mirror of
https://github.com/dkhamsing/open-source-ios-apps.git
synced 2024-12-26 19:22:01 +03:00
[script] Show homepage, order apps
This commit is contained in:
parent
c482b2a570
commit
1663806dbe
@ -33,11 +33,11 @@ def output_flag(lang)
|
|||||||
end
|
end
|
||||||
|
|
||||||
def apps_for_cat(apps, id)
|
def apps_for_cat(apps, id)
|
||||||
apps.select do |a|
|
s = apps.select do |a|
|
||||||
cat = a['category']
|
cat = a['category']
|
||||||
# puts cat.class
|
|
||||||
cat.class == Array ? cat.include?(id) : (cat == id)
|
cat.class == Array ? cat.include?(id) : (cat == id)
|
||||||
end
|
end
|
||||||
|
s.sort_by { |k, v| k['title'] }
|
||||||
end
|
end
|
||||||
|
|
||||||
def output_apps(apps)
|
def output_apps(apps)
|
||||||
@ -46,6 +46,7 @@ def output_apps(apps)
|
|||||||
name = a['title']
|
name = a['title']
|
||||||
link = a['source']
|
link = a['source']
|
||||||
itunes = a['itunes']
|
itunes = a['itunes']
|
||||||
|
homepage = a['homepage']
|
||||||
desc = a['description']
|
desc = a['description']
|
||||||
tags = a['tags']
|
tags = a['tags']
|
||||||
stars = a['stars']
|
stars = a['stars']
|
||||||
@ -73,6 +74,7 @@ def output_apps(apps)
|
|||||||
|
|
||||||
o << "\n"
|
o << "\n"
|
||||||
o << " - #{link}\n"
|
o << " - #{link}\n"
|
||||||
|
o << " - #{homepage}\n" unless homepage.nil?
|
||||||
o << " - #{itunes}\n" unless itunes.nil?
|
o << " - #{itunes}\n" unless itunes.nil?
|
||||||
end
|
end
|
||||||
o
|
o
|
||||||
|
Loading…
Reference in New Issue
Block a user