Mercurial > dottes
annotate makeWebGraphics.sh @ 282:ced1d1ba42f6
Various revisions of printed book presentation.
1. Purple background on the front and and new blank back pages.
2. UK English for hyphenation and date presentation.
3. Dedication and 'About Havoc' section.
4. Footer just page number in centre of page.
5. Revised copyright discussion.
6. Since it's a book, make content, intro and first lines to chapters.
And prompt individual tunes to sections.
7. Omit 'Tunes' chapter heading. It doesn't look good in A5.
author | Jim Hague <jim.hague@acm.org> |
---|---|
date | Fri, 05 Jul 2013 18:56:34 +0100 |
parents | 0ef955669a9a |
children | 77372a0166fe |
rev | line source |
---|---|
43
d92717f8130c
First go at producing a very simple website.
Jim Hague <jim.hague@laicatc.com>
parents:
diff
changeset
|
1 #!/bin/bash |
d92717f8130c
First go at producing a very simple website.
Jim Hague <jim.hague@laicatc.com>
parents:
diff
changeset
|
2 # |
223
0ef955669a9a
Make transposed tunes use the original audio.
Jim Hague <jim.hague@acm.org>
parents:
197
diff
changeset
|
3 # Make graphics required for the website but not for the book. |
43
d92717f8130c
First go at producing a very simple website.
Jim Hague <jim.hague@laicatc.com>
parents:
diff
changeset
|
4 # They go into web/<book>. |
d92717f8130c
First go at producing a very simple website.
Jim Hague <jim.hague@laicatc.com>
parents:
diff
changeset
|
5 # |
d92717f8130c
First go at producing a very simple website.
Jim Hague <jim.hague@laicatc.com>
parents:
diff
changeset
|
6 |
d92717f8130c
First go at producing a very simple website.
Jim Hague <jim.hague@laicatc.com>
parents:
diff
changeset
|
7 if [ $# != 1 ]; then |
223
0ef955669a9a
Make transposed tunes use the original audio.
Jim Hague <jim.hague@acm.org>
parents:
197
diff
changeset
|
8 echo "Usage: makeWebGraphics.sh <book dir name>" |
43
d92717f8130c
First go at producing a very simple website.
Jim Hague <jim.hague@laicatc.com>
parents:
diff
changeset
|
9 exit 1 |
d92717f8130c
First go at producing a very simple website.
Jim Hague <jim.hague@laicatc.com>
parents:
diff
changeset
|
10 fi |
d92717f8130c
First go at producing a very simple website.
Jim Hague <jim.hague@laicatc.com>
parents:
diff
changeset
|
11 |
d92717f8130c
First go at producing a very simple website.
Jim Hague <jim.hague@laicatc.com>
parents:
diff
changeset
|
12 dir=`pwd` |
d92717f8130c
First go at producing a very simple website.
Jim Hague <jim.hague@laicatc.com>
parents:
diff
changeset
|
13 |
d92717f8130c
First go at producing a very simple website.
Jim Hague <jim.hague@laicatc.com>
parents:
diff
changeset
|
14 booke=$dir/$1 |
d92717f8130c
First go at producing a very simple website.
Jim Hague <jim.hague@laicatc.com>
parents:
diff
changeset
|
15 builddir=$dir/web/$1 |
d92717f8130c
First go at producing a very simple website.
Jim Hague <jim.hague@laicatc.com>
parents:
diff
changeset
|
16 graphicsdir=$dir/graphics/$1 |
d92717f8130c
First go at producing a very simple website.
Jim Hague <jim.hague@laicatc.com>
parents:
diff
changeset
|
17 |
d92717f8130c
First go at producing a very simple website.
Jim Hague <jim.hague@laicatc.com>
parents:
diff
changeset
|
18 mkdir -p $builddir |
d92717f8130c
First go at producing a very simple website.
Jim Hague <jim.hague@laicatc.com>
parents:
diff
changeset
|
19 |
223
0ef955669a9a
Make transposed tunes use the original audio.
Jim Hague <jim.hague@acm.org>
parents:
197
diff
changeset
|
20 # Now, for each tune, make the main tune and tune first line bitmaps. |
0ef955669a9a
Make transposed tunes use the original audio.
Jim Hague <jim.hague@acm.org>
parents:
197
diff
changeset
|
21 # Do this to temp files and rename into place to make updates as |
0ef955669a9a
Make transposed tunes use the original audio.
Jim Hague <jim.hague@acm.org>
parents:
197
diff
changeset
|
22 # atomic as possible. |
43
d92717f8130c
First go at producing a very simple website.
Jim Hague <jim.hague@laicatc.com>
parents:
diff
changeset
|
23 find $booke -name "*.abc" | sort | |
d92717f8130c
First go at producing a very simple website.
Jim Hague <jim.hague@laicatc.com>
parents:
diff
changeset
|
24 while read filename |
d92717f8130c
First go at producing a very simple website.
Jim Hague <jim.hague@laicatc.com>
parents:
diff
changeset
|
25 do |
d92717f8130c
First go at producing a very simple website.
Jim Hague <jim.hague@laicatc.com>
parents:
diff
changeset
|
26 name=`basename $filename .abc` |
61
3464d5154f49
Fix temp file name to convert.
Jim Hague <jim.hague@acm.org>
parents:
48
diff
changeset
|
27 tmpname=${name}.tmp |
191
2fa3c89a0a8a
Change web to use PNG rather than JPG.
Jim Hague <jim.hague@acm.org>
parents:
62
diff
changeset
|
28 convert -density 96 $graphicsdir/${name}.eps $builddir/${tmpname}.png |
197
8f352063f277
Finish first version of newly tarted up website.
Jim Hague <jim.hague@acm.org>
parents:
191
diff
changeset
|
29 convert -density 96 $graphicsdir/firstline-${name}.eps $builddir/firstline-${tmpname}.png |
43
d92717f8130c
First go at producing a very simple website.
Jim Hague <jim.hague@laicatc.com>
parents:
diff
changeset
|
30 |
191
2fa3c89a0a8a
Change web to use PNG rather than JPG.
Jim Hague <jim.hague@acm.org>
parents:
62
diff
changeset
|
31 mv $builddir/${tmpname}.png $builddir/${name}.png |
197
8f352063f277
Finish first version of newly tarted up website.
Jim Hague <jim.hague@acm.org>
parents:
191
diff
changeset
|
32 mv $builddir/firstline-${tmpname}.png $builddir/firstline-${name}.png |
43
d92717f8130c
First go at producing a very simple website.
Jim Hague <jim.hague@laicatc.com>
parents:
diff
changeset
|
33 done |