English version includes solutions

pull/207/head
Simon Knott 2018-09-03 19:54:52 +02:00
parent 519a8bb4af
commit 6feb88700a
No known key found for this signature in database
GPG Key ID: 9F980AECBE437129
1 changed files with 21 additions and 1 deletions

View File

@ -1,5 +1,25 @@
#! /usr/bin/env sh #! /usr/bin/env sh
generate_with_solutions () {
echo "Generating English with solutions"
tmpfile=$(mktemp /tmp/abc-script.XXXXXX)
cat ./README.md >> $tmpfile
for dir in ./solutions/system_design/*; do
case $dir in *template*) continue;; esac
case $dir in *__init__.py*) continue;; esac
: [[ -d "$dir" ]] && ( cd "$dir" && cat ./README.md >> $tmpfile && echo "" >> $tmpfile )
done
cat $tmpfile | pandoc --from=markdown -o README.epub
rm "$tmpfile"
echo "Done! You can find the book at ./README.epub"
}
generate () { generate () {
name=$1 name=$1
echo "Generating Ebook $name ..." echo "Generating Ebook $name ..."
@ -7,7 +27,7 @@ generate () {
echo "Done! You can find the book at ./$name.epub" echo "Done! You can find the book at ./$name.epub"
} }
generate README generate_with_solutions
generate README-ja generate README-ja
generate README-zh-Hans generate README-zh-Hans
generate README-zh-TW generate README-zh-TW