File tree Expand file tree Collapse file tree 1 file changed +18
-3
lines changed
Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Original file line number Diff line number Diff line change 9292 if hasproperty (df_in, :l1filename ) df_in = df_in |> @rename (:l1filename => :Filename ) |> DataFrame end
9393 if hasproperty (df_in, :l2filename ) df_in = df_in |> @rename (:l2filename => :Filename ) |> DataFrame end
9494 if hasproperty (df_in, :filename ) df_in = df_in |> @rename (:filename => :Filename ) |> DataFrame end
95- target_datestr = nothing
96- target_date = nothing
95+ m = match (r" (\d {4})\/ (\d {2})\/ (\d {2})\/ " ,manifest_fn)
96+ if isnothing (m) || (length (m. captures) != 3 )
97+ target_datestr = nothing
98+ target_date = nothing
99+ println (" # Empty " , manifest_fn, " and can't figure out date to query. Giving up." )
100+ error (0 )
101+ else
102+ @assert length (m. captures) == 3
103+ year = parse (Int64,m[1 ])
104+ month = parse (Int64,m[2 ])
105+ day = parse (Int64,m[3 ])
106+ @assert 2020 <= year <= 2040
107+ @assert 1 <= month <= 12
108+ @assert 1 <= day <= 31
109+ target_datestr = args[" manifest_or_date" ]
110+ target_date = Date (m[1 ]* m[2 ]* m[3 ],DateFormat (" yyyymmdd" ))
111+ end
97112end
98113
99114using TOML
100115using NeidArchive
101116
102- if size (df_in,1 ) == 0
117+ if ( size (df_in,1 ) == 0 ) && ( ! isnothing (target_date))
103118 if isnothing (args[" user" ]) || isnothing (args[" password" ])
104119 nexsci_dict = TOML. parsefile (nexsci_login_fn)
105120 user_nexsci = nexsci_dict[" user" ]
You can’t perform that action at this time.
0 commit comments