runeblog 0.2.11 → 0.2.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/empty_view.tgz +0 -0
- data/lib/default.rb +0 -1
- data/lib/helpers-blog.rb +11 -94
- data/lib/helpers-repl.rb +0 -27
- data/lib/liveblog.rb +87 -111
- data/lib/logging.rb +0 -23
- data/lib/pathmagic.rb +14 -0
- data/lib/post.rb +9 -20
- data/lib/publish.rb +6 -9
- data/lib/repl.rb +0 -2
- data/lib/runeblog.rb +75 -78
- data/lib/runeblog_version.rb +1 -1
- data/lib/view.rb +2 -3
- data/lib/xlate.rb +31 -0
- data/runeblog.gemspec +1 -2
- data/test/make_blog.rb +13 -5
- metadata +4 -509
- data/lib/BAD.liveblog.rb +0 -724
- data/lib/KEEP.liveblog +0 -646
- data/lib/NEW-liveblog.rb +0 -757
- data/lib/OLD-liveblog.rb +0 -661
- data/test/.blogs/VERSION +0 -2
- data/test/.blogs/config +0 -3
- data/test/.blogs/drafts/0001-whats-at-stubbs.lt3 +0 -16
- data/test/.blogs/drafts/0002-the-new-amphitheatre-is-overrated.lt3 +0 -16
- data/test/.blogs/drafts/0003-elixir-conf-coming-up.lt3 +0 -17
- data/test/.blogs/drafts/0004-does-indie-still-matter.lt3 +0 -16
- data/test/.blogs/drafts/0005-the-genius-of-scenic.lt3 +0 -16
- data/test/.blogs/drafts/0006-the-future-of-coding.lt3 +0 -16
- data/test/.blogs/drafts/0007-the-graffiti-wall.lt3 +0 -17
- data/test/.blogs/drafts/0008-the-waller-creek-project.lt3 +0 -16
- data/test/.blogs/drafts/0009-life-on-sabine-street.lt3 +0 -16
- data/test/.blogs/drafts/0010-remember-modest-mouse.lt3 +0 -17
- data/test/.blogs/sequence +0 -1
- data/test/.blogs/views/around_austin/last_published +0 -1
- data/test/.blogs/views/around_austin/posts/0001-whats-at-stubbs/0001-whats-at-stubbs.lt3 +0 -16
- data/test/.blogs/views/around_austin/posts/0001-whats-at-stubbs/metadata.txt +0 -6
- data/test/.blogs/views/around_austin/posts/0001-whats-at-stubbs/teaser.txt +0 -1
- data/test/.blogs/views/around_austin/posts/0001-whats-at-stubbs/whats-at-stubbs.html +0 -11
- data/test/.blogs/views/around_austin/posts/0002-the-new-amphitheatre-is-overrated/0002-the-new-amphitheatre-is-overrated.lt3 +0 -16
- data/test/.blogs/views/around_austin/posts/0002-the-new-amphitheatre-is-overrated/metadata.txt +0 -6
- data/test/.blogs/views/around_austin/posts/0002-the-new-amphitheatre-is-overrated/teaser.txt +0 -1
- data/test/.blogs/views/around_austin/posts/0002-the-new-amphitheatre-is-overrated/the-new-amphitheatre-is-overrated.html +0 -11
- data/test/.blogs/views/around_austin/posts/0007-the-graffiti-wall/0007-the-graffiti-wall.lt3 +0 -17
- data/test/.blogs/views/around_austin/posts/0007-the-graffiti-wall/metadata.txt +0 -6
- data/test/.blogs/views/around_austin/posts/0007-the-graffiti-wall/teaser.txt +0 -1
- data/test/.blogs/views/around_austin/posts/0007-the-graffiti-wall/the-graffiti-wall.html +0 -12
- data/test/.blogs/views/around_austin/posts/0008-the-waller-creek-project/0008-the-waller-creek-project.lt3 +0 -16
- data/test/.blogs/views/around_austin/posts/0008-the-waller-creek-project/metadata.txt +0 -6
- data/test/.blogs/views/around_austin/posts/0008-the-waller-creek-project/teaser.txt +0 -1
- data/test/.blogs/views/around_austin/posts/0008-the-waller-creek-project/the-waller-creek-project.html +0 -11
- data/test/.blogs/views/around_austin/posts/0009-life-on-sabine-street/0009-life-on-sabine-street.lt3 +0 -16
- data/test/.blogs/views/around_austin/posts/0009-life-on-sabine-street/life-on-sabine-street.html +0 -11
- data/test/.blogs/views/around_austin/posts/0009-life-on-sabine-street/metadata.txt +0 -6
- data/test/.blogs/views/around_austin/posts/0009-life-on-sabine-street/teaser.txt +0 -1
- data/test/.blogs/views/around_austin/publish +0 -5
- data/test/.blogs/views/around_austin/remote/etc/blog.css +0 -34
- data/test/.blogs/views/around_austin/remote/etc/blog.css.lt3 +0 -36
- data/test/.blogs/views/around_austin/remote/etc/externals.lt3 +0 -19
- data/test/.blogs/views/around_austin/remote/etc/favicon.ico +0 -0
- data/test/.blogs/views/around_austin/remote/etc/misc.js +0 -6
- data/test/.blogs/views/around_austin/remote/life-on-sabine-street.html +0 -10
- data/test/.blogs/views/around_austin/remote/permalink/life-on-sabine-street.html +0 -10
- data/test/.blogs/views/around_austin/remote/permalink/the-graffiti-wall.html +0 -10
- data/test/.blogs/views/around_austin/remote/permalink/the-new-amphitheatre-is-overrated.html +0 -50
- data/test/.blogs/views/around_austin/remote/permalink/the-waller-creek-project.html +0 -50
- data/test/.blogs/views/around_austin/remote/permalink/whats-at-stubbs.html +0 -50
- data/test/.blogs/views/around_austin/remote/recent.html +0 -104
- data/test/.blogs/views/around_austin/remote/the-graffiti-wall.html +0 -10
- data/test/.blogs/views/around_austin/remote/the-new-amphitheatre-is-overrated.html +0 -50
- data/test/.blogs/views/around_austin/remote/the-waller-creek-project.html +0 -50
- data/test/.blogs/views/around_austin/remote/whats-at-stubbs.html +0 -50
- data/test/.blogs/views/around_austin/remote/widgets/README +0 -4
- data/test/.blogs/views/around_austin/remote/widgets/ad/ad.lt3 +0 -12
- data/test/.blogs/views/around_austin/remote/widgets/calendar/calendar.lt3 +0 -6
- data/test/.blogs/views/around_austin/remote/widgets/news/list.data +0 -4
- data/test/.blogs/views/around_austin/remote/widgets/news/news.lt3 +0 -3
- data/test/.blogs/views/around_austin/remote/widgets/pages/README +0 -2
- data/test/.blogs/views/around_austin/remote/widgets/pages/disclaim.lt3 +0 -6
- data/test/.blogs/views/around_austin/remote/widgets/pages/faq.lt3 +0 -6
- data/test/.blogs/views/around_austin/remote/widgets/pages/generated.lt3 +0 -4
- data/test/.blogs/views/around_austin/remote/widgets/pages/lifestory.lt3 +0 -6
- data/test/.blogs/views/around_austin/remote/widgets/pages/like-dislike.lt3 +0 -6
- data/test/.blogs/views/around_austin/remote/widgets/pages/list.data +0 -4
- data/test/.blogs/views/around_austin/remote/widgets/pages/main.html +0 -9
- data/test/.blogs/views/around_austin/remote/widgets/pages/main.lt3 +0 -18
- data/test/.blogs/views/around_austin/remote/widgets/tag-cloud/tag-cloud.lt3 +0 -12
- data/test/.blogs/views/around_austin/staging/0001-whats-at-stubbs.lt3 +0 -16
- data/test/.blogs/views/around_austin/staging/0002-the-new-amphitheatre-is-overrated.lt3 +0 -16
- data/test/.blogs/views/around_austin/staging/0007-the-graffiti-wall.lt3 +0 -17
- data/test/.blogs/views/around_austin/staging/0008-the-waller-creek-project.lt3 +0 -16
- data/test/.blogs/views/around_austin/staging/0009-life-on-sabine-street.lt3 +0 -16
- data/test/.blogs/views/around_austin/staging/README +0 -59
- data/test/.blogs/views/around_austin/staging/blog/generate.lt3 +0 -17
- data/test/.blogs/views/around_austin/staging/blog/head.lt3 +0 -9
- data/test/.blogs/views/around_austin/staging/blog/index.lt3 +0 -6
- data/test/.blogs/views/around_austin/staging/blog/post_entry.lt3 +0 -19
- data/test/.blogs/views/around_austin/staging/etc/blog.css +0 -34
- data/test/.blogs/views/around_austin/staging/etc/blog.css.lt3 +0 -36
- data/test/.blogs/views/around_austin/staging/etc/externals.lt3 +0 -19
- data/test/.blogs/views/around_austin/staging/etc/favicon.ico +0 -0
- data/test/.blogs/views/around_austin/staging/etc/misc.js +0 -6
- data/test/.blogs/views/around_austin/staging/global.lt3 +0 -22
- data/test/.blogs/views/around_austin/staging/life-on-sabine-street.html +0 -10
- data/test/.blogs/views/around_austin/staging/navbar/about.html +0 -6
- data/test/.blogs/views/around_austin/staging/navbar/contact.html +0 -6
- data/test/.blogs/views/around_austin/staging/navbar/navbar.lt3 +0 -6
- data/test/.blogs/views/around_austin/staging/post/generate.lt3 +0 -26
- data/test/.blogs/views/around_austin/staging/post/head.lt3 +0 -4
- data/test/.blogs/views/around_austin/staging/post/index.html +0 -16
- data/test/.blogs/views/around_austin/staging/post/index.lt3 +0 -16
- data/test/.blogs/views/around_austin/staging/post/permalink.lt3 +0 -26
- data/test/.blogs/views/around_austin/staging/recent.html +0 -104
- data/test/.blogs/views/around_austin/staging/sidebar/README +0 -3
- data/test/.blogs/views/around_austin/staging/the-graffiti-wall.html +0 -10
- data/test/.blogs/views/around_austin/staging/the-new-amphitheatre-is-overrated.html +0 -50
- data/test/.blogs/views/around_austin/staging/the-waller-creek-project.html +0 -50
- data/test/.blogs/views/around_austin/staging/vars.lt3 +0 -2
- data/test/.blogs/views/around_austin/staging/whats-at-stubbs.html +0 -50
- data/test/.blogs/views/around_austin/staging/widgets/README +0 -4
- data/test/.blogs/views/around_austin/staging/widgets/ad/ad.lt3 +0 -12
- data/test/.blogs/views/around_austin/staging/widgets/calendar/calendar.lt3 +0 -6
- data/test/.blogs/views/around_austin/staging/widgets/news/list.data +0 -4
- data/test/.blogs/views/around_austin/staging/widgets/news/news.lt3 +0 -3
- data/test/.blogs/views/around_austin/staging/widgets/pages/README +0 -2
- data/test/.blogs/views/around_austin/staging/widgets/pages/disclaim.lt3 +0 -6
- data/test/.blogs/views/around_austin/staging/widgets/pages/faq.lt3 +0 -6
- data/test/.blogs/views/around_austin/staging/widgets/pages/generated.lt3 +0 -4
- data/test/.blogs/views/around_austin/staging/widgets/pages/lifestory.lt3 +0 -6
- data/test/.blogs/views/around_austin/staging/widgets/pages/like-dislike.lt3 +0 -6
- data/test/.blogs/views/around_austin/staging/widgets/pages/list.data +0 -4
- data/test/.blogs/views/around_austin/staging/widgets/pages/main.html +0 -9
- data/test/.blogs/views/around_austin/staging/widgets/pages/main.lt3 +0 -18
- data/test/.blogs/views/around_austin/staging/widgets/tag-cloud/tag-cloud.lt3 +0 -12
- data/test/.blogs/views/around_austin/themes/standard/README +0 -59
- data/test/.blogs/views/around_austin/themes/standard/blog/generate.lt3 +0 -17
- data/test/.blogs/views/around_austin/themes/standard/blog/head.lt3 +0 -9
- data/test/.blogs/views/around_austin/themes/standard/blog/index.lt3 +0 -6
- data/test/.blogs/views/around_austin/themes/standard/blog/post_entry.lt3 +0 -19
- data/test/.blogs/views/around_austin/themes/standard/etc/blog.css +0 -34
- data/test/.blogs/views/around_austin/themes/standard/etc/blog.css.lt3 +0 -36
- data/test/.blogs/views/around_austin/themes/standard/etc/externals.lt3 +0 -19
- data/test/.blogs/views/around_austin/themes/standard/etc/favicon.ico +0 -0
- data/test/.blogs/views/around_austin/themes/standard/etc/misc.js +0 -6
- data/test/.blogs/views/around_austin/themes/standard/global.lt3 +0 -22
- data/test/.blogs/views/around_austin/themes/standard/navbar/about.html +0 -6
- data/test/.blogs/views/around_austin/themes/standard/navbar/contact.html +0 -6
- data/test/.blogs/views/around_austin/themes/standard/navbar/navbar.lt3 +0 -6
- data/test/.blogs/views/around_austin/themes/standard/post/generate.lt3 +0 -26
- data/test/.blogs/views/around_austin/themes/standard/post/head.lt3 +0 -4
- data/test/.blogs/views/around_austin/themes/standard/post/index.lt3 +0 -16
- data/test/.blogs/views/around_austin/themes/standard/post/permalink.lt3 +0 -26
- data/test/.blogs/views/around_austin/themes/standard/sidebar/README +0 -3
- data/test/.blogs/views/around_austin/themes/standard/widgets/README +0 -4
- data/test/.blogs/views/around_austin/themes/standard/widgets/ad/ad.lt3 +0 -12
- data/test/.blogs/views/around_austin/themes/standard/widgets/calendar/calendar.lt3 +0 -6
- data/test/.blogs/views/around_austin/themes/standard/widgets/news/list.data +0 -4
- data/test/.blogs/views/around_austin/themes/standard/widgets/news/news.lt3 +0 -3
- data/test/.blogs/views/around_austin/themes/standard/widgets/pages/README +0 -2
- data/test/.blogs/views/around_austin/themes/standard/widgets/pages/disclaim.lt3 +0 -6
- data/test/.blogs/views/around_austin/themes/standard/widgets/pages/faq.lt3 +0 -6
- data/test/.blogs/views/around_austin/themes/standard/widgets/pages/generated.lt3 +0 -4
- data/test/.blogs/views/around_austin/themes/standard/widgets/pages/lifestory.lt3 +0 -6
- data/test/.blogs/views/around_austin/themes/standard/widgets/pages/like-dislike.lt3 +0 -6
- data/test/.blogs/views/around_austin/themes/standard/widgets/pages/list.data +0 -4
- data/test/.blogs/views/around_austin/themes/standard/widgets/pages/main.html +0 -9
- data/test/.blogs/views/around_austin/themes/standard/widgets/pages/main.lt3 +0 -18
- data/test/.blogs/views/around_austin/themes/standard/widgets/tag-cloud/tag-cloud.lt3 +0 -12
- data/test/.blogs/views/computing/last_published +0 -1
- data/test/.blogs/views/computing/posts/0003-elixir-conf-coming-up/0003-elixir-conf-coming-up.lt3 +0 -17
- data/test/.blogs/views/computing/posts/0003-elixir-conf-coming-up/elixir-conf-coming-up.html +0 -12
- data/test/.blogs/views/computing/posts/0003-elixir-conf-coming-up/metadata.txt +0 -6
- data/test/.blogs/views/computing/posts/0003-elixir-conf-coming-up/teaser.txt +0 -1
- data/test/.blogs/views/computing/posts/0005-the-genius-of-scenic/0005-the-genius-of-scenic.lt3 +0 -16
- data/test/.blogs/views/computing/posts/0005-the-genius-of-scenic/metadata.txt +0 -6
- data/test/.blogs/views/computing/posts/0005-the-genius-of-scenic/teaser.txt +0 -1
- data/test/.blogs/views/computing/posts/0005-the-genius-of-scenic/the-genius-of-scenic.html +0 -11
- data/test/.blogs/views/computing/posts/0006-the-future-of-coding/0006-the-future-of-coding.lt3 +0 -16
- data/test/.blogs/views/computing/posts/0006-the-future-of-coding/metadata.txt +0 -6
- data/test/.blogs/views/computing/posts/0006-the-future-of-coding/teaser.txt +0 -1
- data/test/.blogs/views/computing/posts/0006-the-future-of-coding/the-future-of-coding.html +0 -11
- data/test/.blogs/views/computing/publish +0 -5
- data/test/.blogs/views/computing/remote/elixir-conf-coming-up.html +0 -51
- data/test/.blogs/views/computing/remote/etc/blog.css +0 -34
- data/test/.blogs/views/computing/remote/etc/blog.css.lt3 +0 -36
- data/test/.blogs/views/computing/remote/etc/externals.lt3 +0 -19
- data/test/.blogs/views/computing/remote/etc/favicon.ico +0 -0
- data/test/.blogs/views/computing/remote/etc/misc.js +0 -6
- data/test/.blogs/views/computing/remote/permalink/elixir-conf-coming-up.html +0 -51
- data/test/.blogs/views/computing/remote/permalink/the-future-of-coding.html +0 -50
- data/test/.blogs/views/computing/remote/permalink/the-genius-of-scenic.html +0 -50
- data/test/.blogs/views/computing/remote/recent.html +0 -64
- data/test/.blogs/views/computing/remote/the-future-of-coding.html +0 -50
- data/test/.blogs/views/computing/remote/the-genius-of-scenic.html +0 -50
- data/test/.blogs/views/computing/remote/widgets/README +0 -4
- data/test/.blogs/views/computing/remote/widgets/ad/ad.lt3 +0 -12
- data/test/.blogs/views/computing/remote/widgets/calendar/calendar.lt3 +0 -6
- data/test/.blogs/views/computing/remote/widgets/news/list.data +0 -4
- data/test/.blogs/views/computing/remote/widgets/news/news.lt3 +0 -3
- data/test/.blogs/views/computing/remote/widgets/pages/README +0 -2
- data/test/.blogs/views/computing/remote/widgets/pages/disclaim.lt3 +0 -6
- data/test/.blogs/views/computing/remote/widgets/pages/faq.lt3 +0 -6
- data/test/.blogs/views/computing/remote/widgets/pages/generated.lt3 +0 -4
- data/test/.blogs/views/computing/remote/widgets/pages/lifestory.lt3 +0 -6
- data/test/.blogs/views/computing/remote/widgets/pages/like-dislike.lt3 +0 -6
- data/test/.blogs/views/computing/remote/widgets/pages/list.data +0 -4
- data/test/.blogs/views/computing/remote/widgets/pages/main.html +0 -9
- data/test/.blogs/views/computing/remote/widgets/pages/main.lt3 +0 -18
- data/test/.blogs/views/computing/remote/widgets/tag-cloud/tag-cloud.lt3 +0 -12
- data/test/.blogs/views/computing/staging/0003-elixir-conf-coming-up.lt3 +0 -17
- data/test/.blogs/views/computing/staging/0005-the-genius-of-scenic.lt3 +0 -16
- data/test/.blogs/views/computing/staging/0006-the-future-of-coding.lt3 +0 -16
- data/test/.blogs/views/computing/staging/README +0 -59
- data/test/.blogs/views/computing/staging/blog/generate.lt3 +0 -17
- data/test/.blogs/views/computing/staging/blog/head.lt3 +0 -9
- data/test/.blogs/views/computing/staging/blog/index.lt3 +0 -6
- data/test/.blogs/views/computing/staging/blog/post_entry.lt3 +0 -19
- data/test/.blogs/views/computing/staging/elixir-conf-coming-up.html +0 -51
- data/test/.blogs/views/computing/staging/etc/blog.css +0 -34
- data/test/.blogs/views/computing/staging/etc/blog.css.lt3 +0 -36
- data/test/.blogs/views/computing/staging/etc/externals.lt3 +0 -19
- data/test/.blogs/views/computing/staging/etc/favicon.ico +0 -0
- data/test/.blogs/views/computing/staging/etc/misc.js +0 -6
- data/test/.blogs/views/computing/staging/global.lt3 +0 -22
- data/test/.blogs/views/computing/staging/navbar/about.html +0 -6
- data/test/.blogs/views/computing/staging/navbar/contact.html +0 -6
- data/test/.blogs/views/computing/staging/navbar/navbar.lt3 +0 -6
- data/test/.blogs/views/computing/staging/post/generate.lt3 +0 -26
- data/test/.blogs/views/computing/staging/post/head.lt3 +0 -4
- data/test/.blogs/views/computing/staging/post/index.html +0 -16
- data/test/.blogs/views/computing/staging/post/index.lt3 +0 -16
- data/test/.blogs/views/computing/staging/post/permalink.lt3 +0 -26
- data/test/.blogs/views/computing/staging/recent.html +0 -64
- data/test/.blogs/views/computing/staging/sidebar/README +0 -3
- data/test/.blogs/views/computing/staging/the-future-of-coding.html +0 -50
- data/test/.blogs/views/computing/staging/the-genius-of-scenic.html +0 -50
- data/test/.blogs/views/computing/staging/vars.lt3 +0 -2
- data/test/.blogs/views/computing/staging/widgets/README +0 -4
- data/test/.blogs/views/computing/staging/widgets/ad/ad.lt3 +0 -12
- data/test/.blogs/views/computing/staging/widgets/calendar/calendar.lt3 +0 -6
- data/test/.blogs/views/computing/staging/widgets/news/list.data +0 -4
- data/test/.blogs/views/computing/staging/widgets/news/news.lt3 +0 -3
- data/test/.blogs/views/computing/staging/widgets/pages/README +0 -2
- data/test/.blogs/views/computing/staging/widgets/pages/disclaim.lt3 +0 -6
- data/test/.blogs/views/computing/staging/widgets/pages/faq.lt3 +0 -6
- data/test/.blogs/views/computing/staging/widgets/pages/generated.lt3 +0 -4
- data/test/.blogs/views/computing/staging/widgets/pages/lifestory.lt3 +0 -6
- data/test/.blogs/views/computing/staging/widgets/pages/like-dislike.lt3 +0 -6
- data/test/.blogs/views/computing/staging/widgets/pages/list.data +0 -4
- data/test/.blogs/views/computing/staging/widgets/pages/main.html +0 -9
- data/test/.blogs/views/computing/staging/widgets/pages/main.lt3 +0 -18
- data/test/.blogs/views/computing/staging/widgets/tag-cloud/tag-cloud.lt3 +0 -12
- data/test/.blogs/views/computing/themes/standard/README +0 -59
- data/test/.blogs/views/computing/themes/standard/blog/generate.lt3 +0 -17
- data/test/.blogs/views/computing/themes/standard/blog/head.lt3 +0 -9
- data/test/.blogs/views/computing/themes/standard/blog/index.lt3 +0 -6
- data/test/.blogs/views/computing/themes/standard/blog/post_entry.lt3 +0 -19
- data/test/.blogs/views/computing/themes/standard/etc/blog.css +0 -34
- data/test/.blogs/views/computing/themes/standard/etc/blog.css.lt3 +0 -36
- data/test/.blogs/views/computing/themes/standard/etc/externals.lt3 +0 -19
- data/test/.blogs/views/computing/themes/standard/etc/favicon.ico +0 -0
- data/test/.blogs/views/computing/themes/standard/etc/misc.js +0 -6
- data/test/.blogs/views/computing/themes/standard/global.lt3 +0 -22
- data/test/.blogs/views/computing/themes/standard/navbar/about.html +0 -6
- data/test/.blogs/views/computing/themes/standard/navbar/contact.html +0 -6
- data/test/.blogs/views/computing/themes/standard/navbar/navbar.lt3 +0 -6
- data/test/.blogs/views/computing/themes/standard/post/generate.lt3 +0 -26
- data/test/.blogs/views/computing/themes/standard/post/head.lt3 +0 -4
- data/test/.blogs/views/computing/themes/standard/post/index.lt3 +0 -16
- data/test/.blogs/views/computing/themes/standard/post/permalink.lt3 +0 -26
- data/test/.blogs/views/computing/themes/standard/sidebar/README +0 -3
- data/test/.blogs/views/computing/themes/standard/widgets/README +0 -4
- data/test/.blogs/views/computing/themes/standard/widgets/ad/ad.lt3 +0 -12
- data/test/.blogs/views/computing/themes/standard/widgets/calendar/calendar.lt3 +0 -6
- data/test/.blogs/views/computing/themes/standard/widgets/news/list.data +0 -4
- data/test/.blogs/views/computing/themes/standard/widgets/news/news.lt3 +0 -3
- data/test/.blogs/views/computing/themes/standard/widgets/pages/README +0 -2
- data/test/.blogs/views/computing/themes/standard/widgets/pages/disclaim.lt3 +0 -6
- data/test/.blogs/views/computing/themes/standard/widgets/pages/faq.lt3 +0 -6
- data/test/.blogs/views/computing/themes/standard/widgets/pages/generated.lt3 +0 -4
- data/test/.blogs/views/computing/themes/standard/widgets/pages/lifestory.lt3 +0 -6
- data/test/.blogs/views/computing/themes/standard/widgets/pages/like-dislike.lt3 +0 -6
- data/test/.blogs/views/computing/themes/standard/widgets/pages/list.data +0 -4
- data/test/.blogs/views/computing/themes/standard/widgets/pages/main.html +0 -9
- data/test/.blogs/views/computing/themes/standard/widgets/pages/main.lt3 +0 -18
- data/test/.blogs/views/computing/themes/standard/widgets/tag-cloud/tag-cloud.lt3 +0 -12
- data/test/.blogs/views/music/last_published +0 -1
- data/test/.blogs/views/music/posts/0004-does-indie-still-matter/0004-does-indie-still-matter.lt3 +0 -16
- data/test/.blogs/views/music/posts/0004-does-indie-still-matter/does-indie-still-matter.html +0 -11
- data/test/.blogs/views/music/posts/0004-does-indie-still-matter/metadata.txt +0 -6
- data/test/.blogs/views/music/posts/0004-does-indie-still-matter/teaser.txt +0 -1
- data/test/.blogs/views/music/posts/0010-remember-modest-mouse/0010-remember-modest-mouse.lt3 +0 -17
- data/test/.blogs/views/music/posts/0010-remember-modest-mouse/metadata.txt +0 -6
- data/test/.blogs/views/music/posts/0010-remember-modest-mouse/remember-modest-mouse.html +0 -12
- data/test/.blogs/views/music/posts/0010-remember-modest-mouse/teaser.txt +0 -1
- data/test/.blogs/views/music/publish +0 -5
- data/test/.blogs/views/music/remote/does-indie-still-matter.html +0 -50
- data/test/.blogs/views/music/remote/etc/blog.css +0 -34
- data/test/.blogs/views/music/remote/etc/blog.css.lt3 +0 -36
- data/test/.blogs/views/music/remote/etc/externals.lt3 +0 -19
- data/test/.blogs/views/music/remote/etc/favicon.ico +0 -0
- data/test/.blogs/views/music/remote/etc/misc.js +0 -6
- data/test/.blogs/views/music/remote/permalink/does-indie-still-matter.html +0 -50
- data/test/.blogs/views/music/remote/permalink/remember-modest-mouse.html +0 -51
- data/test/.blogs/views/music/remote/recent.html +0 -44
- data/test/.blogs/views/music/remote/remember-modest-mouse.html +0 -51
- data/test/.blogs/views/music/remote/widgets/README +0 -4
- data/test/.blogs/views/music/remote/widgets/ad/ad.lt3 +0 -12
- data/test/.blogs/views/music/remote/widgets/calendar/calendar.lt3 +0 -6
- data/test/.blogs/views/music/remote/widgets/news/list.data +0 -4
- data/test/.blogs/views/music/remote/widgets/news/news.lt3 +0 -3
- data/test/.blogs/views/music/remote/widgets/pages/README +0 -2
- data/test/.blogs/views/music/remote/widgets/pages/disclaim.lt3 +0 -6
- data/test/.blogs/views/music/remote/widgets/pages/faq.lt3 +0 -6
- data/test/.blogs/views/music/remote/widgets/pages/generated.lt3 +0 -4
- data/test/.blogs/views/music/remote/widgets/pages/lifestory.lt3 +0 -6
- data/test/.blogs/views/music/remote/widgets/pages/like-dislike.lt3 +0 -6
- data/test/.blogs/views/music/remote/widgets/pages/list.data +0 -4
- data/test/.blogs/views/music/remote/widgets/pages/main.html +0 -9
- data/test/.blogs/views/music/remote/widgets/pages/main.lt3 +0 -18
- data/test/.blogs/views/music/remote/widgets/tag-cloud/tag-cloud.lt3 +0 -12
- data/test/.blogs/views/music/staging/0004-does-indie-still-matter.lt3 +0 -16
- data/test/.blogs/views/music/staging/0010-remember-modest-mouse.lt3 +0 -17
- data/test/.blogs/views/music/staging/README +0 -59
- data/test/.blogs/views/music/staging/blog/generate.lt3 +0 -17
- data/test/.blogs/views/music/staging/blog/head.lt3 +0 -9
- data/test/.blogs/views/music/staging/blog/index.lt3 +0 -6
- data/test/.blogs/views/music/staging/blog/post_entry.lt3 +0 -19
- data/test/.blogs/views/music/staging/does-indie-still-matter.html +0 -50
- data/test/.blogs/views/music/staging/etc/blog.css +0 -34
- data/test/.blogs/views/music/staging/etc/blog.css.lt3 +0 -36
- data/test/.blogs/views/music/staging/etc/externals.lt3 +0 -19
- data/test/.blogs/views/music/staging/etc/favicon.ico +0 -0
- data/test/.blogs/views/music/staging/etc/misc.js +0 -6
- data/test/.blogs/views/music/staging/global.lt3 +0 -22
- data/test/.blogs/views/music/staging/navbar/about.html +0 -6
- data/test/.blogs/views/music/staging/navbar/contact.html +0 -6
- data/test/.blogs/views/music/staging/navbar/navbar.lt3 +0 -6
- data/test/.blogs/views/music/staging/post/generate.lt3 +0 -26
- data/test/.blogs/views/music/staging/post/head.lt3 +0 -4
- data/test/.blogs/views/music/staging/post/index.html +0 -17
- data/test/.blogs/views/music/staging/post/index.lt3 +0 -16
- data/test/.blogs/views/music/staging/post/permalink.lt3 +0 -26
- data/test/.blogs/views/music/staging/recent.html +0 -44
- data/test/.blogs/views/music/staging/remember-modest-mouse.html +0 -51
- data/test/.blogs/views/music/staging/sidebar/README +0 -3
- data/test/.blogs/views/music/staging/vars.lt3 +0 -2
- data/test/.blogs/views/music/staging/widgets/README +0 -4
- data/test/.blogs/views/music/staging/widgets/ad/ad.lt3 +0 -12
- data/test/.blogs/views/music/staging/widgets/calendar/calendar.lt3 +0 -6
- data/test/.blogs/views/music/staging/widgets/news/list.data +0 -4
- data/test/.blogs/views/music/staging/widgets/news/news.lt3 +0 -3
- data/test/.blogs/views/music/staging/widgets/pages/README +0 -2
- data/test/.blogs/views/music/staging/widgets/pages/disclaim.lt3 +0 -6
- data/test/.blogs/views/music/staging/widgets/pages/faq.lt3 +0 -6
- data/test/.blogs/views/music/staging/widgets/pages/generated.lt3 +0 -4
- data/test/.blogs/views/music/staging/widgets/pages/lifestory.lt3 +0 -6
- data/test/.blogs/views/music/staging/widgets/pages/like-dislike.lt3 +0 -6
- data/test/.blogs/views/music/staging/widgets/pages/list.data +0 -4
- data/test/.blogs/views/music/staging/widgets/pages/main.html +0 -9
- data/test/.blogs/views/music/staging/widgets/pages/main.lt3 +0 -18
- data/test/.blogs/views/music/staging/widgets/tag-cloud/tag-cloud.lt3 +0 -12
- data/test/.blogs/views/music/themes/standard/README +0 -59
- data/test/.blogs/views/music/themes/standard/blog/generate.lt3 +0 -17
- data/test/.blogs/views/music/themes/standard/blog/head.lt3 +0 -9
- data/test/.blogs/views/music/themes/standard/blog/index.lt3 +0 -6
- data/test/.blogs/views/music/themes/standard/blog/post_entry.lt3 +0 -19
- data/test/.blogs/views/music/themes/standard/etc/blog.css +0 -34
- data/test/.blogs/views/music/themes/standard/etc/blog.css.lt3 +0 -36
- data/test/.blogs/views/music/themes/standard/etc/externals.lt3 +0 -19
- data/test/.blogs/views/music/themes/standard/etc/favicon.ico +0 -0
- data/test/.blogs/views/music/themes/standard/etc/misc.js +0 -6
- data/test/.blogs/views/music/themes/standard/global.lt3 +0 -22
- data/test/.blogs/views/music/themes/standard/navbar/about.html +0 -6
- data/test/.blogs/views/music/themes/standard/navbar/contact.html +0 -6
- data/test/.blogs/views/music/themes/standard/navbar/navbar.lt3 +0 -6
- data/test/.blogs/views/music/themes/standard/post/generate.lt3 +0 -26
- data/test/.blogs/views/music/themes/standard/post/head.lt3 +0 -4
- data/test/.blogs/views/music/themes/standard/post/index.lt3 +0 -16
- data/test/.blogs/views/music/themes/standard/post/permalink.lt3 +0 -26
- data/test/.blogs/views/music/themes/standard/sidebar/README +0 -3
- data/test/.blogs/views/music/themes/standard/widgets/README +0 -4
- data/test/.blogs/views/music/themes/standard/widgets/ad/ad.lt3 +0 -12
- data/test/.blogs/views/music/themes/standard/widgets/calendar/calendar.lt3 +0 -6
- data/test/.blogs/views/music/themes/standard/widgets/news/list.data +0 -4
- data/test/.blogs/views/music/themes/standard/widgets/news/news.lt3 +0 -3
- data/test/.blogs/views/music/themes/standard/widgets/pages/README +0 -2
- data/test/.blogs/views/music/themes/standard/widgets/pages/disclaim.lt3 +0 -6
- data/test/.blogs/views/music/themes/standard/widgets/pages/faq.lt3 +0 -6
- data/test/.blogs/views/music/themes/standard/widgets/pages/generated.lt3 +0 -4
- data/test/.blogs/views/music/themes/standard/widgets/pages/lifestory.lt3 +0 -6
- data/test/.blogs/views/music/themes/standard/widgets/pages/like-dislike.lt3 +0 -6
- data/test/.blogs/views/music/themes/standard/widgets/pages/list.data +0 -4
- data/test/.blogs/views/music/themes/standard/widgets/pages/main.html +0 -9
- data/test/.blogs/views/music/themes/standard/widgets/pages/main.lt3 +0 -18
- data/test/.blogs/views/music/themes/standard/widgets/tag-cloud/tag-cloud.lt3 +0 -12
- data/test/.blogs/views/test_view/last_published +0 -1
- data/test/.blogs/views/test_view/publish +0 -5
- data/test/.blogs/views/test_view/remote/etc/blog.css +0 -34
- data/test/.blogs/views/test_view/remote/etc/blog.css.lt3 +0 -36
- data/test/.blogs/views/test_view/remote/etc/externals.lt3 +0 -19
- data/test/.blogs/views/test_view/remote/etc/favicon.ico +0 -0
- data/test/.blogs/views/test_view/remote/etc/misc.js +0 -6
- data/test/.blogs/views/test_view/remote/widgets/README +0 -4
- data/test/.blogs/views/test_view/remote/widgets/ad/ad.lt3 +0 -12
- data/test/.blogs/views/test_view/remote/widgets/calendar/calendar.lt3 +0 -6
- data/test/.blogs/views/test_view/remote/widgets/news/list.data +0 -4
- data/test/.blogs/views/test_view/remote/widgets/news/news.lt3 +0 -3
- data/test/.blogs/views/test_view/remote/widgets/pages/README +0 -2
- data/test/.blogs/views/test_view/remote/widgets/pages/disclaim.lt3 +0 -6
- data/test/.blogs/views/test_view/remote/widgets/pages/faq.lt3 +0 -6
- data/test/.blogs/views/test_view/remote/widgets/pages/generated.lt3 +0 -4
- data/test/.blogs/views/test_view/remote/widgets/pages/lifestory.lt3 +0 -6
- data/test/.blogs/views/test_view/remote/widgets/pages/like-dislike.lt3 +0 -6
- data/test/.blogs/views/test_view/remote/widgets/pages/list.data +0 -4
- data/test/.blogs/views/test_view/remote/widgets/pages/main.html +0 -9
- data/test/.blogs/views/test_view/remote/widgets/pages/main.lt3 +0 -18
- data/test/.blogs/views/test_view/remote/widgets/tag-cloud/tag-cloud.lt3 +0 -12
- data/test/.blogs/views/test_view/staging/README +0 -59
- data/test/.blogs/views/test_view/staging/blog/generate.lt3 +0 -17
- data/test/.blogs/views/test_view/staging/blog/head.lt3 +0 -9
- data/test/.blogs/views/test_view/staging/blog/index.lt3 +0 -6
- data/test/.blogs/views/test_view/staging/blog/post_entry.lt3 +0 -19
- data/test/.blogs/views/test_view/staging/etc/blog.css +0 -34
- data/test/.blogs/views/test_view/staging/etc/blog.css.lt3 +0 -36
- data/test/.blogs/views/test_view/staging/etc/externals.lt3 +0 -19
- data/test/.blogs/views/test_view/staging/etc/favicon.ico +0 -0
- data/test/.blogs/views/test_view/staging/etc/misc.js +0 -6
- data/test/.blogs/views/test_view/staging/global.lt3 +0 -22
- data/test/.blogs/views/test_view/staging/navbar/about.html +0 -6
- data/test/.blogs/views/test_view/staging/navbar/contact.html +0 -6
- data/test/.blogs/views/test_view/staging/navbar/navbar.lt3 +0 -6
- data/test/.blogs/views/test_view/staging/post/generate.lt3 +0 -26
- data/test/.blogs/views/test_view/staging/post/head.lt3 +0 -4
- data/test/.blogs/views/test_view/staging/post/index.lt3 +0 -16
- data/test/.blogs/views/test_view/staging/post/permalink.lt3 +0 -26
- data/test/.blogs/views/test_view/staging/sidebar/README +0 -3
- data/test/.blogs/views/test_view/staging/widgets/README +0 -4
- data/test/.blogs/views/test_view/staging/widgets/ad/ad.lt3 +0 -12
- data/test/.blogs/views/test_view/staging/widgets/calendar/calendar.lt3 +0 -6
- data/test/.blogs/views/test_view/staging/widgets/news/list.data +0 -4
- data/test/.blogs/views/test_view/staging/widgets/news/news.lt3 +0 -3
- data/test/.blogs/views/test_view/staging/widgets/pages/README +0 -2
- data/test/.blogs/views/test_view/staging/widgets/pages/disclaim.lt3 +0 -6
- data/test/.blogs/views/test_view/staging/widgets/pages/faq.lt3 +0 -6
- data/test/.blogs/views/test_view/staging/widgets/pages/generated.lt3 +0 -4
- data/test/.blogs/views/test_view/staging/widgets/pages/lifestory.lt3 +0 -6
- data/test/.blogs/views/test_view/staging/widgets/pages/like-dislike.lt3 +0 -6
- data/test/.blogs/views/test_view/staging/widgets/pages/list.data +0 -4
- data/test/.blogs/views/test_view/staging/widgets/pages/main.html +0 -9
- data/test/.blogs/views/test_view/staging/widgets/pages/main.lt3 +0 -18
- data/test/.blogs/views/test_view/staging/widgets/tag-cloud/tag-cloud.lt3 +0 -12
- data/test/.blogs/views/test_view/themes/standard/README +0 -59
- data/test/.blogs/views/test_view/themes/standard/blog/generate.lt3 +0 -17
- data/test/.blogs/views/test_view/themes/standard/blog/head.lt3 +0 -9
- data/test/.blogs/views/test_view/themes/standard/blog/index.lt3 +0 -6
- data/test/.blogs/views/test_view/themes/standard/blog/post_entry.lt3 +0 -19
- data/test/.blogs/views/test_view/themes/standard/etc/blog.css +0 -34
- data/test/.blogs/views/test_view/themes/standard/etc/blog.css.lt3 +0 -36
- data/test/.blogs/views/test_view/themes/standard/etc/externals.lt3 +0 -19
- data/test/.blogs/views/test_view/themes/standard/etc/favicon.ico +0 -0
- data/test/.blogs/views/test_view/themes/standard/etc/misc.js +0 -6
- data/test/.blogs/views/test_view/themes/standard/global.lt3 +0 -22
- data/test/.blogs/views/test_view/themes/standard/navbar/about.html +0 -6
- data/test/.blogs/views/test_view/themes/standard/navbar/contact.html +0 -6
- data/test/.blogs/views/test_view/themes/standard/navbar/navbar.lt3 +0 -6
- data/test/.blogs/views/test_view/themes/standard/post/generate.lt3 +0 -26
- data/test/.blogs/views/test_view/themes/standard/post/head.lt3 +0 -4
- data/test/.blogs/views/test_view/themes/standard/post/index.lt3 +0 -16
- data/test/.blogs/views/test_view/themes/standard/post/permalink.lt3 +0 -26
- data/test/.blogs/views/test_view/themes/standard/sidebar/README +0 -3
- data/test/.blogs/views/test_view/themes/standard/widgets/README +0 -4
- data/test/.blogs/views/test_view/themes/standard/widgets/ad/ad.lt3 +0 -12
- data/test/.blogs/views/test_view/themes/standard/widgets/calendar/calendar.lt3 +0 -6
- data/test/.blogs/views/test_view/themes/standard/widgets/news/list.data +0 -4
- data/test/.blogs/views/test_view/themes/standard/widgets/news/news.lt3 +0 -3
- data/test/.blogs/views/test_view/themes/standard/widgets/pages/README +0 -2
- data/test/.blogs/views/test_view/themes/standard/widgets/pages/disclaim.lt3 +0 -6
- data/test/.blogs/views/test_view/themes/standard/widgets/pages/faq.lt3 +0 -6
- data/test/.blogs/views/test_view/themes/standard/widgets/pages/generated.lt3 +0 -4
- data/test/.blogs/views/test_view/themes/standard/widgets/pages/lifestory.lt3 +0 -6
- data/test/.blogs/views/test_view/themes/standard/widgets/pages/like-dislike.lt3 +0 -6
- data/test/.blogs/views/test_view/themes/standard/widgets/pages/list.data +0 -4
- data/test/.blogs/views/test_view/themes/standard/widgets/pages/main.html +0 -9
- data/test/.blogs/views/test_view/themes/standard/widgets/pages/main.lt3 +0 -18
- data/test/.blogs/views/test_view/themes/standard/widgets/tag-cloud/tag-cloud.lt3 +0 -12
- data/themes/standard/README +0 -59
- data/themes/standard/blog/generate.lt3 +0 -17
- data/themes/standard/blog/head.lt3 +0 -9
- data/themes/standard/blog/index.lt3 +0 -5
- data/themes/standard/blog/post_entry.lt3 +0 -19
- data/themes/standard/blog/recent.lt3 +0 -2
- data/themes/standard/etc/blog.css.lt3 +0 -36
- data/themes/standard/etc/externals.lt3 +0 -19
- data/themes/standard/etc/favicon.ico +0 -0
- data/themes/standard/etc/misc.js +0 -6
- data/themes/standard/global.lt3 +0 -22
- data/themes/standard/navbar/about.html +0 -6
- data/themes/standard/navbar/contact.html +0 -6
- data/themes/standard/navbar/navbar.lt3 +0 -6
- data/themes/standard/post/generate.lt3 +0 -24
- data/themes/standard/post/head.lt3 +0 -4
- data/themes/standard/post/index.lt3 +0 -16
- data/themes/standard/post/permalink.lt3 +0 -26
- data/themes/standard/sidebar/README +0 -3
- data/themes/standard/widgets/README +0 -4
- data/themes/standard/widgets/ad/ad.lt3 +0 -15
- data/themes/standard/widgets/calendar/calendar.lt3 +0 -6
- data/themes/standard/widgets/news/list.data +0 -4
- data/themes/standard/widgets/news/news.lt3 +0 -2
- data/themes/standard/widgets/pages/README +0 -2
- data/themes/standard/widgets/pages/disclaim.html +0 -6
- data/themes/standard/widgets/pages/disclaim.lt3 +0 -5
- data/themes/standard/widgets/pages/faq.html +0 -7
- data/themes/standard/widgets/pages/faq.lt3 +0 -6
- data/themes/standard/widgets/pages/generated.lt3 +0 -4
- data/themes/standard/widgets/pages/lifestory.html +0 -7
- data/themes/standard/widgets/pages/lifestory.lt3 +0 -6
- data/themes/standard/widgets/pages/like-dislike.html +0 -7
- data/themes/standard/widgets/pages/like-dislike.lt3 +0 -6
- data/themes/standard/widgets/pages/list.data +0 -4
- data/themes/standard/widgets/pages/main.html +0 -9
- data/themes/standard/widgets/pages/pages.lt3 +0 -2
- data/themes/standard/widgets/tag-cloud/tag-cloud.lt3 +0 -12
data/lib/logging.rb
CHANGED
@@ -31,28 +31,5 @@ unless self.respond_to?("log!")
|
|
31
31
|
$log = File.new("/tmp/runeblog.log","a")
|
32
32
|
end
|
33
33
|
|
34
|
-
# def log(str: "", enter: nil, args: [], pwd: false, dir: false)
|
35
|
-
# return unless $logging
|
36
|
-
# time = Time.now.strftime("%H:%M:%S")
|
37
|
-
# meth = ""
|
38
|
-
# meth = "#{enter}" if enter
|
39
|
-
# para = " args: #{args.inspect[1..-2]}"
|
40
|
-
# source = caller[0].sub(/.*\//, " in ").sub(/:/, " line ").sub(/:.*/, "")
|
41
|
-
# source = " in #{source} (probably liveblog.rb)" if source.include? "(eval)"
|
42
|
-
# str = " ... #{str}" unless str.empty?
|
43
|
-
# indent = " "*12
|
44
|
-
# STDERR.puts "#{time} #{str} #{meth}"
|
45
|
-
# STDERR.puts "#{indent} #{source}"
|
46
|
-
# STDERR.puts "#{indent} pwd = #{Dir.pwd} " if pwd
|
47
|
-
# if dir
|
48
|
-
# files = (Dir.entries('.') - %w[. ..]).join(" ")
|
49
|
-
# STDERR.puts "#{indent} dir/* = #{files}"
|
50
|
-
# end
|
51
|
-
# STDERR.puts "#{indent} #{para} " unless args.empty?
|
52
|
-
# # STDERR.puts "#{indent} livetext params = #{livedata.inpect} " unless livedata.nil?
|
53
|
-
# STDERR.puts
|
54
|
-
# # $log.close
|
55
|
-
# # $log = File.new("/tmp/runeblog.log","a")
|
56
|
-
# end
|
57
34
|
end
|
58
35
|
|
data/lib/pathmagic.rb
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
module PathSep
|
2
|
+
def /(right)
|
3
|
+
s1 = self.to_s.dup
|
4
|
+
s2 = right.to_s.dup
|
5
|
+
s1 << "/" unless s2.end_with?("/") || s2.start_with?("/")
|
6
|
+
path = s1 + s2
|
7
|
+
path.gsub!("//", "/")
|
8
|
+
path
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
String.include(PathSep)
|
13
|
+
Symbol.include(PathSep)
|
14
|
+
|
data/lib/post.rb
CHANGED
@@ -1,11 +1,10 @@
|
|
1
|
-
# require 'helpers-blog'
|
2
1
|
require 'runeblog'
|
3
2
|
require 'global'
|
3
|
+
require 'pathmagic'
|
4
4
|
|
5
5
|
class RuneBlog::Post
|
6
6
|
|
7
7
|
attr_reader :num, :title, :date, :views, :num, :slug
|
8
|
-
|
9
8
|
attr_accessor :meta, :blog, :draft
|
10
9
|
|
11
10
|
include RuneBlog::Helpers
|
@@ -22,17 +21,11 @@ class RuneBlog::Post
|
|
22
21
|
raise "Doesn't work right now"
|
23
22
|
raise NoBlogAccessor if RuneBlog.blog.nil?
|
24
23
|
# "post" is a slug
|
25
|
-
pdir = RuneBlog.blog.view.dir
|
24
|
+
pdir = RuneBlog.blog.view.dir/post
|
26
25
|
verify(Dir.exist?(pdir) => "Directory #{pdir} not found")
|
27
26
|
meta = nil
|
28
27
|
Dir.chdir(pdir) do
|
29
|
-
verify(File.exist?("metadata.txt") => "metadata.txt not found",
|
30
|
-
File.exist?("teaser.txt") => "teaser.txt not found")
|
31
|
-
# File.exist?("body.txt") => "body.txt not found")
|
32
28
|
meta = read_config("metadata.txt")
|
33
|
-
verify(meta.date => "meta.date is nil",
|
34
|
-
meta.views => "meta.views is nil",
|
35
|
-
meta.tags => "meta.tags is nil")
|
36
29
|
meta.date = Date.parse(meta.date)
|
37
30
|
meta.views = meta.views.split
|
38
31
|
meta.tags = meta.tags.split
|
@@ -50,8 +43,6 @@ class RuneBlog::Post
|
|
50
43
|
hash = meta.to_h
|
51
44
|
|
52
45
|
File.write("teaser.txt", hash[:teaser])
|
53
|
-
# STDERR.puts ">>>> #{__method__}: writing #{@live.body.size} bytes to #{Dir.pwd}/body.txt"
|
54
|
-
# File.write("body.txt", hash[:body])
|
55
46
|
hash.delete(:teaser)
|
56
47
|
hash.delete(:body)
|
57
48
|
|
@@ -75,7 +66,7 @@ class RuneBlog::Post
|
|
75
66
|
other_views:[])
|
76
67
|
log!(enter: __method__, args: [title, teaser, body, pubdate, other_views])
|
77
68
|
post = self.new
|
78
|
-
# ONLY place next_sequence is called!
|
69
|
+
# NOTE: This is the ONLY place next_sequence is called!
|
79
70
|
num = post.meta.num = post.blog.next_sequence
|
80
71
|
|
81
72
|
# new_metadata
|
@@ -91,10 +82,8 @@ class RuneBlog::Post
|
|
91
82
|
text = RuneBlog.post_template(num: meta.num, title: meta.title, date: meta.pubdate,
|
92
83
|
view: meta.view, teaser: meta.teaser, body: meta.body,
|
93
84
|
views: meta.views, tags: meta.tags, home: viewhome)
|
94
|
-
srcdir =
|
95
|
-
vpdir =
|
96
|
-
verify(Dir.exist?(srcdir) => "#{srcdir} not found",
|
97
|
-
meta.slug.is_a?(String) => "slug #{meta.slug.inspect} is invalid")
|
85
|
+
srcdir = post.blog.root/:drafts + "/"
|
86
|
+
vpdir = post.blog.root/:drafts + "/"
|
98
87
|
fname = meta.slug + ".lt3"
|
99
88
|
post.draft = srcdir + fname
|
100
89
|
dump(text, post.draft)
|
@@ -134,7 +123,7 @@ class RuneBlog::ViewPost
|
|
134
123
|
fname = "#{postdir}/teaser.txt"
|
135
124
|
@teaser_text = File.read(fname).chomp
|
136
125
|
# FIXME dumb hacks...
|
137
|
-
mdfile =
|
126
|
+
mdfile = postdir/"metadata.txt"
|
138
127
|
lines = File.readlines(mdfile)
|
139
128
|
@title = lines.grep(/title:/).first[7..-1].chomp
|
140
129
|
@date = lines.grep(/pubdate:/).first[9..-1].chomp
|
@@ -144,12 +133,12 @@ class RuneBlog::ViewPost
|
|
144
133
|
log!(enter: __method__, args: [view, postdir])
|
145
134
|
fname = File.basename(draft)
|
146
135
|
noext = fname.sub(/.lt3$/, "")
|
147
|
-
vdir =
|
148
|
-
dir =
|
136
|
+
vdir = @root/:views/view
|
137
|
+
dir = vdir/:posts/noext + "/"
|
149
138
|
Dir.mkdir(dir) unless Dir.exist?(dir)
|
150
139
|
system("cp #{draft} #{dir}")
|
151
140
|
viewdir, slugdir, aslug = vdir, dir, noext[5..-1]
|
152
|
-
theme = viewdir
|
141
|
+
theme = viewdir/:themes/:standard
|
153
142
|
[noext, viewdir, slugdir, aslug, theme]
|
154
143
|
end
|
155
144
|
|
data/lib/publish.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
|
-
# require 'helpers-blog'
|
2
|
-
# require 'runeblog'
|
3
1
|
require 'global'
|
2
|
+
require 'pathmagic'
|
4
3
|
|
5
4
|
class RuneBlog::Publishing
|
6
5
|
attr_reader :user, :server, :docroot, :path
|
@@ -42,15 +41,14 @@ class RuneBlog::Publishing
|
|
42
41
|
|
43
42
|
def publish(files, assets=[])
|
44
43
|
log!(enter: __method__, args: [files, assets])
|
45
|
-
dir =
|
44
|
+
dir = @docroot/@path
|
46
45
|
view_name = @blog.view.name
|
47
|
-
viewpath =
|
46
|
+
viewpath = dir/view_name
|
48
47
|
result = system!("ssh #@user@#@server -x mkdir -p #{viewpath}")
|
49
48
|
result = system!("ssh #@user@#@server -x mkdir -p #{viewpath}/assets")
|
50
49
|
files.each do |file|
|
51
|
-
dest = "#@user@#@server
|
50
|
+
dest = "#@user@#@server:" + dir/view_name
|
52
51
|
file.gsub!(/\/\//, "/") # weird... :-/
|
53
|
-
dest.gsub!(/\/\//, "/") # weird... :-/
|
54
52
|
cmd = "scp -r #{file} #{dest} >/dev/null 2>/tmp/wtf"
|
55
53
|
debug "cmd = #{cmd.inspect} - see /tmp/wtf"
|
56
54
|
result = system!(cmd) || puts("\n Could not copy #{file} to #{dest}")
|
@@ -74,8 +72,8 @@ class RuneBlog::Publishing
|
|
74
72
|
|
75
73
|
def remote_permissions?
|
76
74
|
log!(enter: __method__)
|
77
|
-
dir =
|
78
|
-
temp =
|
75
|
+
dir = @docroot/@path
|
76
|
+
temp = @path/"__only_testing"
|
79
77
|
try1 = system("ssh -o BatchMode=yes -o ConnectTimeout=1 #@user@#@server -x mkdir -p #{temp} >/dev/null 2>&1")
|
80
78
|
return nil unless try1
|
81
79
|
try2 = system("ssh -o BatchMode=yes -o ConnectTimeout=1 #@user@#@server -x rmdir #{temp} >/dev/null 2>&1")
|
@@ -84,4 +82,3 @@ class RuneBlog::Publishing
|
|
84
82
|
end
|
85
83
|
end
|
86
84
|
|
87
|
-
|
data/lib/repl.rb
CHANGED
@@ -10,7 +10,6 @@ module RuneBlog::REPL
|
|
10
10
|
|
11
11
|
def edit_file(file)
|
12
12
|
result = system("#{@blog.editor} #{file}")
|
13
|
-
STDERR.puts "editor = #{@blog.editor} FILE = #{file}"
|
14
13
|
raise EditorProblem(file) unless result
|
15
14
|
sleep 0.1
|
16
15
|
STDSCR.clear
|
@@ -222,7 +221,6 @@ STDERR.puts "editor = #{@blog.editor} FILE = #{file}"
|
|
222
221
|
id = get_integer(arg)
|
223
222
|
result = @blog.remove_post(id)
|
224
223
|
output! "Post #{id} not found" if result.nil?
|
225
|
-
# puts "Post #{id} not found" if result.nil?
|
226
224
|
@out
|
227
225
|
end
|
228
226
|
|
data/lib/runeblog.rb
CHANGED
@@ -10,23 +10,25 @@ require 'view'
|
|
10
10
|
require 'publish'
|
11
11
|
require 'post'
|
12
12
|
|
13
|
+
require 'pathmagic'
|
14
|
+
|
13
15
|
###
|
14
16
|
|
15
17
|
class RuneBlog
|
16
18
|
|
17
19
|
DotDir = ".blogs"
|
18
20
|
ConfigFile = "config"
|
19
|
-
Themes = RuneBlog::Path
|
21
|
+
Themes = RuneBlog::Path/"../themes"
|
20
22
|
|
21
|
-
make_exception(:FileNotFound,
|
23
|
+
make_exception(:FileNotFound, "File $1 was not found")
|
22
24
|
make_exception(:BlogRepoAlreadyExists, "Blog repo $1 already exists")
|
23
|
-
make_exception(:CantAssignView,
|
24
|
-
make_exception(:ViewAlreadyExists,
|
25
|
-
make_exception(:DirAlreadyExists,
|
26
|
-
make_exception(:CantCreateDir,
|
27
|
-
make_exception(:EditorProblem,
|
28
|
-
make_exception(:NoSuchView,
|
29
|
-
make_exception(:NoBlogAccessor,
|
25
|
+
make_exception(:CantAssignView, "$1 is not a view")
|
26
|
+
make_exception(:ViewAlreadyExists, "View $1 already exists")
|
27
|
+
make_exception(:DirAlreadyExists, "Directory $1 already exists")
|
28
|
+
make_exception(:CantCreateDir, "Can't create directory $1")
|
29
|
+
make_exception(:EditorProblem, "Could not edit $1")
|
30
|
+
make_exception(:NoSuchView, "No such view: $1")
|
31
|
+
make_exception(:NoBlogAccessor, "Runeblog.blog is not set")
|
30
32
|
|
31
33
|
class << self
|
32
34
|
attr_accessor :blog
|
@@ -43,7 +45,7 @@ class RuneBlog
|
|
43
45
|
def self.create_new_blog_repo(dir = ".blogs")
|
44
46
|
log!(enter: __method__, args: [dir])
|
45
47
|
raise ArgumentError unless dir.is_a?(String) && ! dir.empty?
|
46
|
-
root_dir = Dir.pwd
|
48
|
+
root_dir = Dir.pwd/dir
|
47
49
|
self.create(dir)
|
48
50
|
rescue => err
|
49
51
|
puts "Can't create blog repo: '#{dir}' - #{err}"
|
@@ -55,7 +57,7 @@ class RuneBlog
|
|
55
57
|
# Crude - FIXME later - # What views are there? Publishing, etc.
|
56
58
|
self.blog = self # Weird. Like a singleton - dumbass circular dependency?
|
57
59
|
$_blog = self # Dumber still?
|
58
|
-
root = Dir.pwd
|
60
|
+
root = Dir.pwd/root
|
59
61
|
raise BlogRepoAlreadyExists if Dir.exist?(root)
|
60
62
|
create_dirs(root)
|
61
63
|
Dir.chdir(root) do
|
@@ -74,7 +76,7 @@ class RuneBlog
|
|
74
76
|
# Crude - FIXME later - # What views are there? Publishing, etc.
|
75
77
|
self.blog = self # Weird. Like a singleton - dumbass circular dependency?
|
76
78
|
$_blog = self # Dumber still?
|
77
|
-
root = Dir.pwd
|
79
|
+
root = Dir.pwd/root
|
78
80
|
blog = self.new(root)
|
79
81
|
end
|
80
82
|
|
@@ -85,7 +87,7 @@ class RuneBlog
|
|
85
87
|
$_blog = self # Dumber still?
|
86
88
|
|
87
89
|
@root = root_dir
|
88
|
-
file = @root
|
90
|
+
file = @root/ConfigFile
|
89
91
|
errmsg = "No config file! file = #{file.inspect} dir = #{Dir.pwd}"
|
90
92
|
raise errmsg unless File.exist?(file)
|
91
93
|
|
@@ -110,9 +112,9 @@ class RuneBlog
|
|
110
112
|
def process_post(sourcefile)
|
111
113
|
log!(enter: __method__, args: [dir])
|
112
114
|
nslug = sourcefile.sub(/.lt3/, "")
|
113
|
-
dir = @root
|
115
|
+
dir = @root/:posts/nslug
|
114
116
|
create_dir(dir)
|
115
|
-
xlate cwd: dir, src: sourcefile, debug: true
|
117
|
+
xlate cwd: dir, src: sourcefile # , debug: true
|
116
118
|
_deploy_local(dir)
|
117
119
|
end
|
118
120
|
|
@@ -147,7 +149,7 @@ class RuneBlog
|
|
147
149
|
|
148
150
|
def _set_publisher
|
149
151
|
log!(enter: __method__)
|
150
|
-
file = @view.dir
|
152
|
+
file = @view.dir/:publish
|
151
153
|
@view.publisher = nil
|
152
154
|
return unless File.exist?(file)
|
153
155
|
@view.publisher = RuneBlog::Publishing.new(read_config(file))
|
@@ -171,13 +173,13 @@ class RuneBlog
|
|
171
173
|
|
172
174
|
def get_sequence
|
173
175
|
log!(enter: __method__)
|
174
|
-
File.read(root
|
176
|
+
File.read(@root/:sequence).to_i
|
175
177
|
end
|
176
178
|
|
177
179
|
def next_sequence
|
178
180
|
log!(enter: __method__)
|
179
181
|
@sequence += 1
|
180
|
-
dump(@sequence,
|
182
|
+
dump(@sequence, @root/:sequence)
|
181
183
|
@sequence
|
182
184
|
end
|
183
185
|
|
@@ -186,21 +188,21 @@ class RuneBlog
|
|
186
188
|
v = str2view(v) if v.is_a?(String)
|
187
189
|
raise ArgumentError unless v.nil? || v.is_a?(RuneBlog::View)
|
188
190
|
v ||= @view
|
189
|
-
@root
|
191
|
+
return @root/:views/v
|
190
192
|
end
|
191
193
|
|
192
194
|
def self.exist?
|
193
195
|
log!(enter: __method__)
|
194
|
-
Dir.exist?(DotDir) && File.exist?(DotDir
|
196
|
+
Dir.exist?(DotDir) && File.exist?(DotDir/ConfigFile)
|
195
197
|
end
|
196
198
|
|
197
199
|
def make_dummy_publish_file(view_name)
|
198
200
|
log!(enter: __method__, args: [view_name])
|
199
|
-
vdir =
|
201
|
+
vdir = @root/:views/view_name
|
200
202
|
pub = [:user, :server, :docroot, :path, :proto]
|
201
203
|
pub = pub.map {|x| x.to_s + ": undefined" }
|
202
204
|
pub = pub.join("\n") + "\n"
|
203
|
-
dump(pub,
|
205
|
+
dump(pub, vdir/:publish)
|
204
206
|
end
|
205
207
|
|
206
208
|
def mark_last_published(str)
|
@@ -233,7 +235,7 @@ class RuneBlog
|
|
233
235
|
names = self.views.map(&:to_s)
|
234
236
|
bad = names.include?(view_name)
|
235
237
|
raise ViewAlreadyExists(view_name) if bad
|
236
|
-
vdir =
|
238
|
+
vdir = @root/:views/view_name
|
237
239
|
raise DirAlreadyExists(view_name) if Dir.exist?(vdir)
|
238
240
|
return true # hm?
|
239
241
|
end
|
@@ -242,8 +244,6 @@ class RuneBlog
|
|
242
244
|
log!(enter: __method__, args: [view_name])
|
243
245
|
check_valid_new_view(view_name)
|
244
246
|
make_empty_view_tree(view_name)
|
245
|
-
# xlate cwd: "#@root/views/#{view_name}/themes/standard/blog",
|
246
|
-
# src: "generate", dst: "../../../remote/index"
|
247
247
|
make_dummy_publish_file(view_name)
|
248
248
|
mark_last_published("Initial creation")
|
249
249
|
add_view(view_name)
|
@@ -253,7 +253,8 @@ class RuneBlog
|
|
253
253
|
log!(enter: __method__, args: [name, force])
|
254
254
|
raise ArgumentError unless name.is_a?(String) && ! name.empty?
|
255
255
|
if force
|
256
|
-
|
256
|
+
vname = @root/:views/name
|
257
|
+
system("rm -rf #{vname}")
|
257
258
|
@views -= [str2view(name)]
|
258
259
|
end
|
259
260
|
end
|
@@ -261,18 +262,17 @@ class RuneBlog
|
|
261
262
|
def view_files
|
262
263
|
log!(enter: __method__)
|
263
264
|
vdir = self.view.dir
|
264
|
-
files = [
|
265
|
-
files += posts.map {|x|
|
266
|
-
|
267
|
-
files.reject! {|f| File.mtime(f) < File.mtime("#{vdir}/last_published") }
|
265
|
+
files = [vdir/"index.html"]
|
266
|
+
files += posts.map {|x| vdir/x }
|
267
|
+
files.reject! {|f| File.mtime(f) < File.mtime(vdir/:last_published) }
|
268
268
|
end
|
269
269
|
|
270
270
|
def post_lookup(postid) # side-effect?
|
271
271
|
log!(enter: __method__, args: [postid])
|
272
272
|
slug = title = date = teaser_text = nil
|
273
273
|
|
274
|
-
dir_posts = @vdir
|
275
|
-
posts = Dir.entries(dir_posts).grep(/^\d\d\d\d/).map {|x| dir_posts
|
274
|
+
dir_posts = @vdir/:posts
|
275
|
+
posts = Dir.entries(dir_posts).grep(/^\d\d\d\d/).map {|x| dir_posts/x }
|
276
276
|
posts.select! {|x| File.directory?(x) }
|
277
277
|
|
278
278
|
post = posts.select {|x| File.basename(x).to_i == postid }
|
@@ -286,13 +286,13 @@ class RuneBlog
|
|
286
286
|
log!(enter: __method__, args: [slug])
|
287
287
|
id = slug.to_i
|
288
288
|
text = nil
|
289
|
-
post_entry_name = @theme
|
289
|
+
post_entry_name = @theme/"blog/post_entry.lt3"
|
290
290
|
@_post_entry ||= File.read(post_entry_name)
|
291
291
|
vp = post_lookup(id)
|
292
292
|
nslug, aslug, title, date, teaser_text =
|
293
293
|
vp.nslug, vp.aslug, vp.title, vp.date, vp.teaser_text
|
294
294
|
path = vp.path
|
295
|
-
url = "
|
295
|
+
url = aslug + ".html"
|
296
296
|
date = ::Date.parse(date)
|
297
297
|
date = date.strftime("%B %e<br>%Y")
|
298
298
|
text = interpolate(@_post_entry, binding)
|
@@ -302,9 +302,9 @@ class RuneBlog
|
|
302
302
|
def collect_recent_posts(file)
|
303
303
|
log!(enter: __method__, args: [file])
|
304
304
|
posts = nil
|
305
|
-
dir_posts = @vdir
|
305
|
+
dir_posts = @vdir/:posts
|
306
306
|
entries = Dir.entries(dir_posts)
|
307
|
-
posts = entries.grep(/^\d\d\d\d/).map {|x| dir_posts
|
307
|
+
posts = entries.grep(/^\d\d\d\d/).map {|x| dir_posts/x }
|
308
308
|
posts.select! {|x| File.directory?(x) }
|
309
309
|
# directories that start with four digits
|
310
310
|
posts = posts.sort {|a, b| b.to_i <=> a.to_i } # sort descending
|
@@ -314,7 +314,6 @@ class RuneBlog
|
|
314
314
|
<head><link rel="stylesheet" href="etc/blog.css"></head>
|
315
315
|
<body>
|
316
316
|
HTML
|
317
|
-
# posts = _find_recent_posts
|
318
317
|
wanted = [5, posts.size].min # estimate how many we want?
|
319
318
|
enum = posts.each
|
320
319
|
wanted.times do
|
@@ -323,19 +322,13 @@ class RuneBlog
|
|
323
322
|
text << teaser(postid) # side effect! calls _out
|
324
323
|
end
|
325
324
|
text << "</body></html>"
|
326
|
-
File.write(
|
327
|
-
iframe_text = <<-HTML
|
328
|
-
<iframe name="main" style="width: 100vw;height: 100vh;position: relative;"
|
329
|
-
src='recent.html' width=100% frameborder="0" allowfullscreen>
|
330
|
-
</iframe>
|
331
|
-
HTML
|
332
|
-
# FIXME ^ serves no purpose??
|
325
|
+
File.write(@vdir/:remote/file, text)
|
333
326
|
end
|
334
327
|
|
335
328
|
def create_new_post(title, testing = false, teaser: nil, body: nil, other_views: [])
|
336
329
|
log!(enter: __method__, args: [title, testing, teaser, body, other_views])
|
337
330
|
meta = nil
|
338
|
-
Dir.chdir(
|
331
|
+
Dir.chdir(@root/:posts) do
|
339
332
|
post = Post.create(title: title, teaser: teaser, body: body, other_views: other_views)
|
340
333
|
post.edit unless testing
|
341
334
|
post.build
|
@@ -350,7 +343,7 @@ class RuneBlog
|
|
350
343
|
def edit_initial_post(file, testing = false)
|
351
344
|
log!(enter: __method__, args: [file, testing])
|
352
345
|
debug "=== edit_initial_post #{file.inspect} => #{sourcefile}"
|
353
|
-
sourcefile =
|
346
|
+
sourcefile = @root/:drafts/file
|
354
347
|
result = system("#@editor #{sourcefile} +8") unless testing
|
355
348
|
raise EditorProblem(sourcefile) unless result
|
356
349
|
process_post(sourcefile)
|
@@ -361,14 +354,14 @@ class RuneBlog
|
|
361
354
|
|
362
355
|
def posts
|
363
356
|
log!(enter: __method__)
|
364
|
-
dir = self.view.dir
|
357
|
+
dir = self.view.dir/:posts
|
365
358
|
posts = Dir.entries(dir).grep(/^\d{4}/)
|
366
359
|
posts
|
367
360
|
end
|
368
361
|
|
369
362
|
def drafts
|
370
363
|
log!(enter: __method__)
|
371
|
-
dir =
|
364
|
+
dir = @root/:drafts
|
372
365
|
drafts = Dir.entries(dir).grep(/^\d{4}.*/)
|
373
366
|
end
|
374
367
|
|
@@ -381,19 +374,19 @@ class RuneBlog
|
|
381
374
|
self.view = view # error checking?
|
382
375
|
end
|
383
376
|
|
384
|
-
def generate_index(view)
|
377
|
+
def generate_index(view)
|
385
378
|
log!(enter: __method__, args: [view], pwd: true, dir: true)
|
386
379
|
raise ArgumentError unless view.is_a?(String) || view.is_a?(RuneBlog::View)
|
387
|
-
@vdir = @root
|
380
|
+
@vdir = @root/:views/view
|
388
381
|
collect_recent_posts("recent.html")
|
389
382
|
end
|
390
383
|
|
391
384
|
def generate_view(view) # huh?
|
392
385
|
log!(enter: __method__, args: [view])
|
393
386
|
generate_index(view) # recent posts (recent.html)
|
394
|
-
vdir =
|
395
|
-
xlate cwd:
|
396
|
-
src: "blog/generate.lt3", dst:
|
387
|
+
vdir = @root/:views/view
|
388
|
+
xlate cwd: vdir/:themes/:standard,
|
389
|
+
src: "blog/generate.lt3", dst: vdir/:remote/"index.html"
|
397
390
|
end
|
398
391
|
|
399
392
|
def _get_views(draft)
|
@@ -411,12 +404,12 @@ class RuneBlog
|
|
411
404
|
log!(enter: __method__, args: [draft, view])
|
412
405
|
fname = File.basename(draft)
|
413
406
|
noext = fname.sub(/.lt3$/, "")
|
414
|
-
vdir =
|
415
|
-
dir =
|
407
|
+
vdir = @root/:views/view
|
408
|
+
dir = vdir/:posts/noext
|
416
409
|
Dir.mkdir(dir) unless Dir.exist?(dir)
|
417
410
|
system("cp #{draft} #{dir}")
|
418
411
|
viewdir, slugdir, aslug = vdir, dir, noext[5..-1]
|
419
|
-
theme = viewdir
|
412
|
+
theme = viewdir/:themes/:standard
|
420
413
|
[noext, viewdir, slugdir, aslug, theme]
|
421
414
|
end
|
422
415
|
|
@@ -424,53 +417,57 @@ class RuneBlog
|
|
424
417
|
log!(enter: __method__, args: [draft, pdraft])
|
425
418
|
title_line = File.readlines(draft).grep(/^.title /).first
|
426
419
|
title = title_line.split(" ", 2)[1]
|
427
|
-
# pdir = "
|
428
420
|
Dir.chdir(pdraft) do
|
429
421
|
excerpt = File.read("teaser.txt")
|
430
422
|
vars = %[.set title="#{title.chomp}"\n] +
|
431
423
|
%[.set teaser="#{excerpt.chomp}"]
|
432
|
-
File.open(
|
424
|
+
File.open(pdraft/"vars.lt3", "w") {|f| f.puts vars }
|
433
425
|
end
|
434
426
|
end
|
435
427
|
|
436
|
-
def copy_widget_html
|
428
|
+
def copy_widget_html(view)
|
437
429
|
log!(enter: __method__)
|
438
|
-
|
439
|
-
|
430
|
+
vdir = @root/:views/view
|
431
|
+
remote = vdir/:remote
|
432
|
+
wdir = vdir/:themes/:standard/:widgets
|
433
|
+
widgets = Dir[wdir/"*"].select {|w| File.directory?(w) }
|
440
434
|
widgets.each do |w|
|
441
435
|
dir = File.basename(w)
|
442
|
-
rem = "
|
436
|
+
rem = w.sub(/themes.standard/, "remote")
|
443
437
|
create_dirs(rem)
|
444
|
-
|
438
|
+
files = Dir[w/"*"]
|
439
|
+
next unless files.any? {|x| x =~ /html$/ }
|
440
|
+
system("cp #{w}/*html #{rem}")
|
445
441
|
end
|
446
442
|
end
|
447
443
|
|
448
444
|
def _handle_post(draft, view)
|
449
445
|
log!(enter: __method__, args: [draft, view])
|
446
|
+
# break into separate methods?
|
450
447
|
|
451
448
|
fname = File.basename(draft) # 0001-this-is-a-post.lt3
|
452
449
|
nslug = fname.sub(/.lt3$/, "") # 0001-this-is-a-post
|
453
450
|
aslug = nslug.sub(/\d\d\d\d-/, "") # this-is-a-post
|
454
451
|
ahtml = aslug + ".html" # this-is-a-post.html
|
455
|
-
pdraft =
|
456
|
-
remote =
|
457
|
-
@theme =
|
452
|
+
pdraft = @root/:posts/nslug
|
453
|
+
remote = @root/:views/view/:remote
|
454
|
+
@theme = @root/:views/view/:themes/:standard
|
458
455
|
# Step 1...
|
459
456
|
create_dirs(pdraft)
|
460
457
|
xlate cwd: pdraft, src: draft, dst: "guts.html"
|
461
458
|
_post_metadata(draft, pdraft)
|
462
459
|
# Step 2...
|
463
|
-
vposts =
|
460
|
+
vposts = @root/:views/view/:posts
|
464
461
|
copy!(pdraft, vposts) # ??
|
465
462
|
# Step 3..
|
466
|
-
copy(pdraft
|
467
|
-
copy(pdraft
|
463
|
+
copy(pdraft/"guts.html", @theme/:post)
|
464
|
+
copy(pdraft/"vars.lt3", @theme/:post)
|
468
465
|
# Step 4...
|
469
|
-
xlate cwd:
|
470
|
-
dst:
|
471
|
-
xlate cwd:
|
472
|
-
dst:
|
473
|
-
copy_widget_html
|
466
|
+
xlate cwd: @theme/:post, src: "generate.lt3",
|
467
|
+
dst: remote/ahtml, copy: @theme/:post # , debug: true
|
468
|
+
xlate cwd: @theme/:post, src: "permalink.lt3",
|
469
|
+
dst: remote/:permalink/ahtml # , debug: true
|
470
|
+
copy_widget_html(view)
|
474
471
|
end
|
475
472
|
|
476
473
|
def generate_post(draft)
|
@@ -478,11 +475,11 @@ class RuneBlog
|
|
478
475
|
views = _get_views(draft)
|
479
476
|
views.each do |view|
|
480
477
|
_handle_post(draft, view)
|
481
|
-
generate_view(view)
|
478
|
+
generate_view(view) # FIXME leads to inefficiency?
|
482
479
|
end
|
483
480
|
end
|
484
481
|
|
485
|
-
def relink
|
482
|
+
def relink # FIXME no longer used?
|
486
483
|
log!(enter: __method__)
|
487
484
|
self.views.each {|view| generate_index(view) }
|
488
485
|
end
|
@@ -496,7 +493,7 @@ class RuneBlog
|
|
496
493
|
self.make_slug(meta)
|
497
494
|
check_meta(meta, "index_entry3")
|
498
495
|
# FIXME clean up and generalize
|
499
|
-
ref =
|
496
|
+
ref = view/meta.slug/"index.html"
|
500
497
|
<<-HTML
|
501
498
|
<font size=-1>#{meta.date} </font> <br>
|
502
499
|
<font size=+2 color=blue><a href=../#{ref} style="text-decoration: none">#{meta.title}</font></a>
|
@@ -542,7 +539,7 @@ class RuneBlog
|
|
542
539
|
def undelete_post(num)
|
543
540
|
log!(enter: __method__, args: [num])
|
544
541
|
raise ArgumentError unless num.is_a?(Integer)
|
545
|
-
files = Find.find(
|
542
|
+
files = Find.find(@root/:views).to_a
|
546
543
|
tag = prefix(num)
|
547
544
|
list = files.select {|x| File.directory?(x) and x =~ /_#{tag}/ }
|
548
545
|
return nil if list.empty?
|