Skip to main content

Publish Obsidian Markdown notes to Confluence over Kerberos

Project description

obsidian-publish-confluence

Publish Obsidian-flavored Markdown to Confluence over Kerberos.

Versioning is derived from Git tags for releases.

Features

  • Create or update Confluence pages from Markdown.
  • Track markdown -> page_id mappings locally.
  • Upload attachments on both page create and update.
  • Convert Obsidian image embeds like ![[image.png]] and ![[image.png|400]].
  • Convert fenced code blocks to Confluence code macros.
  • Convert PlantUML blocks to attachments when a PlantUML server is configured.
  • Leave plantuml / puml blocks as normal code blocks when no PlantUML server is configured.

Requirements

  • Python 3.10+
  • curl
  • kinit and klist
  • A Confluence instance that accepts Kerberos auth via curl --negotiate

Installation

pip install obsidian-publish-confluence

For local development:

python -m pip install -e .

Configuration

Set these environment variables:

  • OBSIDIAN_PUBLISH_CONFLUENCE_BASE_URL
  • OBSIDIAN_PUBLISH_CONFLUENCE_SPACE
  • OBSIDIAN_PUBLISH_CONFLUENCE_PARENT_ID
  • OBSIDIAN_PUBLISH_CONFLUENCE_MAPPING_FILE (optional)
  • OBSIDIAN_PUBLISH_CONFLUENCE_PLANTUML_SERVER (optional)

Defaults:

  • OBSIDIAN_PUBLISH_CONFLUENCE_MAPPING_FILE defaults to ~/.config/obsidian-publish-confluence/mapping.json
  • OBSIDIAN_PUBLISH_CONFLUENCE_PLANTUML_SERVER is disabled unless set

Usage

export OBSIDIAN_PUBLISH_CONFLUENCE_BASE_URL="https://confluence.example.com"
export OBSIDIAN_PUBLISH_CONFLUENCE_SPACE="DOCS"
export OBSIDIAN_PUBLISH_CONFLUENCE_PARENT_ID="123456"

obsidian-publish-confluence note.md
obsidian-publish-confluence note.md --title "Custom title"
obsidian-publish-confluence note.md --space DEV --parent-id 987654
obsidian-publish-confluence --check

Kerberos

The CLI expects a valid Kerberos ticket:

kinit YOUR_LOGIN@REALM.EXAMPLE

PlantUML

To enable PlantUML rendering, set:

export OBSIDIAN_PUBLISH_CONFLUENCE_PLANTUML_SERVER="http://localhost:9090"

Without this variable, PlantUML blocks stay regular code blocks.

Release versioning

The package version comes from the Git tag used for the release. For PyPI releases, create a tag like v0.1.0 before publishing a GitHub Release.

Limitations

  • Only image-style Obsidian embeds are converted to Confluence attachments.
  • Non-image wiki links stay plain text.
  • PDF embeds are not converted.
  • Auth mode is Kerberos-only.
  • If a note is not already tracked in the mapping file, a new Confluence page is created instead of matching an existing page by title.

Publishing

This repository includes GitHub Actions for:

  • building distributions on push and pull request
  • publishing to PyPI on GitHub Release published

PyPI publishing is configured for Trusted Publishing.

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

obsidian_publish_confluence-0.1.0.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

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

obsidian_publish_confluence-0.1.0-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file obsidian_publish_confluence-0.1.0.tar.gz.

File metadata

File hashes

Hashes for obsidian_publish_confluence-0.1.0.tar.gz
Algorithm Hash digest
SHA256 80fbfefae4f0f6995b15008322f1fc3a8f41fd7aabbfc33ebdd5af420216fc90
MD5 b917b07fe2c7ce48562772308395199c
BLAKE2b-256 4912413cc208eed459241591e8b0c1824326b33e85c31d8faebdd8271f2d324d

See more details on using hashes here.

Provenance

The following attestation bundles were made for obsidian_publish_confluence-0.1.0.tar.gz:

Publisher: publish.yml on kotborealis/obsidian-publish-confluence

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file obsidian_publish_confluence-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for obsidian_publish_confluence-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5c7ef8daad6a68f6e35c3cf00fd914acf5dcd74df46fd115a50f55d792af48df
MD5 88a37bc8fe1a9eb19003bcb190c50b1c
BLAKE2b-256 f1809128c7ab1294df3c3c1f804c40353220f308669d53607485960a18617504

See more details on using hashes here.

Provenance

The following attestation bundles were made for obsidian_publish_confluence-0.1.0-py3-none-any.whl:

Publisher: publish.yml on kotborealis/obsidian-publish-confluence

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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