summaryrefslogtreecommitdiffstats
path: root/docs/resources
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2017-06-20 09:47:53 +0200
committerSebastien Douheret <sebastien.douheret@iot.bzh>2017-06-20 09:48:38 +0200
commit345940889ad4bbd6dd4d4f1a441c283c96ab2364 (patch)
tree89fc3d77da63fcad6510ebad95eb36d54aac9d38 /docs/resources
parent6f71c875ef2a7259290f98fd7712a1b2042dd7f7 (diff)
Auto generate cover from book.json fields.
Change-Id: I8203040b759289b08d5311a74e6df557fe8250bd Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
Diffstat (limited to 'docs/resources')
-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 13ba4f0..1026ecb 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