m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/lib/html.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/html.rb')
-rw-r--r--lib/html.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/html.rb b/lib/html.rb
new file mode 100644
index 0000000..61e25a3
--- /dev/null
+++ b/lib/html.rb
@@ -0,0 +1,13 @@
+require './lib/templated'
+
+def render_html song
+ template = html_template 'song'
+ template.result binding
+end
+
+def make_htmls songs
+ songs.each do |song_id, song|
+ content = render_html song
+ write_templated content, song_html(song_id), song.title
+ end
+end