diff --git a/pyproject.toml b/pyproject.toml index c640ec0..823e188 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "rda_python_dsarch" -version = "2.0.15" +version = "2.0.16" authors = [ { name="Zaihua Ji", email="zji@ucar.edu" }, ] diff --git a/src/rda_python_dsarch/dsarch.py b/src/rda_python_dsarch/dsarch.py index 8055d2c..eeed2e4 100644 --- a/src/rda_python_dsarch/dsarch.py +++ b/src/rda_python_dsarch/dsarch.py @@ -2645,7 +2645,7 @@ def set_one_webfile(self, i, pgrec, file, flds, type, info=None, ndsid=None, sac if 'RO' in self.params and 'DO' in self.params: self.params['DO'][i] = self.get_next_disp_order(dsid, gindex) record = self.build_record(flds, pgrec, tname, i) - if pgrec and (pgrec['status'] == 'D' or self.PGOPT['ACTS']&self.OPTS['AW'][0]): + if pgrec and (pgrec['status'] == 'D' or 'WS' in self.params or self.PGOPT['ACTS']&self.OPTS['AW'][0]): record['uid'] = self.PGOPT['UID'] if not (info and info['date_modified']): info = self.check_local_file(self.get_web_path(i, file, 1, type), diff --git a/src/rda_python_dsarch/dsarch.usg b/src/rda_python_dsarch/dsarch.usg index ca35c84..b800d3f 100644 --- a/src/rda_python_dsarch/dsarch.usg +++ b/src/rda_python_dsarch/dsarch.usg @@ -866,6 +866,8 @@ d260001-G2: DS-552780725 DC-522 WC-522 SS-465789806 SC-51 processing, used with -GX (-GatherXML) -(SC|SetChecksum) - computes MD5 checksums for files on the GDEX Server and saves them to GDEXDB + -(WS|WithFileSize) - gathers file size information for Web files on the GDEX + Server and saves them to GDEXDB Web file names must be provided via -WF (-WebFile) unless -ON (-OrderNames) is used to reorder files. The number of values supplied @@ -1878,6 +1880,10 @@ behavior. (-GetDataset), the counts are calculated on the fly and included in the output. + -WS or -WithFileSize, rechecks Web file sizes and timestamps for + provided web files with -WF (-WebFile), and updates them into GDEXDB + This Mode option works with action -SW (SetWebFile) only. + -XC or -CrossCopy, used with -AW or -AS to fill gaps in storage: copies files from Glade disk to bOreas (or vice versa) wherever copies are missing. diff --git a/src/rda_python_dsarch/pg_arch.py b/src/rda_python_dsarch/pg_arch.py index 7fec63d..ac4f2ea 100644 --- a/src/rda_python_dsarch/pg_arch.py +++ b/src/rda_python_dsarch/pg_arch.py @@ -126,6 +126,7 @@ def __init__(self): 'WC' : [0, 'WithChecksum', 0], 'WM' : [0, 'WithMetadata', 3], 'WN' : [0, 'WithFileNumber',3], + 'WS' : [0, 'WithFileSize', 3], 'XC' : [0, 'CrossCopy', 1], 'XM' : [0, 'CrossMove', 1], 'ZD' : [0, 'ZipData', 3],