runeblog 0.3.33 → 0.3.34

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6c3a0263fc23bab307b33128588c5f41ba1bd3011069322f9b8716afa78b07d4
4
- data.tar.gz: 92e6f6f794b2a4eeb4aff6492ac659dc9be894bee1b69817cad028e6a9f1224e
3
+ metadata.gz: 5b835a9fea2fa013b708dd9b6f99b411f34517fe6a04f27c130b4fbf3f802881
4
+ data.tar.gz: 818099d61bdfa21031f7e6c13580536b64cdbd27ab2e69c196fccb4c765bd135
5
5
  SHA512:
6
- metadata.gz: dea18f22c31c05a2a96424b8d948958b5bbbc5bdd417119d7547972bfdf5597f1372ad9929409705a28c2c5e3fff9552b0607a91df90438968f34acd635762a7
7
- data.tar.gz: 22300854304c115129158ab773b141f85281431efec03a87ad8969f085cd2322f5a30f2daa42abf796ec6c651420de1ccb9c4ab94984959a4d82cdef1f34d2e6
6
+ metadata.gz: e87e7985ebb4302986520fe593d16bca67cc03f2be97b821c3a0ca5f5f0eda172df6509b148eacc701f85cc86a3199e24876d40d0648c9ad5f8248034caeaa4d
7
+ data.tar.gz: 8b764722bae84a9bc73b3aadbae80599b3cd69252f4f83b7e208bde3b6aadb8cd183d0fb806e5985b77fcc0b75f80abe22dbe813615ca08eb5f5de3dcbcd53bd
data/bin/blog CHANGED
@@ -247,7 +247,7 @@ handle_cmdline unless ARGV.empty?
247
247
 
248
248
  set_fgbg
249
249
  print_intro
250
- create_new_repo?
250
+ create_new_repo? # calls @blog.load
251
251
 
252
252
  cmd_history_etc
253
253
 
data/lib/menus.rb CHANGED
@@ -105,7 +105,7 @@ Menu.top_config = {
105
105
  "Generator for a post" => proc { edit_post_generate },
106
106
  " HEAD info for post" => proc { edit_post_head },
107
107
  " Content for post" => proc { edit_post_index },
108
- "Variables (general!)" => proc { edit_view_global },
108
+ "Variables (general!)" => proc { edit_view_global },
109
109
  " View-specific" => proc { edit_settings_view },
110
110
  " Recent posts" => proc { edit_settings_recent },
111
111
  " Publishing" => proc { edit_settings_publish },
data/lib/processing.rb CHANGED
@@ -76,9 +76,17 @@ rescue => err
76
76
  log!(str: msg)
77
77
  end
78
78
 
79
+ # glv 2 - No such file or directory @ rb_check_realpath_internal - /Users/Hal/.blogs/views/computing/themes/standard/settings/view.txt
80
+
79
81
  def get_live_vars(src)
80
82
  dir, base = File.dirname(src), File.basename(src)
83
+ # puts "glv 1: src = #{src.inspect} dir,base = #{dir.inspect}, #{base.inspect}"
81
84
  live = Livetext.customize(call: [".nopara"])
85
+ puts "glv 2: cd #{dir} xform #{base}\n "
86
+ # HAL9000:~ Hal$ find .blogs/views/computing/ -name global.lt3
87
+ # .blogs/views/computing//themes/standard/global.lt3
88
+ # HAL9000:~ Hal$ find .blogs/views/computing/ -name view.txt
89
+ # .blogs/views/computing//settings/view.txt
82
90
  Dir.chdir(dir) { live.xform_file(base) }
83
91
  live
84
92
  rescue => e
data/lib/publish.rb CHANGED
@@ -14,13 +14,15 @@ class RuneBlog::Publishing
14
14
  def initialize(view)
15
15
  log!(enter: __method__, args: [view.to_s])
16
16
  @blog = RuneBlog.blog
17
- dir0 = @blog.root/:views/view/"themes/standard/"
18
- # CHANGED
19
- dir = @blog.root/:views/view/:data
17
+ dir = @blog.root/:views/view/"themes/standard/"
20
18
  gfile = dir/"global.lt3"
19
+ there = File.exist?(gfile)
20
+ puts "Pub#init 0 gfile = $ gfile.inspect} exist = #{there}"
21
21
  return unless File.exist?(gfile) # FIXME Hackish as hell
22
22
 
23
+ # puts "Pub#init 1"
23
24
  live = get_live_vars(gfile)
25
+ # puts "Pub#init 2 - vars = #{live.vars.inspect}\n "
24
26
  @user = live.vars["publish.user"]
25
27
  @server = live.vars["publish.server"]
26
28
  @docroot = live.vars["publish.docroot"]
data/lib/repl.rb CHANGED
@@ -9,12 +9,12 @@ require 'menus'
9
9
  Signal.trap("INT") { puts "Don't :)" }
10
10
 
11
11
  module RuneBlog::REPL
12
+
12
13
  def edit_file(file, vim: "")
13
14
  ed = @blog.editor
14
- STDERR.puts ">>> edit_file: ed = #{ed.inspect}"
15
15
  params = vim if ed =~ /vim$/
16
- result = system!("#{@blog.editor} #{file} #{params}")
17
- STDERR.puts ">>> edit_file: after system call"
16
+ cmd = "#{@blog.editor} #{file} #{params}"
17
+ result = system!(cmd)
18
18
  raise EditorProblem(file) unless result
19
19
  cmd_clear
20
20
  end
@@ -41,7 +41,7 @@ STDERR.puts ">>> edit_file: after system call"
41
41
 
42
42
  def cmd_config
43
43
  hash = {"Variables (General)" => "global.lt3",
44
- " View-specific" => "../settings/view.txt",
44
+ " View-specific" => "../../settings/view.txt",
45
45
  " Recent posts" => "../../settings/recent.txt",
46
46
  " Publishing" => "../../settings/publish.txt",
47
47
  "Configuration: enable/disable" => "../../settings/features.txt",
data/lib/runeblog.rb CHANGED
@@ -134,7 +134,7 @@ class RuneBlog
134
134
  rescue => err
135
135
  puts "ERROR - #{err.inspect}"
136
136
  # puts "Error - see stderr.out"
137
- puts err.inspect + "\n" + err&.backtrace
137
+ puts err.inspect # + "\n" + err&.backtrace
138
138
  sleep 3
139
139
  end
140
140
 
@@ -1,7 +1,7 @@
1
1
  if !defined?(RuneBlog::Path)
2
2
 
3
3
  class RuneBlog
4
- VERSION = "0.3.33"
4
+ VERSION = "0.3.34"
5
5
 
6
6
  path = Gem.find_files("runeblog").grep(/runeblog-/).first
7
7
  Path = File.dirname(path)
data/lib/view.rb CHANGED
@@ -12,6 +12,7 @@ class RuneBlog::View
12
12
  @blog = RuneBlog.blog
13
13
  @name = name
14
14
  @publisher = RuneBlog::Publishing.new(name)
15
+ # puts "view #{name}: pub = #{@publisher.inspect}"
15
16
  @can_publish = true # FIXME
16
17
  # @blog.view = self # NOOOO??
17
18
  get_globals
@@ -39,19 +40,9 @@ class RuneBlog::View
39
40
  return unless File.exist?(gfile) # Hackish!! how is View.new called from create_view??
40
41
 
41
42
  live = Livetext.customize(call: ".nopara")
42
- puts "get_globals - 1 - transforming #{gfile}"
43
- # FIXME - error here somehow:
44
- # get_globals - 1 - transforming /private/tmp/.blogs/views/foobar/data/global.lt3
45
- # >> variables: pre="view" file="../settings/view.txt" pwd=/private/tmp
46
- # No such dir "../settings" (file ../settings/view.txt)
47
- # No such dir "../settings" (file ../settings/view.txt)
48
- # get_globals - 2
49
43
  live.xform_file(gfile)
50
- puts "get_globals - 2"
51
44
  live.setvar("ViewDir", @blog.root/:views/@name)
52
- puts "get_globals - 3"
53
45
  live.setvar("View", @name)
54
- puts "get_globals - 4"
55
46
  @globals = live.vars
56
47
  # dump_globals_stderr
57
48
  end
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.33
4
+ version: 0.3.34
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hal Fulton
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-14 00:00:00.000000000 Z
11
+ date: 2024-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: livetext