- C 33.7%
- HTML 32.7%
- CSS 17.3%
- Shell 16.3%
| html | ||
| markdown | ||
| static/css | ||
| autoconvert.sh | ||
| cmark.c | ||
| converter.c | ||
| LICENSE | ||
| md-html.service | ||
| README.md | ||
markdown-html-converter
A converter for markdown files to html files. Using the cmark library. At the moment the relevant action works via the shell script. The c files are a future project, to rewrite most of the covert process myself.
Requirements
- cmark:
sudo apt install cmark
- inotify-tools:
sudo apt install inotify-tools
Installation
Autoconvert script
To install the script either clone the repository.
git clone https://git.baumsplitter41.eu/BaumSplitter41/markdown-html-converter.git
cd markdown-html-converter
Edit the paths of WATCH_DIR and HTML_DIR in the autoconvert.sh if needed.
Note: if you want that folder cleaner, you cant delete the cmark.c and converter.c files. There not relevant at the current point of time.
Systemd
Edit the md-html.service:
- set the executing user:
User=username - set the path, where your
autoconvert.shfile is:ExecStart=/bin/bash /path/to/autoconvert.sh
Drop the file into /etc/systemd/system/ and give it to the root user sudo chown root:root /etc/systemd/system/md-html.service
Start and enable the service: systemctl enable md-html.service --now
Check if everything is working: systemctl status md-html.service
Now you can drop markdown files into the configured folder and they will be converted into a html file and placed into the configured html folder.