info:asciidoc:bashscript

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
info:asciidoc:bashscript [2020/03/14 12:14] – créée radeffinfo: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/asciidoctor/pandoc faits par MaPomme ======
 {{tag>asciidoc pdf epub bash}} {{tag>asciidoc pdf epub bash}}
  
-===== Script de base simple =====+===== 1er exemple: script de base simple =====
 <code bash> <code bash>
 #! /usr/bin/bash #! /usr/bin/bash
Ligne 52: Ligne 52:
 </code> </code>
  
 +===== 2e exemple plus riche =====
 +<code bash>
 +#!/usr/bin/bash
  
 +#make some global cleanings
 +sed -i 's|oe|œ|g' *.adoc
 +#exit
 +livre=radioaktif
 +
 +echo "destroy old versions"
 +rm $livre.html
 +rm $livre.epub
 +rm $livre.odt
 +rm $livre.pdf
 +echo "create html5 " $livre.html
 +#asciidoctor -a toc --attribute stylesheet=asciidoctor.css $livre.adoc
 +#no toc
 +asciidoctor --attribute stylesheet=asciidoctor.css book.adoc
 +cp book.html $livre.html
 +#exit
 +echo "create epub " $livre.epub
 +sed -i 's|<img src="images.*||g' book.html
 +pandoc -s book.html -t epub3 -o $livre.epub
 +rm book.html
 +ebook-convert $livre.html  $livre.2.epub  --pretty-print
 +
 +
 +asciidoctor-epub3 -D ./ book.adoc
 +echo "create pdf " $livre.pdf
 +#pandoc $livre.html --variable=fontfamily:arev --latex-engine=xelatex --toc -o $livre.pdf
 +#pandoc -c print.css $livre.html --variable=fontfamily:arev -f fb2 --latex-engine=xelatex -o $livre.pdf
 +#pandoc -c print.css $livre.html --variable=fontfamily:arev --latex-engine=xelatex -o $livre.pdf
 +#pandoc -s -c print.css -o $livre.pdf $livre.html
 +#ebook-convert $livre.html  $livre.pdf --custom-size 110x118 --pdf-default-font-size 11  --pdf-page-margin-bottom 15 --pdf-page-margin-top 15 --pdf-page-margin-left 15 --pdf-page-margin-right 15  --pdf-page-numbers --pdf-sans-family FreeSans  --pdf-serif-family FreeSerif --pdf-standard-font FreeSerif --pretty-print
 +ebook-convert $livre.html  $livre.pdf  --pretty-print
 +
 +echo "create odt " $livre.odt
 +#pandoc  --reference-docx=reference.odt --base-header-level=3 -V date:"" -V title:"" -f html $livre.html -o $livre.odt
 +pandoc  -c asciidoctor.css -f html $livre.html -o $livre.odt
 +
 +#asciidoctor --attribute stylesheet=asciidoctor.css preprint.adoc
 +#pandoc  preprint.html --reference-odt=/home/radeff/ebooks/polars/Radeff_Fred_polars/modele_publication_moinsdecent.net.ott -o preprint.odt
 +</code>
 +
 +===== 3e exemple, printable PDF =====
 +<code bash>
 +#!/usr/bin/bash
 +echo "créé version A4 imprimable avec essai de césure: book.pdf"
 +asciidoctor -r asciidoctor-pdf -b pdf -a pdf-themesdir=resources/themes -a pdf-theme=moinsdecentA4.yml -a pdf-fontsdir=resources/fonts -a reference-location=block -a scripts=cjk book.adoc --trace
 +#exit
 +echo "créé version poche imprimable: bookprint.pdf"
 +asciidoctor -r asciidoctor-pdf -b pdf -a pdf-themesdir=resources/themes -a pdf-theme=moinsdecent.yml -a pdf-fontsdir=resources/fonts -a reference-location=block -a scripts=cjk bookprint.adoc --trace
 +
 +zathura bookprint.pdf book.pdf&
 +</code>
  • info/asciidoc/bashscript.1584184474.txt.gz
  • Dernière modification : 2020/03/14 12:14
  • de radeff