Skip to main content

ObsiDown

Convert obsidian files into well linked markdowns!

Example use cases

  • Export Obsidian subdirectories while maintaining the links in markdown format
  • Make obsidian math Kramdown-compatible
  • Use obsidian to write for Jekyll web pages.

How to use

Define a configuration file config.yaml. In the repo it is provided one as example. Install the poetry dependencies and then you just need to run poetry run python -m obsidown --config path/to/config.yaml

It's possible to install from pypi index by pip install obsidown. Then you can run it with python -m obsidown

Feedback

This project is a hobby project used to automate some things I use myself. Currently it is a early early project! If you need additional features or report some issues or need help, feel free to open a new issue.

Documentation

The quickest way to check what is the format of the config file is to see the pydantic from config.py. Here I will just outline it briefly.

  • sources defines where to look for the input files.
    • paths: where to look for the md files?
    • images: where to look for the linked images?
  • output defines where to write the exported files.
    • base: defines the base url for links
    • path: defines a subpath for the markdown files
    • images: defines a subpath for the image fiiles
    • filesystem: where to write
  • pipeline: defines the single operations possible on a markdown file.
    • name: the identifier of the operation, you should check dispatch.py for a list of the operations.
    • options: variable options of the single operation.

Configuration Reference

Below is a more complete configuration example that you can adapt to your vault:

sources:
  paths:
    - /path/to/obsidian/notes
  images:
    - /path/to/obsidian/assets
output:
  base: notes
  path: content/notes
  images: images/notes
  images_path: static/images/notes
  filesystem: /var/www/my-site
pipeline:
  - name: remove_after_string
    options:
      string: "# Private Section"
  - name: remove_single_char_lines
    options:
      character: "-"
  - name: update_frontmatter
    options:
      frontmatter:
        ShowToc: true
        TocOpen: false
  - name: link_convert
    options: {}
  - name: write_file
    options: {}

Some useful pipeline operations and their options:

  • remove_after_string: drop content after the first occurrence of string. Set line: true to remove just the matching line portion.
  • remove_single_char_lines: remove lines entirely made of repetitions of a single character (for example Obsidian separators like -----).
  • update_frontmatter: merge or override metadata by passing a frontmatter dictionary.
  • citation_convert: convert citations with bibfile pointing to a Zotero/BibTeX export.
  • link_convert: translate Obsidian [[wikilinks]] into absolute links according to output.base.
  • write_file: persisting step that writes the transformed file in the configured destination.

You can chain as many operations as you need; each one receives the output of the previous step, so ordering matters.

Release files for obsidown 0.2.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for obsidown 0.2.10
File Size Uploaded
obsidown-0.2.10.tar.gz 49.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for obsidown 0.2.10
File Interpreter ABI Platform
obsidown-0.2.10-py3-none-any.whl Python 3 none any Details

Total release size: 78.4 kB

Release files / obsidown-0.2.10.tar.gz

Download URL obsidown-0.2.10.tar.gz
Size 49.8 kB
Tags Source
SHA-256 checksum
How to use checksums
eab9fc56ab6f33ffa9bc37aaf893e50cdb9dbeaec7430ceeb03596e16d3ad793
BLAKE2b-256 checksum
How to use checksums
4c49391febd8d09a4f9a8edd155c73cd67e9db01291cb9ce2a9c32cd54294c54
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.5

Release files / obsidown-0.2.10-py3-none-any.whl

Download URL obsidown-0.2.10-py3-none-any.whl
Size 28.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
187c9febee1c5a7deb09c943621c95976001981b5cdd8d45a732796ed6312597
BLAKE2b-256 checksum
How to use checksums
44fbd7dedb768ae43c8e3bb897022fe1b984d15b48af7b06f6d1f2331d38cf2b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.5

Release history Release notifications | RSS feed

This release

0.2.10 This release

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page