livetext 0.8.53 → 0.8.54

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/livetext.rb +1 -1
  3. data/plugin/liveblog.rb +1 -20
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 452960657302e3bbabaeef8cfb43d25111f3658bce430f1ba72756be9043956e
4
- data.tar.gz: 50875e429e260ac6e752136b0197d70bbb306f674145de68898f0f975bada12d
3
+ metadata.gz: 9209b28685d092f304cc148101bb5e7bfb2bc54efbcec6e7563575c127e2c377
4
+ data.tar.gz: 5de9376c7d6707274f3d9f59f5e2623ba2057c9e97600b094be12dfee374de96
5
5
  SHA512:
6
- metadata.gz: 53892f72d41965c2c998194d9d58000c712ad3a535fd6449e9eae4ab11e84bec4e38865ff0504d5152425d8e4f99c7226320d60317cace69ade9b2a8fa4ae30d
7
- data.tar.gz: 62dd440744dea4d263358486f65f76cb9e09d0dcc71bafed905417739bf0ade10689531154adcede2d5ce44eb670fa8ffebcb512d73aba531c184a7f3d60a3e3
6
+ metadata.gz: ae360b0f56c258c80d12eba7ab6dfafd254e741cc4b3dbe67bbb5eb03a973ed467381b62038c0c0e1f27d690a6d22f1d072548054ad25a93f3a7ae3f6c99a5fb
7
+ data.tar.gz: e7136a6ef4ecc064cf6dccf6e0a46b701903d4a0e7482bd2ac2b8bf1d945ff2ed4f468e27dfa783623065117c03af08700f7d19005564a70c8c8eec3d2e9b27e
@@ -1,5 +1,5 @@
1
1
  class Livetext
2
- VERSION = "0.8.53"
2
+ VERSION = "0.8.54"
3
3
  Path = File.expand_path(File.join(File.dirname(__FILE__)))
4
4
  end
5
5
 
@@ -61,7 +61,6 @@ end
61
61
 
62
62
  def init_liveblog # FIXME - a lot of this logic sucks
63
63
  @blog, @meta = Livetext.parameters
64
- # puts "init: #{[@blog, @meta].inspect}"
65
64
  @root = @blog.root
66
65
  @view = @blog.view.name
67
66
  @vdir = @blog.view.dir
@@ -69,15 +68,6 @@ def init_liveblog # FIXME - a lot of this logic sucks
69
68
  @body = ""
70
69
  @slug = @blog.make_slug(@meta)
71
70
  @postdir = @blog.view.dir + "/#@slug"
72
- # puts "postdir = #{@postdir.inspect}"
73
-
74
- # @publish ||= {}
75
- # @config.views.each do |view|
76
- # publish = @config.viewdir(view) + "publish"
77
- # raise "File '#{publish}' not found" unless File.exist?(publish)
78
- # lines = File.readlines(publish).map {|x| x.chomp }
79
- # @publish[view] = lines
80
- # end
81
71
  end
82
72
 
83
73
  def _errout(*args)
@@ -109,7 +99,7 @@ end
109
99
  def image # primitive so far
110
100
  _debug "img: huh? <img src=#{_args.first}></img>"
111
101
  fname = _args.first
112
- path = "../../assets/#{fname}"
102
+ path = "../assets/#{fname}"
113
103
  @body << "<img src=#{path}></img>"
114
104
  end
115
105
 
@@ -168,30 +158,21 @@ end
168
158
 
169
159
  def write_post(meta)
170
160
  save = Dir.pwd
171
- # puts "lt write_post: pwd = #{Dir.pwd}"
172
161
  @postdir.gsub!(/\/\//, "/") # FIXME unneeded?
173
- # puts "lt write_post: ls -l #@postdir"
174
- # system("ls -l #@postdir")
175
- # puts "lt write_post: trying chdir #@postdir"
176
162
  Dir.mkdir(@postdir) unless Dir.exist?(@postdir) # FIXME remember assets!
177
163
  Dir.chdir(@postdir)
178
- # puts "lt write_post: inside #@postdir"
179
164
  meta.views = meta.views.join(" ")
180
165
  meta.tags = meta.tags.join(" ")
181
- # puts "lt write_post: writing body"
182
166
  File.write("body.txt", @body) # Actually HTML...
183
- # puts "lt write_post: writing teaser"
184
167
  File.write("teaser.txt", meta.teaser)
185
168
 
186
169
  fields = [:num, :title, :date, :pubdate, :views, :tags]
187
170
 
188
171
  fname2 = "metadata.txt"
189
- # puts "lt write_post: writing metadata"
190
172
  f2 = File.open(fname2, "w") do |f2|
191
173
  fields.each {|fld| f2.puts "#{fld}: #{meta.send(fld)}" }
192
174
  end
193
175
  Dir.chdir(save)
194
- # puts "lt write_post: returning (now pwd = #{Dir.pwd})"
195
176
  rescue => err
196
177
  puts "err = #{err}"
197
178
  puts err.backtrace.join("\n")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: livetext
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.53
4
+ version: 0.8.54
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hal Fulton