runeblog 0.1.88 → 0.1.89

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: 9e46979242ed8767ec2ef126cf345067bfa290e5b8730bb12fbc2aaa9f2cb470
4
- data.tar.gz: e420c52a7a3e19b3def738c66fe7fd128d70d01864951e10327499542a173e8a
3
+ metadata.gz: b56942f11577eaeb71bb735bb05814455a409daff43a54c31da54518f3050027
4
+ data.tar.gz: 410ec9206c82fba60ab623e8932ba63c3adc25406f00f9242bcf7b47192d13aa
5
5
  SHA512:
6
- metadata.gz: a7f392d33a2be29e265f3bbeef0c3a4c8a4aeb9c6481f664ef22bc9ff4cc52d578af7d236a758e870f0680472ff2f74171a490c35ec4f36e3fa0194210c602cc
7
- data.tar.gz: a46054951a8b79c0fbc1b409bfb23c2743362711fda79ee7ef7b226575f6306c8990f08cb12ef50b8bedcec584d314abf321dd0ea12a4fdc0fb50d0e4a7e0db7
6
+ metadata.gz: 5f3cad279e0de85546fb30dcf6fc2fa4e4ec0d3476952e56f25f7acdbaaa2bcd6ec38b4347b88870a9d76245ff35ab8e388a732165ebb91f225c3660920b7457
7
+ data.tar.gz: '029e73add0580d28e19a06ec8890f23db73c9d430f2df11fa89c826a6cd60f7f57103e53a0a824346660c46b1c0756830665c6da1d5b7e6a6a8e06ab53f60c96'
@@ -290,6 +290,12 @@ def _var(name) # FIXME scope issue!
290
290
  end
291
291
 
292
292
  def head
293
+ _out "<head>"
294
+ args = _args
295
+ args.each do |inc|
296
+ self.data = inc
297
+ _include
298
+ end
293
299
  # Depends on vars: title, desc, host
294
300
  defaults = {}
295
301
  defaults = { "charset" => %[<meta charset="utf-8">],
@@ -315,7 +321,7 @@ def head
315
321
  case word
316
322
  when "viewport"
317
323
  result["viewport"] = %[<meta name="viewport" content="#{remain}">]
318
- when "script"
324
+ when "script" # FIXME this is broken
319
325
  file = remain
320
326
  text = File.read(file)
321
327
  result["script"] = Livetext.new.transform(text)
@@ -329,7 +335,6 @@ def head
329
335
  end
330
336
  hash = defaults.dup.update(result) # FIXME collisions?
331
337
  # _out "<html lang=en_US>"
332
- _out "<head>"
333
338
  hash.each_value {|x| _out " " + x }
334
339
  _out "</head>"
335
340
  _out "<body>"
@@ -481,7 +486,7 @@ end
481
486
  def _teaser(slug)
482
487
  id = slug.to_i
483
488
  text = nil
484
- post_entry_name = @theme + "blog-_postentry.lt3"
489
+ post_entry_name = @theme + "blog/post_entry.lt3"
485
490
  @_post_entry ||= File.read(post_entry_name)
486
491
  vp = _post_lookup(id)
487
492
  nslug, aslug, title, date, teaser_text =
@@ -105,34 +105,11 @@ class RuneBlog::Post
105
105
  error(err)
106
106
  end
107
107
 
108
- def build # THIS CODE WILL GO AWAY
108
+ def build
109
109
  post = self
110
110
  views = post.meta.views
111
111
  text = File.read(@draft)
112
-
113
- @blog.generate_post(@draft)
114
- return
115
-
116
- STDERR.puts "-- Post#build starts in #{Dir.pwd} ..."
117
-
118
- @meta.views.each do |view_name|
119
- # Create dir using slug (index.html, metadata?)
120
- dir = "#{@blog.root}/views/#{view_name}/posts/"
121
- pdir = dir + meta.slug + "/"
122
- create_dir(pdir) unless Dir.exist?(pdir)
123
- Dir.chdir(pdir) do
124
- title_name = pdir + (meta.slug + ".lt3").sub(/^\d{4}-/, "")
125
- dump(text, title_name)
126
- cmd = "livetext #{title_name} >#{title_name.sub(/.lt3$/, ".html")}"
127
- STDERR.puts "--- In #{pdir}"
128
- STDERR.puts "--- cmd = #{cmd}\n "
129
- system(cmd)
130
- end
131
- end
132
- @meta
133
- rescue => err
134
- p err
135
- puts err.backtrace.join("\n")
112
+ @blog.generate_post(@draft)
136
113
  end
137
114
  end
138
115
 
@@ -233,7 +233,6 @@ module RuneBlog::REPL
233
233
  # Simplify this
234
234
  tag = "#{'%04d' % id}"
235
235
  files = Find.find(@blog.root+"/drafts").to_a
236
- p files
237
236
  files = files.grep(/#{tag}-.*lt3/)
238
237
  files = files.map {|f| File.basename(f) }
239
238
  if files.size > 1
@@ -252,27 +251,7 @@ p files
252
251
  file = files.first
253
252
  draft = "#{@blog.root}/drafts/#{file}"
254
253
  result = edit_file(draft)
255
-
256
- STDERR.puts "Calling gp: pwd = #{Dir.pwd} draft = #{draft}"
257
- puts
258
-
259
254
  @blog.generate_post(draft)
260
- return
261
-
262
- # NEW code...
263
- view = @blog.view
264
- # livetext source > naked post 9999-slug (dir?)
265
- draft = @blog.root + "/drafts/#{file}"
266
- # theme = "#{@blog.view.dir}/themes/standard"
267
- # src = "#{theme}/post-index.lt3"
268
-
269
- system("cp #{draft} #{src}") # terms are confusing
270
- file2 = file.sub(/.lt3$/, ".html")
271
- Dir.chdir(theme) do
272
- system("livetext index.lt3 >#{file2}")
273
- end
274
- # @blog.rebuild_post(file)
275
- @out
276
255
  end
277
256
 
278
257
  def cmd_list_views(arg, testing = false)
@@ -1,5 +1,4 @@
1
1
  require 'date'
2
- # require 'livetext'
3
2
 
4
3
  require 'runeblog_version'
5
4
  require 'global'
@@ -25,7 +24,6 @@ class RuneBlog
25
24
  make_exception(:CantCreateDir, "Can't create directory $1")
26
25
  make_exception(:EditorProblem, "Could not edit $1")
27
26
  make_exception(:NoSuchView, "No such view: $1")
28
- # make_exception(:LivetextError, "Livetext#process_file returned nil for $1")
29
27
  make_exception(:NoBlogAccessor, "Runeblog.blog is not set")
30
28
 
31
29
 
@@ -185,12 +183,14 @@ class RuneBlog
185
183
  create_dir('posts')
186
184
 
187
185
  create_dir('staging')
188
- create_dir('staging/assets')
186
+ # create_dir('staging/assets')
187
+ # create_dir('staging/blog')
189
188
  create_dir('remote')
190
- create_dir('remote/assets')
189
+ # create_dir('remote/assets')
191
190
 
192
191
  copy!("themes/standard/*", "staging/")
193
- copy("themes/standard/assets/*", "remote/assets/")
192
+ # copy!("themes/standard/blog/*", "staging/blog/")
193
+ copy!("themes/standard/*", "remote/")
194
194
 
195
195
  pub = "user: xxx\nserver: xxx\ndocroot: xxx\npath: xxx\nproto: xxx\n"
196
196
  dump(pub, "publish")
@@ -248,7 +248,7 @@ class RuneBlog
248
248
  def teaser(slug)
249
249
  id = slug.to_i
250
250
  text = nil
251
- post_entry_name = @theme + "/blog-_postentry.lt3"
251
+ post_entry_name = @theme + "/blog/post_entry.lt3"
252
252
  @_post_entry ||= File.read(post_entry_name)
253
253
  vp = post_lookup(id)
254
254
  nslug, aslug, title, date, teaser_text =
@@ -412,7 +412,7 @@ class RuneBlog
412
412
  copy html, "../remote"
413
413
  collect_recent_posts("recent.html")
414
414
  copy("recent.html", "../remote")
415
- livetext "blog-generate", "../remote/index"
415
+ livetext "blog/generate", "../remote/index"
416
416
  end
417
417
  end
418
418
  end
@@ -2,7 +2,7 @@
2
2
  if ! (Object.constants.include?(:RuneBlog) && RuneBlog.constants.include?(:Path))
3
3
 
4
4
  class RuneBlog
5
- VERSION = "0.1.88"
5
+ VERSION = "0.1.89"
6
6
 
7
7
  path = Gem.find_files("runeblog").grep(/runeblog-/).first
8
8
  Path = File.dirname(path)
@@ -1,3 +1,5 @@
1
+ # include variables before this file?
2
+
1
3
  .post-title a {
2
4
  color: #010101;
3
5
  font-size: 28px;
@@ -24,5 +24,6 @@ sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM
24
24
 
25
25
  </head>
26
26
 
27
- .head # fix/remove later
27
+ .head
28
+ . # fix/remove later
28
29
  .end
@@ -5,7 +5,7 @@
5
5
  <!-- It was generated from $File on $$date. -->
6
6
 
7
7
  .include global.lt3
8
- .include blog-head.lt3
8
+ .include blog/head.lt3
9
9
  <body>
10
10
  $.include navbar.lt3
11
11
  <div class="content container-fluid mt-4">
@@ -1,5 +1,17 @@
1
+ .mixin liveblog
2
+
3
+ . FIXME?
4
+
5
+ <html>
6
+ <!-- Editing this file is not recommended. -->
7
+ <!-- It was generated from $File on $$date. -->
8
+
9
+ .include global.lt3
10
+ .include blog/head.lt3
1
11
  <section class="post">
2
12
  <div class="entry-content">
3
- POST
13
+ $.include post-index.lt3
4
14
  </div>
5
15
  </section>
16
+ </body>
17
+ </html>
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.1.88
4
+ version: 0.1.89
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-09-10 00:00:00.000000000 Z
11
+ date: 2019-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: livetext
@@ -81,12 +81,12 @@ files:
81
81
  - themes/standard/about.html
82
82
  - themes/standard/assets/blog.css
83
83
  - themes/standard/assets/favicon.ico
84
- - themes/standard/blog-_postentry.lt3
85
- - themes/standard/blog-generate.lt3
86
84
  - themes/standard/blog-head.lt3
87
85
  - themes/standard/blog-index.lt3
88
86
  - themes/standard/blog-meta.lt3
89
87
  - themes/standard/blog-navbar.lt3
88
+ - themes/standard/blog/generate.lt3
89
+ - themes/standard/blog/post_entry.lt3
90
90
  - themes/standard/global.lt3
91
91
  - themes/standard/head.lt3
92
92
  - themes/standard/meta.lt3