runeblog 0.2.92 → 0.2.93
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/widgets/pages/pages.rb +1 -1
- data/lib/liveblog.rb +4 -4
- data/lib/publish.rb +5 -15
- data/lib/repl.rb +0 -12
- data/lib/runeblog.rb +5 -6
- data/lib/runeblog_version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 51a1371a11eb69a62ff435090be403f586c0bddfd8c62ef7dc3e4f97020fee12
|
4
|
+
data.tar.gz: 4d1e82de93ebb0d408964b5d06e6dc4a42f450e064b7174eecd4cb8328054f4a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e27ae9cb582a3a84746db31ce664b1ed3a5ed8c47fff9178de4ff5a55e9c41687390b655a13b8df533e498edfe5ffb16af2f3f832c9d9c082353409e2dd17bb
|
7
|
+
data.tar.gz: 73e512eb67281d74c141ecda0de9f75aec04e64402b5ef23a3552d0798e681b3b43aefa2a88fdb9b23bfda95f00b37938a6455599be11a665bcf182ff2b60659
|
data/lib/liveblog.rb
CHANGED
@@ -7,6 +7,9 @@ require 'runeblog'
|
|
7
7
|
require 'pathmagic'
|
8
8
|
require 'processing'
|
9
9
|
|
10
|
+
# top = Livetext::Path + "/../plugin/liveblog/"
|
11
|
+
# eval(File.read("#{top}/testing.rb"))
|
12
|
+
|
10
13
|
|
11
14
|
def init_liveblog # FIXME - a lot of this logic sucks
|
12
15
|
dir = Dir.pwd.sub(/\.blogs.*/, "")
|
@@ -44,7 +47,7 @@ end
|
|
44
47
|
|
45
48
|
def post_trailer
|
46
49
|
perma = _var("publish.proto") + "://" + _var("publish.server") +
|
47
|
-
"/" + _var("publish.path") + "/
|
50
|
+
"/" + _var("publish.path") + "/" + _var("post.aslug") +
|
48
51
|
".html"
|
49
52
|
tags = _var("post.tags")
|
50
53
|
if tags.empty?
|
@@ -100,9 +103,6 @@ def banner
|
|
100
103
|
navbar = nil
|
101
104
|
vdir = @blog.root/:views/@blog.view
|
102
105
|
lines = _body.to_a
|
103
|
-
TTY.puts "-"*30
|
104
|
-
lines.each {|x| TTY.puts x }
|
105
|
-
TTY.puts "-"*30
|
106
106
|
|
107
107
|
lines.each do |line|
|
108
108
|
count += 1
|
data/lib/publish.rb
CHANGED
@@ -43,24 +43,14 @@ class RuneBlog::Publishing
|
|
43
43
|
rc
|
44
44
|
end
|
45
45
|
|
46
|
-
def publish
|
47
|
-
log!(enter: __method__,
|
46
|
+
def publish
|
47
|
+
log!(enter: __method__, level: 1)
|
48
48
|
dir = @docroot/@path
|
49
49
|
view_name = @blog.view.name
|
50
50
|
viewpath = dir # /view_name
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
file.gsub!(/\/\//, "/") # weird... :-/
|
55
|
-
cmd = "scp -r #{file} #{dest} >/dev/null 2>/tmp/wtf"
|
56
|
-
debug "cmd = #{cmd.inspect} - see /tmp/wtf"
|
57
|
-
result = system!(cmd) || puts("\n Could not copy #{file} to #{dest}")
|
58
|
-
end
|
59
|
-
unless assets.empty?
|
60
|
-
cmd = "scp #{assets.join(' ')} #@user@#@server:#{viewpath}/assets >/dev/null 2>/tmp/wtf2"
|
61
|
-
result = system!(cmd)
|
62
|
-
raise PublishError if !result
|
63
|
-
end
|
51
|
+
# FIXME rsync doesn't work
|
52
|
+
cmd = "rsync -a -r -z #{@blog.root}/views/#{@blog.view}/remote/ #@user@#@server:#{viewpath}/"
|
53
|
+
system!(cmd)
|
64
54
|
dump(files, "#{@blog.view.dir}/last_published")
|
65
55
|
true
|
66
56
|
end
|
data/lib/repl.rb
CHANGED
@@ -193,17 +193,6 @@ module RuneBlog::REPL
|
|
193
193
|
return @out
|
194
194
|
end
|
195
195
|
|
196
|
-
# Need to check dirty/clean status first
|
197
|
-
dirty, all, assets = @blog.view.publishable_files
|
198
|
-
files = dirty
|
199
|
-
if dirty.empty?
|
200
|
-
puts fx("\n No files are out of date." + " "*20, :bold)
|
201
|
-
print " Publish anyway? "
|
202
|
-
yn = RubyText.gets.chomp
|
203
|
-
files = all if yn == "y"
|
204
|
-
end
|
205
|
-
return @out if files.empty?
|
206
|
-
|
207
196
|
ret = RubyText.spinner(label: " Publishing... ") do
|
208
197
|
@blog.view.publisher.publish(files, assets) # FIXME weird?
|
209
198
|
end
|
@@ -229,7 +218,6 @@ module RuneBlog::REPL
|
|
229
218
|
debug "Starting cmd_rebuild..."
|
230
219
|
reset_output
|
231
220
|
puts unless testing
|
232
|
-
TTY.puts "rebuilding #{@blog.view.inspect}"
|
233
221
|
@blog.generate_view(@blog.view)
|
234
222
|
@blog.generate_index(@blog.view)
|
235
223
|
@out
|
data/lib/runeblog.rb
CHANGED
@@ -94,8 +94,6 @@ class RuneBlog
|
|
94
94
|
write_repo_config(root: @root)
|
95
95
|
get_repo_config
|
96
96
|
@views = retrieve_views
|
97
|
-
puts @views.inspect
|
98
|
-
system("cat #@root/data/VIEW")
|
99
97
|
self.view = File.read(@root/"data/VIEW").chomp
|
100
98
|
md = Dir.pwd.match(%r[.*/views/(.*?)/])
|
101
99
|
if md
|
@@ -463,7 +461,6 @@ system("cat #@root/data/VIEW")
|
|
463
461
|
|
464
462
|
def generate_view(view) # huh?
|
465
463
|
log!(enter: __method__, args: [view])
|
466
|
-
puts "gv: view = #{view}"
|
467
464
|
vdir = @root/:views/view
|
468
465
|
@theme = @root/:views/view/:themes/:standard
|
469
466
|
depend = [vdir/"remote/etc/blog.css.lt3", @theme/"global.lt3",
|
@@ -478,6 +475,7 @@ puts "gv: view = #{view}"
|
|
478
475
|
call: ".nopara"
|
479
476
|
copy!("#{vdir}/themes/standard/banner/*", "#{vdir}/remote/banner/") # includes navbar/
|
480
477
|
copy("#{vdir}/assets/*", "#{vdir}/remote/assets/")
|
478
|
+
# rebuild widgets
|
481
479
|
copy_widget_html(view)
|
482
480
|
rescue => err
|
483
481
|
STDERR.puts err
|
@@ -598,10 +596,11 @@ puts "gv: view = #{view}"
|
|
598
596
|
preprocess cwd: @theme/:post, src: "generate.lt3", force: true,
|
599
597
|
dst: remote/ahtml, copy: @theme/:post,
|
600
598
|
call: ".nopara" # , debug: true
|
599
|
+
# copy(remote/ahtml, remote/permalink/ahtml)
|
601
600
|
# FIXME dependencies?
|
602
|
-
|
603
|
-
|
604
|
-
|
601
|
+
# preprocess cwd: @theme/:post, src: "permalink.lt3",
|
602
|
+
# dst: remote/:permalink/ahtml,
|
603
|
+
# mix: "liveblog" # , debug: true
|
605
604
|
copy_widget_html(view_name)
|
606
605
|
rescue => err
|
607
606
|
_tmp_error(err)
|
data/lib/runeblog_version.rb
CHANGED