lib/runeblog.rb in runeblog-0.0.59 vs lib/runeblog.rb in runeblog-0.0.60

- old
+ new

@@ -1,11 +1,11 @@ require 'find' require 'yaml' require 'livetext' class RuneBlog - VERSION = "0.0.59" + VERSION = "0.0.60" Path = File.expand_path(File.join(File.dirname(__FILE__))) DefaultData = Path + "/../data" BlogHeaderPath = DefaultData + "/custom/blog_header.html" @@ -101,9 +101,19 @@ result = system("vi #@root/src/#{file} +8 ") raise "Problem editing #@root/src/#{file}" unless result nil rescue => err error(err) + end + + def posts + dir = self.viewdir(@view) + posts = Dir.entries(dir).grep(/^0.*/) + end + + def drafts + dir = "#@root/src" + drafts = Dir.entries(dir).grep(/^0.*.lt3/) end def process_post(file) @main ||= Livetext.new @main.main.output = File.new("/tmp/WHOA","w")