Skip to content

Conversation

@SomeSunlight
Copy link

This PR introduces a major refactoring to support Confluence Data Center in addition to Cloud, while adding significant features for offline usage and architecture reviews.

Key Changes

  • Data Center Support: Implemented Bearer Token authentication, context paths, and robust VPN/SSO handling hints.
  • Visual Fidelity: Switched API retrieval from storage to export_view to correctly render macros, emoticons, and layouts.
  • Offline Navigation: Injects a static, collapsible, and resizable sidebar into every HTML page for full offline navigation.
  • Architecture Sandbox: Added tools (create_editor.py and patch_sidebar.py) to visually restructure the exported documentation offline via Drag & Drop without affecting Confluence.
  • Performance: Added multithreading support (--threads) for faster downloads.
  • Configuration: Externalized platform-specific API paths to confluence_products.ini for better maintainability.

⚠️ Important Note on Cloud Testing

I have developed and tested these changes on a Confluence Data Center instance.

I have carefully migrated the existing Cloud logic into the new confluence_products.ini structure and myModules.py, ensuring the logic remains sound. However, I do not have access to a Confluence Cloud instance to verify the refactored authentication flow personally.

Could you please verify if the Cloud profile in confluence_products.ini works as expected before merging?

I hope it has for you value too!

u239230 added 4 commits December 2, 2025 13:57
…ation

Major refactoring to support Confluence Data Center and improve export quality.

Key Changes:
- **Platform Support:** Added support for Confluence Data Center using Personal Access Tokens (PAT), including VPN/Intranet connectivity checks and specific error messages.
- **Visual Fidelity:** Switched API retrieval from `storage` to `export_view` format to correctly render macros, emoticons, and layouts.
- **Offline Capability:** Integrated `BeautifulSoup` to parse HTML, download embedded images/attachments, and rewrite internal links to relative local paths.
- **Styling:** Implemented a two-layer CSS strategy (Standard + Custom) and automatic CSS discovery.
- **Navigation:** Added automatic generation of a global `index.html` for easier navigation of the exported structure.
- **UX:** Added `tqdm` for progress tracking and improved output directory management (timestamped folders).
- **Configuration:** Externalized platform-specific API paths to `confluence_products.ini`.

Fixes authentication issues and ensures robust handling of pages that cannot be downloaded.
Implements the offline restructuring workflow for the index of all pages and finalizes the UI/UX.

Key Changes:
- **Index Sandbox:** Introduced `create_editor.py` and `patch_sidebar.py`. This tooling replaces direct Markdown editing (which caused performance issues in IDEs) with a lightweight, zero-dependency HTML Drag & Drop editor for restructuring the export.
- **Navigation & UI:**
    - Implemented a fully hierarchical sidebar with proper indentation.
    - Added a robust JavaScript resizer for the sidebar; width is persisted via localStorage.
    - Fixed hamburger menu positioning and layout margins/paddings.
    - Resolved issue with duplicate entries in the index.
- **Metadata:** Added automatic injection of Page Title, Author, and Modification Date to the top of the HTML body for every page.
- **Versioning:** Output directory generation now includes timestamps (e.g., `YYYY-MM-DD HHMM [Title]`) to support clean history management.
- **Fixes:** Addressed various edge cases in tree generation and CSS layouting.
- Added \n in downloaded HTML to enhance readbility
- added help messages to command line parameters
- "last changed by" now in English instead of german. Would need localization, but out of scope now.
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