summaryrefslogtreecommitdiffstats
path: root/docs/resources/make_cover.sh
diff options
context:
space:
mode:
authorStéphane Desneux <stephane.desneux@iot.bzh>2017-06-20 09:25:01 +0000
committerGerrit Code Review <gerrit@automotivelinux.org>2017-06-20 09:25:01 +0000
commit682c21ba91959a333df943bb33d617269f10878c (patch)
tree9a09d6875bfc8a5e41f196548900ca01ccba7cd0 /docs/resources/make_cover.sh
parent576b24cfff99a347ddefda53aecf98334c030096 (diff)
parent3081bce9632e29c7ecebf547360cc78c170470cd (diff)
Merge "Auto generate cover from book.json fields."
Diffstat (limited to 'docs/resources/make_cover.sh')
-rwxr-xr-xdocs/resources/make_cover.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/docs/resources/make_cover.sh b/docs/resources/make_cover.sh
index 13ba4f0c..1026ecbd 100755
--- a/docs/resources/make_cover.sh
+++ b/docs/resources/make_cover.sh
@@ -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