summaryrefslogtreecommitdiffstats
path: root/ll-database-binding/conf.d/app-templates/docs/resources/make_cover.sh
diff options
context:
space:
mode:
authorLoïc Collignon <loic.collignon@iot.bzh>2017-10-24 14:33:33 +0200
committerLoïc Collignon <loic.collignon@iot.bzh>2017-10-24 14:33:33 +0200
commita37a642f6e16be23e5b0a90835f7cfb84d5eb209 (patch)
treef86162140f6be33b2d005549ba2d9b3e1c97170c /ll-database-binding/conf.d/app-templates/docs/resources/make_cover.sh
parent97325dd67f3b7858bd093fc161d0a56e7c7bc9bd (diff)
fix use of make event in preinit
Change-Id: I3a2eb2805bdf618e3c8349776b02bbe1b7475ccc Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
Diffstat (limited to 'll-database-binding/conf.d/app-templates/docs/resources/make_cover.sh')
-rwxr-xr-xll-database-binding/conf.d/app-templates/docs/resources/make_cover.sh27
1 files changed, 0 insertions, 27 deletions
diff --git a/ll-database-binding/conf.d/app-templates/docs/resources/make_cover.sh b/ll-database-binding/conf.d/app-templates/docs/resources/make_cover.sh
deleted file mode 100755
index 1026ecb..0000000
--- a/ll-database-binding/conf.d/app-templates/docs/resources/make_cover.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/bash
-DOCS_DIR=$(cd $(dirname $0)/.. && pwd)
-BOOKFILE=$DOCS_DIR/../book.json
-
-TITLE=$(grep '"title":' $BOOKFILE | cut -d'"' -f 4)
-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)
-
-[ -z "$TITLE" ] && { echo "Error TITLE not set!" ; exit 1; }
-[ -z "$VERSION" ] && { echo "Error VERSION not set!" ; exit 1; }
-[ -z "$DATE" ] && { echo "Error DATE not set!" ; exit 1; }
-
-
-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
-
-# use imagemagick convert tool (cover size must be 1800x2360)
-convert -resize "1600x2160!" -border 100 -bordercolor white -background white \
- -flatten -quality 100 /tmp/cover.svg $DOCS_DIR/cover.jpg
-
-convert -resize "200x262!" $DOCS_DIR/cover.jpg $DOCS_DIR/cover_small.jpg