runeblog 0.2.30 → 0.2.35
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/blog +1 -1
- data/empty_view/assets/sky2.jpg +0 -0
- data/empty_view/remote/widgets/links/list.data +3 -0
- data/empty_view/remote/widgets/news/list.data +4 -0
- data/empty_view/remote/widgets/pages/SUBFILES +1 -0
- data/empty_view/remote/widgets/pages/list.data +4 -0
- data/empty_view/themes/standard/README +59 -0
- data/empty_view/themes/standard/blog/generate.lt3 +37 -0
- data/empty_view/themes/standard/blog/head.lt3 +16 -0
- data/empty_view/themes/standard/blog/index.lt3 +17 -0
- data/empty_view/themes/standard/blog/post_entry.lt3 +22 -0
- data/empty_view/themes/standard/etc/blog.css.lt3 +43 -0
- data/empty_view/themes/standard/etc/externals.lt3 +24 -0
- data/empty_view/themes/standard/etc/favicon.ico +0 -0
- data/empty_view/themes/standard/etc/misc.js +8 -0
- data/empty_view/themes/standard/global.lt3 +35 -0
- data/empty_view/themes/standard/navbar/about.lt3 +18 -0
- data/empty_view/themes/standard/navbar/contact.lt3 +18 -0
- data/empty_view/themes/standard/navbar/navbar.lt3 +16 -0
- data/empty_view/themes/standard/post/generate.lt3 +30 -0
- data/empty_view/themes/standard/post/head.lt3 +7 -0
- data/empty_view/themes/standard/post/index.lt3 +24 -0
- data/empty_view/themes/standard/post/permalink.lt3 +32 -0
- data/empty_view/themes/standard/widgets/README +4 -0
- data/empty_view/themes/standard/widgets/ad/ad.lt3 +15 -0
- data/empty_view/themes/standard/widgets/calendar/calendar.lt3 +6 -0
- data/empty_view/themes/standard/widgets/links/links.lt3 +2 -0
- data/empty_view/themes/standard/widgets/links/list.data +3 -0
- data/empty_view/themes/standard/widgets/news/list.data +4 -0
- data/empty_view/themes/standard/widgets/news/news.lt3 +2 -0
- data/empty_view/themes/standard/widgets/pages/README +2 -0
- data/empty_view/themes/standard/widgets/pages/SUBFILES +1 -0
- data/empty_view/themes/standard/widgets/pages/disclaim.lt3 +10 -0
- data/empty_view/themes/standard/widgets/pages/faq.lt3 +9 -0
- data/empty_view/themes/standard/widgets/pages/generated.lt3 +4 -0
- data/empty_view/themes/standard/widgets/pages/like-dislike.lt3 +11 -0
- data/empty_view/themes/standard/widgets/pages/list.data +4 -0
- data/empty_view/themes/standard/widgets/pages/other-stuff.lt3 +10 -0
- data/empty_view/themes/standard/widgets/pages/pages.lt3 +2 -0
- data/empty_view/themes/standard/widgets/tag-cloud/tag-cloud.lt3 +12 -0
- data/lib/helpers-repl.rb +2 -6
- data/lib/liveblog.rb +51 -29
- data/lib/pathmagic.rb +1 -1
- data/lib/repl.rb +15 -35
- data/lib/runeblog.rb +10 -10
- data/lib/runeblog_version.rb +1 -1
- data/runeblog.gemspec +2 -2
- data/test/general_test.rb +0 -1
- data/test/make_blog.rb +24 -0
- metadata +41 -3
- data/empty_view.tgz +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 554b7da76f9eb5a1f98f0e7d0b47c59a271fa1980c6579454c6127a54e4ba02c
|
4
|
+
data.tar.gz: da9fa509102f2f53fb7ec47b2e1b08e89f1835b098b7cc6bc30cbbf67e297525
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b459c24a3c23fe20d4953aa341ac5857d40dc05c819776d0c6406ab58b7e1a51e4418d849c8a3842d8d13cad18b1543a5232e8fb814144b83b2a71d90e38dd3b
|
7
|
+
data.tar.gz: 2976e3378fed756d0fd810354b7bbb855a46cb1cf3eec22a5f00388372ba3c81bbba7d13e2da76b652985dc165a32027630e2cf9ddbddea992cfcb9452890a57
|
data/bin/blog
CHANGED
Binary file
|
@@ -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,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
|
Binary file
|
@@ -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,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,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,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,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
|
+
|
data/lib/helpers-repl.rb
CHANGED
@@ -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
|
-
"
|
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
|
|
data/lib/liveblog.rb
CHANGED
@@ -37,6 +37,27 @@ def backlink
|
|
37
37
|
_out %[<br><a href="javascript:history.go(-1)">[Back]</a>]
|
38
38
|
end
|
39
39
|
|
40
|
+
def dropcap
|
41
|
+
# Bad form: adds another HEAD
|
42
|
+
_out <<-HTML
|
43
|
+
<head>
|
44
|
+
<style>
|
45
|
+
p:first-child:first-letter {
|
46
|
+
color: #0000ff;
|
47
|
+
float: left;
|
48
|
+
font-family: Georgia;
|
49
|
+
font-size: 75px;
|
50
|
+
line-height: 60px;
|
51
|
+
padding-top: 4px;
|
52
|
+
padding-right: 8px;
|
53
|
+
padding-left: 3px;
|
54
|
+
}
|
55
|
+
</style>
|
56
|
+
</head>
|
57
|
+
HTML
|
58
|
+
_out " "
|
59
|
+
end
|
60
|
+
|
40
61
|
def quote
|
41
62
|
_passthru "<blockquote>"
|
42
63
|
_passthru _body
|
@@ -97,8 +118,7 @@ def make_main_links
|
|
97
118
|
log!(str: "Reading #{input}", pwd: true)
|
98
119
|
pairs = File.readlines(input).map {|line| line.chomp.split(/, */, 2) }
|
99
120
|
_write_main(mainfile, pairs, card_title, tag)
|
100
|
-
|
101
|
-
_write_card(cardfile, mainfile, pairs, card_title, tag, relative: widget_relative)
|
121
|
+
_write_card(cardfile, mainfile, pairs, card_title, tag)
|
102
122
|
log!(str: "...returning from method", pwd: true)
|
103
123
|
end
|
104
124
|
|
@@ -292,7 +312,7 @@ end
|
|
292
312
|
def recent_posts # side-effect
|
293
313
|
_out <<-HTML
|
294
314
|
<div class="col-lg-9 col-md-9 col-sm-9 col-xs-12">
|
295
|
-
<iframe id="main" style="width:
|
315
|
+
<iframe id="main" style="width: 70vw; height: 100vh; position: relative;"
|
296
316
|
src='recent.html' width=100% frameborder="0" allowfullscreen>
|
297
317
|
</iframe>
|
298
318
|
</div>
|
@@ -522,7 +542,7 @@ def _html_body(file, css = nil)
|
|
522
542
|
file.puts " </body>\n</html>"
|
523
543
|
end
|
524
544
|
|
525
|
-
def _write_card(cardfile, mainfile, pairs, card_title, tag
|
545
|
+
def _write_card(cardfile, mainfile, pairs, card_title, tag)
|
526
546
|
log!(str: "Creating #{cardfile}.html", pwd: true)
|
527
547
|
url = mainfile
|
528
548
|
url = :widgets/tag/mainfile + ".html"
|
@@ -542,24 +562,17 @@ def _write_card(cardfile, mainfile, pairs, card_title, tag, relative: true)
|
|
542
562
|
local = _local_tag?(tag)
|
543
563
|
pairs.each do |file, title|
|
544
564
|
url = file
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
when
|
550
|
-
url_ref = "href='#{file}'"
|
551
|
-
when ["yes", true] # can iframe, local file
|
552
|
-
url_ref = _widget_card(file, tag)
|
553
|
-
when ["no", false] # CAN'T iframe, remote file
|
554
|
-
url_ref = _blank(file)
|
555
|
-
when ["no", true] # CAN'T iframe, local file (possible?)
|
556
|
-
url_ref = _blank(file)
|
565
|
+
type, title = page_type(tag, title)
|
566
|
+
case type
|
567
|
+
when :local; url_ref = _widget_card(file, tag) # local always frameable
|
568
|
+
when :frame; url_ref = _main(file) # remote, frameable
|
569
|
+
when :noframe; url_ref = _blank(file) # remote, not frameable
|
557
570
|
end
|
558
|
-
|
559
571
|
anchor = %[<a #{url_ref}>#{title}</a>]
|
560
572
|
wrapper = %[<li class="list-group-item">#{anchor}</li>]
|
561
573
|
f.puts wrapper
|
562
574
|
end
|
575
|
+
_include_file cardfile+".html"
|
563
576
|
f.puts <<-EOS
|
564
577
|
</div>
|
565
578
|
</div>
|
@@ -579,6 +592,20 @@ def _local_tag?(tag)
|
|
579
592
|
end
|
580
593
|
end
|
581
594
|
|
595
|
+
def page_type(tag, title)
|
596
|
+
yesno = "yes"
|
597
|
+
yesno, title = title.split(/, */) if title =~ /^[yes|no]/
|
598
|
+
local = _local_tag?(tag)
|
599
|
+
frameable = (yesno == "yes")
|
600
|
+
if local
|
601
|
+
return [:local, title]
|
602
|
+
elsif frameable
|
603
|
+
return [:frame, title]
|
604
|
+
else
|
605
|
+
return [:noframe, title]
|
606
|
+
end
|
607
|
+
end
|
608
|
+
|
582
609
|
def _write_main(mainfile, pairs, card_title, tag)
|
583
610
|
log!(str: "Creating #{mainfile}.html", pwd: true)
|
584
611
|
local = _local_tag?(tag)
|
@@ -586,17 +613,12 @@ def _write_main(mainfile, pairs, card_title, tag)
|
|
586
613
|
_html_body(f) do
|
587
614
|
f.puts "<h1>#{card_title}</h1>"
|
588
615
|
pairs.each do |file, title|
|
589
|
-
|
590
|
-
|
591
|
-
case
|
592
|
-
when
|
593
|
-
|
594
|
-
when
|
595
|
-
url_ref = _widget_main(file, tag)
|
596
|
-
when ["no", false] # CAN'T iframe, remote file
|
597
|
-
url_ref = _blank(file)
|
598
|
-
when ["no", true] # CAN'T iframe, local file (possible?)
|
599
|
-
url_ref = _blank(file)
|
616
|
+
type, title = page_type(tag, title)
|
617
|
+
title = title.gsub(/\\/, "") # kludge
|
618
|
+
case type
|
619
|
+
when :local; url_ref = _widget_main(file, tag) # local always frameable
|
620
|
+
when :frame; url_ref = "href = '#{file}'" # local always frameable
|
621
|
+
when :noframe; url_ref = _blank(file) # local always frameable
|
600
622
|
end
|
601
623
|
css = "color: #8888FF; text-decoration: none; font-size: 24px; font-family: verdana"
|
602
624
|
f.puts %[<a style="#{css}" #{url_ref}>#{title}</a> <br>]
|
@@ -685,6 +707,6 @@ end
|
|
685
707
|
|
686
708
|
def _widget_card(url, tag)
|
687
709
|
url2 = :widgets/tag/url
|
688
|
-
%[href="#{url2}"]
|
710
|
+
%[href="javascript: void(0)" onclick="javascript:open_main('#{url2}')"]
|
689
711
|
end
|
690
712
|
|
data/lib/pathmagic.rb
CHANGED
data/lib/repl.rb
CHANGED
@@ -131,23 +131,7 @@ module RuneBlog::REPL
|
|
131
131
|
reset_output
|
132
132
|
check_empty(arg)
|
133
133
|
puts unless testing
|
134
|
-
|
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
|
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 =
|
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
|
-
|
360
|
-
|
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
|
-
|
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
|
-
|
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
|
data/lib/runeblog.rb
CHANGED
@@ -232,10 +232,8 @@ class RuneBlog
|
|
232
232
|
def make_empty_view_tree(view_name)
|
233
233
|
log!(enter: __method__, args: [view_name])
|
234
234
|
Dir.chdir(@root) do
|
235
|
-
|
236
|
-
|
237
|
-
system!(cmd1)
|
238
|
-
system!(cmd2)
|
235
|
+
cmd = "cp -r #{RuneBlog::Path}/../empty_view views/#{view_name}"
|
236
|
+
system!(cmd)
|
239
237
|
end
|
240
238
|
end
|
241
239
|
|
@@ -296,6 +294,7 @@ class RuneBlog
|
|
296
294
|
log!(enter: __method__, args: [slug])
|
297
295
|
id = slug.to_i
|
298
296
|
text = nil
|
297
|
+
@theme = @view.dir/"themes/standard"
|
299
298
|
post_entry_name = @theme/"blog/post_entry.lt3"
|
300
299
|
xlate src: post_entry_name, dst: "/tmp/post_entry.html" # , debug: true
|
301
300
|
@_post_entry ||= File.read("/tmp/post_entry.html")
|
@@ -397,12 +396,17 @@ class RuneBlog
|
|
397
396
|
log!(enter: __method__, args: [view])
|
398
397
|
generate_index(view) # recent posts (recent.html)
|
399
398
|
vdir = @root/:views/view
|
399
|
+
@theme = @root/:views/view/:themes/:standard
|
400
400
|
xlate cwd: vdir/"themes/standard/etc",
|
401
401
|
src: "blog.css.lt3", copy: vdir/"remote/etc/blog.css" # , debug: true
|
402
402
|
xlate cwd: vdir/"themes/standard",
|
403
403
|
src: "blog/generate.lt3", dst: vdir/:remote/"index.html"
|
404
404
|
copy("#{vdir}/assets/*", "#{vdir}/remote/assets/")
|
405
|
-
|
405
|
+
rescue => err
|
406
|
+
puts err
|
407
|
+
puts err.backtrace.join("\n")
|
408
|
+
print "Pause... "
|
409
|
+
gets
|
406
410
|
end
|
407
411
|
|
408
412
|
def _get_views(draft)
|
@@ -494,11 +498,6 @@ class RuneBlog
|
|
494
498
|
end
|
495
499
|
end
|
496
500
|
|
497
|
-
def relink # FIXME no longer used?
|
498
|
-
log!(enter: __method__)
|
499
|
-
self.views.each {|view| generate_index(view) }
|
500
|
-
end
|
501
|
-
|
502
501
|
def index_entry(view, meta)
|
503
502
|
log!(enter: __method__, args: [view, meta])
|
504
503
|
debug "=== index_entry #{view.to_s.inspect} #{meta.num} #{meta.title.inspect}"
|
@@ -538,6 +537,7 @@ class RuneBlog
|
|
538
537
|
def remove_post(num)
|
539
538
|
log!(enter: __method__, args: [num])
|
540
539
|
raise ArgumentError unless num.is_a?(Integer)
|
540
|
+
# FIXME update original draft .views
|
541
541
|
tag = prefix(num)
|
542
542
|
files = Find.find(self.view.dir).to_a
|
543
543
|
list = files.select {|x| File.directory?(x) and x =~ /#{tag}/ }
|
data/lib/runeblog_version.rb
CHANGED
data/runeblog.gemspec
CHANGED
@@ -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 +
|
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
|
data/test/general_test.rb
CHANGED
@@ -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
|
data/test/make_blog.rb
CHANGED
@@ -116,8 +116,32 @@ x.change_view("around_austin")
|
|
116
116
|
make_post(x, "The graffiti wall", <<-EXCERPT, <<-BODY)
|
117
117
|
RIP, Hope Gallery
|
118
118
|
EXCERPT
|
119
|
+
.dropcap
|
120
|
+
|
119
121
|
It's been a while since I was there. They say it was torn down
|
120
122
|
while I wasn't looking.
|
123
|
+
|
124
|
+
This fake entry is a long one so as to demonstrate both drop-caps
|
125
|
+
(above) and an inset quote. Blah blah blah. Lorem ipsum dolor and
|
126
|
+
a partridge in a pear tree.
|
127
|
+
|
128
|
+
Wherever you go, there you are. Last night I saw upon the stair
|
129
|
+
a little man who was not there. He wasn't there again today; I
|
130
|
+
wish, I wish he'd go away.
|
131
|
+
|
132
|
+
As far as we know, our computer has never had an undetected error.
|
133
|
+
And never let it be denied that pobbles are happier without their
|
134
|
+
toes. And may your snark never be a boojum.
|
135
|
+
|
136
|
+
Contact light. Houston, this is Tranquility Base. The Eagle has
|
137
|
+
landed. That's one small step for (a) man, one giant leap for
|
138
|
+
mankind.
|
139
|
+
.inset left 20
|
140
|
+
On a clean disk, you can seek forever.
|
141
|
+
.end
|
142
|
+
|
143
|
+
Pity this busy monster, manunkind, not. Pity rather... Listen:
|
144
|
+
There's a hell of a universe next door; let's go.
|
121
145
|
BODY
|
122
146
|
|
123
147
|
make_post(x, "The Waller Creek project", <<-EXCERPT, <<-BODY)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: runeblog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.35
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hal Fulton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-10-
|
11
|
+
date: 2019-10-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: livetext
|
@@ -61,7 +61,45 @@ files:
|
|
61
61
|
- "./README.md"
|
62
62
|
- "./runeblog.gemspec"
|
63
63
|
- bin/blog
|
64
|
-
- empty_view.
|
64
|
+
- empty_view/assets/sky2.jpg
|
65
|
+
- empty_view/remote/widgets/links/list.data
|
66
|
+
- empty_view/remote/widgets/news/list.data
|
67
|
+
- empty_view/remote/widgets/pages/SUBFILES
|
68
|
+
- empty_view/remote/widgets/pages/list.data
|
69
|
+
- empty_view/themes/standard/README
|
70
|
+
- empty_view/themes/standard/blog/generate.lt3
|
71
|
+
- empty_view/themes/standard/blog/head.lt3
|
72
|
+
- empty_view/themes/standard/blog/index.lt3
|
73
|
+
- empty_view/themes/standard/blog/post_entry.lt3
|
74
|
+
- empty_view/themes/standard/etc/blog.css.lt3
|
75
|
+
- empty_view/themes/standard/etc/externals.lt3
|
76
|
+
- empty_view/themes/standard/etc/favicon.ico
|
77
|
+
- empty_view/themes/standard/etc/misc.js
|
78
|
+
- empty_view/themes/standard/global.lt3
|
79
|
+
- empty_view/themes/standard/navbar/about.lt3
|
80
|
+
- empty_view/themes/standard/navbar/contact.lt3
|
81
|
+
- empty_view/themes/standard/navbar/navbar.lt3
|
82
|
+
- empty_view/themes/standard/post/generate.lt3
|
83
|
+
- empty_view/themes/standard/post/head.lt3
|
84
|
+
- empty_view/themes/standard/post/index.lt3
|
85
|
+
- empty_view/themes/standard/post/permalink.lt3
|
86
|
+
- empty_view/themes/standard/widgets/README
|
87
|
+
- empty_view/themes/standard/widgets/ad/ad.lt3
|
88
|
+
- empty_view/themes/standard/widgets/calendar/calendar.lt3
|
89
|
+
- empty_view/themes/standard/widgets/links/links.lt3
|
90
|
+
- empty_view/themes/standard/widgets/links/list.data
|
91
|
+
- empty_view/themes/standard/widgets/news/list.data
|
92
|
+
- empty_view/themes/standard/widgets/news/news.lt3
|
93
|
+
- empty_view/themes/standard/widgets/pages/README
|
94
|
+
- empty_view/themes/standard/widgets/pages/SUBFILES
|
95
|
+
- empty_view/themes/standard/widgets/pages/disclaim.lt3
|
96
|
+
- empty_view/themes/standard/widgets/pages/faq.lt3
|
97
|
+
- empty_view/themes/standard/widgets/pages/generated.lt3
|
98
|
+
- empty_view/themes/standard/widgets/pages/like-dislike.lt3
|
99
|
+
- empty_view/themes/standard/widgets/pages/list.data
|
100
|
+
- empty_view/themes/standard/widgets/pages/other-stuff.lt3
|
101
|
+
- empty_view/themes/standard/widgets/pages/pages.lt3
|
102
|
+
- empty_view/themes/standard/widgets/tag-cloud/tag-cloud.lt3
|
65
103
|
- lib/Javascript.stuff
|
66
104
|
- lib/default.rb
|
67
105
|
- lib/global.rb
|
data/empty_view.tgz
DELETED
Binary file
|