Skip to content

add mode option -WS for action SW#73

Merged
zaihuaji merged 1 commit into
mainfrom
Hua-work-dsarch
May 6, 2026
Merged

add mode option -WS for action SW#73
zaihuaji merged 1 commit into
mainfrom
Hua-work-dsarch

Conversation

@zaihuaji
Copy link
Copy Markdown
Collaborator

@zaihuaji zaihuaji commented May 6, 2026

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new -WS / -WithFileSize mode option intended to refresh (recheck) web-file size/timestamp metadata in the database, primarily for the -SW (SetWebFile) action.

Changes:

  • Register new mode option WS (WithFileSize) in the option table.
  • Update set_one_webfile() to refresh file metadata when -WS is provided.
  • Update usage documentation and bump package version to 2.0.16.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
src/rda_python_dsarch/pg_arch.py Adds WS to the option registry so it can be parsed/recognized.
src/rda_python_dsarch/dsarch.usg Documents the new -WS/-WithFileSize option and its intended usage with -SW.
src/rda_python_dsarch/dsarch.py Enables metadata refresh for existing web-file records when -WS is present.
pyproject.toml Version bump to 2.0.16.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

in the output.

-WS or -WithFileSize, rechecks Web file sizes and timestamps for
provided web files with -WF (-WebFile), and updates them into GDEXDB
-(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
Comment on lines +2648 to 2651
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),
@zaihuaji zaihuaji merged commit a21c25b into main May 6, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants