runeblog 0.2.31 → 0.2.36

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/bin/blog +1 -1
  3. data/empty_view/assets/sky2.jpg +0 -0
  4. data/empty_view/remote/assets/GIT_IS_DUMB +1 -0
  5. data/empty_view/remote/etc/GIT_IS_DUMB +1 -0
  6. data/empty_view/remote/navbar/GIT_IS_DUMB +1 -0
  7. data/empty_view/remote/permalink/GIT_IS_DUMB +1 -0
  8. data/empty_view/remote/widgets/links/list.data +3 -0
  9. data/empty_view/remote/widgets/news/list.data +4 -0
  10. data/empty_view/remote/widgets/pages/SUBFILES +1 -0
  11. data/empty_view/remote/widgets/pages/list.data +4 -0
  12. data/empty_view/themes/standard/README +59 -0
  13. data/empty_view/themes/standard/blog/generate.lt3 +37 -0
  14. data/empty_view/themes/standard/blog/head.lt3 +16 -0
  15. data/empty_view/themes/standard/blog/index.lt3 +17 -0
  16. data/empty_view/themes/standard/blog/post_entry.lt3 +22 -0
  17. data/empty_view/themes/standard/etc/blog.css.lt3 +43 -0
  18. data/empty_view/themes/standard/etc/externals.lt3 +24 -0
  19. data/empty_view/themes/standard/etc/favicon.ico +0 -0
  20. data/empty_view/themes/standard/etc/misc.js +8 -0
  21. data/empty_view/themes/standard/global.lt3 +35 -0
  22. data/empty_view/themes/standard/navbar/about.lt3 +18 -0
  23. data/empty_view/themes/standard/navbar/contact.lt3 +18 -0
  24. data/empty_view/themes/standard/navbar/navbar.lt3 +16 -0
  25. data/empty_view/themes/standard/post/generate.lt3 +30 -0
  26. data/empty_view/themes/standard/post/head.lt3 +7 -0
  27. data/empty_view/themes/standard/post/index.lt3 +24 -0
  28. data/empty_view/themes/standard/post/permalink.lt3 +32 -0
  29. data/empty_view/themes/standard/widgets/README +4 -0
  30. data/empty_view/themes/standard/widgets/ad/ad.lt3 +15 -0
  31. data/empty_view/themes/standard/widgets/calendar/calendar.lt3 +6 -0
  32. data/empty_view/themes/standard/widgets/links/links.lt3 +2 -0
  33. data/empty_view/themes/standard/widgets/links/list.data +3 -0
  34. data/empty_view/themes/standard/widgets/news/list.data +4 -0
  35. data/empty_view/themes/standard/widgets/news/news.lt3 +2 -0
  36. data/empty_view/themes/standard/widgets/pages/README +2 -0
  37. data/empty_view/themes/standard/widgets/pages/SUBFILES +1 -0
  38. data/empty_view/themes/standard/widgets/pages/disclaim.lt3 +10 -0
  39. data/empty_view/themes/standard/widgets/pages/faq.lt3 +9 -0
  40. data/empty_view/themes/standard/widgets/pages/generated.lt3 +4 -0
  41. data/empty_view/themes/standard/widgets/pages/like-dislike.lt3 +11 -0
  42. data/empty_view/themes/standard/widgets/pages/list.data +4 -0
  43. data/empty_view/themes/standard/widgets/pages/other-stuff.lt3 +10 -0
  44. data/empty_view/themes/standard/widgets/pages/pages.lt3 +2 -0
  45. data/empty_view/themes/standard/widgets/tag-cloud/tag-cloud.lt3 +12 -0
  46. data/lib/helpers-repl.rb +2 -6
  47. data/lib/liveblog.rb +4 -5
  48. data/lib/pathmagic.rb +1 -1
  49. data/lib/publish.rb +0 -10
  50. data/lib/repl.rb +15 -35
  51. data/lib/runeblog.rb +12 -13
  52. data/lib/runeblog_version.rb +1 -1
  53. data/lib/view.rb +1 -1
  54. data/runeblog.gemspec +2 -2
  55. data/test/general_test.rb +0 -1
  56. data/test/make_blog.rb +1 -1
  57. metadata +44 -2
  58. data/empty_view.tgz +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 24f0f2eb8b2b217131e1a0bf2c74edd38efd672161f4cfbbe2f32caca0f7198a
4
- data.tar.gz: a356e607a4e20cf4e024995441966f42031f98ce58ef1bff1b616d3f44446cd2
3
+ metadata.gz: dcfdb93b7e151b307a4776601a4c171e5dba3a88a63b859d3c319bb796215981
4
+ data.tar.gz: fa8e91e0f9be6fd7e0111a3b584fec90ff397b0079eb48969d3c2de40467b73e
5
5
  SHA512:
6
- metadata.gz: 23d9b96c624032f42f9928e376c3df6d075a548b4f53278c8adecc9c7379ab999b0d2c2964f867c9379fb78d0373863a5de57b52e8c12a3dfbca463f502b288e
7
- data.tar.gz: 50b81e2e7db6e3f418600bf529fedd1353eeffb39a1bab6f58ed72641e244d4608c44c580864e9c420a6bdd3f39d40f3a8314b551197ef5d26bcee93366852c6
6
+ metadata.gz: 4c40488f1169eef37e142b9550ec589737a345fcca6ceb669baebea94a2d651583cda37ee7d89f11ee83abac9f2ed29584ac3b41b0a6e87c50fff18bc54e13da
7
+ data.tar.gz: 0b389d93a294814f62de4dba5065ba5ac15805e7ac068408d867e83b05901fc6e3848d57e539fc445781d34e564bdb6bd367f8bf59cd39fcc7ff8ee175f54f4a
data/bin/blog CHANGED
@@ -24,7 +24,7 @@ TEXT
24
24
  end
25
25
 
26
26
  def mainloop
27
- print fx("blog> ", Red, :bold)
27
+ print fx("#{@blog.view}> ", Red, :bold)
28
28
  cmd = STDSCR.gets(history: @cmdhist, tab: @tabcom)
29
29
  cmd_quit(nil) if cmd.nil? # ^D
30
30
  cmd.chomp!
@@ -0,0 +1,3 @@
1
+ https://www.mensa.org, no, Mensa International
2
+ http://space.com, yes, Space.com: NASA, Space Exploration and Astronomy News
3
+ https://arstechnica.com, no, Ars Technica
@@ -0,0 +1,4 @@
1
+ https://techcrunch.com/2019/09/16/fossa-scores-8-5-million-series-a-to-help-enterprise-manage-open-source-licenses/, yes, FOSSA scores \$8.5 million Series A to help enterprise manage open-source licenses
2
+ https://techcrunch.com/2019/09/17/spacexs-orbital-starship-prototype-construction-progress-detailed-in-new-photos/, yes, SpaceX’s orbital Starship prototype construction progress detailed in new photos
3
+ https://developers.googleblog.com/2019/05/Flutter-io19.html, yes, Flutter: a Portable UI Framework for Mobile, Web, Embedded, and Desktop
4
+ https://jaycarlson.net/microcontrollers/, no, The Amazing \$1 Microcontroller (2017)
@@ -0,0 +1 @@
1
+ Causes other *.lt3 files to be generated
@@ -0,0 +1,4 @@
1
+ faq.html,Frequently Asked Questions
2
+ like-dislike.html,Likes and Dislikes
3
+ disclaim.html,Disclaimer
4
+ lifestory.html,My Life Story
@@ -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,37 @@
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
+ .mixin liveblog
9
+
10
+ <html>
11
+ <!-- Generated from $File on $$date. Editing not recommended. -->
12
+
13
+ .seek global.lt3
14
+ .include blog/head.lt3
15
+ <body>
16
+
17
+ . FIXME
18
+ <table width=100%>
19
+ <tr>
20
+ <td width=30% bgcolor=black>
21
+ <div style="text-align: center; color: white">
22
+ <h1>Around Austin</h1><br>
23
+ The view from downtown...
24
+ </div>
25
+ </td>
26
+ <td><img src=assets/sky2.jpg width=100%></img>
27
+ </tr>
28
+ </table>
29
+
30
+ $.include navbar/navbar.lt3
31
+ <div class="content container-fluid mt-4">
32
+ <div class="row">
33
+ $.include blog/index.lt3
34
+ </div>
35
+ </div>
36
+ </body>
37
+ </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
+ ad
12
+ links
13
+ news
14
+ pages
15
+ tag-cloud
16
+ .end
17
+
@@ -0,0 +1,22 @@
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%>
8
+ <tr>
9
+ <td width=12% valign=top>
10
+ <span class="post-date mt-1 mb-1">
11
+ <b>#{date}</b>
12
+ </span>
13
+ </td>
14
+ <td> <!-- <span class="post-title-box"> -->
15
+ <span class="post-title-text"><a href="#{url}">#{title}</a></span>
16
+ <b>#{teaser_text}</b>
17
+ <br>
18
+ <a style="text-decoration: none" href="#{url}"><small>Keep reading...</small></a></p> <!-- </span> -->
19
+ </td>
20
+ </tr>
21
+ </table>
22
+ </div>
@@ -0,0 +1,43 @@
1
+ . --------------------------------------------------
2
+ . This file is processed to create blog.css
3
+ . Most of the global CSS goes here
4
+ . --------------------------------------------------
5
+ .nopara
6
+
7
+ .seek themes/standard/global.lt3
8
+
9
+ * { font-family: $font.family }
10
+
11
+ \.post-title a {
12
+ color: $post.title.color;
13
+ font-size: $post.title.size;
14
+ float: right;
15
+ display: inline-block;
16
+ text-align: top;
17
+ text-decoration: none;
18
+ }
19
+
20
+ \.post-title a:hover {
21
+ text-decoration: none;
22
+ }
23
+
24
+ \.post-title-text a {
25
+ color: $post.text.color;
26
+ font-size: $post.text.size;
27
+ # float: right;
28
+ display: block;
29
+ text-decoration: none;
30
+ }
31
+
32
+ \.post-title-text a:hover {
33
+ text-decoration: none;
34
+ }
35
+
36
+ \.post-date {
37
+ color: $post.date.color;
38
+ font-size: $post.date.size;
39
+ display: block;
40
+ float: left;
41
+ text-align: top;
42
+ }
43
+
@@ -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,8 @@
1
+ <!-- Miscellaneous local JS pieces are defined here -->
2
+
3
+ <script>
4
+ function open_main(url) {
5
+ var site = url+'?toolbar=0&amp;navpanes=0&amp;scrollbar=0';
6
+ document.getElementById('main').src = site;
7
+ }
8
+ </script>
@@ -0,0 +1,35 @@
1
+ . --------------------------------------------------
2
+ . Global settings are stored here in the form
3
+ . <variable> <value>
4
+ . --------------------------------------------------
5
+
6
+ .variables
7
+ author Your name here
8
+ blog Blog title goes here
9
+ blog.desc Subtitle (if any) goes here
10
+ site rubyhacker.com
11
+
12
+ host localhost:4000//
13
+ charset utf-8
14
+ url localhost:4000//
15
+ locale en_US
16
+
17
+ font.family verdana
18
+
19
+ post.title.color #010101
20
+ post.title.size 28px
21
+
22
+ post.text.color #0101a1
23
+ post.text.size 22px
24
+
25
+ post.date.color #9a9a9a
26
+ post.date.size 15px
27
+
28
+
29
+ publish.user root
30
+ publish.server rubyhacker.com
31
+ publish.docroot /var/www/
32
+ publish.path around_austin
33
+ publish.proto http
34
+ .end
35
+
@@ -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,16 @@
1
+ . --------------------------------------------------
2
+ . This defines the content of the navigation bar.
3
+ . The first one is a special case.
4
+ . The others are understood to refer to .lt3 files
5
+ . such as navbar/about.lt3 (which is processed into
6
+ . HTML).
7
+ . The title may be more than one word. Quotes are
8
+ . not needed.
9
+ . --------------------------------------------------
10
+
11
+ .navbar
12
+ index Home
13
+ about About
14
+ contact Contact
15
+ .end
16
+
@@ -0,0 +1,30 @@
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
+
9
+ <html>
10
+ <!-- Editing this file is not recommended. -->
11
+ <!-- It was generated from $File on $$date. -->
12
+
13
+ .seek global.lt3
14
+ .include vars.lt3
15
+
16
+ .head
17
+ og:title $title
18
+ description $teaser
19
+ .end
20
+
21
+ <section class="post">
22
+ <div class="entry-content">
23
+ $.copy guts.html
24
+ </div>
25
+ </section>
26
+
27
+ <br>
28
+ <a href="javascript:history.go(-1)">[Back]</a>
29
+ </body>
30
+ </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...
@@ -0,0 +1,24 @@
1
+ . --------------------------------------------------
2
+ . This file is overwritten and customized as the
3
+ . blog is maintained.
4
+ . Currently there is no user-friendly way to change
5
+ . the "skeleton" of a post. When there is, this will
6
+ . likely be the place.
7
+ . --------------------------------------------------
8
+
9
+ .mixin liveblog
10
+ . ^ get rid of this later
11
+
12
+ .post 0
13
+
14
+ .title The new amphitheatre is overrated
15
+ .pubdate 2019-07-09
16
+ .views around_austin
17
+ .tags
18
+
19
+ .teaser
20
+ It used to be that all major concerts played the Erwin Center.
21
+
22
+ .end
23
+ Now, depending on what you consider "major," blah blah blah...
24
+
@@ -0,0 +1,32 @@
1
+ . --------------------------------------------------
2
+ . A permalink differs very little from the original
3
+ . post except that it lacks "context" (navigation
4
+ . bar, banner, sidebar, etc.).
5
+ . It does have a link back to the current front page
6
+ . of the blog.
7
+ . --------------------------------------------------
8
+
9
+ .mixin liveblog
10
+
11
+ <html>
12
+ <!-- Editing this file is not recommended. -->
13
+ <!-- It was generated from $File on $$date. -->
14
+
15
+ .seek global.lt3
16
+ .include vars.lt3
17
+
18
+ .head
19
+ og:title $title
20
+ description $teaser
21
+ .end
22
+
23
+ <section class="post">
24
+ <div class="entry-content">
25
+ $.copy guts.html
26
+ </div>
27
+ </section>
28
+
29
+ <br>
30
+ <a href="../index.html" style="text-decoration: none">[Home: $blog]</a>
31
+ </body>
32
+ </html>
@@ -0,0 +1,4 @@
1
+ bydates Browse blog entries for past dates
2
+ links List of links (typically offsite)
3
+ pages List of pages (my own local stuff)
4
+ search Search posts by tag, title, body, etc.
@@ -0,0 +1,15 @@
1
+ . In real life, ads won't work this way...
2
+
3
+ .set classname="btn btn-light float-right"
4
+ .set card.title="Advertisement"
5
+ .set card.text="Build your amazing website with blabla.com."
6
+ .set extra="bg-dark text-white"
7
+
8
+ <div class="card $extra mb-3">
9
+ <div class="card-body">
10
+ <h5 class="card-title">$card.title</h5>
11
+ <p class="card-text">$card.text</p>
12
+ <a href="javascript: void(0)" onclick="javascript:open_main('widgets/ad/ad.html')" class="$classname">Visit page</a>
13
+ </div>
14
+ </div>
15
+
@@ -0,0 +1,6 @@
1
+
2
+ .card_iframe Calendar
3
+ https://calendar.google.com/calendar/embed?src=en-gb.indian%23holiday%40group.v.calendar.google.com&ctz=Asia%2FKolkata
4
+ height="350"
5
+ .end
6
+
@@ -0,0 +1,2 @@
1
+ .mixin liveblog
2
+ .make_main_links links Links (to Elsewhere)
@@ -0,0 +1,3 @@
1
+ https://www.mensa.org, no, Mensa International
2
+ http://space.com, yes, Space.com: NASA, Space Exploration and Astronomy News
3
+ https://arstechnica.com, no, Ars Technica
@@ -0,0 +1,4 @@
1
+ https://techcrunch.com/2019/09/16/fossa-scores-8-5-million-series-a-to-help-enterprise-manage-open-source-licenses/, yes, FOSSA scores \$8.5 million Series A to help enterprise manage open-source licenses
2
+ https://techcrunch.com/2019/09/17/spacexs-orbital-starship-prototype-construction-progress-detailed-in-new-photos/, yes, SpaceX’s orbital Starship prototype construction progress detailed in new photos
3
+ https://developers.googleblog.com/2019/05/Flutter-io19.html, yes, Flutter: a Portable UI Framework for Mobile, Web, Embedded, and Desktop
4
+ https://jaycarlson.net/microcontrollers/, no, The Amazing \$1 Microcontroller (2017)
@@ -0,0 +1,2 @@
1
+ .mixin liveblog
2
+ .make_main_links news Recent News
@@ -0,0 +1,2 @@
1
+ This is a work in progress...
2
+
@@ -0,0 +1 @@
1
+ Causes other *.lt3 files to be generated
@@ -0,0 +1,10 @@
1
+ .mixin liveblog
2
+
3
+ <h2>Disclaimer</h2>
4
+
5
+ This is just a
6
+ dummy file
7
+
8
+ disclaimer, blah blah
9
+
10
+ .backlink
@@ -0,0 +1,9 @@
1
+ .mixin liveblog
2
+
3
+ <h2>Frequently Asked Questions</h2>
4
+
5
+ This is
6
+ just a
7
+ FAAAAAQ....
8
+
9
+ .backlink
@@ -0,0 +1,4 @@
1
+ <a href="faq.lt3">Frequently Asked Questions</a> <br>
2
+ <a href="like-dislike.lt3">Likes and Dislikes</a> <br>
3
+ <a href="disclaim.lt3">Disclaimer</a> <br>
4
+ <a href="lifestory.lt3">My Life Story</a> <br>
@@ -0,0 +1,11 @@
1
+ .mixin liveblog
2
+
3
+ <h2>My Likes and Dislikes</h2>
4
+
5
+ This is
6
+ stuff that I
7
+ like
8
+ and
9
+ dislike...
10
+
11
+ .backlink
@@ -0,0 +1,4 @@
1
+ faq.html,Frequently Asked Questions
2
+ like-dislike.html,Likes and Dislikes
3
+ disclaim.html,Disclaimer
4
+ other-stuff.html,Other Stuff
@@ -0,0 +1,10 @@
1
+ .mixin liveblog
2
+
3
+ <h2>Other Stuff</h2>
4
+
5
+ This is
6
+ just
7
+ some
8
+ other stuff...
9
+
10
+ .backlink
@@ -0,0 +1,2 @@
1
+ .mixin liveblog
2
+ .make_main_links pages Pages
@@ -0,0 +1,12 @@
1
+ .mixin liveblog
2
+
3
+ .tag_cloud
4
+ https://google.com/,btn btn-dark m-1,Programming
5
+ https://google.com/,btn btn-danger m-1,Science Fiction
6
+ https://google.com/,btn btn-light m-1,Art
7
+ https://google.com/,btn btn-dark m-1,Robotics
8
+ https://google.com/,btn btn-warning m-1,Food and Travel
9
+ https://google.com/,btn btn-light m-1,DIY Hacks
10
+ https://google.com/,btn btn-info m-1,Surfing
11
+ .end
12
+
@@ -18,7 +18,6 @@ module RuneBlog::REPL
18
18
 
19
19
  "new view $name" => :cmd_new_view,
20
20
 
21
- # "customize" => :cmd_customize,
22
21
  "tags" => :cmd_tags,
23
22
  "import" => :cmd_import,
24
23
 
@@ -41,11 +40,9 @@ module RuneBlog::REPL
41
40
  "list assets" => :cmd_list_assets,
42
41
  "lsa" => :cmd_list_assets,
43
42
 
44
- "rm $postid" => :cmd_remove_post,
43
+ "delete >postid" => :cmd_remove_post,
45
44
  "undel $postid" => :cmd_undelete_post,
46
45
 
47
- "kill >postid" => :cmd_kill,
48
-
49
46
  "edit $postid" => :cmd_edit_post,
50
47
  "ed $postid" => :cmd_edit_post,
51
48
  "e $postid" => :cmd_edit_post,
@@ -54,8 +51,6 @@ module RuneBlog::REPL
54
51
 
55
52
  "browse" => :cmd_browse,
56
53
 
57
- "relink" => :cmd_relink,
58
-
59
54
  "rebuild" => :cmd_rebuild,
60
55
 
61
56
  "publish" => :cmd_publish,
@@ -108,6 +103,7 @@ module RuneBlog::REPL
108
103
  end
109
104
  meth = found || :cmd_INVALID
110
105
  params = cmd if meth == :cmd_INVALID
106
+ puts "choose: #{[meth, params].inspect}"
111
107
  [meth, params]
112
108
  end
113
109
 
@@ -118,8 +118,7 @@ def make_main_links
118
118
  log!(str: "Reading #{input}", pwd: true)
119
119
  pairs = File.readlines(input).map {|line| line.chomp.split(/, */, 2) }
120
120
  _write_main(mainfile, pairs, card_title, tag)
121
- widget_relative = false # (tag != "news") # FIXME kludge!!!
122
- _write_card(cardfile, mainfile, pairs, card_title, tag, relative: widget_relative)
121
+ _write_card(cardfile, mainfile, pairs, card_title, tag)
123
122
  log!(str: "...returning from method", pwd: true)
124
123
  end
125
124
 
@@ -543,7 +542,7 @@ def _html_body(file, css = nil)
543
542
  file.puts " </body>\n</html>"
544
543
  end
545
544
 
546
- def _write_card(cardfile, mainfile, pairs, card_title, tag, relative: true)
545
+ def _write_card(cardfile, mainfile, pairs, card_title, tag)
547
546
  log!(str: "Creating #{cardfile}.html", pwd: true)
548
547
  url = mainfile
549
548
  url = :widgets/tag/mainfile + ".html"
@@ -565,7 +564,7 @@ def _write_card(cardfile, mainfile, pairs, card_title, tag, relative: true)
565
564
  url = file
566
565
  type, title = page_type(tag, title)
567
566
  case type
568
- when :local; url_ref = _widget_main(file, tag) # local always frameable
567
+ when :local; url_ref = _widget_card(file, tag) # local always frameable
569
568
  when :frame; url_ref = _main(file) # remote, frameable
570
569
  when :noframe; url_ref = _blank(file) # remote, not frameable
571
570
  end
@@ -708,6 +707,6 @@ end
708
707
 
709
708
  def _widget_card(url, tag)
710
709
  url2 = :widgets/tag/url
711
- %[href="#{url2}"]
710
+ %[href="javascript: void(0)" onclick="javascript:open_main('#{url2}')"]
712
711
  end
713
712
 
@@ -2,7 +2,7 @@ module PathSep
2
2
  def /(right)
3
3
  s1 = self.to_s.dup
4
4
  s2 = right.to_s.dup
5
- s1 << "/" unless s2.end_with?("/") || s2.start_with?("/")
5
+ s1 << "/" unless s1.end_with?("/") || s2.start_with?("/")
6
6
  path = s1 + s2
7
7
  path.gsub!("//", "/")
8
8
  path
@@ -10,16 +10,6 @@ class RuneBlog::Publishing
10
10
  def initialize(view)
11
11
  log!(enter: __method__, args: [view.to_s])
12
12
  @blog = RuneBlog.blog
13
- # # Clunky...
14
- # if params.size == 1 && params[0].is_a?(OpenStruct)
15
- # obj = params[0]
16
- # array = obj.to_h.values_at(:user, :server, :docroot,
17
- # :path, :proto)
18
- # @user, @server, @docroot, @path, @proto = *array
19
- # else
20
- # @user, @server, @docroot, @path, @proto = *params
21
- # end
22
- # find a better way?
23
13
  gfile = @blog.root/:views/view/"themes/standard/global.lt3"
24
14
  data = File.readlines(gfile)
25
15
  grab = ->(var) { data.grep(/^#{var} /).first.chomp.split(" ", 2)[1] }
@@ -131,23 +131,7 @@ module RuneBlog::REPL
131
131
  reset_output
132
132
  check_empty(arg)
133
133
  puts unless testing
134
- files = @blog.find_draft_slugs
135
- if files.empty?
136
- msg = "No files changed"
137
- output! msg
138
- puts "\n #{msg}\n " unless testing
139
- return @out
140
- end
141
- files.each {|file| @blog.rebuild_post(file) }
142
- @blog.dirty_views.each {|view| generate_index(view) } # All views for now?
143
- File.write("#{@blog.root}/drafts/last_rebuild", Time.now)
144
- @out
145
- end
146
-
147
- def cmd_relink(arg, testing = false)
148
- reset_output
149
- check_empty(arg)
150
- @blog.relink
134
+ @blog.generate_view(@blog.view)
151
135
  @out
152
136
  end
153
137
 
@@ -176,6 +160,7 @@ module RuneBlog::REPL
176
160
  def cmd_new_view(arg, testing = false)
177
161
  reset_output
178
162
  @blog.create_view(arg)
163
+ edit_file(@blog.view.dir/"themes/standard/global.lt3")
179
164
  @blog.change_view(arg)
180
165
  @out
181
166
  rescue ViewAlreadyExists
@@ -194,12 +179,19 @@ module RuneBlog::REPL
194
179
  puts err.backtrace.join("\n")
195
180
  end
196
181
 
197
- def cmd_kill(arg, testing = false)
182
+ def _remove_post(arg, testing=false)
183
+ id = get_integer(arg)
184
+ result = @blog.remove_post(id)
185
+ puts "Post #{id} not found" if result.nil?
186
+ end
187
+
188
+ def cmd_remove_post(arg, testing = false)
189
+ puts "arg = #{arg.inspect} is a #{arg.class}"
198
190
  reset_output
199
191
  args = arg.split
200
192
  args.each do |x|
201
193
  # FIXME
202
- ret = cmd_remove_post(x.to_i, false)
194
+ ret = _remove_post(x.to_i, false)
203
195
  puts ret
204
196
  output ret
205
197
  end
@@ -208,16 +200,6 @@ module RuneBlog::REPL
208
200
 
209
201
  #-- FIXME affects linking, building, publishing...
210
202
 
211
- def cmd_remove_post(arg, testing = false)
212
- reset_output
213
- id = get_integer(arg)
214
- result = @blog.remove_post(id)
215
- output! "Post #{id} not found" if result.nil?
216
- @out
217
- end
218
-
219
- #-- FIXME affects linking, building, publishing...
220
-
221
203
  def cmd_edit_post(arg, testing = false)
222
204
  reset_output
223
205
  id = get_integer(arg)
@@ -356,26 +338,24 @@ module RuneBlog::REPL
356
338
  list views List all views available
357
339
  lsv Same as: list views
358
340
 
359
- config Edit the publish file or the templates
360
- customize (BUGGY) Change set of tags, extra views
341
+ * config Edit the publish file or the templates
342
+ * customize (BUGGY) Change set of tags, extra views
361
343
 
362
344
  p, post Create a new post
363
345
  new post Same as post (create a post)
364
346
 
365
- import ASSETS Import assets (images, etc.)
347
+ * import ASSETS Import assets (images, etc.)
366
348
 
367
349
  lsp, list posts List posts in current view
368
350
 
369
351
  lsd, list drafts List all posts regardless of view
370
352
 
371
- rm ID Remove a post
372
- kill ID ID ID... Remove multiple posts
353
+ delete ID [ID...] Remove multiple posts
373
354
  undelete ID Undelete a post
374
355
  edit ID Edit a post
375
356
 
376
357
  preview Look at current (local) view in browser
377
358
  browse Look at current (published) view in browser
378
- relink Regenerate index for all views
379
359
  rebuild Regenerate all posts and relink
380
360
  publish Publish (current view)
381
361
  ssh Login to remote server
@@ -60,7 +60,6 @@ class RuneBlog
60
60
  raise BlogRepoAlreadyExists if Dir.exist?(root)
61
61
  create_dirs(root)
62
62
  Dir.chdir(root) do
63
- system!("cp #{RuneBlog::Path}/../empty_view.tgz .")
64
63
  create_dirs(:drafts, :views, :posts)
65
64
  new_sequence
66
65
  end
@@ -218,7 +217,7 @@ class RuneBlog
218
217
 
219
218
  def mark_last_published(str)
220
219
  log!(enter: __method__, args: [str])
221
- dump(str, "last_published")
220
+ dump(str, "#{self.view.dir}/last_published")
222
221
  end
223
222
 
224
223
  def add_view(view_name)
@@ -232,10 +231,8 @@ class RuneBlog
232
231
  def make_empty_view_tree(view_name)
233
232
  log!(enter: __method__, args: [view_name])
234
233
  Dir.chdir(@root) do
235
- cmd1 = "tar zxvf empty_view.tgz >/dev/null 2>&1"
236
- cmd2 = "cp -r empty_view views/#{view_name}"
237
- system!(cmd1)
238
- system!(cmd2)
234
+ cmd = "cp -r #{RuneBlog::Path}/../empty_view views/#{view_name}"
235
+ system!(cmd)
239
236
  end
240
237
  end
241
238
 
@@ -255,8 +252,8 @@ class RuneBlog
255
252
  log!(enter: __method__, args: [view_name])
256
253
  check_valid_new_view(view_name)
257
254
  make_empty_view_tree(view_name)
258
- mark_last_published("Initial creation")
259
255
  add_view(view_name)
256
+ mark_last_published("Initial creation")
260
257
  end
261
258
 
262
259
  def delete_view(name, force = false)
@@ -296,6 +293,7 @@ class RuneBlog
296
293
  log!(enter: __method__, args: [slug])
297
294
  id = slug.to_i
298
295
  text = nil
296
+ @theme = @view.dir/"themes/standard"
299
297
  post_entry_name = @theme/"blog/post_entry.lt3"
300
298
  xlate src: post_entry_name, dst: "/tmp/post_entry.html" # , debug: true
301
299
  @_post_entry ||= File.read("/tmp/post_entry.html")
@@ -397,12 +395,17 @@ class RuneBlog
397
395
  log!(enter: __method__, args: [view])
398
396
  generate_index(view) # recent posts (recent.html)
399
397
  vdir = @root/:views/view
398
+ @theme = @root/:views/view/:themes/:standard
400
399
  xlate cwd: vdir/"themes/standard/etc",
401
400
  src: "blog.css.lt3", copy: vdir/"remote/etc/blog.css" # , debug: true
402
401
  xlate cwd: vdir/"themes/standard",
403
402
  src: "blog/generate.lt3", dst: vdir/:remote/"index.html"
404
403
  copy("#{vdir}/assets/*", "#{vdir}/remote/assets/")
405
-
404
+ rescue => err
405
+ puts err
406
+ puts err.backtrace.join("\n")
407
+ print "Pause... "
408
+ gets
406
409
  end
407
410
 
408
411
  def _get_views(draft)
@@ -494,11 +497,6 @@ class RuneBlog
494
497
  end
495
498
  end
496
499
 
497
- def relink # FIXME no longer used?
498
- log!(enter: __method__)
499
- self.views.each {|view| generate_index(view) }
500
- end
501
-
502
500
  def index_entry(view, meta)
503
501
  log!(enter: __method__, args: [view, meta])
504
502
  debug "=== index_entry #{view.to_s.inspect} #{meta.num} #{meta.title.inspect}"
@@ -538,6 +536,7 @@ class RuneBlog
538
536
  def remove_post(num)
539
537
  log!(enter: __method__, args: [num])
540
538
  raise ArgumentError unless num.is_a?(Integer)
539
+ # FIXME update original draft .views
541
540
  tag = prefix(num)
542
541
  files = Find.find(self.view.dir).to_a
543
542
  list = files.select {|x| File.directory?(x) and x =~ /#{tag}/ }
@@ -2,7 +2,7 @@
2
2
  if ! (Object.constants.include?(:RuneBlog) && RuneBlog.constants.include?(:Path))
3
3
 
4
4
  class RuneBlog
5
- VERSION = "0.2.31"
5
+ VERSION = "0.2.36"
6
6
 
7
7
  path = Gem.find_files("runeblog").grep(/runeblog-/).first
8
8
  Path = File.dirname(path)
@@ -61,7 +61,7 @@ class RuneBlog::View
61
61
 
62
62
  def recent?(file)
63
63
  log!(enter: __method__, args: [file])
64
- File.mtime(file) > File.mtime("#{dir()}/last_published")
64
+ File.mtime(file) > File.mtime("#{self.dir()}/last_published")
65
65
  rescue
66
66
  true
67
67
  end
@@ -28,10 +28,10 @@ spec = Gem::Specification.new do |s|
28
28
  Find.find("lib").to_a
29
29
  test = Find.find("test").to_a
30
30
  misc = %w[./README.lt3 ./README.md ./runeblog.gemspec]
31
+ empty_view = Find.find("empty_view").to_a
31
32
 
32
- # system("tar zcvf empty_view.tgz empty_view")
33
33
 
34
- s.files = main + misc + test + ["empty_view.tgz"]
34
+ s.files = main + misc + test + empty_view
35
35
  s.homepage = 'https://github.com/Hal9000/runeblog'
36
36
  s.license = "Ruby"
37
37
  end
@@ -27,7 +27,6 @@ class TestREPL < Minitest::Test
27
27
  def setup
28
28
  # To be strictly correct in testing (though slower),
29
29
  # run make_blog here.
30
- # system("tar zcvf last-test.tgz .blog/ && rm -rf .blog")
31
30
  system("ruby test/make_blog.rb") if ARGV.first == "new"
32
31
  @blog = RuneBlog.new
33
32
  end
@@ -136,7 +136,7 @@ toes. And may your snark never be a boojum.
136
136
  Contact light. Houston, this is Tranquility Base. The Eagle has
137
137
  landed. That's one small step for (a) man, one giant leap for
138
138
  mankind.
139
- .inset left
139
+ .inset left 20
140
140
  On a clean disk, you can seek forever.
141
141
  .end
142
142
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: runeblog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.31
4
+ version: 0.2.36
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hal Fulton
@@ -61,7 +61,49 @@ files:
61
61
  - "./README.md"
62
62
  - "./runeblog.gemspec"
63
63
  - bin/blog
64
- - empty_view.tgz
64
+ - empty_view/assets/sky2.jpg
65
+ - empty_view/remote/assets/GIT_IS_DUMB
66
+ - empty_view/remote/etc/GIT_IS_DUMB
67
+ - empty_view/remote/navbar/GIT_IS_DUMB
68
+ - empty_view/remote/permalink/GIT_IS_DUMB
69
+ - empty_view/remote/widgets/links/list.data
70
+ - empty_view/remote/widgets/news/list.data
71
+ - empty_view/remote/widgets/pages/SUBFILES
72
+ - empty_view/remote/widgets/pages/list.data
73
+ - empty_view/themes/standard/README
74
+ - empty_view/themes/standard/blog/generate.lt3
75
+ - empty_view/themes/standard/blog/head.lt3
76
+ - empty_view/themes/standard/blog/index.lt3
77
+ - empty_view/themes/standard/blog/post_entry.lt3
78
+ - empty_view/themes/standard/etc/blog.css.lt3
79
+ - empty_view/themes/standard/etc/externals.lt3
80
+ - empty_view/themes/standard/etc/favicon.ico
81
+ - empty_view/themes/standard/etc/misc.js
82
+ - empty_view/themes/standard/global.lt3
83
+ - empty_view/themes/standard/navbar/about.lt3
84
+ - empty_view/themes/standard/navbar/contact.lt3
85
+ - empty_view/themes/standard/navbar/navbar.lt3
86
+ - empty_view/themes/standard/post/generate.lt3
87
+ - empty_view/themes/standard/post/head.lt3
88
+ - empty_view/themes/standard/post/index.lt3
89
+ - empty_view/themes/standard/post/permalink.lt3
90
+ - empty_view/themes/standard/widgets/README
91
+ - empty_view/themes/standard/widgets/ad/ad.lt3
92
+ - empty_view/themes/standard/widgets/calendar/calendar.lt3
93
+ - empty_view/themes/standard/widgets/links/links.lt3
94
+ - empty_view/themes/standard/widgets/links/list.data
95
+ - empty_view/themes/standard/widgets/news/list.data
96
+ - empty_view/themes/standard/widgets/news/news.lt3
97
+ - empty_view/themes/standard/widgets/pages/README
98
+ - empty_view/themes/standard/widgets/pages/SUBFILES
99
+ - empty_view/themes/standard/widgets/pages/disclaim.lt3
100
+ - empty_view/themes/standard/widgets/pages/faq.lt3
101
+ - empty_view/themes/standard/widgets/pages/generated.lt3
102
+ - empty_view/themes/standard/widgets/pages/like-dislike.lt3
103
+ - empty_view/themes/standard/widgets/pages/list.data
104
+ - empty_view/themes/standard/widgets/pages/other-stuff.lt3
105
+ - empty_view/themes/standard/widgets/pages/pages.lt3
106
+ - empty_view/themes/standard/widgets/tag-cloud/tag-cloud.lt3
65
107
  - lib/Javascript.stuff
66
108
  - lib/default.rb
67
109
  - lib/global.rb
Binary file