runeblog 0.3.15 → 0.3.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/empty_view/themes/standard/post/generate.lt3 +0 -2
- data/empty_view/themes/standard/post/permalink.lt3 +0 -1
- data/lib/liveblog.rb +4 -2
- data/lib/lowlevel.rb +7 -0
- data/lib/processing.rb +2 -1
- data/lib/runeblog.rb +15 -39
- data/lib/runeblog_version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d6961e05ec2e2b61542ec6d149bf2af83f77d8870549707bdde78764fbce0aa
|
4
|
+
data.tar.gz: 9e58ad2e2a60078de58c82fba9ce656b255836f38ac36840131e31ec864b4e7e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb5a93d9fabf6ad9e16c433590ee58a4b15946873ad7e50cb051159eb03694dcd3c4b31abc9d7cb0854216b18caee832d888a4ef44ed999f6a81a2311b995fab
|
7
|
+
data.tar.gz: 85e551c444ca1099de08e4885c2d657b8564e482bca77a5b3fac4733826248c1726217c06b371625a30317149d87b25a98614bd441c88b3b9e1f82856a2260df
|
data/lib/liveblog.rb
CHANGED
@@ -33,8 +33,10 @@ def init_liveblog # FIXME - a lot of this logic sucks
|
|
33
33
|
</a>
|
34
34
|
HTML
|
35
35
|
end
|
36
|
-
rescue
|
37
|
-
|
36
|
+
rescue => err
|
37
|
+
STDERR.puts "err = #{err}"
|
38
|
+
STDERR.puts err.backtrace.join("\n")
|
39
|
+
# raise "Only works inside a blog repo"
|
38
40
|
end
|
39
41
|
|
40
42
|
##################
|
data/lib/lowlevel.rb
CHANGED
data/lib/processing.rb
CHANGED
@@ -2,7 +2,7 @@ if ! defined?(LIVE)
|
|
2
2
|
|
3
3
|
require 'livetext'
|
4
4
|
|
5
|
-
LIVE =
|
5
|
+
LIVE = "defined"
|
6
6
|
LEXT = ".lt3"
|
7
7
|
|
8
8
|
def newer?(f1, f2)
|
@@ -39,6 +39,7 @@ def preprocess(cwd: Dir.pwd, src:,
|
|
39
39
|
STDERR.puts "#{sp} in: #{Dir.pwd}"
|
40
40
|
STDERR.puts "#{sp} from: #{caller[0]}"
|
41
41
|
STDERR.puts "#{sp} copy: #{copy}" if copy
|
42
|
+
STDERR.puts "#{sp} vars: #{vars.inspect}" unless vars == {}
|
42
43
|
end
|
43
44
|
stale = stale?(src, dst, deps, force)
|
44
45
|
if stale
|
data/lib/runeblog.rb
CHANGED
@@ -625,6 +625,7 @@ class RuneBlog
|
|
625
625
|
nslug = fname.sub(/.lt3$/, "") # 0001-this-is-a-post
|
626
626
|
aslug = nslug.sub(/\d\d\d\d-/, "") # this-is-a-post
|
627
627
|
pnum = nslug[0..3] # 0001
|
628
|
+
hash = {}
|
628
629
|
Dir.chdir(pdraft) do
|
629
630
|
excerpt = File.read("teaser.txt")
|
630
631
|
meta = read_metadata
|
@@ -633,29 +634,12 @@ class RuneBlog
|
|
633
634
|
title = meta.title
|
634
635
|
tags = meta.tags
|
635
636
|
# FIXME simplify
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
.end
|
641
|
-
.heredoc post.date
|
642
|
-
#{date}
|
643
|
-
.end
|
644
|
-
.heredoc title
|
645
|
-
#{title.chomp}
|
646
|
-
.end
|
647
|
-
.heredoc post.tags
|
648
|
-
#{tags.join(" ")}
|
649
|
-
.end
|
650
|
-
.heredoc teaser
|
651
|
-
#{excerpt.chomp}
|
652
|
-
.end
|
653
|
-
.heredoc longdate
|
654
|
-
#{longdate}
|
655
|
-
.end
|
656
|
-
LIVE
|
657
|
-
File.open(pdraft/"vars.lt3", "w") {|f| f.puts vars }
|
637
|
+
addvar(hash, "post.num" => pnum, "post.aslug" => aslug,
|
638
|
+
"post.date" => date, title: title.chomp,
|
639
|
+
"post.tags" => tags.join(" "), teaser: excerpt.chomp,
|
640
|
+
longdate: longdate)
|
658
641
|
end
|
642
|
+
hash
|
659
643
|
rescue => err
|
660
644
|
_tmp_error(err)
|
661
645
|
end
|
@@ -681,8 +665,6 @@ class RuneBlog
|
|
681
665
|
|
682
666
|
def _handle_post(draft, view_name = self.view.to_s)
|
683
667
|
log!(enter: __method__, args: [draft, view_name], level: 2)
|
684
|
-
# break into separate methods?
|
685
|
-
|
686
668
|
return unless _check_view?(view_name)
|
687
669
|
|
688
670
|
fname = File.basename(draft) # 0001-this-is-a-post.lt3
|
@@ -693,22 +675,16 @@ class RuneBlog
|
|
693
675
|
remote = @root/:views/view_name/:remote
|
694
676
|
@theme = @root/:views/view_name/:themes/:standard
|
695
677
|
|
696
|
-
# Step 1...
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
_post_metadata(draft, pdraft)
|
702
|
-
# Step 2...
|
703
|
-
vposts = @root/:views/view_name/:posts
|
678
|
+
create_dirs(pdraft) # Step 1...
|
679
|
+
preprocess cwd: pdraft, src: draft, # FIXME dependencies?
|
680
|
+
dst: "guts.html", mix: "liveblog"
|
681
|
+
hash = _post_metadata(draft, pdraft)
|
682
|
+
vposts = @root/:views/view_name/:posts # Step 2...
|
704
683
|
copy!(pdraft, vposts) # ??
|
705
|
-
# Step 3
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
preprocess cwd: @theme/:post, src: "generate.lt3", force: true,
|
710
|
-
dst: remote/ahtml, # copy: @theme/:post,
|
711
|
-
call: ".nopara" # , debug: true
|
684
|
+
copy(pdraft/"guts.html", @theme/:post) # Step 3...
|
685
|
+
preprocess cwd: @theme/:post, src: "generate.lt3", # Step 4...
|
686
|
+
force: true, vars: hash,
|
687
|
+
dst: remote/ahtml, call: ".nopara"
|
712
688
|
FileUtils.rm_f(remote/"published")
|
713
689
|
timelog("Generated", remote/"history")
|
714
690
|
copy_widget_html(view_name)
|
data/lib/runeblog_version.rb
CHANGED
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.3.
|
4
|
+
version: 0.3.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hal Fulton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-01-
|
11
|
+
date: 2020-01-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: livetext
|