summaryrefslogtreecommitdiff
path: root/index.rb
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-08-27 19:12:36 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-08-27 19:12:36 -0400
commit75d4d72a1f5352d1c3520fbaf96911309fc7f96a (patch)
tree942dfa89658964e5954f159fa4d9b41c6b7bc423 /index.rb
parentb373a3a6e1702e7514bb405122a2311d16d85fcd (diff)
index.atom, also: write-atomic
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