Batch export Confluence pages to AI-ready Markdown/XML formats with gitignore-style filtering.
Project description
docpack_confluence
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file docpack_confluence-0.1.1.tar.gz.
File metadata
- Download URL: docpack_confluence-0.1.1.tar.gz
- Upload date:
- Size: 26.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0848f2f2e90653116f4e8b2fb37f2385f4ce924923c14dcd07de19ace6ac8d47
|
|
| MD5 |
c9c97373c9021e5e476afd5a66056240
|
|
| BLAKE2b-256 |
80f1b4a5652fe26e1c40dbe2695a08fa6303a4af8d0e4e9595718ba2387fcca2
|
File details
Details for the file docpack_confluence-0.1.1-py3-none-any.whl.
File metadata
- Download URL: docpack_confluence-0.1.1-py3-none-any.whl
- Upload date:
- Size: 30.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f1e04d1def473d544dc0b41a174656fd39f11782a8980c6b26eb56c2b410c9f4
|
|
| MD5 |
630498fcd507166e0e1957f41f984281
|
|
| BLAKE2b-256 |
9d2711b38de0bc692fbbda2080a5d2d7cefe9f624aaebe2e3e0062e65a7d43d3
|