mirror of
https://github.com/dkhamsing/open-source-ios-apps.git
synced 2025-02-01 19:16:48 +01:00
[script] update how to check itunes links
This commit is contained in:
parent
cf7ca61552
commit
9aa28c1526
7
.github/osia_get_links.rb
vendored
7
.github/osia_get_links.rb
vendored
@ -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?
|
||||
|
Loading…
x
Reference in New Issue
Block a user