A pandoc filter to execute and collect the results of SQL queries.
If runsql.py is in the same folder:
pandoc --filter ./runsql.py test.md -o test.pdfIf runsql.py is installed to a directory in $PATH:
pandoc --filter runsql.py test.md -o test.pdfThe filter fetches it's configuration from the environment through:
MYSQL_HOST: Hostname to the SQL server (defaultlocalhost)MYSQL_USER: Username of the SQL user (defaultroot)MYSQL_PASSWORD: Password of the SQL user (defaultsecret)MYSQL_DATABASE: Database to perform queries to (defaulttrlog)
See test.md and the generated test.pdf files for an example.