2.2 KiB
2.2 KiB
Joplin Metadata to Zola Metadata Converter
This is a very rudimentary script that converts an Exported Joplin Markdown + Font Matter file into a Format that the SSG Zola can unnderstand and parse. This sript suporrts converting KaTeX equations and Memaid Diagrams (requires edits to the Zola Theme for KaTeX and Mermaid support).
Requirements
- Python 3 or higher (Tested with Python 3.11.8)
- argparse (pip install argparse)
Ussage:
python jmzm.py [-h] [-i INPUT] [-l LINES] [-t TAGS] [-b BATCH] [-v] [-m MOVE] [-r]
options:
-h, --help show this help message and exit
-i INPUT, --input INPUT
input file to format to md
-l LINES, --lines LINES
number of lines to replace. The defalt Automatically set. (Requires -i or -b)
-t TAGS, --tags TAGS list of tags in form: "[\"Test\", \"123\"]" (Requires -i or -b)
-b BATCH, --batch BATCH
convert all files in the given folder (Requires a Trailing Slash in given Filepath ".../example/")
-v, --version show the installed version
-m MOVE, --move MOVE move the converted files to a diffrent folder (Requires -i or -b)
-r, --remove remove ALL the old Parent Directories in the Filepath given with -i or -b (Requires -m)
Examples:
# Convert a Single file
python jmzm.py -i path/to/file.md
# Convert a Batch of files in a Folder
python jmzm.py -b path/to/batch/folder/
# Convert a Single File, Move it to a Given Path and Remove the Original folder
python jmzm.py -r -i path/to/file.md -m /path/to/new/Folder
# Convert a Batch of Files, Move them to a Given Path and Remove the Original folder
python jmzm.py -r -b path/to/batch/folder/ -m /path/to/new/Folder
WIP / TODO:
Automatically sort converted files into thier own subfoldersplace any associated assats into the subfolders with the Markdown filesPharse KaTeX expressions to guantee intercompatibillity between Joplin and ZolaIntegrade Mermaid support into my Zola HTML TemplatePharse Mermaid Diagram to a Zola compatible format (HTML)- Auto Detect changes to a Folder, convert any incoming files and output them to the Zola Posts directory