Skip to main content

Converts different typed link formats in Markdown into each other and to external formats.

Project description

Semantic Markdown converter

Converts different typed link formats in Markdown into each other and to external formats. Designed for visualizing obsidian.md vaults using Neo4j bloom.

Getting started

Requires python 3.5+.

  • Install with pip install semantic-markdown-converter
  • Run smdc --input "folder with notes"

Supported input formats

There is currently only one input format supported. An issue or use a pull request for different formats are appreciated! In particular for different markdown syntax for interpreting semantic links.

Plain markdown with a rudimentary typed links format.

This collects all notes with extension .md in the input directory (default: markdown/). Each note is interpreted as follows:

  • Interprets tags as entity types
  • Interprets YAML frontmatter as entity properties
  • Interprets wikilinks as links with type inline, and adds content
  • Lines of the format "- linkType [[note 1]], [[note 2|alias]]" creates links with type linkType from the current note to note 1 and note 2.
  • The name of the note is stored in the property name
  • The content of the note (everything except YAML frontmatter and typed links) is stored in the property content
  • Links to notes that do not exist yet are created without any types.

Supported output formats

Currently, only the propietary Neo4j CYPHER format is supported. This is rather slow. I'll try to do a CSV format soon.

Neo4j CYPHER

Converts the input into a single .cypher file (default: out.cypher) with statements that create nodes and relationships in Neo4j. This can be loaded in Neo4j desktop as follows:

  1. Create a new Database
  2. Manage your database (three dots, Manage)
    1. Plugins -> Install APOC
    2. Settings: Add line apoc.import.file.enabled=true
    3. Open project folder, then copy out.cypher to the import folder within the project folder.
  3. Start database
  4. Open Neo4j browser
    1. Run CALL apoc.cypher.runFile('out.cypher')

Importing with Cypher can take quite a while (multiple minutes). I'll look into alternative methods if people are interested.

Neo4j Bloom

A use case for this converter is to visualize your obsidian.md graph in Neo4j bloom. Neo4j bloom is very powerful graph visualization software Compared to the Obsidian graph view, it allows

  • Coloring and styling notes with different tags
  • Coloring and styling relationships with different types
  • Selective expansion
  • A hierarchical view
  • Very strong querying capabilities

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

semantic-markdown-converter-0.1.4.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

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

semantic_markdown_converter-0.1.4-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

Details for the file semantic-markdown-converter-0.1.4.tar.gz.

File metadata

  • Download URL: semantic-markdown-converter-0.1.4.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.8.5

File hashes

Hashes for semantic-markdown-converter-0.1.4.tar.gz
Algorithm Hash digest
SHA256 f9623f9189d291276f0fb09b51a4a6372048fc0c067561b63ab7770927fbc552
MD5 4e35e86227aa129e0b0ac80fdaf6b05d
BLAKE2b-256 974cc3bd16c10cc0ff2b321e5a8ef64fe99afdc690706b87acc94fad1bdd6cc0

See more details on using hashes here.

File details

Details for the file semantic_markdown_converter-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: semantic_markdown_converter-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 9.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.8.5

File hashes

Hashes for semantic_markdown_converter-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 2c720fd59a6576a02cb66cf6fb0c852ad3b8f7dddc9a5de1591869d886b556ae
MD5 cdacc872bc38e0eb913cd50a8977795b
BLAKE2b-256 57ebd69928ccd14f369116e499e089b16d3c125f705e8659cbee430b1cb96c04

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