From 7660cdbcbfd1b8139281e2aee996f1bd895bad18 Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Sat, 16 May 2020 19:46:16 +0200 Subject: [PATCH] feat: ajout de la compilation des textes au format pdf/epub MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A l'aide de l'outil crowbook, ajouté d'un moyen de télécharger les textes --- generate.sh | 4 ++++ src/crowbook/common.book | 17 +++++++++++++++++ src/crowbook/generate-text.sh | 9 +++++++++ src/scss/_drawing.scss | 5 +++++ .../source/_posts/contes/elegie-commencement.md | 8 ++++---- .../_posts/contes/lenfant-et-le-dragon.md | 8 ++++---- .../source/_posts/contes/lenfant-qui-marcha.md | 8 ++++---- .../_posts/contes/remedes-mathematicien.md | 8 ++++---- .../themes/blog/layout/_partial/article.ejs | 6 ++++++ 9 files changed, 57 insertions(+), 16 deletions(-) create mode 100644 src/crowbook/common.book create mode 100644 src/crowbook/generate-text.sh diff --git a/generate.sh b/generate.sh index b001141..b553c61 100755 --- a/generate.sh +++ b/generate.sh @@ -13,3 +13,7 @@ cd ../../ echo "STEP 4 - Generation de l'espace littéraire" cd src/textes hexo generate + +echo "STEP 5 - Générations des livres à télécharger" +cd ../crowbook +source generate-text.sh diff --git a/src/crowbook/common.book b/src/crowbook/common.book new file mode 100644 index 0000000..914480a --- /dev/null +++ b/src/crowbook/common.book @@ -0,0 +1,17 @@ +author: Kazhnuz +lang: fr + +epub.version: 3 + +tex.template.add: ' +\makeatletter +\@ifclassloaded{book} + {\usepackage{quotchap}} + {} +\makeatother +' + +tex.links_as_footnotes: false + +proofread.languagetool: true +proofread.grammalecte: true diff --git a/src/crowbook/generate-text.sh b/src/crowbook/generate-text.sh new file mode 100644 index 0000000..6476bec --- /dev/null +++ b/src/crowbook/generate-text.sh @@ -0,0 +1,9 @@ +mkdir ../../dist/download + +crowbook -s "../textes/source/_posts/contes/lenfant-et-le-dragon.md" +crowbook -s "../textes/source/_posts/contes/elegie-commencement.md" +crowbook -s "../textes/source/_posts/contes/remedes-mathematicien.md" +crowbook -s "../textes/source/_posts/contes/lenfant-qui-marcha.md" + +#crowbook -s "src/textes/source/_posts/nouvelles/zoomorphes.md" +#crowbook -s "src/textes/source/_posts/nouvelles/prisonnier.md" diff --git a/src/scss/_drawing.scss b/src/scss/_drawing.scss index ff5a08c..df87107 100644 --- a/src/scss/_drawing.scss +++ b/src/scss/_drawing.scss @@ -31,6 +31,11 @@ } } +strong.btn-fake { + @include button($button_large); + @include button-fullcontrol(transparent, transparent, rgba(0,0,0,1)); +} + a.article-nav-link-wrap { @include button($button_large); padding-left: $button_large; diff --git a/src/textes/source/_posts/contes/elegie-commencement.md b/src/textes/source/_posts/contes/elegie-commencement.md index 6dd9d9e..a3fc81e 100644 --- a/src/textes/source/_posts/contes/elegie-commencement.md +++ b/src/textes/source/_posts/contes/elegie-commencement.md @@ -1,7 +1,7 @@ --- import: ../../../../crowbook/common.book -title: L'enfant qui marcha -date: '2017/10/02 09:45:00' +title: "L'élégie du commencement" +date: '2017/07/06 10:23:00' lang: fr version: 0.1.0 license: CC-BY-SA 4.0 @@ -10,8 +10,8 @@ output: - pdf - epub - proofread.html -output.pdf: ../../../../dist/contes/elegie-commencement/index.pdf -output.epub: ../../../../dist/contes/elegie-commencement/index.epub +output.pdf: ../../../../../dist/download/elegie-commencement.pdf +output.epub: ../../../../../dist/download/elegie-commencement.epub download: elegie-commencement categories: - Contes diff --git a/src/textes/source/_posts/contes/lenfant-et-le-dragon.md b/src/textes/source/_posts/contes/lenfant-et-le-dragon.md index 9410934..c815fc5 100644 --- a/src/textes/source/_posts/contes/lenfant-et-le-dragon.md +++ b/src/textes/source/_posts/contes/lenfant-et-le-dragon.md @@ -1,17 +1,17 @@ --- import: ../../../../crowbook/common.book -title: L'enfant et le dragon +title: "L'enfant et le dragon" lang: fr version: 0.1.0 license: CC-BY-SA 4.0 -date: '2017/10/02 09:45:00' +date: '2018/06/12 23:38:00' proofread.grammalecte: true output: - pdf - epub - proofread.html -output.pdf: ../../../../dist/dl/lenfant-et-le-dragon.pdf -output.epub: ../../../../dist/dl/lenfant-et-le-dragon.epub +output.pdf: ../../../../../dist/download/lenfant-et-le-dragon.pdf +output.epub: ../../../../../dist/download/lenfant-et-le-dragon.epub download: lenfant-et-le-dragon categories: - Contes diff --git a/src/textes/source/_posts/contes/lenfant-qui-marcha.md b/src/textes/source/_posts/contes/lenfant-qui-marcha.md index c10e192..6d3cda0 100644 --- a/src/textes/source/_posts/contes/lenfant-qui-marcha.md +++ b/src/textes/source/_posts/contes/lenfant-qui-marcha.md @@ -1,7 +1,7 @@ --- import: ../../../../crowbook/common.book -title: L'enfant qui marcha -date: '2017/10/02 09:45:00' +title: "L'enfant qui marcha" +date: '2017/07/06 10:13:00' lang: fr version: 0.1.0 license: CC-BY-SA 4.0 @@ -10,8 +10,8 @@ output: - pdf - epub - proofread.html -output.pdf: ../../../../dist/contes/lenfant-qui-marcha/index.pdf -output.epub: ../../../../dist/contes/lenfant-qui-marcha/index.epub +output.pdf: ../../../../../dist/download/lenfant-qui-marcha.pdf +output.epub: ../../../../../dist/download/lenfant-qui-marcha.epub download: lenfant-qui-marcha categories: - Contes diff --git a/src/textes/source/_posts/contes/remedes-mathematicien.md b/src/textes/source/_posts/contes/remedes-mathematicien.md index f2984af..0930a27 100644 --- a/src/textes/source/_posts/contes/remedes-mathematicien.md +++ b/src/textes/source/_posts/contes/remedes-mathematicien.md @@ -1,7 +1,7 @@ --- import: ../../../../crowbook/common.book -title: Les remèdes du mathématicien -date: '2017/10/02 09:45:00' +title: "Les remèdes du mathématicien" +date: '2016/12/16 17:23:00' lang: fr version: 0.1.0 license: CC-BY-SA 4.0 @@ -10,8 +10,8 @@ output: - pdf - epub - proofread.html -output.pdf: ../../../../dist/contes/remedes-mathematicien/index.pdf -output.epub: ../../../../dist/contes/remedes-mathematicien/index.epub +output.pdf: ../../../../../dist/download/remedes-mathematicien.pdf +output.epub: ../../../../../dist/download/remedes-mathematicien.epub download: remedes-mathematicien categories: - Contes diff --git a/src/textes/themes/blog/layout/_partial/article.ejs b/src/textes/themes/blog/layout/_partial/article.ejs index b4a88f6..2dacb2c 100644 --- a/src/textes/themes/blog/layout/_partial/article.ejs +++ b/src/textes/themes/blog/layout/_partial/article.ejs @@ -36,6 +36,12 @@ <%- partial('post/category') %> +
+ Télécharger : + .PDF + .EPUB +
+