Mercurial > dottes
comparison makeWeb.sh @ 484:4fab69a1027d build-default-207
Add MusicXML conversion to tune pages.
Might help someone.
| author | Jim Hague <jim.hague@acm.org> |
|---|---|
| date | Tue, 17 Jun 2014 09:11:38 +0100 |
| parents | 1fa67fce807f |
| children | a89eba8f6dd5 |
comparison
equal
deleted
inserted
replaced
| 483:681274f40615 | 484:4fab69a1027d |
|---|---|
| 1 #!/bin/bash | 1 #!/bin/bash |
| 2 # | 2 # |
| 3 # Build the website. The common items and the web items are assumed | 3 # Build the website. The common items and the web items are assumed |
| 4 # to be already built. | 4 # to be already built. This generates the MusicXML and the page HTML |
| 5 # and shuffles other files ino the right place. | |
| 5 # | 6 # |
| 6 | 7 |
| 7 #set -x | 8 #set -x |
| 8 | 9 |
| 9 # Restore titles like 'Exploding Potato, The' to the | 10 # Restore titles like 'Exploding Potato, The' to the |
| 58 tunelist=tunelist.html | 59 tunelist=tunelist.html |
| 59 booke=$1 | 60 booke=$1 |
| 60 masterbooke=$2 | 61 masterbooke=$2 |
| 61 title=$booke | 62 title=$booke |
| 62 instrument=$3 | 63 instrument=$3 |
| 64 abc2xml=$dir/abc2xml/abc2xml.py | |
| 63 | 65 |
| 64 buildno=`cat buildno.txt` | 66 buildno=`cat buildno.txt` |
| 65 # Remove trailing % added for Latex purposes. | 67 # Remove trailing % added for Latex purposes. |
| 66 buildno=${buildno%%%} | 68 buildno=${buildno%%%} |
| 67 subtitle= | 69 subtitle= |
| 99 find $bookedir -name "*.abc" | sort | | 101 find $bookedir -name "*.abc" | sort | |
| 100 while read filename | 102 while read filename |
| 101 do | 103 do |
| 102 name=`basename $filename .abc` | 104 name=`basename $filename .abc` |
| 103 | 105 |
| 106 # Extract items to substitute in the web page. | |
| 104 title=`$dir/abcfield.py --field T --html $filename` | 107 title=`$dir/abcfield.py --field T --html $filename` |
| 105 fixtitle "$title" | 108 fixtitle "$title" |
| 106 title=$retval | 109 title=$retval |
| 107 subtitle=`$dir/abcfield.py --index 2 --field T --latex $filename` | 110 subtitle=`$dir/abcfield.py --index 2 --field T --latex $filename` |
| 108 fixtitle "$subtitle" | 111 fixtitle "$subtitle" |
| 128 fixkey $key | 131 fixkey $key |
| 129 key=$retval | 132 key=$retval |
| 130 | 133 |
| 131 # Copy the ABC into the web. | 134 # Copy the ABC into the web. |
| 132 cp $filename $webdir | 135 cp $filename $webdir |
| 136 | |
| 137 # Generate MusicXML into the web. | |
| 138 python $abc2xml $filename > ${webdir}/${name}.xml | |
| 133 | 139 |
| 134 # If we are not the master booke, link the mp3s in from the | 140 # If we are not the master booke, link the mp3s in from the |
| 135 # master page in a desperate attempt to make IE8 work. | 141 # master page in a desperate attempt to make IE8 work. |
| 136 # The Jenkins archive will dereference the soft link, it seems, | 142 # The Jenkins archive will dereference the soft link, it seems, |
| 137 # but I guess I can live with copies of the MP3 for now. | 143 # but I guess I can live with copies of the MP3 for now. |
