add inter_osw_copy_with_images_attachments.py - #211
Open
MatPoppFHG wants to merge 1 commit into
Open
MatPoppFHG wants to merge 1 commit into
MatPoppFHG wants to merge 1 commit into
Conversation
MatPoppFHG
commented
Sep 25, 2026
Contributor
- Add inter_osw_copy_with_images_attachments.py: a two-phase script for copying OSW pages between instances with optional dependency resolution
- Phase 1 (collect_pages): fetches primary pages and optionally resolves File (images/attachments), Category (recursive hierarchy), and Property dependencies, dumping everything into a local page package for inspection
- Phase 2 (push_pages): reads the local package and uploads to the target in dependency order (Properties → Categories → Files → Primary pages)
- Includes workarounds for three library-level issues:
- WtPage.dump() binary download returns HTML instead of binary data → re-downloads via OswExpress.download_file()
- OswExpress.upload_file() creates a fresh UUID that mismatches the page title → uses mw_site.upload() for binary-only upload, slot content written separately via page.edit()
- WtSite.read_page_package() skips the main slot content → manually loads it from packages.json urlPath
- Renames file_upload_download.py → file_controller_upload_download.py
Contributor
Release previewNo version bump from the current commits (stays at Changelog preview (truncated)Preview via python-semantic-release and conventional commits. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.