Tool scritto in bash per convertire immagini jpg
o documenti pdf
in markdown; viene sfruttato il servizio CLI di MathPix (non open, con un piano gratuito).
Questo tool è stato utilizzato per generare la maggior parte delle pagine di questo sito powered by Material for MkDocs. Leggi qui il caso d'uso.
- Download the bash script
wget "https://raw.githubusercontent.com/dennisangemi/tomkd/main/tomkd"
- Move it to
/usr/local/bin
sudo mv ./tomkd /usr/local/bin
- Make it executable
sudo chmod +x /usr/local/bin/tomkd
Requirements
- imagemagick
- mpx (MathPix CLI)
- pandoc
Signup to MathPix and then login to your MathPix account running
mpx login
-i
for the input file. It can be .jpg
or .pdf
tomkd -i compito.jpg
-o
for the output (it must be .md
)
tomkd -i compito.pdf -o YYYY-MM-DD.md
-t
for the tag
tomkd -i compito.pdf -o YYYY-MM-DD.md -t "Questo è il mio tag"
The output consists of:
- markdown file
- input file moved to a specific folder based on the extension of the file (e.g.
pdf/input.pdf
orimages/input.jpg
) - images included in the input file organized in an
images/
directory.
If you want to build the tool from the repo, downloat this repo and then run
sudo ./build
This is the same of setup but in this way you can use your own modified