Skip to content

Commit

Permalink
multilang and generation script
Browse files Browse the repository at this point in the history
  • Loading branch information
Wivik committed Oct 15, 2023
1 parent cea2c86 commit 4385c32
Show file tree
Hide file tree
Showing 17 changed files with 39 additions and 0 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
9 changes: 9 additions & 0 deletions book-fr/00-01-title-page.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title:
author:
rights: Creative Commons Attribution ShareAlike 4.0
language: en-US
cover-image:
description:
date:
---
1 change: 1 addition & 0 deletions book-fr/00-02-preface.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Preface {epub:type=preface}
File renamed without changes.
6 changes: 6 additions & 0 deletions book-fr/00-04-contributors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Contributors {epub:type=contributors}

| Name | Website | Role |
| ------ | --------- | ----- |
| Seb | https://zedas.fr | Main author |

1 change: 1 addition & 0 deletions book-fr/01-01-chapter-1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Chapter 1
1 change: 1 addition & 0 deletions book-fr/01-02-chapter-2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Chapter 2
1 change: 1 addition & 0 deletions book-fr/img/.empty
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Put images here.
Binary file added book-fr/img/cc-by-sa.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions generate.sh
Original file line number Diff line number Diff line change
@@ -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)


0 comments on commit 4385c32

Please sign in to comment.