runeblog 0.2.41 → 0.2.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/blog +4 -7
- data/empty_view/themes/standard/blog/post_entry.lt3 +11 -10
- data/empty_view/themes/standard/etc/blog.css.lt3 +18 -1
- data/empty_view/themes/standard/navbar/faq.lt3 +1 -0
- data/empty_view/themes/standard/navbar/navbar.lt3 +1 -0
- data/empty_view/themes/standard/post/generate.lt3 +9 -4
- data/empty_view/themes/standard/widgets/ad/ad.lt3 +8 -1
- data/empty_view/themes/standard/widgets/ad/ad1.png +0 -0
- data/empty_view/themes/standard/widgets/ad/ad2.png +0 -0
- data/empty_view/themes/standard/widgets/ad/ad3.png +0 -0
- data/empty_view/themes/standard/widgets/ad/ad4.png +0 -0
- data/empty_view/themes/standard/widgets/bydates/bydates.rb +7 -3
- data/empty_view/themes/standard/widgets/links/links.rb +28 -3
- data/empty_view/themes/standard/widgets/news/news.rb +7 -3
- data/empty_view/themes/standard/widgets/pages/pages.rb +10 -3
- data/empty_view/themes/standard/widgets/pinned/pinned.rb +7 -3
- data/empty_view/themes/standard/widgets/search/search.rb +7 -3
- data/empty_view/themes/standard/widgets/sitemap/sitemap.rb +7 -3
- data/empty_view/themes/standard/widgets/tag-cloud/tag-cloud.rb +7 -3
- data/lib/default.rb +1 -4
- data/lib/global.rb +8 -7
- data/lib/helpers-blog.rb +15 -15
- data/lib/liveblog.rb +94 -57
- data/lib/logging.rb +17 -8
- data/lib/post.rb +6 -6
- data/lib/publish.rb +4 -4
- data/lib/repl.rb +1 -0
- data/lib/runeblog.rb +77 -47
- data/lib/runeblog_version.rb +1 -1
- data/lib/view.rb +2 -8
- data/lib/xlate.rb +2 -2
- data/test/austin.rb +159 -0
- metadata +8 -5
- data/empty_view/remote/widgets/links/list.data +0 -3
- data/empty_view/remote/widgets/news/list.data +0 -4
- data/empty_view/remote/widgets/pages/list.data +0 -4
data/lib/xlate.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
LEXT = ".lt3"
|
3
3
|
|
4
4
|
def stale?(src, dst, force = false)
|
5
|
-
log!(enter: __method__, args: [src, dst])
|
5
|
+
log!(enter: __method__, args: [src, dst], level: 3)
|
6
6
|
raise "Source #{src} not found in #{Dir.pwd}" unless File.exist?(src)
|
7
7
|
return true if force
|
8
8
|
return true unless File.exist?(dst)
|
@@ -29,7 +29,7 @@ LEXT = ".lt3"
|
|
29
29
|
STDERR.puts "#{indent} -- ^ Already up to date!" if debug
|
30
30
|
return
|
31
31
|
end
|
32
|
-
rc = system
|
32
|
+
rc = system("livetext #{src} >#{dst}")
|
33
33
|
STDERR.puts "...completed (shell returned #{rc})" if debug
|
34
34
|
system!("cp #{dst} #{copy}") if copy
|
35
35
|
end
|
data/test/austin.rb
ADDED
@@ -0,0 +1,159 @@
|
|
1
|
+
$LOAD_PATH << "./lib"
|
2
|
+
|
3
|
+
major, minor = RUBY_VERSION.split(".").values_at(0,1)
|
4
|
+
ver = major.to_i*10 + minor.to_i
|
5
|
+
abort "Need Ruby 2.4 or greater" unless ver >= 24
|
6
|
+
|
7
|
+
# Home = Dir.pwd
|
8
|
+
|
9
|
+
require 'date'
|
10
|
+
|
11
|
+
require 'global'
|
12
|
+
require 'runeblog'
|
13
|
+
require 'repl'
|
14
|
+
|
15
|
+
def bold(str)
|
16
|
+
"\e[1m#{str}\e[0m"
|
17
|
+
end
|
18
|
+
|
19
|
+
def getch
|
20
|
+
# sleep 5
|
21
|
+
end
|
22
|
+
|
23
|
+
def debug(str = "")
|
24
|
+
t = Time.now
|
25
|
+
time = t.to_f.to_s
|
26
|
+
n = time.index(".")
|
27
|
+
msec = time[n..(n+2)]
|
28
|
+
time = t.strftime("%H:%M:%S") + msec
|
29
|
+
STDERR.puts "#{'%-11s' % time} #{str}"
|
30
|
+
end
|
31
|
+
|
32
|
+
@fake_date = Date.today - 20
|
33
|
+
|
34
|
+
def make_post(x, title, teaser, body, views=[])
|
35
|
+
debug " make_post #{bold(title)}"
|
36
|
+
pubdate = @fake_date.strftime("%Y-%m-%d")
|
37
|
+
@fake_date += (rand(2) + 1)
|
38
|
+
x.create_new_post(title, true, teaser: teaser, body: body, views: views,
|
39
|
+
pubdate: pubdate)
|
40
|
+
end
|
41
|
+
|
42
|
+
def show_lines(text)
|
43
|
+
lines = text.split("\n")
|
44
|
+
str = "#{lines.size} lines\n"
|
45
|
+
lines.each {|line| str << " #{line.inspect}\n" }
|
46
|
+
str
|
47
|
+
end
|
48
|
+
|
49
|
+
# "Main"...
|
50
|
+
|
51
|
+
t0 = Time.now
|
52
|
+
|
53
|
+
puts bold("\nGenerating test blog...")
|
54
|
+
|
55
|
+
system("rm -rf .blogs")
|
56
|
+
RuneBlog.create_new_blog_repo(".blogs")
|
57
|
+
x = RuneBlog.new(".blogs")
|
58
|
+
|
59
|
+
debug("create_view: #{bold('around_austin')}")
|
60
|
+
x.create_view("around_austin") # FIXME remember view title!
|
61
|
+
|
62
|
+
#### FIXME later!!
|
63
|
+
vars = <<-VARS
|
64
|
+
|
65
|
+
.variables
|
66
|
+
blog Around Austin
|
67
|
+
blog.desc The view from downtown...
|
68
|
+
.end
|
69
|
+
VARS
|
70
|
+
File.open(".blogs/views/around_austin/themes/standard/global.lt3", "a") do |f|
|
71
|
+
f.puts vars
|
72
|
+
end
|
73
|
+
####
|
74
|
+
|
75
|
+
debug("** generate_view: #{bold('around_austin')}")
|
76
|
+
x.generate_view("around_austin")
|
77
|
+
|
78
|
+
debug("-- change_view: #{bold('around_austin')}")
|
79
|
+
x.change_view("around_austin") # 1 2 7 8 9
|
80
|
+
|
81
|
+
make_post(x, "What's at Stubbs...", <<-EXCERPT, <<-BODY, [])
|
82
|
+
Stubbs has been around for longer than civilization.
|
83
|
+
EXCERPT
|
84
|
+
That's a good thing. But their music isn't always the greatest.
|
85
|
+
BODY
|
86
|
+
|
87
|
+
make_post(x, "The new amphitheatre is overrated", <<-EXCERPT, <<-BODY)
|
88
|
+
It used to be that all major concerts played the Erwin Center.
|
89
|
+
EXCERPT
|
90
|
+
Now, depending on what you consider "major," blah blah blah...
|
91
|
+
BODY
|
92
|
+
|
93
|
+
make_post(x, "The graffiti wall", <<-EXCERPT, <<-BODY)
|
94
|
+
RIP, Hope Gallery
|
95
|
+
EXCERPT
|
96
|
+
|
97
|
+
.dropcap It's been a while since I was there. They say it was torn down
|
98
|
+
while I wasn't looking. Never tagged anything there, of course, nor
|
99
|
+
anywhere else. Spraypainting public places isn't my thing, but in this
|
100
|
+
case I condoned it because it was sort of there for that purpose.
|
101
|
+
|
102
|
+
This fake entry is a long one so as to demonstrate both drop-caps
|
103
|
+
(above) and an inset quote. Blah blah blah. Lorem ipsum dolor and
|
104
|
+
a partridge in a pear tree.
|
105
|
+
|
106
|
+
.inset left 20
|
107
|
+
Wherever you go, there you are. Last night I saw upon the stair
|
108
|
+
a little man who was not there. He wasn't there again today; I
|
109
|
+
wish, I wish he'd go away. As far as we know, our computer has
|
110
|
+
never had an undetected error.
|
111
|
+
|On a clean disk, you can seek forever.
|
112
|
+
And never let it be denied that
|
113
|
+
pobbles are happier without their toes. And may your snark never
|
114
|
+
be a boojum. How do you know you aren't dreaming right now? When
|
115
|
+
you see a butterfly, think of Chuang Tzu.
|
116
|
+
.end
|
117
|
+
|
118
|
+
Contact light. Houston, this is Tranquility Base. The Eagle has
|
119
|
+
landed. That's one small step for (a) man, one giant leap for
|
120
|
+
mankind.
|
121
|
+
|
122
|
+
Pity this busy monster, manunkind, not. Pity rather... Listen:
|
123
|
+
There's a hell of a universe next door; let's go.
|
124
|
+
BODY
|
125
|
+
|
126
|
+
make_post(x, "The Waller Creek project", <<-EXCERPT, <<-BODY)
|
127
|
+
Will it ever be finished?
|
128
|
+
EXCERPT
|
129
|
+
Blah blah Waller Creek blah blah...
|
130
|
+
BODY
|
131
|
+
|
132
|
+
make_post(x, "Life on Sabine Street", <<-EXCERPT, <<-BODY)
|
133
|
+
It's like Pooh Corner, except not.
|
134
|
+
EXCERPT
|
135
|
+
This is about Sabine St, blah blah lorem ipsum dolor...
|
136
|
+
BODY
|
137
|
+
|
138
|
+
make_post(x, "Remember Modest Mouse?", <<-EXCERPT, <<-BODY, [])
|
139
|
+
They date to the 90s or before.
|
140
|
+
EXCERPT
|
141
|
+
But I first heard of them
|
142
|
+
in 2005.
|
143
|
+
BODY
|
144
|
+
|
145
|
+
debug
|
146
|
+
debug "** generate_index #{bold("around_austin")}"
|
147
|
+
x.generate_index("around_austin")
|
148
|
+
|
149
|
+
debug
|
150
|
+
x.change_view("around_austin")
|
151
|
+
debug
|
152
|
+
|
153
|
+
puts bold("...finished.\n")
|
154
|
+
|
155
|
+
t1 = Time.now
|
156
|
+
|
157
|
+
elapsed = t1 - t0
|
158
|
+
puts "\nElapsed: #{'%3.2f' % elapsed} secs\n "
|
159
|
+
|
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.46
|
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-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: livetext
|
@@ -67,9 +67,6 @@ files:
|
|
67
67
|
- empty_view/remote/etc/GIT_IS_DUMB
|
68
68
|
- empty_view/remote/navbar/GIT_IS_DUMB
|
69
69
|
- empty_view/remote/permalink/GIT_IS_DUMB
|
70
|
-
- empty_view/remote/widgets/links/list.data
|
71
|
-
- empty_view/remote/widgets/news/list.data
|
72
|
-
- empty_view/remote/widgets/pages/list.data
|
73
70
|
- empty_view/themes/standard/README
|
74
71
|
- empty_view/themes/standard/blog/generate.lt3
|
75
72
|
- empty_view/themes/standard/blog/head.lt3
|
@@ -82,6 +79,7 @@ files:
|
|
82
79
|
- empty_view/themes/standard/global.lt3
|
83
80
|
- empty_view/themes/standard/navbar/about.lt3
|
84
81
|
- empty_view/themes/standard/navbar/contact.lt3
|
82
|
+
- empty_view/themes/standard/navbar/faq.lt3
|
85
83
|
- empty_view/themes/standard/navbar/navbar.lt3
|
86
84
|
- empty_view/themes/standard/post/generate.lt3
|
87
85
|
- empty_view/themes/standard/post/head.lt3
|
@@ -89,6 +87,10 @@ files:
|
|
89
87
|
- empty_view/themes/standard/post/permalink.lt3
|
90
88
|
- empty_view/themes/standard/widgets/README
|
91
89
|
- empty_view/themes/standard/widgets/ad/ad.lt3
|
90
|
+
- empty_view/themes/standard/widgets/ad/ad1.png
|
91
|
+
- empty_view/themes/standard/widgets/ad/ad2.png
|
92
|
+
- empty_view/themes/standard/widgets/ad/ad3.png
|
93
|
+
- empty_view/themes/standard/widgets/ad/ad4.png
|
92
94
|
- empty_view/themes/standard/widgets/bydates/README
|
93
95
|
- empty_view/themes/standard/widgets/bydates/bydates.lt3
|
94
96
|
- empty_view/themes/standard/widgets/bydates/bydates.rb
|
@@ -201,6 +203,7 @@ files:
|
|
201
203
|
- lib/runeblog_version.rb
|
202
204
|
- lib/view.rb
|
203
205
|
- lib/xlate.rb
|
206
|
+
- test/austin.rb
|
204
207
|
- test/fakeimage.jpg
|
205
208
|
- test/general_test.rb
|
206
209
|
- test/make_blog.rb
|
@@ -1,4 +0,0 @@
|
|
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)
|