Sha256: 54938961fca1e1a3c3b87db6d0738349b36a5421b44a931bc380aa7095d04826
Contents?: true
Size: 496 Bytes
Versions: 5
Compression:
Stored size: 496 Bytes
Contents
module Format module HTML def self.to_txt(html) base = File.expand_path(File.dirname(__FILE__)) lynx_path = "#{base}/../../windows_bin/lynx" tmp_file = "#{base}/format_html_tmp.html" fd = File.open(tmp_file, 'w+') fd.puts html fd.close if RUBY_PLATFORM =~ /win32/i cmd = "#{lynx_path}/lynx.exe -cfg=#{lynx_path}/lynx.cfg" else cmd = '/usr/bin/lynx' end `#{cmd} -dump #{tmp_file}` end end end
Version data entries
5 entries across 5 versions & 1 rubygems