diff --git a/coll-health-obj-analysis/config/os_queries.ssm.yml b/coll-health-obj-analysis/config/os_queries.ssm.yml index 307a55e..ed4c2bf 100644 --- a/coll-health-obj-analysis/config/os_queries.ssm.yml +++ b/coll-health-obj-analysis/config/os_queries.ssm.yml @@ -21,6 +21,8 @@ outputs: class: FitsOutput fits-filtered: class: FitsFilteredOutput + fits-unfiltered: + class: FitsUnfilteredOutput queries: default: diff --git a/coll-health-obj-analysis/fits_outputter.rb b/coll-health-obj-analysis/fits_outputter.rb index 8657884..5911396 100644 --- a/coll-health-obj-analysis/fits_outputter.rb +++ b/coll-health-obj-analysis/fits_outputter.rb @@ -57,7 +57,7 @@ def format_fits_output xml = Nokogiri::XML(File.read(fits_output)).remove_namespaces! xml.xpath('/fits/identification').each do |doc| stat = doc.xpath('@status').text - stat = 'NA' if stat.empty? + stat = 'TOOLS_AGREE' if stat.empty? c = doc.xpath('count(identity)') count = c > 1 ? "(#{c.to_i} identities)" : '' write "\t\tStatus: #{stat} #{count}" @@ -146,3 +146,12 @@ def record_stat(stat) @interesting = true unless stat == 'UNKNOWN' end end + +# Invoke FITS, output unfiltered FITS XML +class FitsUnfilteredOutput < FitsOutput + def format_fits_output + return unless File.exist?(fits_output) + + puts File.read(fits_output) + end +end diff --git a/coll-health-obj-analysis/object_health_query.rb b/coll-health-obj-analysis/object_health_query.rb index f760db2..37ce05d 100644 --- a/coll-health-obj-analysis/object_health_query.rb +++ b/coll-health-obj-analysis/object_health_query.rb @@ -109,10 +109,11 @@ def make_options(argv) end.parse(argv) # the default extractor does not pull file details... change the formatter if needed - if options[:fmt] == :default && - (options[:output] == :files || options[:output] == :fits || options[:output] == :'fits-filtered') - options[:fmt] = - :files + if options[:fmt] == :default + case options[:output] + when :files, :fits, :'fits-filtered', :'fits-unfiltered' + options[:fmt] = :files + end end options end diff --git a/coll-health-obj-analysis/sample/README.md b/coll-health-obj-analysis/sample/README.md index af3c178..f5b1cb7 100644 --- a/coll-health-obj-analysis/sample/README.md +++ b/coll-health-obj-analysis/sample/README.md @@ -236,8 +236,7 @@ _Uses YAML v1.14.0 extension_ ## Conversion program to turn YAML into JSON ```rb -File.open('config/obj_schema.json', 'w') do |f| - f.write( +File.open('config/obj_schema.json', 'w') do |f| f.write( JSON.pretty_generate( YAML.safe_load( File.read('config/obj_schema.yml'),