Sha256: cf6aa5dac04b6db943b924744d0ca9785322fd6f499a9b2a1af93dfac8d6341e

Contents?: true

Size: 1.05 KB

Versions: 4

Compression:

Stored size: 1.05 KB

Contents

#!/usr/bin/env ruby

require 'litexbrl'
require 'pry'

def doc(path)
  File.open(path) {|f| Nokogiri::XML(f) }
end

def read(path)
  File.open(path) {|f| f.read }
end

def dir
  File.expand_path '../../spec/data/tdnet/summary', __FILE__
end


#doc = doc('bin/1.xbrl')
#doc = doc('bin/a.htm')
#elm = doc.at_xpath("//xbrli:xbrl/tse-t-ed:NetSales[@contextRef='CurrentYearConsolidatedDuration']")
#elm = doc.at_xpath("//ix:nonFraction[@contextRef='CurrentYearDuration_NonConsolidatedMember_ForecastMember' and @name='tse-ed-t:NetIncomePerShare']")
#elm = doc.at_xpath("//ix:nonFraction[@contextRef='CurrentYearDuration_ConsolidatedMember_ForecastMember' and @name='tse-ed-t:NetSales']")
#elm = doc.at_xpath("//xbrli:context[@id='CurrentYearDuration']/xbrli:period/xbrli:endDate")
#p elm.content

#xbrl = LiteXBRL::TDnet::Summary.parse('bin/1.xbrl')
#xbrl = LiteXBRL::TDnet::Summary2.parse('bin/1q.htm')
#xbrl = LiteXBRL::TDnet::Summary2.parse('bin/year.htm')
#xbrl = LiteXBRL::TDnet::ResultsForecast2.parse('bin/1.htm')
xbrl =  LiteXBRL::TDnet.parse_string read('bin/a.htm')
p xbrl

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
litexbrl-0.1.3 bin/litexbrl
litexbrl-0.1.2 bin/litexbrl
litexbrl-0.1.1 bin/litexbrl
litexbrl-0.1.0 bin/litexbrl