m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/build.rb31
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