lib/WWWCHtmlConverter/WWWCHTMLConverterLib.rb in WWWCHtmlConverter-0.0.2 vs lib/WWWCHtmlConverter/WWWCHTMLConverterLib.rb in WWWCHtmlConverter-0.0.3

- old
+ new

@@ -1,17 +1,16 @@ # -*- encoding: utf-8 -*- -p 'index' -p 'a'.encoding + require "erb" require "thor" module WWWCHTMLConverter # Your code goes here... class CommandLine < Thor attr_accessor :wwwc - desc "in_to WWWwwCのディレクトリ", "out アウトプットディレクトリ" + desc "in_to WWWCのディレクトリ", "out アウトプットディレクトリ" def initialize() @wwwc = WWWC.new() end def in_to(dir_path) @@ -87,11 +86,11 @@ # Item.datのパスを回帰的に取得 @items = [] Dir.glob("Item.dat/**/*").each{|dir| wwwc = WWWC_HTML_Converter.new wwwc.item_date_pach = dir - pp dir.encode(Encoding::SJIS) + p dir.encode(Encoding::SJIS) } # ディレクトリリスト作成 @items.each{|wwwc| dir_list = Dir::entries() @@ -237,11 +236,11 @@ dir_css = Dir.glob('./../../html/theme/*') @css_theme = dir_css[rand(dir_css.size)].sub!("./../../html/theme/", "") # データベース @db_file_name = ARGV[0] - @db = Sequel.sqlite(@db_file_name) + #@db = Sequel.sqlite(@db_file_name) # データベースからデータ取得 dataset = @db[:index].where(:Private => false).order(:Datetime) datas = dataset.all @@ -261,21 +260,10 @@ @day_body = File.open("./../day_body.erb").read @all_body = File.open("./../all_body.erb").read end - def keyword() - @keywords = @db[:keyword].select(:Keyword).all - - @keyword = "" - @keywords.each{|i| - i.each{|key, value| - @keyword = value + ", " + @keyword} - } - @keyword.encode!("UTF-8") - end - def create_body() # くっつける @htmls = [] @days.get_days().each{|day| @@ -344,7 +332,7 @@ } end end end -link = WWWC_HTML_Converter::Link.new(ARGV[0], ARGV[1]) # +#link = WWWC_HTML_Converter::Link.new(ARGV[0], ARGV[1]) #