Skip to main content

CLI utility for publishing markdown files to Outline wiki

Project description

GetOutline CLI

getoutline-cli is an unofficial command-line interface for publishing markdown files to Outline. The primary goal of this project is to automate the process of publishing markdown files to Outline in CI/CD pipelines.

It allows to publish CHANGELOG.md, README.md, or any other markdown file to an Outline wiki.

The list of files to publish is defined in the configuration file .outline-cli.yml. Alternatively, you can specify configuration file using --config option.

Installation and usage

pip install getoutline-cli

To publish markdown files to Outline, run the following command:

getoutline-cli

To specify the configuration file, use the --config option:

getoutline-cli --config some_config.yml

To preview the changes without publishing, use the --preview option:

getoutline-cli --preview

Environment Variables

  • OUTLINE_API_TOKEN - Outline API token (required if not specified in the configuration file)
  • OUTLINE_URL - Outline URL (e.g., https://wiki.example.com) (required if not specified in the configuration file)

Configuration file

The configuration file is a YAML file containing the following fields:

  • token - Outline API token (required if not specified in the environment variables)
  • url - Outline URL (e.g., https://wiki.example.com) (required if not specified in the environment variables)
  • files - List of files to publish (required)

The files field is a list of dictionaries with the following fields:

  • path - Name or path to the markdown file (required)
  • id - Outline document ID (required)
  • title - Title of the document in Outline (optional)
  • append - Append content to the existing document (optional, default is False)
  • publish - Publish the document after updating (optional, default is True)
  • substitutions - List of substitutions to apply to the content (optional)

The substitutions field is a list of dictionaries regex: replacement value, applied to the content of the markdown file before publishing.

Example Configuration File

url: https://wiki.example.com
token: YOUR_OUTLINE_API_TOKEN
files:
  - path: CHANGELOG.md
    id: YOUR_ID_1
    substitutions:
      # Remove links to git commits
      - " ?\\(\\[[a-z0-9]+\\]\\(https://git\\.example\\.com/.+\\)\\)": ""
      # Remove commits without JIRA issues (DEV-XXXX)
      - "^\\* (?!.*\\(DEV-\\d+\\)).*$\\n": ""
      # Remove empty sections
      -  "### .+\\n+": ""
  - path: README.md
    id: YOUR_ID_2
    title: README
    append: false
    publish: true

Authors

  • Alexander Pivovarov

License

License under the MIT License.

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

getoutline-cli-0.4.2.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

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

getoutline_cli-0.4.2-py2-none-any.whl (5.4 kB view details)

Uploaded Python 2

File details

Details for the file getoutline-cli-0.4.2.tar.gz.

File metadata

  • Download URL: getoutline-cli-0.4.2.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.0

File hashes

Hashes for getoutline-cli-0.4.2.tar.gz
Algorithm Hash digest
SHA256 9c078fc7f9b6d65e1e43ac02fc1e44d5245591988af500c71473e2026612393d
MD5 ade0760e89169b13fd467e80a2e31393
BLAKE2b-256 5cec6811861d187f1ba94fa0f326a0e8e0fa74007c3fe090cf7465e82c52860e

See more details on using hashes here.

File details

Details for the file getoutline_cli-0.4.2-py2-none-any.whl.

File metadata

  • Download URL: getoutline_cli-0.4.2-py2-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.0

File hashes

Hashes for getoutline_cli-0.4.2-py2-none-any.whl
Algorithm Hash digest
SHA256 f6d9dfd5f5ec1e8f1fb920b0961698c724571b22a7057969d83d200a96ce5733
MD5 bd956972c533b745c82f578fb7657008
BLAKE2b-256 d12d04ef468cb8accafa1b322efd7f67d051a72036b3c36f356269c989c98e87

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