runeblog 0.2.37 → 0.2.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 132d1e47c6892b832f21544dfbb6cc1ea46d5ab4948f089842114b700725bf7e
4
- data.tar.gz: 3b1bdf9527caa5415fc4d631ef772edad07fc79ebe6b5f3bef7acfa250b31e7d
3
+ metadata.gz: 703ba416efcf4467ac20d3a9e37084c49004b48fae50adeb25beb1ec013a4d0a
4
+ data.tar.gz: ac0c5e8a64578169f7faa3c729baaecb6a83ea28d9639d8ea74b49b42ada943a
5
5
  SHA512:
6
- metadata.gz: 3d2571ed899e5e33b85564f54bbab240fabf6944bd1c1867a68b1bcd9efec5b9dff92489a3a3ed4e28ad67c6e4e84af73ef60d178f2347582eb34d6644e11421
7
- data.tar.gz: c326f5a238ba10ee6da0fdca4780a12b01130006f0e02049f252396f9f098cd4cf7cbcb5efabdcd61076c0d7d05e290fb8ae48ed9fae2c070ac3aa91fe475766
6
+ metadata.gz: 8080cbdaedbb3795cf8f3c1e3fef03ed44633423d41471bc7a8632f57b65ca9a01a82843a4324a75abd1e9b241db5f9b3d47c21f09ef23788cc86a240083bd8e
7
+ data.tar.gz: d4abe4cc7ea9af24a93416a567e6286fa4a3b8cfe6356c4e633337bff1413f9fab83e3ca60d1cea6790aa50cfca2e12593dbf7fdb392011ff86c30545c10cb41
@@ -2,7 +2,7 @@
2
2
  . This file will usually not be edited by the user.
3
3
  . It is used to generate the top-level index.html
4
4
  . The user will more often edit blog/index.lt3 in
5
- . the process of blog setup.
5
+ . the process of blog setup.
6
6
  . --------------------------------------------------
7
7
 
8
8
  .mixin liveblog
@@ -15,17 +15,17 @@
15
15
  <body>
16
16
 
17
17
  . FIXME
18
- <table width=100%>
19
- <tr>
20
- <td width=30% bgcolor=black>
21
- <div style="text-align: center; color: white">
22
- <h1>Around Austin</h1><br>
23
- The view from downtown...
24
- </div>
25
- </td>
26
- <td><img src=assets/sky2.jpg width=100%></img>
27
- </tr>
28
- </table>
18
+ <table width=100%>
19
+ <tr>
20
+ <td width=30% bgcolor=black>
21
+ <div style="text-align: center; color: white">
22
+ <h1>Around Austin</h1><br>
23
+ The view from downtown...
24
+ </div>
25
+ </td>
26
+ <td><img src=assets/sky2.jpg width=100%></img>
27
+ </tr>
28
+ </table>
29
29
 
30
30
  $.include navbar/navbar.lt3
31
31
  <div class="content container-fluid mt-4">
@@ -40,7 +40,9 @@ module RuneBlog::REPL
40
40
  "list assets" => :cmd_list_assets,
41
41
  "lsa" => :cmd_list_assets,
42
42
 
43
- "delete >postid" => :cmd_remove_post,
43
+ "pages" => :cmd_pages,
44
+
45
+ "delete >postid" => :cmd_remove_post,
44
46
  "undel $postid" => :cmd_undelete_post,
45
47
 
46
48
  "edit $postid" => :cmd_edit_post,
@@ -103,7 +105,7 @@ module RuneBlog::REPL
103
105
  end
104
106
  meth = found || :cmd_INVALID
105
107
  params = cmd if meth == :cmd_INVALID
106
- puts "choose: #{[meth, params].inspect}"
108
+ # puts "choose: #{[meth, params].inspect}"
107
109
  [meth, params]
108
110
  end
109
111
 
@@ -36,28 +36,40 @@ module RuneBlog::REPL
36
36
  @out
37
37
  end
38
38
 
39
- def cmd_config(arg, testing = false)
39
+ def cmd_pages(arg, testing = false)
40
40
  check_empty(arg)
41
- dir = @blog.view.dir
42
- items = ["themes/standard/blogview.lt3", "themes/standard/post-index.lt3"]
43
- num, fname = STDSCR.menu(title: "Edit file:", items: items)
44
- edit_file("#{dir}/#{fname}")
45
- end
46
-
47
- # Currently not used
48
- def cmd_customize(arg, testing = false)
49
- # add extra views? add tags?
50
- puts "\n This is still buggy.\n "
51
- return
52
-
53
- avail_tags = all_tags
54
- tags = STDSCR.multimenu(items: avail_tags)
55
- @blog.post_tags = tags
56
- end
57
-
58
- def cmd_tags(arg, testing = false)
59
- Dir.chdir(@blog.root + "/views/" + @blog.view.name)
60
- edit_file("tagpool")
41
+ dir = @blog.view.dir/"themes/standard/widgets/pages"
42
+ # Assume child files already generated (and list.data??)
43
+ data = dir/"list.data"
44
+ lines = File.readlines(data)
45
+ hash = {}
46
+ lines.each do |line|
47
+ url, name = line.chomp.split(",")
48
+ source = url.sub(/.html$/, ".lt3")
49
+ hash[name] = source
50
+ end
51
+ new_item = "[New page]"
52
+ num, fname = STDSCR.menu(title: "Edit page:", items: hash.keys + [new_item])
53
+ return if fname.nil?
54
+ if fname == new_item
55
+ print "Page title: "
56
+ title = RubyText.gets
57
+ title.chomp!
58
+ print "File name (.lt3): "
59
+ fname = RubyText.gets
60
+ fname << ".lt3" unless fname.end_with?(".lt3")
61
+ fhtml = fname.sub(/.lt3$/, ".html")
62
+ File.open(data, "a") {|f| f.puts "#{fhtml},#{title}" }
63
+ new_file = dir/fname
64
+ File.open(new_file, "w") do |f|
65
+ f.puts "<h1>#{title}</h1>\n\n\n "
66
+ f.puts ".backlink"
67
+ end
68
+ edit_file(new_file)
69
+ else
70
+ target = hash[fname]
71
+ edit_file(dir/target)
72
+ end
61
73
  end
62
74
 
63
75
  def cmd_import(arg, testing = false)
@@ -143,6 +155,7 @@ module RuneBlog::REPL
143
155
  n = viewnames.find_index(@blog.view.name)
144
156
  name = @blog.view.name
145
157
  k, name = STDSCR.menu(title: "Views", items: viewnames, curr: n) unless testing
158
+ return if name.nil?
146
159
  @blog.view = name
147
160
  output name + "\n"
148
161
  puts "\n ", fx(name, :bold), "\n" unless testing
@@ -2,7 +2,7 @@
2
2
  if ! (Object.constants.include?(:RuneBlog) && RuneBlog.constants.include?(:Path))
3
3
 
4
4
  class RuneBlog
5
- VERSION = "0.2.37"
5
+ VERSION = "0.2.38"
6
6
 
7
7
  path = Gem.find_files("runeblog").grep(/runeblog-/).first
8
8
  Path = File.dirname(path)
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.2.37
4
+ version: 0.2.38
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hal Fulton