runeblog 0.2.11 → 0.2.17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (525) hide show
  1. checksums.yaml +4 -4
  2. data/empty_view.tgz +0 -0
  3. data/lib/default.rb +0 -1
  4. data/lib/helpers-blog.rb +11 -94
  5. data/lib/helpers-repl.rb +0 -27
  6. data/lib/liveblog.rb +87 -111
  7. data/lib/logging.rb +0 -23
  8. data/lib/pathmagic.rb +14 -0
  9. data/lib/post.rb +9 -20
  10. data/lib/publish.rb +6 -9
  11. data/lib/repl.rb +0 -2
  12. data/lib/runeblog.rb +75 -78
  13. data/lib/runeblog_version.rb +1 -1
  14. data/lib/view.rb +2 -3
  15. data/lib/xlate.rb +31 -0
  16. data/runeblog.gemspec +1 -2
  17. data/test/make_blog.rb +13 -5
  18. metadata +4 -509
  19. data/lib/BAD.liveblog.rb +0 -724
  20. data/lib/KEEP.liveblog +0 -646
  21. data/lib/NEW-liveblog.rb +0 -757
  22. data/lib/OLD-liveblog.rb +0 -661
  23. data/test/.blogs/VERSION +0 -2
  24. data/test/.blogs/config +0 -3
  25. data/test/.blogs/drafts/0001-whats-at-stubbs.lt3 +0 -16
  26. data/test/.blogs/drafts/0002-the-new-amphitheatre-is-overrated.lt3 +0 -16
  27. data/test/.blogs/drafts/0003-elixir-conf-coming-up.lt3 +0 -17
  28. data/test/.blogs/drafts/0004-does-indie-still-matter.lt3 +0 -16
  29. data/test/.blogs/drafts/0005-the-genius-of-scenic.lt3 +0 -16
  30. data/test/.blogs/drafts/0006-the-future-of-coding.lt3 +0 -16
  31. data/test/.blogs/drafts/0007-the-graffiti-wall.lt3 +0 -17
  32. data/test/.blogs/drafts/0008-the-waller-creek-project.lt3 +0 -16
  33. data/test/.blogs/drafts/0009-life-on-sabine-street.lt3 +0 -16
  34. data/test/.blogs/drafts/0010-remember-modest-mouse.lt3 +0 -17
  35. data/test/.blogs/sequence +0 -1
  36. data/test/.blogs/views/around_austin/last_published +0 -1
  37. data/test/.blogs/views/around_austin/posts/0001-whats-at-stubbs/0001-whats-at-stubbs.lt3 +0 -16
  38. data/test/.blogs/views/around_austin/posts/0001-whats-at-stubbs/metadata.txt +0 -6
  39. data/test/.blogs/views/around_austin/posts/0001-whats-at-stubbs/teaser.txt +0 -1
  40. data/test/.blogs/views/around_austin/posts/0001-whats-at-stubbs/whats-at-stubbs.html +0 -11
  41. data/test/.blogs/views/around_austin/posts/0002-the-new-amphitheatre-is-overrated/0002-the-new-amphitheatre-is-overrated.lt3 +0 -16
  42. data/test/.blogs/views/around_austin/posts/0002-the-new-amphitheatre-is-overrated/metadata.txt +0 -6
  43. data/test/.blogs/views/around_austin/posts/0002-the-new-amphitheatre-is-overrated/teaser.txt +0 -1
  44. data/test/.blogs/views/around_austin/posts/0002-the-new-amphitheatre-is-overrated/the-new-amphitheatre-is-overrated.html +0 -11
  45. data/test/.blogs/views/around_austin/posts/0007-the-graffiti-wall/0007-the-graffiti-wall.lt3 +0 -17
  46. data/test/.blogs/views/around_austin/posts/0007-the-graffiti-wall/metadata.txt +0 -6
  47. data/test/.blogs/views/around_austin/posts/0007-the-graffiti-wall/teaser.txt +0 -1
  48. data/test/.blogs/views/around_austin/posts/0007-the-graffiti-wall/the-graffiti-wall.html +0 -12
  49. data/test/.blogs/views/around_austin/posts/0008-the-waller-creek-project/0008-the-waller-creek-project.lt3 +0 -16
  50. data/test/.blogs/views/around_austin/posts/0008-the-waller-creek-project/metadata.txt +0 -6
  51. data/test/.blogs/views/around_austin/posts/0008-the-waller-creek-project/teaser.txt +0 -1
  52. data/test/.blogs/views/around_austin/posts/0008-the-waller-creek-project/the-waller-creek-project.html +0 -11
  53. data/test/.blogs/views/around_austin/posts/0009-life-on-sabine-street/0009-life-on-sabine-street.lt3 +0 -16
  54. data/test/.blogs/views/around_austin/posts/0009-life-on-sabine-street/life-on-sabine-street.html +0 -11
  55. data/test/.blogs/views/around_austin/posts/0009-life-on-sabine-street/metadata.txt +0 -6
  56. data/test/.blogs/views/around_austin/posts/0009-life-on-sabine-street/teaser.txt +0 -1
  57. data/test/.blogs/views/around_austin/publish +0 -5
  58. data/test/.blogs/views/around_austin/remote/etc/blog.css +0 -34
  59. data/test/.blogs/views/around_austin/remote/etc/blog.css.lt3 +0 -36
  60. data/test/.blogs/views/around_austin/remote/etc/externals.lt3 +0 -19
  61. data/test/.blogs/views/around_austin/remote/etc/favicon.ico +0 -0
  62. data/test/.blogs/views/around_austin/remote/etc/misc.js +0 -6
  63. data/test/.blogs/views/around_austin/remote/life-on-sabine-street.html +0 -10
  64. data/test/.blogs/views/around_austin/remote/permalink/life-on-sabine-street.html +0 -10
  65. data/test/.blogs/views/around_austin/remote/permalink/the-graffiti-wall.html +0 -10
  66. data/test/.blogs/views/around_austin/remote/permalink/the-new-amphitheatre-is-overrated.html +0 -50
  67. data/test/.blogs/views/around_austin/remote/permalink/the-waller-creek-project.html +0 -50
  68. data/test/.blogs/views/around_austin/remote/permalink/whats-at-stubbs.html +0 -50
  69. data/test/.blogs/views/around_austin/remote/recent.html +0 -104
  70. data/test/.blogs/views/around_austin/remote/the-graffiti-wall.html +0 -10
  71. data/test/.blogs/views/around_austin/remote/the-new-amphitheatre-is-overrated.html +0 -50
  72. data/test/.blogs/views/around_austin/remote/the-waller-creek-project.html +0 -50
  73. data/test/.blogs/views/around_austin/remote/whats-at-stubbs.html +0 -50
  74. data/test/.blogs/views/around_austin/remote/widgets/README +0 -4
  75. data/test/.blogs/views/around_austin/remote/widgets/ad/ad.lt3 +0 -12
  76. data/test/.blogs/views/around_austin/remote/widgets/calendar/calendar.lt3 +0 -6
  77. data/test/.blogs/views/around_austin/remote/widgets/news/list.data +0 -4
  78. data/test/.blogs/views/around_austin/remote/widgets/news/news.lt3 +0 -3
  79. data/test/.blogs/views/around_austin/remote/widgets/pages/README +0 -2
  80. data/test/.blogs/views/around_austin/remote/widgets/pages/disclaim.lt3 +0 -6
  81. data/test/.blogs/views/around_austin/remote/widgets/pages/faq.lt3 +0 -6
  82. data/test/.blogs/views/around_austin/remote/widgets/pages/generated.lt3 +0 -4
  83. data/test/.blogs/views/around_austin/remote/widgets/pages/lifestory.lt3 +0 -6
  84. data/test/.blogs/views/around_austin/remote/widgets/pages/like-dislike.lt3 +0 -6
  85. data/test/.blogs/views/around_austin/remote/widgets/pages/list.data +0 -4
  86. data/test/.blogs/views/around_austin/remote/widgets/pages/main.html +0 -9
  87. data/test/.blogs/views/around_austin/remote/widgets/pages/main.lt3 +0 -18
  88. data/test/.blogs/views/around_austin/remote/widgets/tag-cloud/tag-cloud.lt3 +0 -12
  89. data/test/.blogs/views/around_austin/staging/0001-whats-at-stubbs.lt3 +0 -16
  90. data/test/.blogs/views/around_austin/staging/0002-the-new-amphitheatre-is-overrated.lt3 +0 -16
  91. data/test/.blogs/views/around_austin/staging/0007-the-graffiti-wall.lt3 +0 -17
  92. data/test/.blogs/views/around_austin/staging/0008-the-waller-creek-project.lt3 +0 -16
  93. data/test/.blogs/views/around_austin/staging/0009-life-on-sabine-street.lt3 +0 -16
  94. data/test/.blogs/views/around_austin/staging/README +0 -59
  95. data/test/.blogs/views/around_austin/staging/blog/generate.lt3 +0 -17
  96. data/test/.blogs/views/around_austin/staging/blog/head.lt3 +0 -9
  97. data/test/.blogs/views/around_austin/staging/blog/index.lt3 +0 -6
  98. data/test/.blogs/views/around_austin/staging/blog/post_entry.lt3 +0 -19
  99. data/test/.blogs/views/around_austin/staging/etc/blog.css +0 -34
  100. data/test/.blogs/views/around_austin/staging/etc/blog.css.lt3 +0 -36
  101. data/test/.blogs/views/around_austin/staging/etc/externals.lt3 +0 -19
  102. data/test/.blogs/views/around_austin/staging/etc/favicon.ico +0 -0
  103. data/test/.blogs/views/around_austin/staging/etc/misc.js +0 -6
  104. data/test/.blogs/views/around_austin/staging/global.lt3 +0 -22
  105. data/test/.blogs/views/around_austin/staging/life-on-sabine-street.html +0 -10
  106. data/test/.blogs/views/around_austin/staging/navbar/about.html +0 -6
  107. data/test/.blogs/views/around_austin/staging/navbar/contact.html +0 -6
  108. data/test/.blogs/views/around_austin/staging/navbar/navbar.lt3 +0 -6
  109. data/test/.blogs/views/around_austin/staging/post/generate.lt3 +0 -26
  110. data/test/.blogs/views/around_austin/staging/post/head.lt3 +0 -4
  111. data/test/.blogs/views/around_austin/staging/post/index.html +0 -16
  112. data/test/.blogs/views/around_austin/staging/post/index.lt3 +0 -16
  113. data/test/.blogs/views/around_austin/staging/post/permalink.lt3 +0 -26
  114. data/test/.blogs/views/around_austin/staging/recent.html +0 -104
  115. data/test/.blogs/views/around_austin/staging/sidebar/README +0 -3
  116. data/test/.blogs/views/around_austin/staging/the-graffiti-wall.html +0 -10
  117. data/test/.blogs/views/around_austin/staging/the-new-amphitheatre-is-overrated.html +0 -50
  118. data/test/.blogs/views/around_austin/staging/the-waller-creek-project.html +0 -50
  119. data/test/.blogs/views/around_austin/staging/vars.lt3 +0 -2
  120. data/test/.blogs/views/around_austin/staging/whats-at-stubbs.html +0 -50
  121. data/test/.blogs/views/around_austin/staging/widgets/README +0 -4
  122. data/test/.blogs/views/around_austin/staging/widgets/ad/ad.lt3 +0 -12
  123. data/test/.blogs/views/around_austin/staging/widgets/calendar/calendar.lt3 +0 -6
  124. data/test/.blogs/views/around_austin/staging/widgets/news/list.data +0 -4
  125. data/test/.blogs/views/around_austin/staging/widgets/news/news.lt3 +0 -3
  126. data/test/.blogs/views/around_austin/staging/widgets/pages/README +0 -2
  127. data/test/.blogs/views/around_austin/staging/widgets/pages/disclaim.lt3 +0 -6
  128. data/test/.blogs/views/around_austin/staging/widgets/pages/faq.lt3 +0 -6
  129. data/test/.blogs/views/around_austin/staging/widgets/pages/generated.lt3 +0 -4
  130. data/test/.blogs/views/around_austin/staging/widgets/pages/lifestory.lt3 +0 -6
  131. data/test/.blogs/views/around_austin/staging/widgets/pages/like-dislike.lt3 +0 -6
  132. data/test/.blogs/views/around_austin/staging/widgets/pages/list.data +0 -4
  133. data/test/.blogs/views/around_austin/staging/widgets/pages/main.html +0 -9
  134. data/test/.blogs/views/around_austin/staging/widgets/pages/main.lt3 +0 -18
  135. data/test/.blogs/views/around_austin/staging/widgets/tag-cloud/tag-cloud.lt3 +0 -12
  136. data/test/.blogs/views/around_austin/themes/standard/README +0 -59
  137. data/test/.blogs/views/around_austin/themes/standard/blog/generate.lt3 +0 -17
  138. data/test/.blogs/views/around_austin/themes/standard/blog/head.lt3 +0 -9
  139. data/test/.blogs/views/around_austin/themes/standard/blog/index.lt3 +0 -6
  140. data/test/.blogs/views/around_austin/themes/standard/blog/post_entry.lt3 +0 -19
  141. data/test/.blogs/views/around_austin/themes/standard/etc/blog.css +0 -34
  142. data/test/.blogs/views/around_austin/themes/standard/etc/blog.css.lt3 +0 -36
  143. data/test/.blogs/views/around_austin/themes/standard/etc/externals.lt3 +0 -19
  144. data/test/.blogs/views/around_austin/themes/standard/etc/favicon.ico +0 -0
  145. data/test/.blogs/views/around_austin/themes/standard/etc/misc.js +0 -6
  146. data/test/.blogs/views/around_austin/themes/standard/global.lt3 +0 -22
  147. data/test/.blogs/views/around_austin/themes/standard/navbar/about.html +0 -6
  148. data/test/.blogs/views/around_austin/themes/standard/navbar/contact.html +0 -6
  149. data/test/.blogs/views/around_austin/themes/standard/navbar/navbar.lt3 +0 -6
  150. data/test/.blogs/views/around_austin/themes/standard/post/generate.lt3 +0 -26
  151. data/test/.blogs/views/around_austin/themes/standard/post/head.lt3 +0 -4
  152. data/test/.blogs/views/around_austin/themes/standard/post/index.lt3 +0 -16
  153. data/test/.blogs/views/around_austin/themes/standard/post/permalink.lt3 +0 -26
  154. data/test/.blogs/views/around_austin/themes/standard/sidebar/README +0 -3
  155. data/test/.blogs/views/around_austin/themes/standard/widgets/README +0 -4
  156. data/test/.blogs/views/around_austin/themes/standard/widgets/ad/ad.lt3 +0 -12
  157. data/test/.blogs/views/around_austin/themes/standard/widgets/calendar/calendar.lt3 +0 -6
  158. data/test/.blogs/views/around_austin/themes/standard/widgets/news/list.data +0 -4
  159. data/test/.blogs/views/around_austin/themes/standard/widgets/news/news.lt3 +0 -3
  160. data/test/.blogs/views/around_austin/themes/standard/widgets/pages/README +0 -2
  161. data/test/.blogs/views/around_austin/themes/standard/widgets/pages/disclaim.lt3 +0 -6
  162. data/test/.blogs/views/around_austin/themes/standard/widgets/pages/faq.lt3 +0 -6
  163. data/test/.blogs/views/around_austin/themes/standard/widgets/pages/generated.lt3 +0 -4
  164. data/test/.blogs/views/around_austin/themes/standard/widgets/pages/lifestory.lt3 +0 -6
  165. data/test/.blogs/views/around_austin/themes/standard/widgets/pages/like-dislike.lt3 +0 -6
  166. data/test/.blogs/views/around_austin/themes/standard/widgets/pages/list.data +0 -4
  167. data/test/.blogs/views/around_austin/themes/standard/widgets/pages/main.html +0 -9
  168. data/test/.blogs/views/around_austin/themes/standard/widgets/pages/main.lt3 +0 -18
  169. data/test/.blogs/views/around_austin/themes/standard/widgets/tag-cloud/tag-cloud.lt3 +0 -12
  170. data/test/.blogs/views/computing/last_published +0 -1
  171. data/test/.blogs/views/computing/posts/0003-elixir-conf-coming-up/0003-elixir-conf-coming-up.lt3 +0 -17
  172. data/test/.blogs/views/computing/posts/0003-elixir-conf-coming-up/elixir-conf-coming-up.html +0 -12
  173. data/test/.blogs/views/computing/posts/0003-elixir-conf-coming-up/metadata.txt +0 -6
  174. data/test/.blogs/views/computing/posts/0003-elixir-conf-coming-up/teaser.txt +0 -1
  175. data/test/.blogs/views/computing/posts/0005-the-genius-of-scenic/0005-the-genius-of-scenic.lt3 +0 -16
  176. data/test/.blogs/views/computing/posts/0005-the-genius-of-scenic/metadata.txt +0 -6
  177. data/test/.blogs/views/computing/posts/0005-the-genius-of-scenic/teaser.txt +0 -1
  178. data/test/.blogs/views/computing/posts/0005-the-genius-of-scenic/the-genius-of-scenic.html +0 -11
  179. data/test/.blogs/views/computing/posts/0006-the-future-of-coding/0006-the-future-of-coding.lt3 +0 -16
  180. data/test/.blogs/views/computing/posts/0006-the-future-of-coding/metadata.txt +0 -6
  181. data/test/.blogs/views/computing/posts/0006-the-future-of-coding/teaser.txt +0 -1
  182. data/test/.blogs/views/computing/posts/0006-the-future-of-coding/the-future-of-coding.html +0 -11
  183. data/test/.blogs/views/computing/publish +0 -5
  184. data/test/.blogs/views/computing/remote/elixir-conf-coming-up.html +0 -51
  185. data/test/.blogs/views/computing/remote/etc/blog.css +0 -34
  186. data/test/.blogs/views/computing/remote/etc/blog.css.lt3 +0 -36
  187. data/test/.blogs/views/computing/remote/etc/externals.lt3 +0 -19
  188. data/test/.blogs/views/computing/remote/etc/favicon.ico +0 -0
  189. data/test/.blogs/views/computing/remote/etc/misc.js +0 -6
  190. data/test/.blogs/views/computing/remote/permalink/elixir-conf-coming-up.html +0 -51
  191. data/test/.blogs/views/computing/remote/permalink/the-future-of-coding.html +0 -50
  192. data/test/.blogs/views/computing/remote/permalink/the-genius-of-scenic.html +0 -50
  193. data/test/.blogs/views/computing/remote/recent.html +0 -64
  194. data/test/.blogs/views/computing/remote/the-future-of-coding.html +0 -50
  195. data/test/.blogs/views/computing/remote/the-genius-of-scenic.html +0 -50
  196. data/test/.blogs/views/computing/remote/widgets/README +0 -4
  197. data/test/.blogs/views/computing/remote/widgets/ad/ad.lt3 +0 -12
  198. data/test/.blogs/views/computing/remote/widgets/calendar/calendar.lt3 +0 -6
  199. data/test/.blogs/views/computing/remote/widgets/news/list.data +0 -4
  200. data/test/.blogs/views/computing/remote/widgets/news/news.lt3 +0 -3
  201. data/test/.blogs/views/computing/remote/widgets/pages/README +0 -2
  202. data/test/.blogs/views/computing/remote/widgets/pages/disclaim.lt3 +0 -6
  203. data/test/.blogs/views/computing/remote/widgets/pages/faq.lt3 +0 -6
  204. data/test/.blogs/views/computing/remote/widgets/pages/generated.lt3 +0 -4
  205. data/test/.blogs/views/computing/remote/widgets/pages/lifestory.lt3 +0 -6
  206. data/test/.blogs/views/computing/remote/widgets/pages/like-dislike.lt3 +0 -6
  207. data/test/.blogs/views/computing/remote/widgets/pages/list.data +0 -4
  208. data/test/.blogs/views/computing/remote/widgets/pages/main.html +0 -9
  209. data/test/.blogs/views/computing/remote/widgets/pages/main.lt3 +0 -18
  210. data/test/.blogs/views/computing/remote/widgets/tag-cloud/tag-cloud.lt3 +0 -12
  211. data/test/.blogs/views/computing/staging/0003-elixir-conf-coming-up.lt3 +0 -17
  212. data/test/.blogs/views/computing/staging/0005-the-genius-of-scenic.lt3 +0 -16
  213. data/test/.blogs/views/computing/staging/0006-the-future-of-coding.lt3 +0 -16
  214. data/test/.blogs/views/computing/staging/README +0 -59
  215. data/test/.blogs/views/computing/staging/blog/generate.lt3 +0 -17
  216. data/test/.blogs/views/computing/staging/blog/head.lt3 +0 -9
  217. data/test/.blogs/views/computing/staging/blog/index.lt3 +0 -6
  218. data/test/.blogs/views/computing/staging/blog/post_entry.lt3 +0 -19
  219. data/test/.blogs/views/computing/staging/elixir-conf-coming-up.html +0 -51
  220. data/test/.blogs/views/computing/staging/etc/blog.css +0 -34
  221. data/test/.blogs/views/computing/staging/etc/blog.css.lt3 +0 -36
  222. data/test/.blogs/views/computing/staging/etc/externals.lt3 +0 -19
  223. data/test/.blogs/views/computing/staging/etc/favicon.ico +0 -0
  224. data/test/.blogs/views/computing/staging/etc/misc.js +0 -6
  225. data/test/.blogs/views/computing/staging/global.lt3 +0 -22
  226. data/test/.blogs/views/computing/staging/navbar/about.html +0 -6
  227. data/test/.blogs/views/computing/staging/navbar/contact.html +0 -6
  228. data/test/.blogs/views/computing/staging/navbar/navbar.lt3 +0 -6
  229. data/test/.blogs/views/computing/staging/post/generate.lt3 +0 -26
  230. data/test/.blogs/views/computing/staging/post/head.lt3 +0 -4
  231. data/test/.blogs/views/computing/staging/post/index.html +0 -16
  232. data/test/.blogs/views/computing/staging/post/index.lt3 +0 -16
  233. data/test/.blogs/views/computing/staging/post/permalink.lt3 +0 -26
  234. data/test/.blogs/views/computing/staging/recent.html +0 -64
  235. data/test/.blogs/views/computing/staging/sidebar/README +0 -3
  236. data/test/.blogs/views/computing/staging/the-future-of-coding.html +0 -50
  237. data/test/.blogs/views/computing/staging/the-genius-of-scenic.html +0 -50
  238. data/test/.blogs/views/computing/staging/vars.lt3 +0 -2
  239. data/test/.blogs/views/computing/staging/widgets/README +0 -4
  240. data/test/.blogs/views/computing/staging/widgets/ad/ad.lt3 +0 -12
  241. data/test/.blogs/views/computing/staging/widgets/calendar/calendar.lt3 +0 -6
  242. data/test/.blogs/views/computing/staging/widgets/news/list.data +0 -4
  243. data/test/.blogs/views/computing/staging/widgets/news/news.lt3 +0 -3
  244. data/test/.blogs/views/computing/staging/widgets/pages/README +0 -2
  245. data/test/.blogs/views/computing/staging/widgets/pages/disclaim.lt3 +0 -6
  246. data/test/.blogs/views/computing/staging/widgets/pages/faq.lt3 +0 -6
  247. data/test/.blogs/views/computing/staging/widgets/pages/generated.lt3 +0 -4
  248. data/test/.blogs/views/computing/staging/widgets/pages/lifestory.lt3 +0 -6
  249. data/test/.blogs/views/computing/staging/widgets/pages/like-dislike.lt3 +0 -6
  250. data/test/.blogs/views/computing/staging/widgets/pages/list.data +0 -4
  251. data/test/.blogs/views/computing/staging/widgets/pages/main.html +0 -9
  252. data/test/.blogs/views/computing/staging/widgets/pages/main.lt3 +0 -18
  253. data/test/.blogs/views/computing/staging/widgets/tag-cloud/tag-cloud.lt3 +0 -12
  254. data/test/.blogs/views/computing/themes/standard/README +0 -59
  255. data/test/.blogs/views/computing/themes/standard/blog/generate.lt3 +0 -17
  256. data/test/.blogs/views/computing/themes/standard/blog/head.lt3 +0 -9
  257. data/test/.blogs/views/computing/themes/standard/blog/index.lt3 +0 -6
  258. data/test/.blogs/views/computing/themes/standard/blog/post_entry.lt3 +0 -19
  259. data/test/.blogs/views/computing/themes/standard/etc/blog.css +0 -34
  260. data/test/.blogs/views/computing/themes/standard/etc/blog.css.lt3 +0 -36
  261. data/test/.blogs/views/computing/themes/standard/etc/externals.lt3 +0 -19
  262. data/test/.blogs/views/computing/themes/standard/etc/favicon.ico +0 -0
  263. data/test/.blogs/views/computing/themes/standard/etc/misc.js +0 -6
  264. data/test/.blogs/views/computing/themes/standard/global.lt3 +0 -22
  265. data/test/.blogs/views/computing/themes/standard/navbar/about.html +0 -6
  266. data/test/.blogs/views/computing/themes/standard/navbar/contact.html +0 -6
  267. data/test/.blogs/views/computing/themes/standard/navbar/navbar.lt3 +0 -6
  268. data/test/.blogs/views/computing/themes/standard/post/generate.lt3 +0 -26
  269. data/test/.blogs/views/computing/themes/standard/post/head.lt3 +0 -4
  270. data/test/.blogs/views/computing/themes/standard/post/index.lt3 +0 -16
  271. data/test/.blogs/views/computing/themes/standard/post/permalink.lt3 +0 -26
  272. data/test/.blogs/views/computing/themes/standard/sidebar/README +0 -3
  273. data/test/.blogs/views/computing/themes/standard/widgets/README +0 -4
  274. data/test/.blogs/views/computing/themes/standard/widgets/ad/ad.lt3 +0 -12
  275. data/test/.blogs/views/computing/themes/standard/widgets/calendar/calendar.lt3 +0 -6
  276. data/test/.blogs/views/computing/themes/standard/widgets/news/list.data +0 -4
  277. data/test/.blogs/views/computing/themes/standard/widgets/news/news.lt3 +0 -3
  278. data/test/.blogs/views/computing/themes/standard/widgets/pages/README +0 -2
  279. data/test/.blogs/views/computing/themes/standard/widgets/pages/disclaim.lt3 +0 -6
  280. data/test/.blogs/views/computing/themes/standard/widgets/pages/faq.lt3 +0 -6
  281. data/test/.blogs/views/computing/themes/standard/widgets/pages/generated.lt3 +0 -4
  282. data/test/.blogs/views/computing/themes/standard/widgets/pages/lifestory.lt3 +0 -6
  283. data/test/.blogs/views/computing/themes/standard/widgets/pages/like-dislike.lt3 +0 -6
  284. data/test/.blogs/views/computing/themes/standard/widgets/pages/list.data +0 -4
  285. data/test/.blogs/views/computing/themes/standard/widgets/pages/main.html +0 -9
  286. data/test/.blogs/views/computing/themes/standard/widgets/pages/main.lt3 +0 -18
  287. data/test/.blogs/views/computing/themes/standard/widgets/tag-cloud/tag-cloud.lt3 +0 -12
  288. data/test/.blogs/views/music/last_published +0 -1
  289. data/test/.blogs/views/music/posts/0004-does-indie-still-matter/0004-does-indie-still-matter.lt3 +0 -16
  290. data/test/.blogs/views/music/posts/0004-does-indie-still-matter/does-indie-still-matter.html +0 -11
  291. data/test/.blogs/views/music/posts/0004-does-indie-still-matter/metadata.txt +0 -6
  292. data/test/.blogs/views/music/posts/0004-does-indie-still-matter/teaser.txt +0 -1
  293. data/test/.blogs/views/music/posts/0010-remember-modest-mouse/0010-remember-modest-mouse.lt3 +0 -17
  294. data/test/.blogs/views/music/posts/0010-remember-modest-mouse/metadata.txt +0 -6
  295. data/test/.blogs/views/music/posts/0010-remember-modest-mouse/remember-modest-mouse.html +0 -12
  296. data/test/.blogs/views/music/posts/0010-remember-modest-mouse/teaser.txt +0 -1
  297. data/test/.blogs/views/music/publish +0 -5
  298. data/test/.blogs/views/music/remote/does-indie-still-matter.html +0 -50
  299. data/test/.blogs/views/music/remote/etc/blog.css +0 -34
  300. data/test/.blogs/views/music/remote/etc/blog.css.lt3 +0 -36
  301. data/test/.blogs/views/music/remote/etc/externals.lt3 +0 -19
  302. data/test/.blogs/views/music/remote/etc/favicon.ico +0 -0
  303. data/test/.blogs/views/music/remote/etc/misc.js +0 -6
  304. data/test/.blogs/views/music/remote/permalink/does-indie-still-matter.html +0 -50
  305. data/test/.blogs/views/music/remote/permalink/remember-modest-mouse.html +0 -51
  306. data/test/.blogs/views/music/remote/recent.html +0 -44
  307. data/test/.blogs/views/music/remote/remember-modest-mouse.html +0 -51
  308. data/test/.blogs/views/music/remote/widgets/README +0 -4
  309. data/test/.blogs/views/music/remote/widgets/ad/ad.lt3 +0 -12
  310. data/test/.blogs/views/music/remote/widgets/calendar/calendar.lt3 +0 -6
  311. data/test/.blogs/views/music/remote/widgets/news/list.data +0 -4
  312. data/test/.blogs/views/music/remote/widgets/news/news.lt3 +0 -3
  313. data/test/.blogs/views/music/remote/widgets/pages/README +0 -2
  314. data/test/.blogs/views/music/remote/widgets/pages/disclaim.lt3 +0 -6
  315. data/test/.blogs/views/music/remote/widgets/pages/faq.lt3 +0 -6
  316. data/test/.blogs/views/music/remote/widgets/pages/generated.lt3 +0 -4
  317. data/test/.blogs/views/music/remote/widgets/pages/lifestory.lt3 +0 -6
  318. data/test/.blogs/views/music/remote/widgets/pages/like-dislike.lt3 +0 -6
  319. data/test/.blogs/views/music/remote/widgets/pages/list.data +0 -4
  320. data/test/.blogs/views/music/remote/widgets/pages/main.html +0 -9
  321. data/test/.blogs/views/music/remote/widgets/pages/main.lt3 +0 -18
  322. data/test/.blogs/views/music/remote/widgets/tag-cloud/tag-cloud.lt3 +0 -12
  323. data/test/.blogs/views/music/staging/0004-does-indie-still-matter.lt3 +0 -16
  324. data/test/.blogs/views/music/staging/0010-remember-modest-mouse.lt3 +0 -17
  325. data/test/.blogs/views/music/staging/README +0 -59
  326. data/test/.blogs/views/music/staging/blog/generate.lt3 +0 -17
  327. data/test/.blogs/views/music/staging/blog/head.lt3 +0 -9
  328. data/test/.blogs/views/music/staging/blog/index.lt3 +0 -6
  329. data/test/.blogs/views/music/staging/blog/post_entry.lt3 +0 -19
  330. data/test/.blogs/views/music/staging/does-indie-still-matter.html +0 -50
  331. data/test/.blogs/views/music/staging/etc/blog.css +0 -34
  332. data/test/.blogs/views/music/staging/etc/blog.css.lt3 +0 -36
  333. data/test/.blogs/views/music/staging/etc/externals.lt3 +0 -19
  334. data/test/.blogs/views/music/staging/etc/favicon.ico +0 -0
  335. data/test/.blogs/views/music/staging/etc/misc.js +0 -6
  336. data/test/.blogs/views/music/staging/global.lt3 +0 -22
  337. data/test/.blogs/views/music/staging/navbar/about.html +0 -6
  338. data/test/.blogs/views/music/staging/navbar/contact.html +0 -6
  339. data/test/.blogs/views/music/staging/navbar/navbar.lt3 +0 -6
  340. data/test/.blogs/views/music/staging/post/generate.lt3 +0 -26
  341. data/test/.blogs/views/music/staging/post/head.lt3 +0 -4
  342. data/test/.blogs/views/music/staging/post/index.html +0 -17
  343. data/test/.blogs/views/music/staging/post/index.lt3 +0 -16
  344. data/test/.blogs/views/music/staging/post/permalink.lt3 +0 -26
  345. data/test/.blogs/views/music/staging/recent.html +0 -44
  346. data/test/.blogs/views/music/staging/remember-modest-mouse.html +0 -51
  347. data/test/.blogs/views/music/staging/sidebar/README +0 -3
  348. data/test/.blogs/views/music/staging/vars.lt3 +0 -2
  349. data/test/.blogs/views/music/staging/widgets/README +0 -4
  350. data/test/.blogs/views/music/staging/widgets/ad/ad.lt3 +0 -12
  351. data/test/.blogs/views/music/staging/widgets/calendar/calendar.lt3 +0 -6
  352. data/test/.blogs/views/music/staging/widgets/news/list.data +0 -4
  353. data/test/.blogs/views/music/staging/widgets/news/news.lt3 +0 -3
  354. data/test/.blogs/views/music/staging/widgets/pages/README +0 -2
  355. data/test/.blogs/views/music/staging/widgets/pages/disclaim.lt3 +0 -6
  356. data/test/.blogs/views/music/staging/widgets/pages/faq.lt3 +0 -6
  357. data/test/.blogs/views/music/staging/widgets/pages/generated.lt3 +0 -4
  358. data/test/.blogs/views/music/staging/widgets/pages/lifestory.lt3 +0 -6
  359. data/test/.blogs/views/music/staging/widgets/pages/like-dislike.lt3 +0 -6
  360. data/test/.blogs/views/music/staging/widgets/pages/list.data +0 -4
  361. data/test/.blogs/views/music/staging/widgets/pages/main.html +0 -9
  362. data/test/.blogs/views/music/staging/widgets/pages/main.lt3 +0 -18
  363. data/test/.blogs/views/music/staging/widgets/tag-cloud/tag-cloud.lt3 +0 -12
  364. data/test/.blogs/views/music/themes/standard/README +0 -59
  365. data/test/.blogs/views/music/themes/standard/blog/generate.lt3 +0 -17
  366. data/test/.blogs/views/music/themes/standard/blog/head.lt3 +0 -9
  367. data/test/.blogs/views/music/themes/standard/blog/index.lt3 +0 -6
  368. data/test/.blogs/views/music/themes/standard/blog/post_entry.lt3 +0 -19
  369. data/test/.blogs/views/music/themes/standard/etc/blog.css +0 -34
  370. data/test/.blogs/views/music/themes/standard/etc/blog.css.lt3 +0 -36
  371. data/test/.blogs/views/music/themes/standard/etc/externals.lt3 +0 -19
  372. data/test/.blogs/views/music/themes/standard/etc/favicon.ico +0 -0
  373. data/test/.blogs/views/music/themes/standard/etc/misc.js +0 -6
  374. data/test/.blogs/views/music/themes/standard/global.lt3 +0 -22
  375. data/test/.blogs/views/music/themes/standard/navbar/about.html +0 -6
  376. data/test/.blogs/views/music/themes/standard/navbar/contact.html +0 -6
  377. data/test/.blogs/views/music/themes/standard/navbar/navbar.lt3 +0 -6
  378. data/test/.blogs/views/music/themes/standard/post/generate.lt3 +0 -26
  379. data/test/.blogs/views/music/themes/standard/post/head.lt3 +0 -4
  380. data/test/.blogs/views/music/themes/standard/post/index.lt3 +0 -16
  381. data/test/.blogs/views/music/themes/standard/post/permalink.lt3 +0 -26
  382. data/test/.blogs/views/music/themes/standard/sidebar/README +0 -3
  383. data/test/.blogs/views/music/themes/standard/widgets/README +0 -4
  384. data/test/.blogs/views/music/themes/standard/widgets/ad/ad.lt3 +0 -12
  385. data/test/.blogs/views/music/themes/standard/widgets/calendar/calendar.lt3 +0 -6
  386. data/test/.blogs/views/music/themes/standard/widgets/news/list.data +0 -4
  387. data/test/.blogs/views/music/themes/standard/widgets/news/news.lt3 +0 -3
  388. data/test/.blogs/views/music/themes/standard/widgets/pages/README +0 -2
  389. data/test/.blogs/views/music/themes/standard/widgets/pages/disclaim.lt3 +0 -6
  390. data/test/.blogs/views/music/themes/standard/widgets/pages/faq.lt3 +0 -6
  391. data/test/.blogs/views/music/themes/standard/widgets/pages/generated.lt3 +0 -4
  392. data/test/.blogs/views/music/themes/standard/widgets/pages/lifestory.lt3 +0 -6
  393. data/test/.blogs/views/music/themes/standard/widgets/pages/like-dislike.lt3 +0 -6
  394. data/test/.blogs/views/music/themes/standard/widgets/pages/list.data +0 -4
  395. data/test/.blogs/views/music/themes/standard/widgets/pages/main.html +0 -9
  396. data/test/.blogs/views/music/themes/standard/widgets/pages/main.lt3 +0 -18
  397. data/test/.blogs/views/music/themes/standard/widgets/tag-cloud/tag-cloud.lt3 +0 -12
  398. data/test/.blogs/views/test_view/last_published +0 -1
  399. data/test/.blogs/views/test_view/publish +0 -5
  400. data/test/.blogs/views/test_view/remote/etc/blog.css +0 -34
  401. data/test/.blogs/views/test_view/remote/etc/blog.css.lt3 +0 -36
  402. data/test/.blogs/views/test_view/remote/etc/externals.lt3 +0 -19
  403. data/test/.blogs/views/test_view/remote/etc/favicon.ico +0 -0
  404. data/test/.blogs/views/test_view/remote/etc/misc.js +0 -6
  405. data/test/.blogs/views/test_view/remote/widgets/README +0 -4
  406. data/test/.blogs/views/test_view/remote/widgets/ad/ad.lt3 +0 -12
  407. data/test/.blogs/views/test_view/remote/widgets/calendar/calendar.lt3 +0 -6
  408. data/test/.blogs/views/test_view/remote/widgets/news/list.data +0 -4
  409. data/test/.blogs/views/test_view/remote/widgets/news/news.lt3 +0 -3
  410. data/test/.blogs/views/test_view/remote/widgets/pages/README +0 -2
  411. data/test/.blogs/views/test_view/remote/widgets/pages/disclaim.lt3 +0 -6
  412. data/test/.blogs/views/test_view/remote/widgets/pages/faq.lt3 +0 -6
  413. data/test/.blogs/views/test_view/remote/widgets/pages/generated.lt3 +0 -4
  414. data/test/.blogs/views/test_view/remote/widgets/pages/lifestory.lt3 +0 -6
  415. data/test/.blogs/views/test_view/remote/widgets/pages/like-dislike.lt3 +0 -6
  416. data/test/.blogs/views/test_view/remote/widgets/pages/list.data +0 -4
  417. data/test/.blogs/views/test_view/remote/widgets/pages/main.html +0 -9
  418. data/test/.blogs/views/test_view/remote/widgets/pages/main.lt3 +0 -18
  419. data/test/.blogs/views/test_view/remote/widgets/tag-cloud/tag-cloud.lt3 +0 -12
  420. data/test/.blogs/views/test_view/staging/README +0 -59
  421. data/test/.blogs/views/test_view/staging/blog/generate.lt3 +0 -17
  422. data/test/.blogs/views/test_view/staging/blog/head.lt3 +0 -9
  423. data/test/.blogs/views/test_view/staging/blog/index.lt3 +0 -6
  424. data/test/.blogs/views/test_view/staging/blog/post_entry.lt3 +0 -19
  425. data/test/.blogs/views/test_view/staging/etc/blog.css +0 -34
  426. data/test/.blogs/views/test_view/staging/etc/blog.css.lt3 +0 -36
  427. data/test/.blogs/views/test_view/staging/etc/externals.lt3 +0 -19
  428. data/test/.blogs/views/test_view/staging/etc/favicon.ico +0 -0
  429. data/test/.blogs/views/test_view/staging/etc/misc.js +0 -6
  430. data/test/.blogs/views/test_view/staging/global.lt3 +0 -22
  431. data/test/.blogs/views/test_view/staging/navbar/about.html +0 -6
  432. data/test/.blogs/views/test_view/staging/navbar/contact.html +0 -6
  433. data/test/.blogs/views/test_view/staging/navbar/navbar.lt3 +0 -6
  434. data/test/.blogs/views/test_view/staging/post/generate.lt3 +0 -26
  435. data/test/.blogs/views/test_view/staging/post/head.lt3 +0 -4
  436. data/test/.blogs/views/test_view/staging/post/index.lt3 +0 -16
  437. data/test/.blogs/views/test_view/staging/post/permalink.lt3 +0 -26
  438. data/test/.blogs/views/test_view/staging/sidebar/README +0 -3
  439. data/test/.blogs/views/test_view/staging/widgets/README +0 -4
  440. data/test/.blogs/views/test_view/staging/widgets/ad/ad.lt3 +0 -12
  441. data/test/.blogs/views/test_view/staging/widgets/calendar/calendar.lt3 +0 -6
  442. data/test/.blogs/views/test_view/staging/widgets/news/list.data +0 -4
  443. data/test/.blogs/views/test_view/staging/widgets/news/news.lt3 +0 -3
  444. data/test/.blogs/views/test_view/staging/widgets/pages/README +0 -2
  445. data/test/.blogs/views/test_view/staging/widgets/pages/disclaim.lt3 +0 -6
  446. data/test/.blogs/views/test_view/staging/widgets/pages/faq.lt3 +0 -6
  447. data/test/.blogs/views/test_view/staging/widgets/pages/generated.lt3 +0 -4
  448. data/test/.blogs/views/test_view/staging/widgets/pages/lifestory.lt3 +0 -6
  449. data/test/.blogs/views/test_view/staging/widgets/pages/like-dislike.lt3 +0 -6
  450. data/test/.blogs/views/test_view/staging/widgets/pages/list.data +0 -4
  451. data/test/.blogs/views/test_view/staging/widgets/pages/main.html +0 -9
  452. data/test/.blogs/views/test_view/staging/widgets/pages/main.lt3 +0 -18
  453. data/test/.blogs/views/test_view/staging/widgets/tag-cloud/tag-cloud.lt3 +0 -12
  454. data/test/.blogs/views/test_view/themes/standard/README +0 -59
  455. data/test/.blogs/views/test_view/themes/standard/blog/generate.lt3 +0 -17
  456. data/test/.blogs/views/test_view/themes/standard/blog/head.lt3 +0 -9
  457. data/test/.blogs/views/test_view/themes/standard/blog/index.lt3 +0 -6
  458. data/test/.blogs/views/test_view/themes/standard/blog/post_entry.lt3 +0 -19
  459. data/test/.blogs/views/test_view/themes/standard/etc/blog.css +0 -34
  460. data/test/.blogs/views/test_view/themes/standard/etc/blog.css.lt3 +0 -36
  461. data/test/.blogs/views/test_view/themes/standard/etc/externals.lt3 +0 -19
  462. data/test/.blogs/views/test_view/themes/standard/etc/favicon.ico +0 -0
  463. data/test/.blogs/views/test_view/themes/standard/etc/misc.js +0 -6
  464. data/test/.blogs/views/test_view/themes/standard/global.lt3 +0 -22
  465. data/test/.blogs/views/test_view/themes/standard/navbar/about.html +0 -6
  466. data/test/.blogs/views/test_view/themes/standard/navbar/contact.html +0 -6
  467. data/test/.blogs/views/test_view/themes/standard/navbar/navbar.lt3 +0 -6
  468. data/test/.blogs/views/test_view/themes/standard/post/generate.lt3 +0 -26
  469. data/test/.blogs/views/test_view/themes/standard/post/head.lt3 +0 -4
  470. data/test/.blogs/views/test_view/themes/standard/post/index.lt3 +0 -16
  471. data/test/.blogs/views/test_view/themes/standard/post/permalink.lt3 +0 -26
  472. data/test/.blogs/views/test_view/themes/standard/sidebar/README +0 -3
  473. data/test/.blogs/views/test_view/themes/standard/widgets/README +0 -4
  474. data/test/.blogs/views/test_view/themes/standard/widgets/ad/ad.lt3 +0 -12
  475. data/test/.blogs/views/test_view/themes/standard/widgets/calendar/calendar.lt3 +0 -6
  476. data/test/.blogs/views/test_view/themes/standard/widgets/news/list.data +0 -4
  477. data/test/.blogs/views/test_view/themes/standard/widgets/news/news.lt3 +0 -3
  478. data/test/.blogs/views/test_view/themes/standard/widgets/pages/README +0 -2
  479. data/test/.blogs/views/test_view/themes/standard/widgets/pages/disclaim.lt3 +0 -6
  480. data/test/.blogs/views/test_view/themes/standard/widgets/pages/faq.lt3 +0 -6
  481. data/test/.blogs/views/test_view/themes/standard/widgets/pages/generated.lt3 +0 -4
  482. data/test/.blogs/views/test_view/themes/standard/widgets/pages/lifestory.lt3 +0 -6
  483. data/test/.blogs/views/test_view/themes/standard/widgets/pages/like-dislike.lt3 +0 -6
  484. data/test/.blogs/views/test_view/themes/standard/widgets/pages/list.data +0 -4
  485. data/test/.blogs/views/test_view/themes/standard/widgets/pages/main.html +0 -9
  486. data/test/.blogs/views/test_view/themes/standard/widgets/pages/main.lt3 +0 -18
  487. data/test/.blogs/views/test_view/themes/standard/widgets/tag-cloud/tag-cloud.lt3 +0 -12
  488. data/themes/standard/README +0 -59
  489. data/themes/standard/blog/generate.lt3 +0 -17
  490. data/themes/standard/blog/head.lt3 +0 -9
  491. data/themes/standard/blog/index.lt3 +0 -5
  492. data/themes/standard/blog/post_entry.lt3 +0 -19
  493. data/themes/standard/blog/recent.lt3 +0 -2
  494. data/themes/standard/etc/blog.css.lt3 +0 -36
  495. data/themes/standard/etc/externals.lt3 +0 -19
  496. data/themes/standard/etc/favicon.ico +0 -0
  497. data/themes/standard/etc/misc.js +0 -6
  498. data/themes/standard/global.lt3 +0 -22
  499. data/themes/standard/navbar/about.html +0 -6
  500. data/themes/standard/navbar/contact.html +0 -6
  501. data/themes/standard/navbar/navbar.lt3 +0 -6
  502. data/themes/standard/post/generate.lt3 +0 -24
  503. data/themes/standard/post/head.lt3 +0 -4
  504. data/themes/standard/post/index.lt3 +0 -16
  505. data/themes/standard/post/permalink.lt3 +0 -26
  506. data/themes/standard/sidebar/README +0 -3
  507. data/themes/standard/widgets/README +0 -4
  508. data/themes/standard/widgets/ad/ad.lt3 +0 -15
  509. data/themes/standard/widgets/calendar/calendar.lt3 +0 -6
  510. data/themes/standard/widgets/news/list.data +0 -4
  511. data/themes/standard/widgets/news/news.lt3 +0 -2
  512. data/themes/standard/widgets/pages/README +0 -2
  513. data/themes/standard/widgets/pages/disclaim.html +0 -6
  514. data/themes/standard/widgets/pages/disclaim.lt3 +0 -5
  515. data/themes/standard/widgets/pages/faq.html +0 -7
  516. data/themes/standard/widgets/pages/faq.lt3 +0 -6
  517. data/themes/standard/widgets/pages/generated.lt3 +0 -4
  518. data/themes/standard/widgets/pages/lifestory.html +0 -7
  519. data/themes/standard/widgets/pages/lifestory.lt3 +0 -6
  520. data/themes/standard/widgets/pages/like-dislike.html +0 -7
  521. data/themes/standard/widgets/pages/like-dislike.lt3 +0 -6
  522. data/themes/standard/widgets/pages/list.data +0 -4
  523. data/themes/standard/widgets/pages/main.html +0 -9
  524. data/themes/standard/widgets/pages/pages.lt3 +0 -2
  525. data/themes/standard/widgets/tag-cloud/tag-cloud.lt3 +0 -12
@@ -1,661 +0,0 @@
1
- require 'ostruct'
2
- require 'pp'
3
- require 'date'
4
-
5
- require 'livetext'
6
- require 'runeblog'
7
-
8
- errfile = File.new("/tmp/liveblog.out", "w")
9
- STDERR.reopen(errfile)
10
-
11
- def init_liveblog # FIXME - a lot of this logic sucks
12
- here = Dir.pwd
13
- dir = here
14
- loop { dir = Dir.pwd; break if File.exist?("config"); Dir.chdir("..") }
15
- Dir.chdir(here)
16
- @blog = $_blog = RuneBlog.new(dir)
17
- @root = @blog.root
18
- @view = @blog.view
19
- @view_name = @blog.view.name
20
- @vdir = @blog.view.dir
21
- @version = RuneBlog::VERSION
22
- @theme = @vdir + "/themes/standard/"
23
- end
24
-
25
- # FIXME - stale? and livetext are duplicated from helpers-blog
26
-
27
- def stale?(src, dst)
28
- return true unless File.exist?(dst)
29
- return true if File.mtime(src) > File.mtime(dst)
30
- return false
31
- end
32
-
33
- def livetext(src, dst=nil)
34
- src += ".lt3" unless src.end_with?(".lt3")
35
- if dst
36
- dst += ".html" unless dst.end_with?(".html")
37
- else
38
- dst = src.sub(/.lt3$/, "")
39
- end
40
- return unless stale?(src, dst)
41
- system("livetext #{src} >#{dst}")
42
- end
43
-
44
- def post
45
- @meta = OpenStruct.new
46
- @meta.num = _args[0]
47
- _out " <!-- Post number #{@meta.num} -->\n "
48
- end
49
-
50
- def quote
51
- _passthru "<blockquote>"
52
- _passthru _body
53
- _passthru "</blockquote>"
54
- _optional_blank_line
55
- end
56
-
57
- def categories # does nothing right now
58
- end
59
-
60
- def style
61
- fname = _args[0]
62
- _passthru %[<link rel="stylesheet" href="???/etc/#{fname}')">]
63
- end
64
-
65
- # Move elsewhere later!
66
-
67
- def h1; _passthru "<h1>#{@_data}</h1>"; end
68
- def h2; _passthru "<h2>#{@_data}</h2>"; end
69
- def h3; _passthru "<h3>#{@_data}</h3>"; end
70
- def h4; _passthru "<h4>#{@_data}</h4>"; end
71
- def h5; _passthru "<h5>#{@_data}</h5>"; end
72
- def h6; _passthru "<h6>#{@_data}</h6>"; end
73
-
74
- def hr; _passthru "<hr>"; end
75
-
76
- def list
77
- _out "<ul>"
78
- _body {|line| _out "<li>#{line}</li>" }
79
- _out "</ul>"
80
- _optional_blank_line
81
- end
82
-
83
- def list!
84
- _out "<ul>"
85
- lines = _body.each
86
- loop do
87
- line = lines.next
88
- line = _format(line)
89
- if line[0] == " "
90
- _out line
91
- else
92
- _out "<li>#{line}</li>"
93
- end
94
- end
95
- _out "</ul>"
96
- _optional_blank_line
97
- end
98
-
99
- def html_body(file)
100
- file.puts "<html>\n <body>"
101
- yield
102
- file.puts " </body>\n</html>"
103
- end
104
-
105
- def make_news_links
106
- # FIXME remember strings may not be safe
107
- line = _data.chomp
108
- input, cardfile, mainfile, card_title = *line.split(" ", 4)
109
- pairs = File.readlines(input).map {|line| line.chomp.split(",", 2) }
110
- # HTML for main area (iframe)
111
- File.open("#{mainfile}.html", "w") do |f|
112
- html_body(f) do
113
- f.puts "<h1>#{card_title}</h1>"
114
- pairs.each do |file, title|
115
- f.puts %[<a style="text-decoration: none; font-size: 24px" href="#{file}">#{title}</a> <br>]
116
- end
117
- end
118
- end
119
- # HTML for sidebar card
120
- File.open("#{cardfile}.html", "w") do |f|
121
- f.puts <<-EOS
122
- <div class="card mb-3">
123
- <div class="card-body">
124
- <h5 class="card-title">
125
- <a href="javascript: void(0)"
126
- onclick="javascript:open_main('widgets/news/#{mainfile}.html')"
127
- style="text-decoration: none; color: black">#{card_title}</a>
128
- </h5>
129
- EOS
130
- pairs.each do |file, title|
131
- f.puts <<-EOS
132
- <li class="list-group-item"> <a href="javascript: void(0)"
133
- onclick="javascript:open_main('#{file}')">#{title}</a> </li>
134
- EOS
135
- end
136
- f.puts <<-EOS
137
- </div>
138
- </div>
139
- EOS
140
- end
141
- end
142
-
143
- ### inset
144
-
145
- def inset
146
- lines = _body
147
- box = ""
148
- lines.each do |line|
149
- line = line.dup
150
- if line[0] == "/" # Only into inset
151
- line[0] = ' '
152
- box << line.dup + " "
153
- line.replace(" ")
154
- end
155
- if line[0] == "|" # Into inset and body
156
- line[0] = ' '
157
- box << line.dup + " "
158
- end
159
- _passthru(line)
160
- end
161
- lr = _args.first
162
- wide = _args[1] || "25"
163
- _passthru "<div style='float:#{lr}; width: #{wide}%; padding:8px; padding-right:12px; font-family:verdana'>"
164
- _passthru '<b><i>'
165
- _passthru box
166
- _passthru_noline '</i></b></div>'
167
- _optional_blank_line
168
- end
169
-
170
- def _errout(*args)
171
- ::STDERR.puts *args
172
- end
173
-
174
- def _passthru(line)
175
- return if line.nil?
176
- line = _format(line)
177
- _out line + "\n"
178
- _out "<p>" if line.empty? && ! @_nopara
179
- end
180
-
181
- def _passthru_noline(line)
182
- return if line.nil?
183
- line = _format(line)
184
- _out line
185
- _out "<p>" if line.empty? && ! @_nopara
186
- end
187
-
188
- def title
189
- raise "'post' was not called" unless @meta
190
- title = @_data.chomp
191
- @meta.title = title
192
- setvar :title, title
193
- _out %[<h1 class="post-title">#{title}</h1><br>]
194
- _optional_blank_line
195
- end
196
-
197
- def pubdate
198
- raise "'post' was not called" unless @meta
199
- _debug "data = #@_data"
200
- # Check for discrepancy?
201
- match = /(\d{4}).(\d{2}).(\d{2})/.match @_data
202
- junk, y, m, d = match.to_a
203
- y, m, d = y.to_i, m.to_i, d.to_i
204
- @meta.date = ::Date.new(y, m, d)
205
- @meta.pubdate = "%04d-%02d-%02d" % [y, m, d]
206
- _optional_blank_line
207
- end
208
-
209
- def image # primitive so far
210
- _debug "img: huh? <img src=#{_args.first}></img>"
211
- fname = _args.first
212
- path = "assets/#{fname}"
213
- _out "<img src=#{path}></img>"
214
- _optional_blank_line
215
- end
216
-
217
- def tags
218
- raise "'post' was not called" unless @meta
219
- _debug "args = #{_args}"
220
- @meta.tags = _args.dup || []
221
- _optional_blank_line
222
- end
223
-
224
- def views
225
- raise "'post' was not called" unless @meta
226
- _debug "data = #{_args}"
227
- @meta.views = _args.dup
228
- _optional_blank_line
229
- end
230
-
231
- def pin
232
- raise "'post' was not called" unless @meta
233
- _debug "data = #{_args}"
234
- # verify only already-specified views?
235
- @meta.pinned = _args.dup
236
- _optional_blank_line
237
- end
238
-
239
- def write_post
240
- raise "'post' was not called" unless @meta
241
- save = Dir.pwd
242
- @postdir.gsub!(/\/\//, "/") # FIXME unneeded?
243
- Dir.mkdir(@postdir) unless Dir.exist?(@postdir) # FIXME remember assets!
244
- Dir.chdir(@postdir)
245
- @meta.views = @meta.views.join(" ") if @meta.views.is_a? Array
246
- @meta.tags = @meta.tags.join(" ") if @meta.tags.is_a? Array
247
- File.write("teaser.txt", @meta.teaser)
248
-
249
- fields = [:num, :title, :date, :pubdate, :views, :tags]
250
-
251
- fname2 = "metadata.txt"
252
- f2 = File.open(fname2, "w") do |f2|
253
- fields.each {|fld| f2.puts "#{fld}: #{@meta.send(fld)}" }
254
- end
255
- Dir.chdir(save)
256
- rescue => err
257
- puts "err = #{err}"
258
- puts err.backtrace.join("\n")
259
- end
260
-
261
- def teaser
262
- raise "'post' was not called" unless @meta
263
- @meta.teaser = _body_text
264
- setvar :teaser, @meta.teaser
265
- _out @meta.teaser + "\n"
266
- # FIXME
267
- end
268
-
269
- def finalize
270
- unless @meta
271
- puts @live.body
272
- return
273
- end
274
- if @blog.nil?
275
- return @meta
276
- end
277
-
278
- @slug = @blog.make_slug(@meta)
279
- slug_dir = @slug
280
- @postdir = @blog.view.dir + "/posts/#{slug_dir}"
281
- STDERR.puts "--- finalize: pwd = #{Dir.pwd} postdir = #@postdir"
282
- write_post
283
- @meta
284
- end
285
-
286
- $Dot = self # Clunky! for dot commands called from Functions class
287
-
288
- # Find a better way to do this?
289
-
290
- class Livetext::Functions
291
-
292
- def br(n="1")
293
- # Thought: Maybe make a way for functions to "simply" call the
294
- # dot command of the same name?? Is this trivial??
295
- n = n.empty? ? 1 : n.to_i
296
- "<br>"*n
297
- end
298
-
299
- def h1(param); "<h1>#{param}</h1>"; end
300
- def h2(param); "<h2>#{param}</h2>"; end
301
- def h3(param); "<h3>#{param}</h3>"; end
302
- def h4(param); "<h4>#{param}</h4>"; end
303
- def h5(param); "<h5>#{param}</h5>"; end
304
- def h6(param); "<h6>#{param}</h6>"; end
305
-
306
- def hr(param=nil)
307
- $Dot.hr
308
- end
309
-
310
- def image(param)
311
- "<img src='#{param}'></img>"
312
- end
313
-
314
- end
315
-
316
- ###### experimental...
317
-
318
- class Livetext::Functions
319
- def _var(name)
320
- ::Livetext::Vars[name] || "[:#{name} is undefined]"
321
- end
322
-
323
- def link
324
- file, cdata = self.class.param.split("||", 2)
325
- %[<link type="application/atom+xml" rel="alternate" href="#{_var(:host)}#{file}" title="#{_var(:title)}">]
326
- end
327
- end
328
-
329
- ###
330
-
331
- def _var(name) # FIXME scope issue!
332
- ::Livetext::Vars[name] || "[:#{name} is undefined]"
333
- end
334
-
335
- def head # Does NOT output <head> tags
336
- args = _args
337
- args.each do |inc|
338
- self.data = inc
339
- _include
340
- end
341
- # Depends on vars: title, desc, host
342
- defaults = {}
343
- defaults = { "charset" => %[<meta charset="utf-8">],
344
- "http-equiv" => %[<meta http-equiv="X-UA-Compatible" content="IE=edge">],
345
- "title" => %[<title>\n #{_var(:blog)} | #{_var("blog.desc")}\n </title>],
346
- "generator" => %[<meta name="generator" content="Runeblog v #@version">],
347
- "og:title" => %[<meta property="og:title" content="#{_var(:blog)}">],
348
- "og:locale" => %[<meta property="og:locale" content="#{_var(:locale)}">],
349
- "description" => %[<meta name="description" content="#{_var("blog.desc")}">],
350
- "og:description" => %[<meta property="og:description" content="#{_var("blog.desc")}">],
351
- "linkc" => %[<link rel="canonical" href="#{_var(:host)}">],
352
- "og:url" => %[<meta property="og:url" content="#{_var(:host)}">],
353
- "og:site_name" => %[<meta property="og:site_name" content="#{_var(:blog)}">],
354
- "style" => %[<link rel="stylesheet" href="etc/blog.css">],
355
- "feed" => %[<link type="application/atom+xml" rel="alternate" href="#{_var(:host)}/feed.xml" title="#{_var(:blog)}">],
356
- "favicon" => %[<link rel="shortcut icon" type="image/x-icon" href="../etc/favicon.ico">\n <link rel="apple-touch-icon" href="../etc/favicon.ico">]
357
- }
358
- result = {}
359
- lines = _body
360
- lines.each do |line|
361
- line.chomp
362
- word, remain = line.split(" ", 2)
363
- case word
364
- when "viewport"
365
- result["viewport"] = %[<meta name="viewport" content="#{remain}">]
366
- when "script" # FIXME this is broken
367
- file = remain
368
- text = File.read(file)
369
- result["script"] = Livetext.new.transform(text)
370
- when "style"
371
- result["style"] = %[<link rel="stylesheet" href="('/etc/#{remain}')">]
372
- # Later: allow other overrides
373
- when ""; break
374
- else
375
- STDERR.puts "-- got '#{word}'; old value = #{result[word].inspect}"
376
- if defaults[word]
377
- result[word] = %[<meta property="#{word}" content="#{remain}">]
378
- STDERR.puts "-- new value = #{result[word].inspect}"
379
- else
380
- puts "Unknown tag '#{word}'"
381
- end
382
- end
383
- end
384
- hash = defaults.dup.update(result) # FIXME collisions?
385
-
386
- # _out "<!-- "; _out hash.inspect; _out "--> "
387
- hash.each_value {|x| _out " " + x }
388
- _out "<body>"
389
- end
390
-
391
- ########## newer stuff...
392
-
393
- def meta
394
- args = _args
395
- enum = args.each
396
- str = "<meta"
397
- arg = enum.next
398
- loop do
399
- if arg.end_with?(":")
400
- str << " " << arg[0..-2] << "="
401
- a2 = enum.next
402
- str << %["#{a2}"]
403
- else
404
- STDERR.puts "=== meta error?"
405
- end
406
- arg = enum.next
407
- end
408
- str << ">"
409
- _out str
410
- end
411
-
412
- def recent_posts # side-effect
413
- _out %[<div class="col-lg-9 col-md-9 col-sm-9 col-xs-12">]
414
- all_teasers
415
- _out %[</div>]
416
- end
417
-
418
- def sidebar
419
- _out %[<div class="col-lg-3 col-md-3 col-sm-3 col-xs-12">]
420
- _args do |token|
421
- tag = token.chomp.strip.downcase
422
- Dir.chdir("widgets/#{tag}") do
423
- livetext tag, "card-#{tag}.html"
424
- _include_file "card-#{tag}.html"
425
- end
426
- end
427
- _out %[</div>]
428
- end
429
-
430
- def stylesheet
431
- lines = _body
432
- url = lines[0]
433
- integ = lines[1]
434
- cross = lines[2] || "anonymous"
435
- _out %[<link rel="stylesheet" href="#{url}" integrity="#{integ}" crossorigin="#{cross}"></link>]
436
- end
437
-
438
- def script
439
- lines = _body
440
- url = lines[0]
441
- integ = lines[1]
442
- cross = lines[2] || "anonymous"
443
- _out %[<script src="#{url}" integrity="#{integ}" crossorigin="#{cross}"></script>]
444
- end
445
-
446
-
447
- ### How this next bit works:
448
- ###
449
- ### all_teasers will call _find_recent_posts
450
- ###
451
- ### _find_recent_posts will search higher in the directory structure
452
- ### for where the posts are (0001, 0002, ...) NOTE: This implies you
453
- ### must be in some specific place when this code is run.
454
- ### It returns the 20 most recent posts.
455
- ###
456
- ### all_teasers will then pick a small number of posts and call _teaser
457
-
458
- ### on each one. (The code in _teaser really belongs in a small template
459
- ### somewhere.)
460
- ###
461
-
462
- def _find_recent_posts
463
- @vdir = _var(:FileDir).match(%r[(^.*/views/.*?)/])[1]
464
- posts = nil
465
- dir_posts = @vdir + "/posts"
466
- entries = Dir.entries(dir_posts)
467
- posts = entries.grep(/^\d\d\d\d/).map {|x| dir_posts + "/" + x }
468
- posts.select! {|x| File.directory?(x) }
469
- # directories that start with four digits
470
- posts = posts.sort {|a, b| b.to_i <=> a.to_i } # sort descending
471
- posts[0..19] # return 20 at most
472
- end
473
-
474
- def all_teasers
475
- text = <<-HTML
476
- <html>
477
- <head><link rel="stylesheet" href="etc/blog.css"></head>
478
- <body>
479
- HTML
480
- posts = _find_recent_posts
481
- wanted = [5, posts.size].min # estimate how many we want?
482
- enum = posts.each
483
- wanted.times do
484
- postid = File.basename(enum.next)
485
- postid = postid.to_i
486
- text << _teaser(postid) # side effect! calls _out
487
- end
488
- text << "</body></html>"
489
- File.write("recent.html", text)
490
- _out %[<iframe id="main" style="width: 100vw; height: 100vh; position: relative;" src='recent.html' width=100% frameborder="0" allowfullscreen></iframe>]
491
- end
492
-
493
- def _post_lookup(postid) # side-effect
494
- # .. = templates, ../.. = views/thisview
495
- slug = title = date = teaser_text = nil
496
-
497
- dir_posts = @vdir + "/posts"
498
- posts = Dir.entries(dir_posts).grep(/^\d\d\d\d/).map {|x| dir_posts + "/" + x }
499
- posts.select! {|x| File.directory?(x) }
500
-
501
- post = posts.select {|x| File.basename(x).to_i == postid }
502
- raise "Error: More than one post #{postid}" if post.size > 1
503
- postdir = post.first
504
- vp = RuneBlog::ViewPost.new(@blog.view, postdir)
505
- vp
506
- end
507
-
508
- def _interpolate(str, context) # FIXME move this later
509
- wrapped = "%[" + str.dup + "]" # could fail...
510
- eval(wrapped, context)
511
- end
512
-
513
- def _teaser(slug)
514
- id = slug.to_i
515
- text = nil
516
- post_entry_name = @theme + "blog/post_entry.lt3"
517
- @_post_entry ||= File.read(post_entry_name)
518
- vp = _post_lookup(id)
519
- nslug, aslug, title, date, teaser_text =
520
- vp.nslug, vp.aslug, vp.title, vp.date, vp.teaser_text
521
- path = vp.path
522
- url = "#{path}/#{aslug}.html" # Should be relative to .blogs!! FIXME
523
- date = Date.parse(date)
524
- date = date.strftime("%B %e<br>%Y")
525
- text = _interpolate(@_post_entry, binding)
526
- text
527
- end
528
-
529
- def _card_generic(card_title:, middle:, extra: "")
530
- front = <<-HTML
531
- <div class="card #{extra} mb-3">
532
- <div class="card-body">
533
- <h5 class="card-title">#{card_title}</h5>
534
- HTML
535
-
536
- tail = <<-HTML
537
- </div>
538
- </div>
539
- HTML
540
- text = front + middle + tail
541
- _out text + "\n "
542
- end
543
-
544
- def card_iframe
545
- title, lines = _data, _body
546
- lines.map!(&:chomp)
547
- url = lines[0].chomp
548
- stuff = lines[1..-1].join(" ") # FIXME later
549
- middle = <<-HTML
550
- <iframe src="#{url}" #{stuff}
551
- style="border: 0" #{stuff}
552
- frameborder="0" scrolling="no">
553
- </iframe>
554
- HTML
555
-
556
- _card_generic(card_title: title, middle: middle, extra: "bg-dark text-white")
557
- end
558
-
559
- def _main(url)
560
- %[href="javascript: void(0)" onclick="javascript:open_main('#{url}')"]
561
- end
562
-
563
- def card1
564
- title, lines = _data, _body
565
- lines.map!(&:chomp)
566
-
567
- card_text = lines[0]
568
- url, classname, cdata = lines[1].split(",", 4)
569
- main = _main(url)
570
-
571
- middle = <<-HTML
572
- <p class="card-text">#{card_text}</p>
573
- <a #{main} class="#{classname}">#{cdata}</a>
574
- HTML
575
-
576
- _card_generic(card_title: title, middle: middle, extra: "bg-dark text-white")
577
- end
578
-
579
- def card2
580
- str = _data
581
- file, card_title = str.chomp.split(" ", 2)
582
- card_title = %[<a #{_main(file)} style="text-decoration: none; color: black">#{card_title}</a>]
583
-
584
- # FIXME is this wrong??
585
-
586
- open = <<-HTML
587
- <div class="card mb-3">
588
- <div class="card-body">
589
- <h5 class="card-title">#{card_title}</h5>
590
- <ul class="list-group list-group-flush">
591
- HTML
592
- _out open
593
- _body do |line|
594
- url, cdata = line.chomp.split(",", 3)
595
- main = _main(url)
596
- _out %[<li class="list-group-item"><a #{main}}">#{cdata}</a> </li>]
597
- end
598
- close = %[ </ul>\n </div>\n </div>]
599
- _out close
600
- end
601
-
602
- def tag_cloud
603
- title = _data
604
- title = "Tag Cloud" if title.empty?
605
- open = <<-HTML
606
- <div class="card mb-3">
607
- <div class="card-body">
608
- <h5 class="card-title">#{title}</h5>
609
- HTML
610
- _out open
611
- _body do |line|
612
- line.chomp!
613
- url, classname, cdata = line.split(",", 4)
614
- main = _main(url)
615
- _out %[<a #{main} class="#{classname}">#{cdata}</a>]
616
- end
617
- close = %[ </div>\n </div>]
618
- _out close
619
- end
620
-
621
- def navbar
622
- title = _var(:blog)
623
-
624
- open = <<-HTML
625
- <nav class="navbar navbar-expand-lg navbar-light bg-light">
626
- <a class="navbar-brand" href="index.html">#{title}</a>
627
- <button class="navbar-toggler"
628
- type="button"
629
- data-toggle="collapse"
630
- data-target="#navbarSupportedContent"
631
- aria-controls="navbarSupportedContent"
632
- aria-expanded="false"
633
- aria-label="Toggle navigation">
634
- <span class="navbar-toggler-icon"></span>
635
- </button>
636
- <div class="collapse navbar-collapse pull-right"
637
- id="navbarSupportedContent">
638
- <ul class="navbar-nav mr-auto">
639
- HTML
640
- close = <<-HTML
641
- </ul>
642
- </div>
643
- </nav>
644
- HTML
645
-
646
- first = true
647
- _out open
648
- _body do |line|
649
- href, cdata = line.chomp.strip.split(" ", 2)
650
- main = _main(href)
651
- if first
652
- first = false
653
- _out %[<li class="nav-item active"> <a class="nav-link" href="#{href}">#{cdata}<span class="sr-only">(current)</span></a> </li>]
654
- else
655
- main = _main("navbar/#{href}")
656
- _out %[<li class="nav-item"> <a class="nav-link" #{main}>#{cdata}</a> </li>]
657
- end
658
- end
659
- _out close
660
- end
661
-