Sha256: d5232585c205f1f3fc01827753f7e98bac818a8bd97b8b641c12670e58890e23
Contents?: true
Size: 354 Bytes
Versions: 1
Compression:
Stored size: 354 Bytes
Contents
#!/usr/bin/env ruby # $LOAD_PATH.unshift(File.expand_path("../../lib", "__FILE__")) require 'nokogiri' n = Nokogiri::HTML::parse STDIN.read options = ARGV.select{ |o| o =~ /^\-/ } query = ARGV - options n.css(query.first).each do |element| if options.any?{|o| ["-t", "--text"].include?(o) } puts element.text else puts element end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
xp-1.0.0 | bin/xp |