<< 20121015-update-fachinfo-chapter-exporter-job | 2012 | 20121011-fixed-delete-link-instant-search-update-generika-lookandfeel >>
$ ruby jobs/export_fachinfo_chapter test amzv usage $ ruby jobs/export_fachinfo_chapter test amzv usage fr $ ruby jobs/export_fachinfo_chapter test --chapter amzv usage $ ruby jobs/export_fachinfo_chapter "test more" --chapter amzv usage --lang fr
/path/to/ruby/1.9.1/net/protocol.rb:313: warning: regexp match /.../n against to UTF-8 string /path/to/ruby/1.9.1/net/protocol.rb:313: warning: regexp match /.../n against to UTF-8 string /path/to/ruby/1.9.1/net/protocol.rb:313: warning: regexp match /.../n against to UTF-8 string ...
# for encoding warning of each_crlf_line require 'net/protocol' class Net::InternetMessageIO private def each_crlf_line_with_force_encoding(src) buffer_filling(@wbuf, src) do @wbuf.force_encoding('ASCII-8BIT') while line = @wbuf.slice!(/\A.*(?:\n|\r\n|\r(?!\z))/n) yield line.chomp("\n") + "\r\n" end end end alias_method :each_crlf_line_without_force_encoding, :each_crlf_line alias_method :each_crlf_line, :each_crlf_line_with_force_encoding end
Finaly used gzip(Binaly, ASCII-8BIT) as attachment.
EX.
# Job $ ruby jobs/export_fachinfo_chapter mg usage effects # E-mail Anzahl: 13901 Packages: 12413 Chapters: usage,effects Lang: de Term: mg File: /var/ch.oddb.org/data/downloads/fachinfo_chapter_usage-effects_mg.2012-10-13.csv # Attach fachinfo_chapter_usage-effects_mg.2012-10-13.csv.gz