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' P.add 'about', 'about.html' P.add 'songbook', 'śpiewnik-tuturutu.pdf' 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_templated_file 'about.html', 'O Śpiewniku' write_statics statics P.cd SongsDir make_sheets songs make_pdfs songs make_htmls songs