runeblog 0.2.10 → 0.2.16
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/helpers-blog.rb +46 -24
- data/lib/liveblog.rb +66 -39
- data/lib/pathmagic.rb +14 -0
- data/lib/runeblog.rb +160 -133
- data/lib/runeblog_version.rb +1 -1
- data/runeblog.gemspec +2 -3
- data/test/make_blog.rb +3 -5
- metadata +5 -511
- 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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: da4cf909e23c3d38745684efef6be5f7b048d5487edc5192fa2041db387f8e6e
|
4
|
+
data.tar.gz: 5aef89b7cff7aab75cb093800ceaaf97f90d669c0a3901829e72fcdc4d1bcb44
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9d6b591026909681b34e1ab24fe61ba274a176c0d22bb335be1c2a07475f1f3b9444fb0c3e419b906853bc1b98f12650393f3a4d409bc83b9b37ee04269e7ce
|
7
|
+
data.tar.gz: 2f22425943ba72ad5587895d4895662fc70e18dd0ae644f1b0f7f6283eb5dc8a188b0e08fa0a08178a9948f9c7b1671c1e98dc6ff704764d289faba2af4d0d17
|
data/empty_view.tgz
CHANGED
Binary file
|
data/lib/helpers-blog.rb
CHANGED
@@ -3,6 +3,8 @@ require 'fileutils'
|
|
3
3
|
|
4
4
|
# Home = Dir.pwd # unless Home
|
5
5
|
|
6
|
+
LEXT = ".lt3"
|
7
|
+
|
6
8
|
module RuneBlog::Helpers
|
7
9
|
|
8
10
|
def copy(src, dst)
|
@@ -31,37 +33,57 @@ exit unless rc
|
|
31
33
|
# end
|
32
34
|
end
|
33
35
|
|
34
|
-
def stale?(src, dst)
|
36
|
+
def stale?(src, dst, force = false)
|
35
37
|
log!(enter: __method__, args: [src, dst])
|
38
|
+
raise "Source #{src} not found in #{Dir.pwd}" unless File.exist?(src)
|
39
|
+
return true if force
|
36
40
|
return true unless File.exist?(dst)
|
37
41
|
return true if File.mtime(src) > File.mtime(dst)
|
38
42
|
return false
|
39
43
|
end
|
40
44
|
|
41
|
-
def livetext(src, dst=nil, dir=".")
|
42
|
-
log!(enter: __method__, args: [src, dst])
|
43
|
-
src << ".lt3" unless src.end_with?(".lt3")
|
44
|
-
if dst
|
45
|
-
dst << ".html" unless dst.end_with?(".html")
|
46
|
-
else
|
47
|
-
dst = src.sub(/.lt3$/, "")
|
48
|
-
end
|
49
|
-
|
50
|
-
Dir.chdir(dir) { system("livetext #{src} >#{dst}") }
|
51
|
-
end
|
52
|
-
|
53
|
-
def livetext!(src, dst=nil, dir=".")
|
54
|
-
log!(enter: __method__, args: [src, dst])
|
55
|
-
src << ".lt3" unless src.end_with?(".lt3")
|
56
|
-
if dst
|
57
|
-
dst << ".html" unless dst.end_with?(".html")
|
58
|
-
else
|
59
|
-
dst = src.sub(/.lt3$/, "")
|
45
|
+
# def livetext(src, dst=nil, dir=".")
|
46
|
+
# log!(enter: __method__, args: [src, dst])
|
47
|
+
# src << ".lt3" unless src.end_with?(".lt3")
|
48
|
+
# if dst
|
49
|
+
# dst << ".html" unless dst.end_with?(".html")
|
50
|
+
# else
|
51
|
+
# dst = src.sub(/.lt3$/, "")
|
52
|
+
# end
|
53
|
+
## return unless stale?(src, dst)
|
54
|
+
# Dir.chdir(dir) { system("livetext #{src} >#{dst}") }
|
55
|
+
# end
|
56
|
+
#
|
57
|
+
# def livetext!(src, dst=nil, dir=".")
|
58
|
+
# log!(enter: __method__, args: [src, dst])
|
59
|
+
# src << ".lt3" unless src.end_with?(".lt3")
|
60
|
+
# if dst
|
61
|
+
# dst << ".html" unless dst.end_with?(".html")
|
62
|
+
# else
|
63
|
+
# dst = src.sub(/.lt3$/, "")
|
64
|
+
# end
|
65
|
+
## return unless stale?(src, dst)
|
66
|
+
#STDERR.puts "-- livetext #{src} >#{dst} \n in: #{Dir.pwd}\n from: #{caller[0]}"
|
67
|
+
# Dir.chdir(dir) { system("livetext #{src} >#{dst}") }
|
68
|
+
#STDERR.puts "... completed"
|
69
|
+
# end
|
70
|
+
|
71
|
+
def xlate(cwd: Dir.pwd, src:,
|
72
|
+
dst: (strip = true; src.sub(/.lt3$/,"")),
|
73
|
+
copy: nil, debug: false, force: false)
|
74
|
+
src += LEXT unless src.end_with?(LEXT)
|
75
|
+
dst += ".html" unless dst.end_with?(".html") || strip
|
76
|
+
Dir.chdir(cwd) do
|
77
|
+
return unless stale?(src, dst, force)
|
78
|
+
if debug
|
79
|
+
STDERR.puts "-- xlate #{src} >#{dst}"
|
80
|
+
STDERR.puts " in: #{Dir.pwd}"
|
81
|
+
STDERR.puts " from: #{caller[0]}"
|
82
|
+
STDERR.puts " copy: #{copy}" if copy
|
83
|
+
end
|
84
|
+
rc = system("livetext #{src} >#{dst}")
|
60
85
|
end
|
61
|
-
|
62
|
-
STDERR.puts "-- livetext #{src} >#{dst} \n in: #{Dir.pwd}\n from: #{caller[0]}"
|
63
|
-
Dir.chdir(dir) { system("livetext #{src} >#{dst}") }
|
64
|
-
STDERR.puts "... completed"
|
86
|
+
STDERR.puts "...completed (shell returned #{rc})" if debug
|
65
87
|
end
|
66
88
|
|
67
89
|
def get_root
|
data/lib/liveblog.rb
CHANGED
@@ -19,7 +19,7 @@ def init_liveblog # FIXME - a lot of this logic sucks
|
|
19
19
|
@view_name = @blog.view.name
|
20
20
|
@vdir = @blog.view.dir
|
21
21
|
@version = RuneBlog::VERSION
|
22
|
-
@theme = @vdir
|
22
|
+
@theme = @vdir/:themes/:standard
|
23
23
|
end
|
24
24
|
|
25
25
|
# FIXME - stale? and livetext are duplicated from helpers-blog
|
@@ -96,41 +96,34 @@ def list!
|
|
96
96
|
_optional_blank_line
|
97
97
|
end
|
98
98
|
|
99
|
-
def
|
99
|
+
def _html_body(file)
|
100
100
|
file.puts "<html>\n <body>"
|
101
101
|
yield
|
102
102
|
file.puts " </body>\n</html>"
|
103
103
|
end
|
104
104
|
|
105
|
-
def
|
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
|
105
|
+
def _write_card(cardfile, mainfile, pairs, card_title, tag, relative: true)
|
119
106
|
# HTML for sidebar card
|
107
|
+
log!(str: "Creating #{cardfile}.html", pwd: true)
|
108
|
+
# TTY.puts "Creating #{cardfile}.html - pwd = #{Dir.pwd}"
|
120
109
|
File.open("#{cardfile}.html", "w") do |f|
|
121
110
|
f.puts <<-EOS
|
122
111
|
<div class="card mb-3">
|
123
112
|
<div class="card-body">
|
124
113
|
<h5 class="card-title">
|
125
114
|
<a href="javascript: void(0)"
|
126
|
-
onclick="javascript:open_main('widgets
|
115
|
+
onclick="javascript:open_main('widgets/#{tag}/#{mainfile}.html')"
|
127
116
|
style="text-decoration: none; color: black">#{card_title}</a>
|
128
117
|
</h5>
|
129
118
|
EOS
|
119
|
+
log!(str: "Writing data pairs to #{cardfile}.html", pwd: true)
|
120
|
+
top = ""
|
121
|
+
top = :widgets/tag + "/" unless tag == "news" # FIXME !!
|
130
122
|
pairs.each do |file, title|
|
123
|
+
# took out #{top}#{file}
|
131
124
|
f.puts <<-EOS
|
132
125
|
<li class="list-group-item"> <a href="javascript: void(0)"
|
133
|
-
onclick="javascript:open_main('#{file}')">#{title}</a> </li>
|
126
|
+
onclick="javascript:open_main('#{top}#{file}')">#{title}</a> </li>
|
134
127
|
EOS
|
135
128
|
end
|
136
129
|
f.puts <<-EOS
|
@@ -140,6 +133,35 @@ def make_news_links
|
|
140
133
|
end
|
141
134
|
end
|
142
135
|
|
136
|
+
def _write_main(mainfile, pairs, card_title)
|
137
|
+
# HTML for main area (iframe)
|
138
|
+
log!(str: "Creating #{mainfile}.html", pwd: true)
|
139
|
+
File.open("#{mainfile}.html", "w") do |f|
|
140
|
+
_html_body(f) do
|
141
|
+
f.puts "<h1>#{card_title}</h1>"
|
142
|
+
pairs.each do |file, title|
|
143
|
+
main = _main(file)
|
144
|
+
f.puts %[<a style="text-decoration: none; font-size: 24px" #{main}>#{title}</a> <br>]
|
145
|
+
end
|
146
|
+
end
|
147
|
+
end
|
148
|
+
end
|
149
|
+
|
150
|
+
def make_main_links
|
151
|
+
log!(enter: __method__)
|
152
|
+
# FIXME remember strings may not be safe
|
153
|
+
line = _data.chomp
|
154
|
+
tag, card_title = *line.split(" ", 2)
|
155
|
+
cardfile, mainfile = "#{tag}-card", "#{tag}-main"
|
156
|
+
input = "list.data"
|
157
|
+
log!(str: "Reading #{input}", pwd: true)
|
158
|
+
pairs = File.readlines(input).map {|line| line.chomp.split(",", 2) }
|
159
|
+
_write_main(mainfile, pairs, card_title)
|
160
|
+
widget_relative = false # (tag != "news") # FIXME kludge!!!
|
161
|
+
_write_card(cardfile, mainfile, pairs, card_title, tag, relative: widget_relative)
|
162
|
+
log!(str: "...returning from method", pwd: true)
|
163
|
+
end
|
164
|
+
|
143
165
|
### inset
|
144
166
|
|
145
167
|
def inset
|
@@ -209,7 +231,7 @@ end
|
|
209
231
|
def image # primitive so far
|
210
232
|
_debug "img: huh? <img src=#{_args.first}></img>"
|
211
233
|
fname = _args.first
|
212
|
-
path =
|
234
|
+
path = :assets/fname
|
213
235
|
_out "<img src=#{path}></img>"
|
214
236
|
_optional_blank_line
|
215
237
|
end
|
@@ -236,23 +258,20 @@ def pin
|
|
236
258
|
_optional_blank_line
|
237
259
|
end
|
238
260
|
|
239
|
-
def
|
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
|
261
|
+
def _write_metadata
|
247
262
|
File.write("teaser.txt", @meta.teaser)
|
248
|
-
|
249
263
|
fields = [:num, :title, :date, :pubdate, :views, :tags]
|
250
|
-
|
251
264
|
fname2 = "metadata.txt"
|
252
265
|
f2 = File.open(fname2, "w") do |f2|
|
253
266
|
fields.each {|fld| f2.puts "#{fld}: #{@meta.send(fld)}" }
|
254
267
|
end
|
255
|
-
|
268
|
+
end
|
269
|
+
|
270
|
+
def write_post
|
271
|
+
raise "'post' was not called" unless @meta
|
272
|
+
@meta.views = @meta.views.join(" ") if @meta.views.is_a? Array
|
273
|
+
@meta.tags = @meta.tags.join(" ") if @meta.tags.is_a? Array
|
274
|
+
_write_metadata
|
256
275
|
rescue => err
|
257
276
|
puts "err = #{err}"
|
258
277
|
puts err.backtrace.join("\n")
|
@@ -267,19 +286,25 @@ def teaser
|
|
267
286
|
end
|
268
287
|
|
269
288
|
def finalize
|
289
|
+
STDERR.puts :cp1
|
270
290
|
unless @meta
|
271
291
|
puts @live.body
|
272
292
|
return
|
273
293
|
end
|
294
|
+
STDERR.puts :cp4
|
274
295
|
if @blog.nil?
|
275
296
|
return @meta
|
276
297
|
end
|
277
298
|
|
299
|
+
STDERR.puts :cp6
|
278
300
|
@slug = @blog.make_slug(@meta)
|
301
|
+
STDERR.puts :cp7
|
279
302
|
slug_dir = @slug
|
280
|
-
@postdir = @blog.view.dir
|
303
|
+
@postdir = @blog.view.dir/:posts/slug_dir
|
281
304
|
STDERR.puts "--- finalize: pwd = #{Dir.pwd} postdir = #@postdir"
|
305
|
+
STDERR.puts :cp8
|
282
306
|
write_post
|
307
|
+
STDERR.puts :cp9
|
283
308
|
@meta
|
284
309
|
end
|
285
310
|
|
@@ -423,10 +448,12 @@ def sidebar
|
|
423
448
|
_out %[<div class="col-lg-3 col-md-3 col-sm-3 col-xs-12">]
|
424
449
|
_args do |token|
|
425
450
|
tag = token.chomp.strip.downcase
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
451
|
+
wtag = :widgets/tag
|
452
|
+
raise "Can't find #{wtag}" unless Dir.exist?(wtag)
|
453
|
+
Dir.chdir(wtag) do
|
454
|
+
tcard = "#{tag}-card.html"
|
455
|
+
livetext tag, tcard
|
456
|
+
_include_file tcard
|
430
457
|
end
|
431
458
|
end
|
432
459
|
_out %[</div>]
|
@@ -490,8 +517,8 @@ def _post_lookup(postid) # side-effect
|
|
490
517
|
# .. = templates, ../.. = views/thisview
|
491
518
|
slug = title = date = teaser_text = nil
|
492
519
|
|
493
|
-
dir_posts = @vdir
|
494
|
-
posts = Dir.entries(dir_posts).grep(/^\d\d\d\d/).map {|x| dir_posts
|
520
|
+
dir_posts = @vdir/:posts
|
521
|
+
posts = Dir.entries(dir_posts).grep(/^\d\d\d\d/).map {|x| dir_posts/x }
|
495
522
|
posts.select! {|x| File.directory?(x) }
|
496
523
|
|
497
524
|
post = posts.select {|x| File.basename(x).to_i == postid }
|
@@ -606,7 +633,7 @@ def tag_cloud
|
|
606
633
|
_out open
|
607
634
|
_body do |line|
|
608
635
|
line.chomp!
|
609
|
-
url, classname, cdata = line.split(",",
|
636
|
+
url, classname, cdata = line.split(",", 3)
|
610
637
|
main = _main(url)
|
611
638
|
_out %[<a #{main} class="#{classname}">#{cdata}</a>]
|
612
639
|
end
|
@@ -648,7 +675,7 @@ def navbar
|
|
648
675
|
first = false
|
649
676
|
_out %[<li class="nav-item active"> <a class="nav-link" href="#{href}">#{cdata}<span class="sr-only">(current)</span></a> </li>]
|
650
677
|
else
|
651
|
-
main = _main(
|
678
|
+
main = _main(:navbar/href)
|
652
679
|
_out %[<li class="nav-item"> <a class="nav-link" #{main}>#{cdata}</a> </li>]
|
653
680
|
end
|
654
681
|
end
|
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/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,12 +57,12 @@ 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
|
62
64
|
system("cp #{RuneBlog::Path}/../empty_view.tgz .")
|
63
|
-
create_dirs(:drafts, :views)
|
65
|
+
create_dirs(:drafts, :views, :posts)
|
64
66
|
new_sequence
|
65
67
|
end
|
66
68
|
put_config(root: root)
|
@@ -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
|
|
@@ -99,6 +101,23 @@ class RuneBlog
|
|
99
101
|
@post_tags = []
|
100
102
|
end
|
101
103
|
|
104
|
+
def _deploy_local(dir)
|
105
|
+
log!(enter: __method__, args: [dir])
|
106
|
+
Dir.chdir(dir) do
|
107
|
+
views = File.readlines("metadata.txt").grep(/^.views /).first[7..-1].split
|
108
|
+
views.each {|v| system("cp *html #@root/views/#{v}/remote") }
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
def process_post(sourcefile)
|
113
|
+
log!(enter: __method__, args: [dir])
|
114
|
+
nslug = sourcefile.sub(/.lt3/, "")
|
115
|
+
dir = @root/:posts/nslug
|
116
|
+
create_dir(dir)
|
117
|
+
xlate cwd: dir, src: sourcefile, debug: true
|
118
|
+
_deploy_local(dir)
|
119
|
+
end
|
120
|
+
|
102
121
|
def inspect
|
103
122
|
log!(enter: __method__)
|
104
123
|
str = "blog: "
|
@@ -130,7 +149,7 @@ class RuneBlog
|
|
130
149
|
|
131
150
|
def _set_publisher
|
132
151
|
log!(enter: __method__)
|
133
|
-
file = @view.dir
|
152
|
+
file = @view.dir/:publish
|
134
153
|
@view.publisher = nil
|
135
154
|
return unless File.exist?(file)
|
136
155
|
@view.publisher = RuneBlog::Publishing.new(read_config(file))
|
@@ -154,13 +173,13 @@ class RuneBlog
|
|
154
173
|
|
155
174
|
def get_sequence
|
156
175
|
log!(enter: __method__)
|
157
|
-
File.read(root
|
176
|
+
File.read(@root/:sequence).to_i
|
158
177
|
end
|
159
178
|
|
160
179
|
def next_sequence
|
161
180
|
log!(enter: __method__)
|
162
181
|
@sequence += 1
|
163
|
-
dump(@sequence,
|
182
|
+
dump(@sequence, @root/:sequence)
|
164
183
|
@sequence
|
165
184
|
end
|
166
185
|
|
@@ -169,60 +188,73 @@ class RuneBlog
|
|
169
188
|
v = str2view(v) if v.is_a?(String)
|
170
189
|
raise ArgumentError unless v.nil? || v.is_a?(RuneBlog::View)
|
171
190
|
v ||= @view
|
172
|
-
@root
|
191
|
+
return @root/:views/v
|
173
192
|
end
|
174
193
|
|
175
194
|
def self.exist?
|
176
195
|
log!(enter: __method__)
|
177
|
-
Dir.exist?(DotDir) && File.exist?(DotDir
|
196
|
+
Dir.exist?(DotDir) && File.exist?(DotDir/ConfigFile)
|
178
197
|
end
|
179
198
|
|
180
|
-
def
|
181
|
-
|
182
|
-
|
199
|
+
def make_dummy_publish_file(view_name)
|
200
|
+
log!(enter: __method__, args: [view_name])
|
201
|
+
vdir = @root/:views/view_name
|
202
|
+
pub = [:user, :server, :docroot, :path, :proto]
|
203
|
+
pub = pub.map {|x| x.to_s + ": undefined" }
|
204
|
+
pub = pub.join("\n") + "\n"
|
205
|
+
dump(pub, vdir/:publish)
|
183
206
|
end
|
184
207
|
|
185
|
-
def
|
186
|
-
|
187
|
-
|
188
|
-
copy!("themes/standard/widgets", "remote/")
|
208
|
+
def mark_last_published(str)
|
209
|
+
log!(enter: __method__, args: [str])
|
210
|
+
dump(str, "last_published")
|
189
211
|
end
|
190
212
|
|
191
|
-
def
|
192
|
-
log!(enter: __method__, args: [
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
vdir = arg.dup
|
199
|
-
raise DirAlreadyExists(vdir) if Dir.exist?(vdir)
|
213
|
+
def add_view(view_name)
|
214
|
+
log!(enter: __method__, args: [view_name])
|
215
|
+
view = RuneBlog::View.new(view_name)
|
216
|
+
@view = view # current view
|
217
|
+
@views << view # all views
|
218
|
+
view
|
219
|
+
end
|
200
220
|
|
221
|
+
def make_empty_view_tree(view_name)
|
222
|
+
log!(enter: __method__, args: [view_name])
|
201
223
|
Dir.chdir(@root) do
|
202
224
|
cmd1 = "tar zxvf empty_view.tgz >/dev/null 2>&1"
|
203
|
-
cmd2 = "cp -r empty_view views/#{
|
225
|
+
cmd2 = "cp -r empty_view views/#{view_name}"
|
204
226
|
system(cmd1)
|
205
227
|
system(cmd2)
|
206
228
|
end
|
229
|
+
end
|
207
230
|
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
231
|
+
def check_valid_new_view(view_name)
|
232
|
+
log!(enter: __method__, args: [view_name])
|
233
|
+
raise ArgumentError unless view_name.is_a?(String)
|
234
|
+
raise ArgumentError if view_name.empty?
|
235
|
+
names = self.views.map(&:to_s)
|
236
|
+
bad = names.include?(view_name)
|
237
|
+
raise ViewAlreadyExists(view_name) if bad
|
238
|
+
vdir = @root/:views/view_name
|
239
|
+
raise DirAlreadyExists(view_name) if Dir.exist?(vdir)
|
240
|
+
return true # hm?
|
241
|
+
end
|
212
242
|
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
243
|
+
def create_view(view_name)
|
244
|
+
log!(enter: __method__, args: [view_name])
|
245
|
+
check_valid_new_view(view_name)
|
246
|
+
make_empty_view_tree(view_name)
|
247
|
+
make_dummy_publish_file(view_name)
|
248
|
+
mark_last_published("Initial creation")
|
249
|
+
add_view(view_name)
|
219
250
|
end
|
220
251
|
|
221
252
|
def delete_view(name, force = false)
|
222
253
|
log!(enter: __method__, args: [name, force])
|
223
254
|
raise ArgumentError unless name.is_a?(String) && ! name.empty?
|
224
255
|
if force
|
225
|
-
|
256
|
+
vname = @root/:views/name
|
257
|
+
system("rm -rf #{vname}")
|
226
258
|
@views -= [str2view(name)]
|
227
259
|
end
|
228
260
|
end
|
@@ -230,18 +262,17 @@ class RuneBlog
|
|
230
262
|
def view_files
|
231
263
|
log!(enter: __method__)
|
232
264
|
vdir = self.view.dir
|
233
|
-
files = [
|
234
|
-
files += posts.map {|x|
|
235
|
-
|
236
|
-
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) }
|
237
268
|
end
|
238
269
|
|
239
270
|
def post_lookup(postid) # side-effect?
|
240
271
|
log!(enter: __method__, args: [postid])
|
241
272
|
slug = title = date = teaser_text = nil
|
242
273
|
|
243
|
-
dir_posts = @vdir
|
244
|
-
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 }
|
245
276
|
posts.select! {|x| File.directory?(x) }
|
246
277
|
|
247
278
|
post = posts.select {|x| File.basename(x).to_i == postid }
|
@@ -255,13 +286,13 @@ class RuneBlog
|
|
255
286
|
log!(enter: __method__, args: [slug])
|
256
287
|
id = slug.to_i
|
257
288
|
text = nil
|
258
|
-
post_entry_name = @theme
|
289
|
+
post_entry_name = @theme/"blog/post_entry.lt3"
|
259
290
|
@_post_entry ||= File.read(post_entry_name)
|
260
291
|
vp = post_lookup(id)
|
261
292
|
nslug, aslug, title, date, teaser_text =
|
262
293
|
vp.nslug, vp.aslug, vp.title, vp.date, vp.teaser_text
|
263
294
|
path = vp.path
|
264
|
-
url = "
|
295
|
+
url = aslug + ".html"
|
265
296
|
date = ::Date.parse(date)
|
266
297
|
date = date.strftime("%B %e<br>%Y")
|
267
298
|
text = interpolate(@_post_entry, binding)
|
@@ -271,9 +302,9 @@ class RuneBlog
|
|
271
302
|
def collect_recent_posts(file)
|
272
303
|
log!(enter: __method__, args: [file])
|
273
304
|
posts = nil
|
274
|
-
dir_posts = @vdir
|
305
|
+
dir_posts = @vdir/:posts
|
275
306
|
entries = Dir.entries(dir_posts)
|
276
|
-
posts = entries.grep(/^\d\d\d\d/).map {|x| dir_posts
|
307
|
+
posts = entries.grep(/^\d\d\d\d/).map {|x| dir_posts/x }
|
277
308
|
posts.select! {|x| File.directory?(x) }
|
278
309
|
# directories that start with four digits
|
279
310
|
posts = posts.sort {|a, b| b.to_i <=> a.to_i } # sort descending
|
@@ -283,7 +314,6 @@ class RuneBlog
|
|
283
314
|
<head><link rel="stylesheet" href="etc/blog.css"></head>
|
284
315
|
<body>
|
285
316
|
HTML
|
286
|
-
# posts = _find_recent_posts
|
287
317
|
wanted = [5, posts.size].min # estimate how many we want?
|
288
318
|
enum = posts.each
|
289
319
|
wanted.times do
|
@@ -292,19 +322,19 @@ class RuneBlog
|
|
292
322
|
text << teaser(postid) # side effect! calls _out
|
293
323
|
end
|
294
324
|
text << "</body></html>"
|
295
|
-
File.write(
|
296
|
-
iframe_text = <<-HTML
|
297
|
-
<iframe name="main" style="width: 100vw;height: 100vh;position: relative;"
|
298
|
-
src='recent.html' width=100% frameborder="0" allowfullscreen>
|
299
|
-
</iframe>
|
300
|
-
HTML
|
325
|
+
File.write(@vdir/:remote/file, text)
|
326
|
+
# iframe_text = <<-HTML
|
327
|
+
# <iframe name="main" style="width: 100vw;height: 100vh;position: relative;"
|
328
|
+
# src='recent.html' width=100% frameborder="0" allowfullscreen>
|
329
|
+
# </iframe>
|
330
|
+
# HTML
|
301
331
|
# FIXME ^ serves no purpose??
|
302
332
|
end
|
303
333
|
|
304
334
|
def create_new_post(title, testing = false, teaser: nil, body: nil, other_views: [])
|
305
335
|
log!(enter: __method__, args: [title, testing, teaser, body, other_views])
|
306
336
|
meta = nil
|
307
|
-
Dir.chdir(
|
337
|
+
Dir.chdir(@root/:posts) do
|
308
338
|
post = Post.create(title: title, teaser: teaser, body: body, other_views: other_views)
|
309
339
|
post.edit unless testing
|
310
340
|
post.build
|
@@ -319,9 +349,10 @@ class RuneBlog
|
|
319
349
|
def edit_initial_post(file, testing = false)
|
320
350
|
log!(enter: __method__, args: [file, testing])
|
321
351
|
debug "=== edit_initial_post #{file.inspect} => #{sourcefile}"
|
322
|
-
sourcefile =
|
352
|
+
sourcefile = @root/:drafts/file
|
323
353
|
result = system("#@editor #{sourcefile} +8") unless testing
|
324
354
|
raise EditorProblem(sourcefile) unless result
|
355
|
+
process_post(sourcefile)
|
325
356
|
nil
|
326
357
|
rescue => err
|
327
358
|
error(err)
|
@@ -329,14 +360,14 @@ class RuneBlog
|
|
329
360
|
|
330
361
|
def posts
|
331
362
|
log!(enter: __method__)
|
332
|
-
dir = self.view.dir
|
363
|
+
dir = self.view.dir/:posts
|
333
364
|
posts = Dir.entries(dir).grep(/^\d{4}/)
|
334
365
|
posts
|
335
366
|
end
|
336
367
|
|
337
368
|
def drafts
|
338
369
|
log!(enter: __method__)
|
339
|
-
dir =
|
370
|
+
dir = @root/:drafts
|
340
371
|
drafts = Dir.entries(dir).grep(/^\d{4}.*/)
|
341
372
|
end
|
342
373
|
|
@@ -352,16 +383,16 @@ class RuneBlog
|
|
352
383
|
def generate_index(view) # FIXME delete?
|
353
384
|
log!(enter: __method__, args: [view], pwd: true, dir: true)
|
354
385
|
raise ArgumentError unless view.is_a?(String) || view.is_a?(RuneBlog::View)
|
355
|
-
@vdir = @root
|
386
|
+
@vdir = @root/:views/view
|
356
387
|
collect_recent_posts("recent.html")
|
357
388
|
end
|
358
389
|
|
359
390
|
def generate_view(view) # huh?
|
360
391
|
log!(enter: __method__, args: [view])
|
361
392
|
generate_index(view) # recent posts (recent.html)
|
362
|
-
|
363
|
-
|
364
|
-
|
393
|
+
vdir = @root/:views/view
|
394
|
+
xlate cwd: vdir/:themes/:standard,
|
395
|
+
src: "blog/generate.lt3", dst: vdir/:remote/"index.html"
|
365
396
|
end
|
366
397
|
|
367
398
|
def _get_views(draft)
|
@@ -379,82 +410,78 @@ class RuneBlog
|
|
379
410
|
log!(enter: __method__, args: [draft, view])
|
380
411
|
fname = File.basename(draft)
|
381
412
|
noext = fname.sub(/.lt3$/, "")
|
382
|
-
vdir =
|
383
|
-
dir =
|
413
|
+
vdir = @root/:views/view
|
414
|
+
dir = vdir/:posts/noext
|
384
415
|
Dir.mkdir(dir) unless Dir.exist?(dir)
|
385
416
|
system("cp #{draft} #{dir}")
|
386
417
|
viewdir, slugdir, aslug = vdir, dir, noext[5..-1]
|
387
|
-
theme = viewdir
|
418
|
+
theme = viewdir/:themes/:standard
|
388
419
|
[noext, viewdir, slugdir, aslug, theme]
|
389
420
|
end
|
390
421
|
|
391
|
-
def
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
lt3 = draft.split("/")[-1] # Remember: Some posts may be in more than
|
398
|
-
copy(lt3, remote) # one view -- careful with links back
|
399
|
-
STDERR.puts "1 pwd = #{Dir.pwd}"
|
400
|
-
livetext! draft, html
|
401
|
-
STDERR.puts " copy #{html}, #{remote}/#{html}"
|
402
|
-
copy(html, "#{remote}/#{html}")
|
403
|
-
|
404
|
-
title_line = File.readlines(draft).grep(/^.title /).first
|
405
|
-
title = title_line.split(" ", 2)[1]
|
422
|
+
def _post_metadata(draft, pdraft)
|
423
|
+
log!(enter: __method__, args: [draft, pdraft])
|
424
|
+
title_line = File.readlines(draft).grep(/^.title /).first
|
425
|
+
title = title_line.split(" ", 2)[1]
|
426
|
+
# pdir = "
|
427
|
+
Dir.chdir(pdraft) do
|
406
428
|
excerpt = File.read("teaser.txt")
|
407
429
|
vars = %[.set title="#{title.chomp}"\n] +
|
408
430
|
%[.set teaser="#{excerpt.chomp}"]
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
431
|
+
File.open(pdraft/"vars.lt3", "w") {|f| f.puts vars }
|
432
|
+
end
|
433
|
+
end
|
434
|
+
|
435
|
+
def copy_widget_html(view)
|
436
|
+
log!(enter: __method__)
|
437
|
+
vdir = @root/:views/view
|
438
|
+
remote = vdir/:remote
|
439
|
+
wdir = vdir/:themes/:standard/:widgets
|
440
|
+
widgets = Dir[wdir/"*"].select {|w| File.directory?(w) }
|
441
|
+
widgets.each do |w|
|
442
|
+
dir = File.basename(w)
|
443
|
+
rem = w.sub(/themes.standard/, "remote")
|
444
|
+
create_dirs(rem)
|
445
|
+
next unless Dir[w/"*"].any? {|x| x =~ /html$/ }
|
446
|
+
system("cp #{w}/*html #{rem}")
|
422
447
|
end
|
423
448
|
end
|
424
449
|
|
450
|
+
def _handle_post(draft, view)
|
451
|
+
log!(enter: __method__, args: [draft, view])
|
452
|
+
|
453
|
+
fname = File.basename(draft) # 0001-this-is-a-post.lt3
|
454
|
+
nslug = fname.sub(/.lt3$/, "") # 0001-this-is-a-post
|
455
|
+
aslug = nslug.sub(/\d\d\d\d-/, "") # this-is-a-post
|
456
|
+
ahtml = aslug + ".html" # this-is-a-post.html
|
457
|
+
pdraft = @root/:posts/nslug
|
458
|
+
remote = @root/:views/view/:remote
|
459
|
+
@theme = @root/:views/view/:themes/:standard
|
460
|
+
# Step 1...
|
461
|
+
create_dirs(pdraft)
|
462
|
+
xlate cwd: pdraft, src: draft, dst: "guts.html"
|
463
|
+
_post_metadata(draft, pdraft)
|
464
|
+
# Step 2...
|
465
|
+
vposts = @root/:views/view/:posts
|
466
|
+
copy!(pdraft, vposts) # ??
|
467
|
+
# Step 3..
|
468
|
+
copy(pdraft/"guts.html", @theme/:post)
|
469
|
+
copy(pdraft/"vars.lt3", @theme/:post)
|
470
|
+
# Step 4...
|
471
|
+
xlate cwd: @theme/:post, src: "generate.lt3",
|
472
|
+
dst: remote/ahtml, copy: @theme/:post
|
473
|
+
xlate cwd: @theme/:post, src: "permalink.lt3",
|
474
|
+
dst: remote/:permalink/ahtml
|
475
|
+
copy_widget_html(view)
|
476
|
+
end
|
477
|
+
|
425
478
|
def generate_post(draft)
|
426
479
|
log!(enter: __method__, args: [draft])
|
427
480
|
views = _get_views(draft)
|
428
|
-
views.each do |view|
|
481
|
+
views.each do |view|
|
429
482
|
_handle_post(draft, view)
|
483
|
+
generate_view(view)
|
430
484
|
end
|
431
|
-
# noext, viewdir, slugdir, aslug, @theme = _copy_get_dirs(draft, view)
|
432
|
-
# remote = viewdir + "/remote"
|
433
|
-
# Dir.chdir(slugdir) do
|
434
|
-
# copy(draft, ".")
|
435
|
-
# lt3 = draft.split("/")[-1]
|
436
|
-
# # Remember: Some posts may be in more than one view -- careful with links back
|
437
|
-
# copy(lt3, remote)
|
438
|
-
# html = noext[5..-1] # strip "nnnn-"
|
439
|
-
# livetext! draft, html
|
440
|
-
# copy(html, "#{remote}/#{html}")
|
441
|
-
# title_line = File.readlines(draft).grep(/^.title /).first
|
442
|
-
# title = title_line.split(" ", 2)[1]
|
443
|
-
# excerpt = File.read("teaser.txt")
|
444
|
-
# vars = %[.set title="#{title.chomp}"\n] +
|
445
|
-
# %[.set teaser="#{excerpt.chomp}"]
|
446
|
-
# theme = "#{viewdir}/themes/standard"
|
447
|
-
# File.open("#{theme}/post/vars.lt3", "w") {|f| f.puts vars }
|
448
|
-
# livetext! "generate.lt3", "#{remote}/html", "#{theme}/post"
|
449
|
-
# copy("#{remote}/html", "#{theme}/post")
|
450
|
-
# livetext! "permalink.lt3", "#{remote}/permalink/#{html}", "#{theme}/post"
|
451
|
-
# log!(str: "About to enter remote/", pwd: true, dir: true)
|
452
|
-
# Dir.chdir(remote) do
|
453
|
-
# log!(str: "Now in remote/", pwd: true, dir: true)
|
454
|
-
# system("cp -r ../themes/standard/widgets .")
|
455
|
-
# log!(str: "finished with remote/", pwd: true, dir: true)
|
456
|
-
# end
|
457
|
-
# end
|
458
485
|
end
|
459
486
|
|
460
487
|
def relink
|
@@ -471,7 +498,7 @@ STDERR.puts " copy #{html}, #{remote}/#{html}"
|
|
471
498
|
self.make_slug(meta)
|
472
499
|
check_meta(meta, "index_entry3")
|
473
500
|
# FIXME clean up and generalize
|
474
|
-
ref =
|
501
|
+
ref = view/meta.slug/"index.html"
|
475
502
|
<<-HTML
|
476
503
|
<font size=-1>#{meta.date} </font> <br>
|
477
504
|
<font size=+2 color=blue><a href=../#{ref} style="text-decoration: none">#{meta.title}</font></a>
|
@@ -517,7 +544,7 @@ STDERR.puts " copy #{html}, #{remote}/#{html}"
|
|
517
544
|
def undelete_post(num)
|
518
545
|
log!(enter: __method__, args: [num])
|
519
546
|
raise ArgumentError unless num.is_a?(Integer)
|
520
|
-
files = Find.find(
|
547
|
+
files = Find.find(@root/:views).to_a
|
521
548
|
tag = prefix(num)
|
522
549
|
list = files.select {|x| File.directory?(x) and x =~ /_#{tag}/ }
|
523
550
|
return nil if list.empty?
|