lib/repl.rb in runeblog-0.1.30 vs lib/repl.rb in runeblog-0.1.31

- old
+ new

@@ -45,10 +45,23 @@ "custom/post_template.html"] num, fname = STDSCR.menu(title: "Edit file:", items: items) edit_file("#{dir}/#{fname}") end + def cmd_customize(arg, testing = false) + # add extra views? add tags? + Dir.chdir(@blog.root + "/views/" + @blog.view.name) + others = @blog.views - [@blog.view] + others.map!(&:name) + viewlist = STDSCR.multimenu(items: others) + puts "\n #{viewlist.inspect}\n " + tags = File.readlines("tagpool").map(&:chomp) + tags << "[NEW TAG]" + taglist = STDSCR.multimenu(items: tags) + puts "\n #{taglist.inspect}\n " + end + def cmd_browse(arg, testing = false) reset_output check_empty(arg) url = @blog.view.publisher.url if url.nil? @@ -306,9 +319,11 @@ new view Create a new view list views List all views available lsv Same as: list views + + customize Change set of tags, extra views p, post Create a new post new post Same as post (create a post) lsp, list posts List posts in current view