summaryrefslogtreecommitdiff
path: root/index.rb
diff options
context:
space:
mode:
Diffstat (limited to 'index.rb')
-rwxr-xr-xindex.rb32
1 files changed, 0 insertions, 32 deletions
diff --git a/index.rb b/index.rb
deleted file mode 100755
index 61450d5..0000000
--- a/index.rb
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/usr/bin/env ruby
-# -*- coding: utf-8 -*-
-load 'pandoc.rb'
-require 'erb'
-require 'date'
-
-puts "Web log entries\n=====\n"
-
-puts '<style>
-li {
- list-style-type: none;
-}
-time {
- color: #AAAAAA;
- font-family: monospace;
-}
-</style>'
-
-articles = []
-for filename in ARGV do
- input = File.read(filename)
- doc = Pandoc::load('markdown',input)
- articles.push({
- :title => doc["title"] || input.split("\n",2).first,
- :date => Date.parse(doc['date']),
- :slug => filename.sub(/^public\//,'').sub(/\.md$/,''),
- })
-end
-
-articles.sort_by{|a| a[:date]}.reverse.each do |a|
- puts " * <time>#{a[:date].strftime('%Y-%m-%d')}</time> - [#{a[:title]}](./#{a[:slug]}.html)"
-end