Auto generate cover from book.json fields.
[src/app-framework-main.git] / docs / resources / make_cover.sh
index 13ba4f0..1026ecb 100755 (executable)
@@ -3,7 +3,7 @@ DOCS_DIR=$(cd $(dirname $0)/.. && pwd)
 BOOKFILE=$DOCS_DIR/../book.json
 
 TITLE=$(grep  '"title":' $BOOKFILE | cut -d'"' -f 4)
-SUBTITLE=""
+SUBTITLE=$(grep  '"subtitle":' $BOOKFILE | cut -d'"' -f 4)
 VERSION="Version $(grep  '"version":' $BOOKFILE | cut -d'"' -f 4)"
 DATE=$(grep  '"published":' $BOOKFILE | cut -d'"' -f 4)
 
@@ -15,6 +15,7 @@ DATE=$(grep  '"published":' $BOOKFILE | cut -d'"' -f 4)
 cat $(dirname $0)/cover.svg | sed -e "s/{title}/$TITLE/g" \
     -e "s/font-size:87.5px/font-size:54px/g" \
     -e "s/{subtitle}/$SUBTITLE/g" \
+    -e "s/font-size:62.5px/font-size:40px/g" \
     -e "s/{version}/$VERSION/g" \
     -e "s/{date}/$DATE/g" \
     > /tmp/cover.svg