require 'erb' require 'fileutils' require './lib/song' require './lib/songs' require './lib/latex' require './lib/pather' require './lib/ly' require './lib/html' require './lib/statics' statics = [ 'style.css' ] FileUtils.mkdir_p(BuildDir) FileUtils.mkdir_p(build SongsDir) FileUtils.mkdir_p(TmpDir) FileUtils.mkdir_p(tmp SongsDir) 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