diff --git a/.github/osia_get_links.rb b/.github/osia_get_links.rb index 3572d3b0..2406c83e 100644 --- a/.github/osia_get_links.rb +++ b/.github/osia_get_links.rb @@ -2,6 +2,7 @@ require_relative 'osia_helper' UNIQUES = 'check-unique.txt' # should be unique LINKS = 'check-links.txt' # allow dupes +INFO = 'check-info.txt' # errors are allowed def apps_archived(apps) a = apps.select {|a| a['tags'] != nil }.select {|b| b['tags'].include?'archive'} @@ -14,10 +15,11 @@ archived = apps_archived a active = a.reject { |x| archived.include? x } uniques = [] +info = [] active.each do |z| uniques.push z['source'] - uniques.push z['itunes'] unless z['itunes'].nil? uniques.push z['screenshots'] unless z['screenshots'].nil? + info.push z['itunes'] unless z['itunes'].nil? end uniques.each_with_index { |z, i| puts "#{i+1} #{z}" } @@ -25,6 +27,9 @@ uniques.each_with_index { |z, i| puts "#{i+1} #{z}" } puts "Writing #{UNIQUES}" File.open(UNIQUES, 'w') { |f| f.puts uniques } +puts "Writing #{INFO}" +File.open(INFO, 'w') { |f| f.puts info } + links = [] active.each do |z| links.push z['homepage'] unless z['homepage'].nil?