Skip to main content

Upload Markdown documents to Backlog Wiki with image and MermaidJS support

Project description

Gospelo Backlog Docs

Overview

Upload Markdown documents to Backlog Wiki with image and MermaidJS support.

The Story Behind

One day in a development team's Slack channel:

Engineer: "Where can I find the specs for this function?" Client: "In the head of Tanaka-san, who left the company last month."

The engineer looked up to the heavens and cried out:

"Dear God, save me from this documentation-less hell!"

At that moment, there seemed to be a divine revelation:

(Make it yourself.)

"...Fine. I'll build it. Automatically."

And thus, Gospelo was born.

A documentation tool for engineers that delivers "words of salvation" to the documentation wasteland and helps the "specs are in my head" guy finally find peace.

The name "gospel" + "pelo" came from a late-night coding session where the developer thought "I felt like God told me to make it myself, so I did (・ω<)☆". Issues about naming sense are not accepted.

"Gospel" means "good news" or "words of salvation" in Christianity.


What's New in v1.1.0

  • Directory batch processing - Upload all Markdown files from a directory at once
  • Progress display - Animated spinner with percentage and progress bar
  • New options: --no-recursive, --pattern, --exclude, --continue-on-error

See Changelog for full details.


Features

  • Upload Markdown files to Backlog Wiki
  • Batch upload from directories with recursive search
  • Automatic image upload and link conversion
  • MermaidJS diagram conversion to PNG (requires mermaid-cli)
  • Extract wiki page name from H1 title
  • Support for hierarchical wiki page names (e.g., Parent/Child/Page)
  • Flexible credential management (CLI args, environment variables, .env files)
  • Progress display with spinner and percentage

Installation

pip install gospelo-backlog-docs

Optional: MermaidJS Support

To enable MermaidJS diagram conversion, install mermaid-cli:

npm install -g @mermaid-js/mermaid-cli

Quick Start

1. Set up credentials

Create a .env file or set environment variables:

# .env
BACKLOG_SPACE_ID=your-space-id
BACKLOG_API_KEY=your-api-key
BACKLOG_DOMAIN=backlog.jp  # or backlog.com

Or use the global config directory:

mkdir -p ~/.config/gospelo-backlog-docs
cp .env.example ~/.config/gospelo-backlog-docs/.env
# Edit the file with your credentials

2. Upload Markdown files

# Single file
gospelo-backlog-docs document.md --project PROJECT_KEY

# All files in a directory (recursive)
gospelo-backlog-docs docs/ --project PROJECT_KEY

Usage

gospelo-backlog-docs <path> --project <PROJECT_KEY> [options]

Arguments

Argument Description
path Path to Markdown file or directory
--project, -p Backlog project key (required)
--wiki-name, -n Wiki page name (only for single file)
--space-id, -s Backlog space ID
--api-key, -k Backlog API key
--domain, -d Backlog domain (default: backlog.jp)
--env-file, -e Path to .env file
--dry-run Parse only, do not upload
--no-recursive Do not search subdirectories
--pattern File pattern to match (default: *.md)
--exclude Patterns to exclude (can be specified multiple times)
--continue-on-error Continue uploading remaining files even if one fails
--version, -v Show version

Examples

# Upload a single file
gospelo-backlog-docs docs/design.md --project MYPROJECT

# Specify wiki page name (single file only)
gospelo-backlog-docs docs/design.md --project MYPROJECT --wiki-name "Design/UI Spec"

# Upload all Markdown files in a directory (recursive)
gospelo-backlog-docs docs/ --project MYPROJECT

# Upload only top-level files (no subdirectories)
gospelo-backlog-docs docs/ --project MYPROJECT --no-recursive

# Upload only spec files
gospelo-backlog-docs docs/ --project MYPROJECT --pattern "*_spec.md"

# Exclude README and draft files
gospelo-backlog-docs docs/ --project MYPROJECT --exclude "README.md" --exclude "*_draft.md"

# Continue uploading even if some files fail
gospelo-backlog-docs docs/ --project MYPROJECT --continue-on-error

# Dry run (parse without uploading)
gospelo-backlog-docs docs/design.md --project MYPROJECT --dry-run

# Use specific .env file
gospelo-backlog-docs docs/design.md --project MYPROJECT --env-file .env.production

Credential Priority

Credentials are resolved in the following order (highest priority first):

  1. CLI arguments (--space-id, --api-key, --domain)
  2. Environment variables (BACKLOG_SPACE_ID, BACKLOG_API_KEY, BACKLOG_DOMAIN)
  3. Specified .env file (--env-file)
  4. Local .env file (current directory)
  5. Global config ~/.config/gospelo-backlog-docs/.env

Markdown Features

Images

Local images are automatically uploaded:

![Screenshot](./images/screenshot.png)

External URLs are preserved as-is:

![Logo](https://example.com/logo.png)

MermaidJS Diagrams

MermaidJS code blocks are converted to PNG images (requires mermaid-cli):

```mermaid
graph TD
    A[Start] --> B[Process]
    B --> C[End]
```

Wiki Page Name

The wiki page name is determined by:

  1. --wiki-name argument (if specified)
  2. First H1 title in the Markdown file
  3. Filename (without extension)

Hierarchical names are supported:

# Parent/Child/Page Name

Requirements

  • Python 3.10+
  • requests
  • python-dotenv
  • mermaid-cli (optional, for MermaidJS support)

Documentation

License

MIT License - see LICENSE for details.

Third-Party Licenses

See THIRD_PARTY_LICENSES.md for dependency licenses.

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

gospelo_backlog_docs-1.1.0.tar.gz (31.4 kB view details)

Uploaded Source

Built Distribution

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

gospelo_backlog_docs-1.1.0-py3-none-any.whl (21.2 kB view details)

Uploaded Python 3

File details

Details for the file gospelo_backlog_docs-1.1.0.tar.gz.

File metadata

  • Download URL: gospelo_backlog_docs-1.1.0.tar.gz
  • Upload date:
  • Size: 31.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for gospelo_backlog_docs-1.1.0.tar.gz
Algorithm Hash digest
SHA256 9f6fbaf29b24100c098dbafd031a18a4125320df7c2849dc736be5b360cfa674
MD5 e147c9e50eb4d68b88a4762f57cf24e5
BLAKE2b-256 5420e2e7dc0f7d16716cbcaad66d284042c595b1c3338e713f0b46d24815ccc9

See more details on using hashes here.

File details

Details for the file gospelo_backlog_docs-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for gospelo_backlog_docs-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 08ca6af3f955896830c89af88110eecc152bd356e728df63c2b9ce4ee9b4abce
MD5 f7f862b02391d0e3262abe02597d6d0b
BLAKE2b-256 66e21cc6de0eaa0169bb988f20026336db6c7b17fee0c8a640b923068a520a7e

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