runeblog 0.2.46 → 0.2.51
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 -3
- data/empty_view/assets/austin-pano.jpg +0 -0
- data/empty_view/themes/standard/banner/about.lt3 +18 -0
- data/empty_view/themes/standard/banner/blog-banner.jpg +0 -0
- data/empty_view/themes/standard/banner/contact.lt3 +18 -0
- data/empty_view/themes/standard/banner/faq.lt3 +1 -0
- data/empty_view/themes/standard/banner/navbar.lt3 +17 -0
- data/empty_view/themes/standard/blog/generate.lt3 +5 -3
- data/empty_view/themes/standard/blog/post_entry.lt3 +4 -1
- data/empty_view/themes/standard/navbar/navbar.lt3 +1 -1
- data/empty_view/themes/standard/widgets/pages/faq.lt3 +34 -3
- data/lib/global.rb +13 -39
- data/lib/helpers-blog.rb +0 -29
- data/lib/helpers-repl.rb +1 -0
- data/lib/liveblog.rb +142 -10
- data/lib/post.rb +18 -14
- data/lib/publish.rb +0 -1
- data/lib/repl.rb +127 -13
- data/lib/runeblog.rb +95 -59
- data/lib/runeblog_version.rb +1 -1
- data/lib/view.rb +0 -1
- data/lib/xlate.rb +38 -32
- data/test/austin.rb +2 -0
- metadata +8 -2
data/lib/runeblog_version.rb
CHANGED
data/lib/view.rb
CHANGED
data/lib/xlate.rb
CHANGED
@@ -1,42 +1,48 @@
|
|
1
1
|
|
2
2
|
LEXT = ".lt3"
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
4
|
+
def newer?(f1, f2)
|
5
|
+
File.mtime(f1) > File.mtime(f2)
|
6
|
+
end
|
7
|
+
|
8
|
+
def stale?(src, dst, deps, force = false)
|
9
|
+
meh = File.new("/tmp/dammit-#{src.gsub(/\//, "-")}", "w")
|
10
|
+
log!(enter: __method__, args: [src, dst], level: 3)
|
11
|
+
raise "Source #{src} not found in #{Dir.pwd}" unless File.exist?(src)
|
12
|
+
return true if force
|
13
|
+
return true unless File.exist?(dst)
|
14
|
+
return true if newer?(src, dst)
|
15
|
+
deps.each {|dep| return true if newer?(dep, dst) }
|
16
|
+
return false
|
17
|
+
end
|
12
18
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
else
|
29
|
-
STDERR.puts "#{indent} -- ^ Already up to date!" if debug
|
30
|
-
return
|
31
|
-
end
|
19
|
+
def xlate(cwd: Dir.pwd, src:,
|
20
|
+
dst: (strip = true; src.sub(/.lt3$/,"")),
|
21
|
+
deps: [], copy: nil, debug: false, force: false)
|
22
|
+
src += LEXT unless src.end_with?(LEXT)
|
23
|
+
dst += ".html" unless dst.end_with?(".html") || strip
|
24
|
+
indent = " "*12
|
25
|
+
Dir.chdir(cwd) do
|
26
|
+
if debug
|
27
|
+
STDERR.puts "#{indent} -- xlate #{src} >#{dst}"
|
28
|
+
STDERR.puts "#{indent} in: #{Dir.pwd}"
|
29
|
+
STDERR.puts "#{indent} from: #{caller[0]}"
|
30
|
+
STDERR.puts "#{indent} copy: #{copy}" if copy
|
31
|
+
end
|
32
|
+
stale = stale?(src, dst, deps, force)
|
33
|
+
if stale
|
32
34
|
rc = system("livetext #{src} >#{dst}")
|
33
35
|
STDERR.puts "...completed (shell returned #{rc})" if debug
|
34
36
|
system!("cp #{dst} #{copy}") if copy
|
37
|
+
else
|
38
|
+
STDERR.puts "#{indent} -- ^ Already up to date!" if debug
|
39
|
+
return
|
35
40
|
end
|
36
41
|
end
|
42
|
+
end
|
37
43
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
44
|
+
def xlate!(cwd: Dir.pwd, src:, copy: nil, debug: false, force: false)
|
45
|
+
output = "/tmp/xlate-#{File.basename(src).sub(/.lt3$/, "")}"
|
46
|
+
xlate cwd: cwd, src: src, dst: output, debug: debug, force: force
|
47
|
+
File.read(output + ".html") # return all content as string
|
48
|
+
end
|
data/test/austin.rb
CHANGED
@@ -119,6 +119,8 @@ Contact light. Houston, this is Tranquility Base. The Eagle has
|
|
119
119
|
landed. That's one small step for (a) man, one giant leap for
|
120
120
|
mankind.
|
121
121
|
|
122
|
+
Here's the PDF of $$link["Ruby for the Old-Time C Programmer"|http://rubyhacker.com/blog2/rubydino.pdf]
|
123
|
+
|
122
124
|
Pity this busy monster, manunkind, not. Pity rather... Listen:
|
123
125
|
There's a hell of a universe next door; let's go.
|
124
126
|
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.51
|
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-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: livetext
|
@@ -62,12 +62,18 @@ files:
|
|
62
62
|
- "./runeblog.gemspec"
|
63
63
|
- bin/blog
|
64
64
|
- bin/mkwidget
|
65
|
+
- empty_view/assets/austin-pano.jpg
|
65
66
|
- empty_view/assets/sky2.jpg
|
66
67
|
- empty_view/remote/assets/GIT_IS_DUMB
|
67
68
|
- empty_view/remote/etc/GIT_IS_DUMB
|
68
69
|
- empty_view/remote/navbar/GIT_IS_DUMB
|
69
70
|
- empty_view/remote/permalink/GIT_IS_DUMB
|
70
71
|
- empty_view/themes/standard/README
|
72
|
+
- empty_view/themes/standard/banner/about.lt3
|
73
|
+
- empty_view/themes/standard/banner/blog-banner.jpg
|
74
|
+
- empty_view/themes/standard/banner/contact.lt3
|
75
|
+
- empty_view/themes/standard/banner/faq.lt3
|
76
|
+
- empty_view/themes/standard/banner/navbar.lt3
|
71
77
|
- empty_view/themes/standard/blog/generate.lt3
|
72
78
|
- empty_view/themes/standard/blog/head.lt3
|
73
79
|
- empty_view/themes/standard/blog/index.lt3
|