From f3039744d72454e7e3b8cb1032266bcc172ce488 Mon Sep 17 00:00:00 2001 From: Marcin Chrzanowski Date: Sun, 12 Sep 2021 14:17:19 +0200 Subject: Initial commit --- scripts/build.rb | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 scripts/build.rb (limited to 'scripts') 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 -- cgit v1.2.3