Sha256: 72909cd5fed1493abaecc3865d6f476a8bfe1363ed2ed62cba332a5b30f09b32
Contents?: true
Size: 626 Bytes
Versions: 2
Compression:
Stored size: 626 Bytes
Contents
require "yaml" module Ykxutils module_function def complemente_dt_tag(line) if line =~ /<DT>/ # p "complemente_dt_tag T" line + "</DT>" elsif line =~ /<dt>/ line + "</dt>" else # p "complemente_dt_tag F" line end end def reform_dt_tag(infilename, outfilename) infile = File.open(infilename) outfile = File.open(outfilename, 'w') Ykxutils::file_convert(infile, outfile){ |infile, outfile| while line = infile.gets line.chomp! oline = Ykxutils.complemente_dt_tag(line) outfile.write( oline + "\n" ) end } end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ykxutils-0.1.14 | lib/ykxutils/htmlparsex.rb |
ykxutils-0.1.12 | lib/ykxutils/htmlparsex.rb |