runeblog 0.1.90 → 0.1.91

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: 9687bddcc20a39a654a99603151b884aac19cd4e6eded49c8353168fa38f388d
4
- data.tar.gz: 61fdab92aa959e73840ae5021864fe700642ddc705c9ca118b6ce318c5e3876a
3
+ metadata.gz: d0ecc0207a215d6ecb745fc93ef707d330990f287637f0e6838ea996ef8a3922
4
+ data.tar.gz: f00e1ab6255ae818b30d345408e44a3735dc907b9d16cf9ab51fc473bd6bedeb
5
5
  SHA512:
6
- metadata.gz: 9dca839400cbae673b05ec03128c15cbab360ff445e56de78d51aac4a1441e139fd3f13357bf13c75500bd0cad6010d9b3276262ae9011c08bd2d15787e4285b
7
- data.tar.gz: 237b98bcdbc8d784a64668db6e7ff6488531f36d2f23f94847ba8fdccb9564473f133c3bdabbd7f868a5b2c626fb9c65046e9d251890851aad12e6aef9f50abe
6
+ metadata.gz: 9e13e2828c71f69a5fd40dc4da1c1cf604e2222ad8d1c919e4402a662e7224aa488512f6c2107d48336a96049cf61d830fe93d4247e278c7ac755e511ef7b03b
7
+ data.tar.gz: 26aac596e6e68e5b37bd36c1aacb193f22da135a5e299a68437f46b34d52e74f343e5e22960b6d879a132d772febb66049876dd5f4a1ba969dccdfd9f942d7f7
data/lib/helpers-blog.rb CHANGED
@@ -133,11 +133,14 @@ end
133
133
  files
134
134
  end
135
135
 
136
- def create_dir(dir)
137
- return if Dir.exist?(dir) # && File.directory?(dir)
138
- cmd = "mkdir -p #{dir} >/dev/null" # 2>&1"
139
- result = system(cmd)
140
- raise CantCreateDir(dir) unless result
136
+ def create_dirs(*dirs)
137
+ dirs.each do |dir|
138
+ dir = dir.to_s # symbols allowed
139
+ next if Dir.exist?(dir)
140
+ cmd = "mkdir -p #{dir} >/dev/null"
141
+ result = system(cmd)
142
+ raise CantCreateDir(dir) unless result
143
+ end
141
144
  end
142
145
 
143
146
  def interpolate(str, binding)
data/lib/liveblog.rb CHANGED
@@ -8,15 +8,6 @@ require 'runeblog'
8
8
  errfile = File.new("liveblog.out", "w")
9
9
  STDERR.reopen(errfile)
10
10
 
11
- # def title # side-effect
12
- # def pubdate # side-effect
13
- # def tags # side-effect
14
- # def views # side-effect
15
- # def pin # side-effect
16
- # def write_post # side-effect
17
- # def main # side-effect
18
- # def _post_lookup(postid) # side-effect
19
-
20
11
  def init_liveblog # FIXME - a lot of this logic sucks
21
12
  here = Dir.pwd
22
13
  dir = here
@@ -122,7 +113,7 @@ def _passthru_noline(line)
122
113
  _out "<p>" if line.empty? && ! @_nopara
123
114
  end
124
115
 
125
- def title # side-effect
116
+ def title
126
117
  raise "'post' was not called" unless @meta
127
118
  title = @_data.chomp
128
119
  @meta.title = title
@@ -131,7 +122,7 @@ def title # side-effect
131
122
  _optional_blank_line
132
123
  end
133
124
 
134
- def pubdate # side-effect
125
+ def pubdate
135
126
  raise "'post' was not called" unless @meta
136
127
  _debug "data = #@_data"
137
128
  # Check for discrepancy?
@@ -151,21 +142,21 @@ def image # primitive so far
151
142
  _optional_blank_line
152
143
  end
153
144
 
154
- def tags # side-effect
145
+ def tags
155
146
  raise "'post' was not called" unless @meta
156
147
  _debug "args = #{_args}"
157
148
  @meta.tags = _args.dup || []
158
149
  _optional_blank_line
159
150
  end
160
151
 
161
- def views # side-effect
152
+ def views
162
153
  raise "'post' was not called" unless @meta
163
154
  _debug "data = #{_args}"
164
- @meta.views = _args.dup # + ["main"]
155
+ @meta.views = _args.dup
165
156
  _optional_blank_line
166
157
  end
167
158
 
168
- def pin # side-effect
159
+ def pin
169
160
  raise "'post' was not called" unless @meta
170
161
  _debug "data = #{_args}"
171
162
  # verify only already-specified views?
@@ -196,7 +187,7 @@ def list!
196
187
  _optional_blank_line
197
188
  end
198
189
 
199
- def write_post # side-effect
190
+ def write_post
200
191
  raise "'post' was not called" unless @meta
201
192
  save = Dir.pwd
202
193
  @postdir.gsub!(/\/\//, "/") # FIXME unneeded?
@@ -231,7 +222,7 @@ def finalize
231
222
  return
232
223
  end
233
224
  if @blog.nil?
234
- return @meta # @live.body
225
+ return @meta
235
226
  end
236
227
 
237
228
  @slug = @blog.make_slug(@meta)
@@ -361,15 +352,16 @@ def meta
361
352
  _out str
362
353
  end
363
354
 
364
- def main # side-effect
355
+ def recent_posts # side-effect
365
356
  _out %[<div class="col-lg-9 col-md-9 col-sm-9 col-xs-12">]
366
- which = _args[0]
367
- case which
368
- when "recent_posts"
369
- all_teasers
370
- when "post" # No longer needed??
371
- _out %[<iframe style="width: 100vw;height: 100vh;position: relative;" src='whats-at-stubbs.html' width=100% frameborder="0" allowfullscreen></iframe>]
372
- end
357
+ all_teasers
358
+ ## which = _args[0]
359
+ ## case which
360
+ ## when "recent_posts"
361
+ ## all_teasers
362
+ ## when "post" # No longer needed??
363
+ ## _out %[<iframe style="width: 100vw;height: 100vh;position: relative;" src='whats-at-stubbs.html' width=100% frameborder="0" allowfullscreen></iframe>]
364
+ ## end
373
365
  _out %[</div>]
374
366
  end
375
367
 
data/lib/runeblog.rb CHANGED
@@ -54,11 +54,9 @@ class RuneBlog
54
54
  $_blog = self # Dumber still?
55
55
  root = Dir.pwd + "/" + root
56
56
  raise BlogRepoAlreadyExists if Dir.exist?(root)
57
- create_dir(root)
57
+ create_dirs(root)
58
58
  Dir.chdir(root) do
59
- create_dir("drafts")
60
- create_dir("views")
61
- #? create_dir("assets")
59
+ create_dirs(:drafts, :views)
62
60
  new_sequence
63
61
  end
64
62
  put_config(root: root)
@@ -172,36 +170,27 @@ class RuneBlog
172
170
 
173
171
  vdir = "#@root/views/#{arg}/"
174
172
  raise DirAlreadyExists(vdir) if Dir.exist?(vdir)
175
- create_dir(vdir)
173
+ create_dirs(vdir)
176
174
  up = Dir.pwd
177
175
 
178
- Dir.chdir(vdir)
179
- x = RuneBlog::Default
180
- # create_dir('themes')
181
- copy!("#{Themes}", "themes")
182
- create_dir('assets')
183
- create_dir('posts')
176
+ Dir.chdir(vdir) do
177
+ x = RuneBlog::Default
178
+ copy!("#{Themes}", "themes")
179
+ create_dirs(:assets, :posts)
180
+ create_dirs(:staging, :remote)
181
+ copy!("themes/standard/*", "staging/")
182
+ copy!("themes/standard/*", "remote/")
184
183
 
185
- create_dir('staging')
186
- # create_dir('staging/assets')
187
- # create_dir('staging/blog')
188
- create_dir('remote')
189
- # create_dir('remote/assets')
184
+ pub = "user: xxx\nserver: xxx\ndocroot: xxx\npath: xxx\nproto: xxx\n"
185
+ dump(pub, "publish")
190
186
 
191
- copy!("themes/standard/*", "staging/")
192
- # copy!("themes/standard/blog/*", "staging/blog/")
193
- copy!("themes/standard/*", "remote/")
187
+ # Add to global.lt3 here? FIXME
194
188
 
195
- pub = "user: xxx\nserver: xxx\ndocroot: xxx\npath: xxx\nproto: xxx\n"
196
- dump(pub, "publish")
197
-
198
- # Add to global.lt3 here? FIXME
199
-
200
- view = RuneBlog::View.new(arg)
201
- self.view = view
202
- vdir = self.view.dir
203
- dump("Initial creation", "last_published")
204
- Dir.chdir(up)
189
+ view = RuneBlog::View.new(arg)
190
+ self.view = view
191
+ vdir = self.view.dir
192
+ dump("Initial creation", "last_published")
193
+ end
205
194
  @views << view
206
195
  @views
207
196
  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.90"
5
+ VERSION = "0.1.91"
6
6
 
7
7
  path = Gem.find_files("runeblog").grep(/runeblog-/).first
8
8
  Path = File.dirname(path)
@@ -7,10 +7,10 @@
7
7
  .include global.lt3
8
8
  .include blog/head.lt3
9
9
  <body>
10
- $.include navbar.lt3
10
+ $.include navbar/navbar.lt3
11
11
  <div class="content container-fluid mt-4">
12
12
  <div class="row">
13
- $.include blog-index.lt3
13
+ $.include blog/index.lt3
14
14
  </div>
15
15
  </div>
16
16
  </body>
@@ -0,0 +1,4 @@
1
+ .recent_posts
2
+
3
+ .sidebar! ad news calendar tag-cloud
4
+
@@ -0,0 +1,27 @@
1
+ In /Users/Hal/Dropbox/files/runeblog/themes/standard
2
+ - about to process global.lt3
3
+ ...finished
4
+ In /Users/Hal/Dropbox/files/runeblog/themes/standard
5
+ - about to process blog/head.lt3
6
+ In /Users/Hal/Dropbox/files/runeblog/themes/standard
7
+ - about to process meta.lt3
8
+ ...finished
9
+ In /Users/Hal/Dropbox/files/runeblog/themes/standard
10
+ - about to process navbar.lt3
11
+ ...finished
12
+ In /Users/Hal/Dropbox/files/runeblog/themes/standard
13
+ - about to process blog-index.lt3
14
+ In /Users/Hal/Dropbox/files/runeblog/themes/standard
15
+ - about to process sidebar/ad.lt3
16
+ ...finished
17
+ In /Users/Hal/Dropbox/files/runeblog/themes/standard
18
+ - about to process sidebar/news.lt3
19
+ ...finished
20
+ In /Users/Hal/Dropbox/files/runeblog/themes/standard
21
+ - about to process sidebar/calendar.lt3
22
+ ...finished
23
+ In /Users/Hal/Dropbox/files/runeblog/themes/standard
24
+ - about to process sidebar/tag-cloud.lt3
25
+ ...finished
26
+ ...finished
27
+ ...finished
File without changes
File without changes
@@ -8,9 +8,13 @@
8
8
 
9
9
  .include global.lt3
10
10
  .include blog/head.lt3
11
+ . post head stuff...
12
+
13
+ . html/body mismatch?
14
+
11
15
  <section class="post">
12
16
  <div class="entry-content">
13
- $.include post-index.lt3
17
+ $.include post/index.lt3
14
18
  </div>
15
19
  </section>
16
20
  </body>
File without changes
File without changes
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: runeblog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.90
4
+ version: 0.1.91
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hal Fulton
@@ -78,22 +78,21 @@ files:
78
78
  - test/make_blog.rb
79
79
  - test/test
80
80
  - themes/standard/README
81
- - themes/standard/about.html
82
81
  - themes/standard/assets/blog.css
83
82
  - themes/standard/assets/favicon.ico
84
- - themes/standard/blog-index.lt3
85
- - themes/standard/blog-meta.lt3
86
- - themes/standard/blog-navbar.lt3
87
83
  - themes/standard/blog/generate.lt3
88
84
  - themes/standard/blog/head.lt3
85
+ - themes/standard/blog/index.lt3
89
86
  - themes/standard/blog/post_entry.lt3
90
87
  - themes/standard/global.lt3
91
88
  - themes/standard/head.lt3
89
+ - themes/standard/liveblog.out
92
90
  - themes/standard/meta.lt3
93
- - themes/standard/navbar.lt3
94
- - themes/standard/post-generate.lt3
95
- - themes/standard/post-head.lt3
96
- - themes/standard/post-index.lt3
91
+ - themes/standard/navbar/about.html
92
+ - themes/standard/navbar/navbar.lt3
93
+ - themes/standard/post/generate.lt3
94
+ - themes/standard/post/head.lt3
95
+ - themes/standard/post/index.lt3
97
96
  - themes/standard/sidebar/ad.lt3
98
97
  - themes/standard/sidebar/calendar.lt3
99
98
  - themes/standard/sidebar/news.lt3
@@ -1,6 +0,0 @@
1
- .main recent_posts
2
-
3
- . Should sidebar just stick items on its command line?
4
-
5
- .sidebar! ad news calendar tag-cloud
6
-
@@ -1,3 +0,0 @@
1
- .meta charset: utf-8
2
- .meta http-equiv: X-UA-Compatible content: IE=edge,chrome=1
3
- .meta name: viewport content: width=device-width,initial-scale=1
@@ -1,6 +0,0 @@
1
- .navbar
2
- index.html Home
3
- about.html About
4
- contact.html Contact
5
- .end
6
-