diff options
author | Marcin Chrzanowski <m@m-chrzan.xyz> | 2021-09-12 14:17:19 +0200 |
---|---|---|
committer | Marcin Chrzanowski <m@m-chrzan.xyz> | 2021-09-12 14:17:19 +0200 |
commit | f3039744d72454e7e3b8cb1032266bcc172ce488 (patch) | |
tree | 5a92a698056e2cbec6f0b121a9ce31596e4a4581 /scripts |
Initial commit
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/build.rb | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/scripts/build.rb b/scripts/build.rb new file mode 100644 index 0000000..1ad5472 --- /dev/null +++ b/scripts/build.rb @@ -0,0 +1,31 @@ +require 'erb' + +require './lib/song' +require './lib/songs' +require './lib/tags' +require './lib/latex' +require './lib/pather' +require './lib/ly' +require './lib/html' +require './lib/statics' + +statics = [ 'style.css' ] + +P = Pather.new + +P.add 'index', 'index.html' +P.add 'style', 'style.css' + +songs.each_key do |song_id| + P.add(song_html(song_id), song_html(song_id)) + P.add(song_svg(song_id), song_svg(song_id)) + P.add(song_pdf(song_id), song_pdf(song_id)) +end + +write_templated_erb 'index.html.erb' +write_statics statics + +P.cd SongsDir +make_sheets songs +make_pdfs songs +make_htmls songs |