Skip to content

add inter_osw_copy_with_images_attachments.py - #211

Open
MatPoppFHG wants to merge 1 commit into
mainfrom
copy_with_images_attachments
Open

MatPoppFHG wants to merge 1 commit into
mainfrom
copy_with_images_attachments

Conversation

@MatPoppFHG

Copy link
Copy Markdown
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

@github-actions

Copy link
Copy Markdown
Contributor

Release preview

No version bump from the current commits (stays at v2.8.1). Use conventional commit types (feat, fix, ...) to trigger a release.

Changelog preview (truncated)

Preview via python-semantic-release and conventional commits.

This branch has not been deployed

No deployments
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.

1 participant