pandoc
PANDOC
Le logiciel PANDOC permet de convertir des documents d'un format à un autre.
- Site de PANDOC: https://pandoc.org/index.html
- Installation (infos générales): https://pandoc.org/installing.html
- Installation Ubuntu: installer le paquet pandoc (cf: https://doc.ubuntu-fr.org/pandoc)
Une fois installé, il faut l'utiliser via un terminal de commande.
Convertir avec pandoc un document traitement de texte writer libreoffice .odt en document markdown .md
Préalable important: ne jamais avoir créé de table des matières dans le document odt initial. Sinon, les textes des titres du document .md final risquent de comporter des trucs bizarres !
Procéder en étapes successives : odt → html → md
1. Pour obtenir un document final markdown .md SANS table des matières
# étape 1: convertir le fichier .odt en fichier .hmtl pandoc -s fichier.odt -o fichier.html #étape 2: convertir le fichier .html généré, en fichier .md pandoc -s fichier.html -o fichier.md
2. Pour obtenir une table des matière dans le document final markdown .md
# étape 1: convertir le fichier .odt en fichier .hmtl pandoc -s fichier.odt -o fichier.html #étape 2: convertir le fichier .html généré, en fichier .md, en ajoutant une table des matières pandoc --toc -s fichier.html -o fichier.md
Nota: “toc” signifie “Table Of Content”
pandoc.txt · Dernière modification : 2019/07/16 14:26 de Antoine C.