mirror of
https://github.com/dkhamsing/open-source-ios-apps.git
synced 2024-12-22 21:38:44 +01:00
19 lines
449 B
Ruby
19 lines
449 B
Ruby
|
require_relative 'osia_helper'
|
||
|
|
||
|
OUTPUT = 'temp-links'
|
||
|
|
||
|
def apps_archived(apps)
|
||
|
a = apps.select {|a| a['tags'] != nil }.select {|b| b['tags'].include?'archive'}
|
||
|
a.sort_by { |k, v| k['title'] }
|
||
|
end
|
||
|
|
||
|
j = get_json
|
||
|
a = j['projects']
|
||
|
archived = apps_archived a
|
||
|
links = a.reject { |x| archived.include? x }.map { |y| y['source']}
|
||
|
|
||
|
links.each_with_index { |z, i| puts "#{i+1} #{z}"}
|
||
|
|
||
|
puts "Writing #{OUTPUT}"
|
||
|
File.open(OUTPUT, 'w') { |f| f.puts links }
|