diff --git a/book/00-01-title-page.md b/book-en/00-01-title-page.md similarity index 100% rename from book/00-01-title-page.md rename to book-en/00-01-title-page.md diff --git a/book/00-02-preface.md b/book-en/00-02-preface.md similarity index 100% rename from book/00-02-preface.md rename to book-en/00-02-preface.md diff --git a/book/00-03-copyright-en.md b/book-en/00-03-copyright-en.md similarity index 100% rename from book/00-03-copyright-en.md rename to book-en/00-03-copyright-en.md diff --git a/book/00-04-contributors.md b/book-en/00-04-contributors.md similarity index 100% rename from book/00-04-contributors.md rename to book-en/00-04-contributors.md diff --git a/book/01-01-chapter-1.md b/book-en/01-01-chapter-1.md similarity index 100% rename from book/01-01-chapter-1.md rename to book-en/01-01-chapter-1.md diff --git a/book/01-02-chapter-2.md b/book-en/01-02-chapter-2.md similarity index 100% rename from book/01-02-chapter-2.md rename to book-en/01-02-chapter-2.md diff --git a/book/img/.empty b/book-en/img/.empty similarity index 100% rename from book/img/.empty rename to book-en/img/.empty diff --git a/book/img/cc-by-sa.png b/book-en/img/cc-by-sa.png similarity index 100% rename from book/img/cc-by-sa.png rename to book-en/img/cc-by-sa.png diff --git a/book-fr/00-01-title-page.md b/book-fr/00-01-title-page.md new file mode 100644 index 0000000..de0de5b --- /dev/null +++ b/book-fr/00-01-title-page.md @@ -0,0 +1,9 @@ +--- +title: +author: +rights: Creative Commons Attribution ShareAlike 4.0 +language: en-US +cover-image: +description: +date: +--- diff --git a/book-fr/00-02-preface.md b/book-fr/00-02-preface.md new file mode 100644 index 0000000..10ae05b --- /dev/null +++ b/book-fr/00-02-preface.md @@ -0,0 +1 @@ +# Preface {epub:type=preface} diff --git a/book/00-03-copyright-fr.md b/book-fr/00-03-copyright-fr.md similarity index 100% rename from book/00-03-copyright-fr.md rename to book-fr/00-03-copyright-fr.md diff --git a/book-fr/00-04-contributors.md b/book-fr/00-04-contributors.md new file mode 100644 index 0000000..8d5f312 --- /dev/null +++ b/book-fr/00-04-contributors.md @@ -0,0 +1,6 @@ +# Contributors {epub:type=contributors} + +| Name | Website | Role | +| ------ | --------- | ----- | +| Seb | https://zedas.fr | Main author | + diff --git a/book-fr/01-01-chapter-1.md b/book-fr/01-01-chapter-1.md new file mode 100644 index 0000000..b743fda --- /dev/null +++ b/book-fr/01-01-chapter-1.md @@ -0,0 +1 @@ +# Chapter 1 diff --git a/book-fr/01-02-chapter-2.md b/book-fr/01-02-chapter-2.md new file mode 100644 index 0000000..7ebb596 --- /dev/null +++ b/book-fr/01-02-chapter-2.md @@ -0,0 +1 @@ +# Chapter 2 diff --git a/book-fr/img/.empty b/book-fr/img/.empty new file mode 100644 index 0000000..bca67c4 --- /dev/null +++ b/book-fr/img/.empty @@ -0,0 +1 @@ +Put images here. diff --git a/book-fr/img/cc-by-sa.png b/book-fr/img/cc-by-sa.png new file mode 100644 index 0000000..12229ac Binary files /dev/null and b/book-fr/img/cc-by-sa.png differ diff --git a/generate.sh b/generate.sh new file mode 100644 index 0000000..fe12667 --- /dev/null +++ b/generate.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +# generate epub + +DEFAULT_BASENAME=$(pwd | awk -F '/' '{print $NF}') +DEFAULT_LANG="fr" + +read -p "Name of the epub file [ ${DEFAULT_BASENAME}] : " FILE_BASENAME +FILE_BASENAME=${FILE_BASENAME:-$DEFAULT_BASENAME} +echo "Available languages are : " +ls -d book* +read -p "Which language to use : [ ${DEFAULT_LANG} ] : " BOOK_LANG +BOOK_LANG=${BOOK_LANG:-$DEFAULT_LANG} +read -p "Review filename [ ${FILE_BASENAME}-${BOOK_LANG}.epub ] : " EPUB_FILE +EPUB_FILE=${EPUB_FILE:-"${FILE_BASENAME}-${BOOK_LANG}.epub"} +echo $EPUB_FILE + +podman run --rm -v .:/workspace --workdir /workspace ghcr.io/wivik/pandoc-plantuml:latest -o ${EPUB_FILE} --filter=/filters/plantuml.py --resource-path=.:book-${BOOK_LANG} --standalone $(ls book-${BOOK_LANG}/00-*.md book-${BOOK_LANG}/01-*.md) + +