A simple and leightweight Markdown to PDF converter
A simple and leightweight tool for converting Markdown syntax to a PDF.
The API is responsible for handling requests from the frontend. The tasks are easy, so the API also works as the backend.
The frontend is a simple one-pager written in HTML and JavaScript. It sends and receives stuff to/from the API.
The database stores the PDF files, there is a dump provided that includes a routine to auto-delete files older than 5 days.
- Make sure to have a MySQL-Server and Python3 running.
- Setup a MySQL database. I strongly recommend using the provided dump, the dump provides not only the database structure, but also the auto-deletion routine.
- Setup the API. Therefore install all needed python librarys. The API runs with
gunicorn
, install gunicorn itself and the python library (pip3 install gunicorn
). - Run the API as daemon (e.g. use systemd). You can manually run it via
bash startapi.sh
in the API-folder. - Change the settings in the config.ini according to your needs. The
baseurl
should be the baseurl (url without endpoint; e.g.: http://api.domain.org or http://domain.org/api) from the API, NOT the frontend. - Setup the frontend, it requires HTML and JavaScript. I recommend a Webserver like Apache.
- The frontend uses 127.0.0.1:8080 for calling the API, if your API is elsewhere please adapt that in the index.html file.
Use this API image, setup the frontend with your prefered webserver.
View the GitHub Wiki
This is an issue with the cairo
library on which weasyprint
depends. Make sure to install a newer version (> 1.15 should fix that).