Skip to main content

Python-Markdown extension for parsing Iron Vault journals

Project description

ironvaultmd - Iron Vault Markdown Parser

Quality Gate Status Coverage Security Hotspots Reliability Issues Maintainability Issues Security Issues

A Python-Markdown (GitHub) extension to parse Markdown files from the Iron Vault (GitHub) Obsidian plugin.

The main idea for this extension is to convert Iron Vault markdown journals into HTML sites for publishing.

Features

Supports at this point

  • parsing ```iron-vault-mechanics ``` blocks (see below for details)
  • collecting frontmatter YAML information into a dictionary
  • regular and labeled wiki-style links, i.e. [[link]] and [[link|label]] (see also below for details)

Supported mechanics block content

Disclaimer: This extension came into existence for my own purposes, to eventually publish my campaigns.

After old-school pen and paper, and a bunch of other experiments, I eventually gave Iron Vault a try for my most recent campaign - and I haven't looked back. However, this only happened in December 2024, so somewhere around Iron Vault version 1.88.1, and only with a Starforged campaign. Currently, neither journals created with an older version, nor OG Ironsworn, Delve, or Sundered Isles campaigns are supported, and results may be disappointing.

Mechanics nodes

Currently supported nodes within a mechanics block: add, burn, clock, meter, move, out-of-character comments, oracle (note, only single oracle nodes, no oracle groups), position, progress, progress-roll, reroll, roll, track

Links

Links are currently detected but only packed in a <span class="ivm-link"> element. No actual linking is performed yet.

Installation

pip install ironvaultmd

This will install the required dependencies, markdown and pyyaml, as well.

Usage

Quick usage to convert an Iron Vault journal Markdown file to HTML and print it to the terminal:

import markdown
from ironvaultmd import IronVaultExtension

md = markdown.Markdown(extensions=[IronVaultExtension()])

with open("/path/to/ironvault/Journals/JournalEntry.md", "r", encoding="utf-8") as file:
    print(md.convert(file.read()))

Check also the ironparser.py example file for a more complete example to write a given journal Markdown file as HTML file.

Developing

See DEVELOPING.md for details on how to set up development environments etc.

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

ironvaultmd-0.1.1.tar.gz (12.4 kB view details)

Uploaded Source

Built Distribution

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

ironvaultmd-0.1.1-py3-none-any.whl (14.4 kB view details)

Uploaded Python 3

File details

Details for the file ironvaultmd-0.1.1.tar.gz.

File metadata

  • Download URL: ironvaultmd-0.1.1.tar.gz
  • Upload date:
  • Size: 12.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for ironvaultmd-0.1.1.tar.gz
Algorithm Hash digest
SHA256 991cf8f1d1f7d91a9c6d487eb4b4d1d220d38b7335c285f5e94f0c49475041aa
MD5 dfa17aff5fed6e13179ec81f229b2828
BLAKE2b-256 7fc22abb823dc1824fe447605aed04cfa5c0198efde151ccce405e521563a62b

See more details on using hashes here.

File details

Details for the file ironvaultmd-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: ironvaultmd-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 14.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for ironvaultmd-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fe97a15abf0c08a4d7029939a244e39395ba9b9ea910e9f56206bb90d0d33c80
MD5 a91402eaf83fe6375e92ab4e06d9aefe
BLAKE2b-256 4f1d06a7bc67597730156b20af6384b70e9eb846bee338f78c8bf5dcecf26b7a

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