Metadata-Version: 2.2
Name: confluence-markdown-exporter
Version: 1.0.0
Summary: A tool to export Confluence pages to Markdown
Author: Sebastian Penhouet
License: MIT
Project-URL: Homepage, https://github.com/Spenhouet/confluence-markdown-exporter
Project-URL: Documentation, https://github.com/Spenhouet/confluence-markdown-exporter/blob/main/README.md
Project-URL: Source, https://github.com/Spenhouet/confluence-markdown-exporter
Project-URL: Tracker, https://github.com/Spenhouet/confluence-markdown-exporter/issues
Keywords: confluence,atlassian,markdown,export,convertion,download
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: atlassian-python-api
Requires-Dist: markdownify
Requires-Dist: pandas
Requires-Dist: pydantic-settings
Requires-Dist: pyyaml
Requires-Dist: tabulate
Requires-Dist: tqdm
Requires-Dist: typer
Provides-Extra: dev
Requires-Dist: ruff==0.9.10; extra == "dev"

# confluence-markdown-exporter

The confluence-markdown-exporter is a tool designed to convert Confluence pages into Markdown format. This exporter helps in migrating content from Confluence to platforms that support Markdown, ensuring that the content retains its structure and formatting.

## Features

- Converts Confluence pages to Markdown format.
- Uses the Atlassian API to export individual pages, pages including children, and whole spaces.
- Supports various Confluence elements such as headings, paragraphs, lists, tables, and more.
- Retains formatting such as bold, italic, and underline.
- Converts Confluence macros to equivalent Markdown syntax where possible.
- Handles images and attachments by linking them appropriately in the Markdown output.
- Supports extended Markdown features like tasks, alerts, and front matter.

## Supported Markdown Elements

- **Headings**: Converts Confluence headings to Markdown headings.
- **Paragraphs**: Converts Confluence paragraphs to Markdown paragraphs.
- **Lists**: Supports both ordered and unordered lists.
- **Tables**: Converts Confluence tables to Markdown tables.
- **Formatting**: Supports bold, italic, and underline text.
- **Links**: Converts Confluence links to Markdown links.
- **Images**: Converts Confluence images to Markdown images with appropriate links.
- **Code Blocks**: Converts Confluence code blocks to Markdown code blocks.
- **Tasks**: Converts Confluence tasks to Markdown task lists.
- **Alerts**: Converts Confluence info panels to Markdown alert blocks.
- **Front Matter**: Adds front matter to the Markdown files for metadata like page properties and page labels.

## Usage

To use the confluence-markdown-exporter, follow these steps:

1. **Installation**: Clone the repository and install the necessary dependencies.

   ```sh
   git clone https://github.com/yourusername/confluence-markdown-exporter.git
   cd confluence-markdown-exporter
   pip install -r requirements.txt
   ```

2. **Configuration**: Configure the exporter by copying the `.env.template` file to `.env` and filling in your Confluence instance details and authentication.

   ```sh
   cp .env.template .env
   ```

   Edit the `.env` file to include your Confluence details:

   ```env
   USERNAME=your-username
   PASSWORD=your-api-token
   URL=https://your-confluence-instance.atlassian.net
   ```

3. **Exporting**: Run the exporter with the desired Confluence page ID.

   ```sh
   python confluence_markdown_exporter/main.py page 123456 ./output_path/
   ```

4. **Output**: The exported Markdown file will be saved in the `output` directory.
   ```sh
   output_path/
   └── space-abcdef
        └── page-123456.md
   ```

## Contributing

If you would like to contribute, please read [our contribution guideline](CONTRIBUTING.md).

## License

This tool is an open source project released under the [MIT License](LICENSE).
