Différences
Ci-dessous, les différences entre deux révisions de la page.
| Prochaine révision | Révision précédente | ||
| info:asciidoc:bashscript [2020/03/14 12:14] – créée radeff | info:asciidoc:bashscript [2020/03/14 12:19] (Version actuelle) – radeff | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| - | ====== Exemples de script fait par mapomme | + | ====== Exemples de scripts bash asciidoc/ |
| {{tag> | {{tag> | ||
| - | ===== Script | + | ===== 1er exemple: script |
| <code bash> | <code bash> | ||
| #! / | #! / | ||
| Ligne 52: | Ligne 52: | ||
| </ | </ | ||
| + | ===== 2e exemple plus riche ===== | ||
| + | <code bash> | ||
| + | # | ||
| + | #make some global cleanings | ||
| + | sed -i ' | ||
| + | #exit | ||
| + | livre=radioaktif | ||
| + | |||
| + | echo " | ||
| + | rm $livre.html | ||
| + | rm $livre.epub | ||
| + | rm $livre.odt | ||
| + | rm $livre.pdf | ||
| + | echo " | ||
| + | # | ||
| + | #no toc | ||
| + | asciidoctor --attribute stylesheet=asciidoctor.css book.adoc | ||
| + | cp book.html $livre.html | ||
| + | #exit | ||
| + | echo " | ||
| + | sed -i ' | ||
| + | pandoc -s book.html -t epub3 -o $livre.epub | ||
| + | rm book.html | ||
| + | ebook-convert $livre.html | ||
| + | |||
| + | |||
| + | asciidoctor-epub3 -D ./ book.adoc | ||
| + | echo " | ||
| + | #pandoc $livre.html --variable=fontfamily: | ||
| + | #pandoc -c print.css $livre.html --variable=fontfamily: | ||
| + | #pandoc -c print.css $livre.html --variable=fontfamily: | ||
| + | #pandoc -s -c print.css -o $livre.pdf $livre.html | ||
| + | # | ||
| + | ebook-convert $livre.html | ||
| + | |||
| + | echo " | ||
| + | # | ||
| + | pandoc | ||
| + | |||
| + | # | ||
| + | # | ||
| + | </ | ||
| + | |||
| + | ===== 3e exemple, printable PDF ===== | ||
| + | <code bash> | ||
| + | # | ||
| + | echo " | ||
| + | asciidoctor -r asciidoctor-pdf -b pdf -a pdf-themesdir=resources/ | ||
| + | #exit | ||
| + | echo " | ||
| + | asciidoctor -r asciidoctor-pdf -b pdf -a pdf-themesdir=resources/ | ||
| + | |||
| + | zathura bookprint.pdf book.pdf& | ||
| + | </ | ||