https://github.com/danishi/backlog-document-exporter
Backlog Document Exporter
https://github.com/danishi/backlog-document-exporter
backlog backlog-api python
Last synced: 10 months ago
JSON representation
Backlog Document Exporter
- Host: GitHub
- URL: https://github.com/danishi/backlog-document-exporter
- Owner: danishi
- License: mit
- Created: 2025-06-13T12:14:53.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-06-16T12:44:42.000Z (12 months ago)
- Last Synced: 2025-07-29T01:54:13.855Z (11 months ago)
- Topics: backlog, backlog-api, python
- Language: Python
- Homepage:
- Size: 32.2 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Backlog Document Exporter
Backlog Document Exporter is a small command line tool for exporting documents from Backlog. The program uses the Backlog Document API (beta) and prints information in Markdown format.
## Configuration
Create a `.env` file based on `.env.example` and set the following values:
```
BACKLOG_SPACE_DOMAIN=your-space.backlog.com
BACKLOG_API_KEY=your-api-key
BACKLOG_PROJECT_KEY=PROJECTKEY
BACKLOG_SSL_VERIFY=true
```
Set `BACKLOG_SSL_VERIFY` to `false` if you need to skip TLS certificate verification.
## Setup
Install dependencies into a virtual environment:
```bash
python3 -m venv .venv
source .venv/bin/activate
pip3 install -r requirements.txt
```
## Usage
```
python3 -m backlog_document_exporter.cli list
python3 -m backlog_document_exporter.cli tree
python3 -m backlog_document_exporter.cli info
python3 -m backlog_document_exporter.cli download [output_dir]
python3 -m backlog_document_exporter.cli export [output_dir]
python3 -m backlog_document_exporter.cli export-md [output_file]
```
If `output_dir` is omitted, files are saved to the current directory.
The `list` command automatically fetches all pages using the required `offset` parameter. Each row in its output also contains a `url` column in the following format:
```
https://BACKLOG_SPACE_DOMAIN/document/BACKLOG_PROJECT_KEY/
```
The `tree` command prints a hierarchical view of the documents and appends the same URL after each document title.
`` is the identifier shown in the list or tree output. All command output other than downloaded files is printed in Markdown.
The `export` command downloads all documents in the current project, recreating the document tree as directories. Each document's metadata and content are saved to `document.md` alongside any attachments.
The `export-md` command writes the document tree followed by each document's title and content to a single Markdown file. If `output_file` is omitted, `documents.md` is created in the current directory.
## Reference
- [Backlog Document API update information](https://backlog.com/ja/blog/backlog-update-document-202506/#API%E3%82%92%E6%8B%A1%E5%85%85%E3%81%97%E3%81%BE%E3%81%97%E3%81%9F)