aboutsummaryrefslogtreecommitdiffstats
path: root/docs/resources/make_cover.sh
blob: fbbbc02323aa8998dd68a29006d56069add58b3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash

cat cover.svg | sed -e 's/{title}/Low Level CAN binding/' \
    -e 's/font-size:87.5px/font-size:50px/g' \
    -e 's/{subtitle}//g' \
    -e 's/{version}/Version 4.99-EERC1/g' \
    -e 's/{date}/September 2017/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 ../cover.jpg

convert -resize "200x262!" ../cover.jpg ../cover_small.jpg