Skip to main content

Batch export Confluence pages to AI-ready Markdown/XML formats with gitignore-style filtering.

Project description

Documentation Status https://github.com/MacHu-GWU/docpack_confluence-project/actions/workflows/main.yml/badge.svg https://codecov.io/gh/MacHu-GWU/docpack_confluence-project/branch/main/graph/badge.svg https://img.shields.io/pypi/v/docpack-confluence.svg https://img.shields.io/pypi/l/docpack-confluence.svg https://img.shields.io/pypi/pyversions/docpack-confluence.svg https://img.shields.io/badge/✍️_Release_History!--None.svg?style=social&logo=github https://img.shields.io/badge/⭐_Star_me_on_GitHub!--None.svg?style=social&logo=github
https://img.shields.io/badge/Link-API-blue.svg https://img.shields.io/badge/Link-Install-blue.svg https://img.shields.io/badge/Link-GitHub-blue.svg https://img.shields.io/badge/Link-Submit_Issue-blue.svg https://img.shields.io/badge/Link-Request_Feature-blue.svg https://img.shields.io/badge/Link-Download-blue.svg

docpack_confluence

https://docpack-confluence.readthedocs.io/en/latest/_static/docpack_confluence-logo.png

Batch export Confluence pages to AI-ready formats.

docpack_confluence helps you export Confluence documentation to Markdown/XML files optimized for AI knowledge bases. Whether you’re building a RAG pipeline, uploading to ChatGPT/Claude/Gemini, or creating a custom knowledge base, this library handles the heavy lifting.

Why Use This Library?

  • Precise Selection: Use gitignore-style include/exclude patterns to export exactly the pages you need

  • AI-Ready Output: Generates XML-wrapped Markdown with source URLs and metadata

  • All-in-One Export: Merge all pages into a single file for easy drag-and-drop to AI platforms

  • Multi-Space Support: Export from multiple Confluence spaces (even different sites) in one operation

  • Deep Hierarchy Support: Handles Confluence’s API depth limitations automatically

Quick Example

from pathlib import Path
from sanhe_confluence_sdk import Confluence
from docpack_confluence.api import SpaceExportConfig, ExportSpec

# Setup client
client = Confluence(
    url="https://your-domain.atlassian.net",
    username="your-email@example.com",
    password="your-api-token",  # From https://id.atlassian.com/manage-profile/security/api-tokens
)

# Export with include/exclude patterns
spec = ExportSpec(
    space_configs=[
        SpaceExportConfig(
            client=client,
            space_key="DOCS",
            include=[
                "https://your-domain.atlassian.net/wiki/spaces/DOCS/pages/123/User-Guide/**",
            ],
            exclude=[
                "https://your-domain.atlassian.net/wiki/spaces/DOCS/pages/456/Internal/**",
            ],
        ),
    ],
    dir_out=Path("./export"),
)
spec.export()

# Output:
# ./export/
#   space_key_DOCS/
#     User Guide ~ Getting Started.xml
#     User Guide ~ Configuration.xml
#     ...
#   all_in_one_knowledge_base.txt  <- Ready for AI platforms!

Pattern Syntax:

  • /** - Include page and all descendants

  • /* - Include descendants only (not the page itself)

  • No suffix - Include only the specific page

Install

$ pip install docpack-confluence

For full documentation, visit docpack-confluence.readthedocs.io.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

docpack_confluence-0.1.2.tar.gz (26.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

docpack_confluence-0.1.2-py3-none-any.whl (30.3 kB view details)

Uploaded Python 3

File details

Details for the file docpack_confluence-0.1.2.tar.gz.

File metadata

  • Download URL: docpack_confluence-0.1.2.tar.gz
  • Upload date:
  • Size: 26.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.8

File hashes

Hashes for docpack_confluence-0.1.2.tar.gz
Algorithm Hash digest
SHA256 afa25791a416b1ca5c094d47723eeff708871c5a6e277d1a113c02f3ba002467
MD5 a34512a2e79f648608dcca298dbe1905
BLAKE2b-256 65aeb54f62914ae0966d41cac8c885b61612ad1fad7f806bb6aa3ea7a5a4b850

See more details on using hashes here.

File details

Details for the file docpack_confluence-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for docpack_confluence-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 27a5f04f542df4932518106e0d4769a335f2c3d4635eb6515180a66a80914290
MD5 57e84ba5300b7bab8e839be8b82bfb82
BLAKE2b-256 410534ae145eb85e5ed500d0b290c121ddbae45b700e1e59de14622317ccbe4e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page