Start links section
2318d3023c5109e2e8f1b985edd934558a933e1c
1 parent
7cd86c45
data/links.txt
added
+12 -0
| 1 | + | ||
| 2 | + | * Principia Discordia <http://www.principiadiscordia.com/book/1.php> |
|
| 3 | + | ||
| 4 | + | Essential reading if you want to understand life. |
|
| 5 | + | ||
| 6 | + | * Learn VimScript the Hard Way <http://learnvimscriptthehardway.stevelosh.com/> |
|
| 7 | + | ||
| 8 | + | A pretty great vim reference. |
|
| 9 | + | ||
| 10 | + | * Vim script cheatsheet <http://ricostacruz.com/cheatsheets/vimscript.html> |
|
| 11 | + | ||
| 12 | + | A beautiful VimL cheatsheet. |
links/links.css
added
+38 -0
| 1 | + | body { |
|
| 2 | + | padding: 10px; |
|
| 3 | + | font-size: 14px; |
|
| 4 | + | } |
|
| 5 | + | ||
| 6 | + | h1 { |
|
| 7 | + | font-size: 16px; |
|
| 8 | + | } |
|
| 9 | + | ||
| 10 | + | h2 { |
|
| 11 | + | font-size: 20px; |
|
| 12 | + | text-decoration: underline; |
|
| 13 | + | } |
|
| 14 | + | ||
| 15 | + | h3 { |
|
| 16 | + | font-size: 20px; |
|
| 17 | + | } |
|
| 18 | + | ||
| 19 | + | section > header { |
|
| 20 | + | margin-bottom: 10px; |
|
| 21 | + | } |
|
| 22 | + | ||
| 23 | + | section > header > h2 { |
|
| 24 | + | font-size: 20px; |
|
| 25 | + | } |
|
| 26 | + | ||
| 27 | + | li { |
|
| 28 | + | list-style-position: inside; |
|
| 29 | + | margin: 10px 0; |
|
| 30 | + | } |
|
| 31 | + | ||
| 32 | + | section p { |
|
| 33 | + | margin: 15px 0 30px 0; |
|
| 34 | + | } |
|
| 35 | + | ||
| 36 | + | a:hover { |
|
| 37 | + | text-decoration: underline; |
|
| 38 | + | } |
scripts/links
added
+15 -0
| 1 | + | #!/usr/bin/env ruby |
|
| 2 | + | ||
| 3 | + | require 'erb' |
|
| 4 | + | require 'ostruct' |
|
| 5 | + | ||
| 6 | + | $stdout.print ERB.new( |
|
| 7 | + | File.read('templates/links.html.erb') |
|
| 8 | + | ).result( |
|
| 9 | + | OpenStruct.new( |
|
| 10 | + | links: ARGF.read.scan(/^([&\w -]+)\n={16,}\n/) {|section| |
|
| 11 | + | [section, ARGF.read.scan(/\*\s+(.+?)\s+<(.+?)>\s+(.+)\n/)] |
|
| 12 | + | } |
|
| 13 | + | ).instance_eval { binding } |
|
| 14 | + | ) |
|
| 15 | + |