runeblog 0.3.02

Sign up to get free protection for your applications and to get access to all the features.
Files changed (141) hide show
  1. checksums.yaml +7 -0
  2. data/README.lt3 +279 -0
  3. data/README.md +312 -0
  4. data/bin/blog +200 -0
  5. data/bin/mkwidget +164 -0
  6. data/data/EDITOR +1 -0
  7. data/data/ROOT +1 -0
  8. data/data/VIEW +1 -0
  9. data/data/features.txt +18 -0
  10. data/data/global.lt3 +20 -0
  11. data/data/universal.lt3 +18 -0
  12. data/empty_view/assets/austin-pano.jpg +0 -0
  13. data/empty_view/assets/sky2.jpg +0 -0
  14. data/empty_view/config/exper/2svg.lt3 +38 -0
  15. data/empty_view/config/exper/gen_svg.rb +60 -0
  16. data/empty_view/config/exper/meta.html +10 -0
  17. data/empty_view/config/exper/s2.html +25 -0
  18. data/empty_view/config/exper/varmint.rb +50 -0
  19. data/empty_view/config/facebook/credentials.txt +7 -0
  20. data/empty_view/config/facebook/facebook.rb +42 -0
  21. data/empty_view/config/facebook/fb.html +10 -0
  22. data/empty_view/config/facebook/fb.js.lt3 +15 -0
  23. data/empty_view/config/reddit/credentials.txt +6 -0
  24. data/empty_view/config/reddit/notes.txt +4 -0
  25. data/empty_view/config/reddit/reddit_post_url.py +34 -0
  26. data/empty_view/config/reddit/redpost.rb +43 -0
  27. data/empty_view/config/reddit/the-graffiti-wall.html +91 -0
  28. data/empty_view/config/twitter/credentials.txt +3 -0
  29. data/empty_view/config/twitter/tw.html +12 -0
  30. data/empty_view/config/twitter/tw.js +5 -0
  31. data/empty_view/config/twitter/twitter.rb +35 -0
  32. data/empty_view/posts/GIT_IS_DUMB +1 -0
  33. data/empty_view/remote/assets/GIT_IS_DUMB +1 -0
  34. data/empty_view/remote/banner/navbar/GIT_IS_DUMB +0 -0
  35. data/empty_view/remote/etc/GIT_IS_DUMB +1 -0
  36. data/empty_view/remote/permalink/GIT_IS_DUMB +1 -0
  37. data/empty_view/remote/widgets/ad/GIT_IS_DUMB +2 -0
  38. data/empty_view/remote/widgets/links/GIT_IS_DUMB +2 -0
  39. data/empty_view/remote/widgets/news/GIT_IS_DUMB +2 -0
  40. data/empty_view/remote/widgets/pages/GIT_IS_DUMB +2 -0
  41. data/empty_view/remote/widgets/pinned/GIT_IS_DUMB +2 -0
  42. data/empty_view/settings/features.txt +18 -0
  43. data/empty_view/settings/publish.txt +5 -0
  44. data/empty_view/settings/recent.txt +6 -0
  45. data/empty_view/settings/view.txt +4 -0
  46. data/empty_view/themes/standard/README +59 -0
  47. data/empty_view/themes/standard/banner/banner.lt3 +5 -0
  48. data/empty_view/themes/standard/banner/navbar/about.lt3 +18 -0
  49. data/empty_view/themes/standard/banner/navbar/contact.lt3 +18 -0
  50. data/empty_view/themes/standard/banner/navbar/faq.lt3 +1 -0
  51. data/empty_view/themes/standard/banner/navbar/list.data +3 -0
  52. data/empty_view/themes/standard/banner/top.lt3 +20 -0
  53. data/empty_view/themes/standard/blog/generate.lt3 +21 -0
  54. data/empty_view/themes/standard/blog/head.lt3 +16 -0
  55. data/empty_view/themes/standard/blog/index.lt3 +17 -0
  56. data/empty_view/themes/standard/blog/post_entry.lt3 +21 -0
  57. data/empty_view/themes/standard/etc/blog.css.lt3 +62 -0
  58. data/empty_view/themes/standard/etc/externals.lt3 +24 -0
  59. data/empty_view/themes/standard/etc/favicon.ico +0 -0
  60. data/empty_view/themes/standard/etc/misc.js +20 -0
  61. data/empty_view/themes/standard/post/generate.lt3 +38 -0
  62. data/empty_view/themes/standard/post/head.lt3 +7 -0
  63. data/empty_view/themes/standard/post/index.lt3 +24 -0
  64. data/empty_view/themes/standard/post/permalink.lt3 +32 -0
  65. data/empty_view/themes/standard/widgets/README +4 -0
  66. data/empty_view/themes/standard/widgets/ad/ad.lt3 +22 -0
  67. data/empty_view/themes/standard/widgets/ad/ad1.png +0 -0
  68. data/empty_view/themes/standard/widgets/ad/ad2.png +0 -0
  69. data/empty_view/themes/standard/widgets/ad/ad3.png +0 -0
  70. data/empty_view/themes/standard/widgets/ad/ad4.png +0 -0
  71. data/empty_view/themes/standard/widgets/bydates/README +2 -0
  72. data/empty_view/themes/standard/widgets/bydates/bydates.rb +18 -0
  73. data/empty_view/themes/standard/widgets/bydates/card.css +1 -0
  74. data/empty_view/themes/standard/widgets/bydates/custom.rb +1 -0
  75. data/empty_view/themes/standard/widgets/bydates/main.css +2 -0
  76. data/empty_view/themes/standard/widgets/links/README +2 -0
  77. data/empty_view/themes/standard/widgets/links/card.css +1 -0
  78. data/empty_view/themes/standard/widgets/links/custom.rb +1 -0
  79. data/empty_view/themes/standard/widgets/links/links.rb +90 -0
  80. data/empty_view/themes/standard/widgets/links/list.data +3 -0
  81. data/empty_view/themes/standard/widgets/links/main.css +2 -0
  82. data/empty_view/themes/standard/widgets/news/README +2 -0
  83. data/empty_view/themes/standard/widgets/news/card.css +1 -0
  84. data/empty_view/themes/standard/widgets/news/custom.rb +1 -0
  85. data/empty_view/themes/standard/widgets/news/list.data +4 -0
  86. data/empty_view/themes/standard/widgets/news/main.css +2 -0
  87. data/empty_view/themes/standard/widgets/news/news.rb +88 -0
  88. data/empty_view/themes/standard/widgets/pages/README +2 -0
  89. data/empty_view/themes/standard/widgets/pages/card.css +1 -0
  90. data/empty_view/themes/standard/widgets/pages/custom.rb +1 -0
  91. data/empty_view/themes/standard/widgets/pages/disclaim.lt3 +10 -0
  92. data/empty_view/themes/standard/widgets/pages/faq.lt3 +40 -0
  93. data/empty_view/themes/standard/widgets/pages/like-dislike.lt3 +11 -0
  94. data/empty_view/themes/standard/widgets/pages/list.data +4 -0
  95. data/empty_view/themes/standard/widgets/pages/local.rb +0 -0
  96. data/empty_view/themes/standard/widgets/pages/main.css +2 -0
  97. data/empty_view/themes/standard/widgets/pages/other-stuff.lt3 +10 -0
  98. data/empty_view/themes/standard/widgets/pages/pages.rb +95 -0
  99. data/empty_view/themes/standard/widgets/pinned/README +2 -0
  100. data/empty_view/themes/standard/widgets/pinned/card.css +1 -0
  101. data/empty_view/themes/standard/widgets/pinned/custom.rb +1 -0
  102. data/empty_view/themes/standard/widgets/pinned/main.css +2 -0
  103. data/empty_view/themes/standard/widgets/pinned/pinned.rb +99 -0
  104. data/empty_view/themes/standard/widgets/search/README +2 -0
  105. data/empty_view/themes/standard/widgets/search/card.css +1 -0
  106. data/empty_view/themes/standard/widgets/search/custom.rb +1 -0
  107. data/empty_view/themes/standard/widgets/search/main.css +2 -0
  108. data/empty_view/themes/standard/widgets/search/search.rb +18 -0
  109. data/empty_view/themes/standard/widgets/sitemap/README +2 -0
  110. data/empty_view/themes/standard/widgets/sitemap/card.css +1 -0
  111. data/empty_view/themes/standard/widgets/sitemap/custom.rb +1 -0
  112. data/empty_view/themes/standard/widgets/sitemap/main.css +2 -0
  113. data/empty_view/themes/standard/widgets/sitemap/sitemap.rb +18 -0
  114. data/empty_view/themes/standard/widgets/tag-cloud/OLD-example.lt3 +12 -0
  115. data/empty_view/themes/standard/widgets/tag-cloud/README +2 -0
  116. data/empty_view/themes/standard/widgets/tag-cloud/card.css +1 -0
  117. data/empty_view/themes/standard/widgets/tag-cloud/custom.rb +1 -0
  118. data/empty_view/themes/standard/widgets/tag-cloud/main.css +2 -0
  119. data/empty_view/themes/standard/widgets/tag-cloud/tag-cloud.lt3 +3 -0
  120. data/empty_view/themes/standard/widgets/tag-cloud/tag-cloud.rb +18 -0
  121. data/lib/Javascript.stuff +69 -0
  122. data/lib/helpers-blog.rb +155 -0
  123. data/lib/helpers-repl.rb +201 -0
  124. data/lib/liveblog.rb +825 -0
  125. data/lib/logging.rb +44 -0
  126. data/lib/lowlevel.rb +73 -0
  127. data/lib/pathmagic.rb +14 -0
  128. data/lib/post.rb +211 -0
  129. data/lib/processing.rb +60 -0
  130. data/lib/publish.rb +73 -0
  131. data/lib/repl.rb +597 -0
  132. data/lib/runeblog.rb +773 -0
  133. data/lib/runeblog_version.rb +50 -0
  134. data/lib/view.rb +69 -0
  135. data/runeblog.gemspec +42 -0
  136. data/test/austin.rb +158 -0
  137. data/test/fakeimage.jpg +0 -0
  138. data/test/general_test.rb +304 -0
  139. data/test/make_blog.rb +196 -0
  140. data/test/test +3 -0
  141. metadata +242 -0
@@ -0,0 +1 @@
1
+ meh
@@ -0,0 +1,18 @@
1
+ # 0 = disabled (installed but disabled)
2
+ # 1 = enabled (implies installed)
3
+ # x = excluded (not installed; does it even exist?)
4
+
5
+ reddit 1 # autopost, embed thread after blog post
6
+ facebook 0 # reader-like, reader post, autopost?
7
+ twitter 0 # reader-tweet, reader-follow, autotweet?
8
+
9
+ links 1 # widget: external links
10
+ news 1 # widget: news (external)
11
+ pages 1 # widget: internal pages
12
+ pinned 1 # widget: pinned posts
13
+
14
+ ad x # widget: embed advertising
15
+ bydates x # widget: browse posts by date
16
+ search x # widget: search posts
17
+ sitemap x # widget: site map
18
+ tag_cloud x # widget: tag cloud (clickable)
@@ -0,0 +1,5 @@
1
+ user root
2
+ server SITE
3
+ docroot /var/www/html
4
+ path VIEW_NAME # can be different
5
+ proto https
@@ -0,0 +1,6 @@
1
+ title.color #010101
2
+ title.size 28px
3
+ text.color #0101a1
4
+ text.size 22px
5
+ date.color #9a9a9a
6
+ date.size 15px
@@ -0,0 +1,4 @@
1
+ author VIEW_AUTHOR
2
+ title VIEW_TITLE
3
+ subtitle VIEW_SUBTITLE
4
+ site VIEW_SITE
@@ -0,0 +1,59 @@
1
+ New structure:
2
+
3
+ themes/standard The first "default theme" - more later
4
+ ├── README This file
5
+ ├── assets Assets (images/videos/etc) for entire view
6
+ ├── banner Top banner for the view
7
+ ├── blog All files/info for view
8
+ │   ├── generate.lt3 Generate index.html from wrapper (rarely edited)
9
+ │   ├── head.lt3 Header info for index.html
10
+ │   ├── index.lt3 "Guts" of view (user-edited, wrapped by generate.lt3)
11
+ │   └── post_entry.lt3
12
+ ├── etc
13
+ │   ├── blog.css
14
+ │   ├── externals.lt3
15
+ │   ├── global.lt3
16
+ │   └── favicon.ico
17
+ ├── navbar
18
+ │   ├── about.html
19
+ │   └── navbar.lt3
20
+ ├── pages
21
+ ├── post
22
+ │   ├── generate.lt3
23
+ │   ├── head.lt3
24
+ │   ├── index.lt3
25
+ │   └── permalink.lt3
26
+ └── sidebar
27
+    ├── ad.lt3
28
+    ├── calendar.lt3
29
+    ├── news.lt3
30
+    └── tag-cloud.lt3
31
+
32
+
33
+ Old structure:
34
+
35
+ templates The first "default theme" - more later
36
+ ├── README This file
37
+ ├── about.html An "about" file (will move)
38
+ ├── assets Assets for entire view (blog)
39
+ │   ├── application.css "Global" CSS
40
+ │   ├── favicon.ico Favicon
41
+ │   └── ... Other files later, images, etc.
42
+ ├── blog ** The whole template for this view (blog)
43
+ │   ├── _postentry.lt3 Used repeatedly in list of blog posts
44
+ │   ├── generate.lt3 The "main wrapper" that actually generates everything
45
+ │   ├── index.lt3 The main "user editable" portion of the template
46
+ │   ├── navbar.lt3 The navigation bar
47
+ │   └── sidebar The sidebar (which may include different things)
48
+ │   ├── ad.lt3 Code to generate an advertisement
49
+ │   ├── calendar.lt3 Code for a calendar
50
+ │   ├── news.lt3 Recent news
51
+ │   └── tag-cloud.lt3 Tag cloud (generated automatically of course)
52
+ ├── global.lt3 Some global settings (MOVED TO etc)
53
+ ├── head.lt3 A standard <head> section
54
+ ├── meta.lt3 Standard meta tags
55
+ └── post
56
+    ├── head.lt3 Specific to post (adds to higher-level head)
57
+    ├── generate.lt3 The "main wrapper" that actually generates the post
58
+    └── index.lt3 The main "user editable" portion of the post template
59
+
@@ -0,0 +1,5 @@
1
+ .banner
2
+ text top.html
3
+ break
4
+ navbar
5
+ .end
@@ -0,0 +1,18 @@
1
+ . --------------------------------------------------
2
+ . This is a sample file typical of page referenced
3
+ . directly from the navigation bar.
4
+ . It is like a special case of a page in the "pages"
5
+ . widget.
6
+ . --------------------------------------------------
7
+
8
+ .set this.title="About me"
9
+ . make this better later
10
+ <html><body>
11
+ <div class="content container-fluid mt-4">
12
+ <div class="row">
13
+ <h1>$this.title</h1>
14
+ . content starts here...
15
+ Blah blah blah...
16
+ </div>
17
+ </div>
18
+ </body></html>
@@ -0,0 +1,18 @@
1
+ . --------------------------------------------------
2
+ . This is a sample file typical of page referenced
3
+ . directly from the navigation bar.
4
+ . It is like a special case of a page in the "pages"
5
+ . widget.
6
+ . --------------------------------------------------
7
+
8
+ .set this.title="Contact"
9
+ . make this better later
10
+ <html><body>
11
+ <div class="content container-fluid mt-4">
12
+ <div class="row">
13
+ <h1>$this.title</h1>
14
+ . content starts here...
15
+ How to contact me by email, smoke signals, ICBM, seance, ...
16
+ </div>
17
+ </div>
18
+ </body></html>
@@ -0,0 +1 @@
1
+ .include ../../widgets/pages/faq.lt3
@@ -0,0 +1,3 @@
1
+ about About
2
+ contact Contact
3
+ faq FAQ
@@ -0,0 +1,20 @@
1
+ .seek global.lt3 # FIXME this is a hack!
2
+
3
+ <svg width="98%" height="120"
4
+ viewBox="0 0 98% 100">
5
+ <defs>
6
+ <linearGradient id="grad1" x1="100%" y1="100%" x2="0%" y2="100%">
7
+ <stop offset="0%" style="stop-color:rgb(198,198,228);stop-opacity:1" />
8
+ <stop offset="100%" style="stop-color:rgb(30,30,50);stop-opacity:1" />
9
+ </linearGradient>
10
+ </defs>
11
+ <style>
12
+ .small { font: 18px sans-serif; fill: #98baff }
13
+ .heavy { font: bold 52px sans-serif; fill: #76a9ff }
14
+ </style>
15
+
16
+ <rect x="20" y="20" rx="15" ry="15" width="98%" height="100" fill="url(#grad1)"/>
17
+
18
+ <text x="45" y="70" class=heavy>$view.title</text>
19
+ <text x="45" y="98" class=small>$view.subtitle</text>
20
+ </svg>
@@ -0,0 +1,21 @@
1
+ . --------------------------------------------------
2
+ . This file will usually not be edited by the user.
3
+ . It is used to generate the top-level index.html
4
+ . The user will more often edit blog/index.lt3 in
5
+ . the process of blog setup.
6
+ . --------------------------------------------------
7
+
8
+ <html>
9
+ <!-- Generated from $File on $$date.
10
+ Editing not recommended. -->
11
+ $.seek global.lt3
12
+ $.include blog/head.lt3
13
+ <body>
14
+ $.include banner/banner.lt3
15
+ <div class="content container-fluid mt-4">
16
+ <div class="row">
17
+ $.include blog/index.lt3
18
+ </div>
19
+ </div>
20
+ </body>
21
+ </html>
@@ -0,0 +1,16 @@
1
+ . --------------------------------------------------
2
+ . This file will usually not be edited by the user.
3
+ . It is used to generate the <HEAD> for the overall
4
+ . blog and for the individual post.
5
+ . SUBJECT TO CHANGE, like everything else but moreso
6
+ . --------------------------------------------------
7
+
8
+ <head>
9
+ .include etc/externals.lt3
10
+ .include etc/misc.js
11
+
12
+ . fix/remove later
13
+ .head
14
+ .end
15
+
16
+ </head>
@@ -0,0 +1,17 @@
1
+ . --------------------------------------------------
2
+ . This file describes the actual layout of the blog.
3
+ . It is referenced from blog/generate.lt3
4
+ . --------------------------------------------------
5
+
6
+ . figure out how to put navbar here
7
+
8
+ .recent_posts
9
+
10
+ .sidebar
11
+ links
12
+ ad
13
+ pinned
14
+ pages
15
+ news
16
+ .end
17
+
@@ -0,0 +1,21 @@
1
+ . --------------------------------------------------
2
+ . This HTML fragment gives the format of a post's
3
+ . "index" entry (recent posts on blog front page).
4
+ . --------------------------------------------------
5
+
6
+ <div class="post">
7
+ <table width=100% cellpadding=7>
8
+ <tr>
9
+ <td width=16% valign=top align=right style="margin-top: -1px;">
10
+ <font size=-1>#{date}</font>
11
+ </td>
12
+ <td>
13
+ <span class="recent-title-text"><a href="#{url}" style="margin-top: -5px">#{title}</a></span>
14
+ <b>#{teaser_text}</b>&nbsp;&nbsp;
15
+ <a style="text-decoration: none" href="#{url}"><small>Keep&nbsp;reading</small></a>
16
+ </td>
17
+ </tr>
18
+ </table>
19
+ </div>
20
+
21
+ <font size=-4><br></font>
@@ -0,0 +1,62 @@
1
+ . --------------------------------------------------
2
+ . This file is processed to create blog.css
3
+ . Most of the global CSS goes here
4
+ . --------------------------------------------------
5
+
6
+ .seek global.lt3
7
+
8
+ body { font-family: $font.family }
9
+
10
+ \.recent-title a {
11
+ color: $recent.title.color;
12
+ font-family: $font.family;
13
+ font-size: $recent.title.size;
14
+ float: right;
15
+ display: inline-block;
16
+ text-align: top;
17
+ text-decoration: none;
18
+ }
19
+
20
+ \.recent-title a:hover {
21
+ text-decoration: none;
22
+ }
23
+
24
+ \.recent-title-text a {
25
+ color: $recent.text.color;
26
+ font-family: $font.family;
27
+ font-size: $recent.text.size;
28
+ display: block;
29
+ text-decoration: none;
30
+ }
31
+
32
+ \.recent-title-text a:hover {
33
+ text-decoration: none;
34
+ }
35
+
36
+ \.recent-date {
37
+ color: $recent.date.color;
38
+ font-family: $font.family;
39
+ font-size: $recent.date.size;
40
+ display: block;
41
+ float: left;
42
+ text-align: top;
43
+ }
44
+
45
+ \.mydrop {
46
+ color: #444444;
47
+ float: left;
48
+ text-align: top;
49
+ # font-family: Verdana;
50
+ font-size: 38px;
51
+ line-height: 38px;
52
+ # padding-top: 0px;
53
+ padding-right: 8px;
54
+ padding-left: 3px;
55
+ }
56
+
57
+ . not used?
58
+ \.thumbnail img {
59
+ max-height: 100%;
60
+ max-width: 100%;
61
+ }
62
+
@@ -0,0 +1,24 @@
1
+ . --------------------------------------------------
2
+ . External JS and CSS resources (Bootstrap, etc.)
3
+ . are defined here
4
+ . --------------------------------------------------
5
+
6
+ .stylesheet
7
+ https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css
8
+ sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T
9
+ .end
10
+
11
+ .script
12
+ https://code.jquery.com/jquery-3.3.1.slim.min.js
13
+ sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo
14
+ .end
15
+
16
+ .script
17
+ https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js
18
+ sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1
19
+ .end
20
+
21
+ .script
22
+ https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js
23
+ sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM
24
+ .end
@@ -0,0 +1,20 @@
1
+ <!-- Miscellaneous local JS pieces are defined here -->
2
+ .nopara
3
+
4
+ <script>
5
+ function open_main(url) {
6
+ var site = url+'?toolbar=0&amp;navpanes=0&amp;scrollbar=0';
7
+ document.getElementById('main').src = site;
8
+ }
9
+
10
+ function callout(d, id, src) {
11
+ var js, fjs = d.getElementsByTagName('script')[0];
12
+ p=/^http:/.test(d.location)?'http':'https';
13
+ if (d.getElementById(id)) {return;}
14
+ js = d.createElement('script');
15
+ js.id = id;
16
+ js.src = p + src;
17
+ fjs.parentNode.insertBefore(js, fjs);
18
+ }
19
+
20
+ </script>
@@ -0,0 +1,38 @@
1
+ . --------------------------------------------------
2
+ . This is used to generate a single post.
3
+ . The logic behind it is convoluted and may be
4
+ . subject to change.
5
+ . --------------------------------------------------
6
+
7
+ .mixin liveblog
8
+ <html>
9
+ <!-- Generated from $File on $$date; editing not recommended. -->
10
+
11
+ .seek global.lt3
12
+ .include vars.lt3
13
+
14
+ . FIXME
15
+
16
+ .head
17
+ og:title $title
18
+ description $teaser
19
+ style blog.css
20
+ .end
21
+
22
+ <body>
23
+
24
+ <section class="post">
25
+ <div class="recent-content">
26
+ <table border=0 width=100%><tr>
27
+ <td align=left valign=bottom><h2 class="recent-title">$title</h2></td>
28
+ <td align=right valign=top><font size=-5><br></font>$longdate</td>
29
+ </tr></table><hr>
30
+ $.copy guts.html
31
+ </div>
32
+ </section>
33
+
34
+ <br>
35
+ <hr>
36
+ .post_trailer
37
+ </body>
38
+ </html>
@@ -0,0 +1,7 @@
1
+ . --------------------------------------------------
2
+ . This file is currently unused and may go away.
3
+ . It is intended to manage the <HEAD> for a post (as
4
+ . opposed to the entire blog).
5
+ . --------------------------------------------------
6
+
7
+ . To be done...