1
0
mirror of https://github.com/dkhamsing/open-source-ios-apps.git synced 2025-03-11 17:10:13 +01:00

Rename category-ids

This commit is contained in:
Daniel Khamsing 2016-08-25 07:35:26 -07:00
parent 3c6797c42a
commit aec62d551f
4 changed files with 546 additions and 546 deletions

View File

@ -5,7 +5,7 @@ A new entry should update **contents.json** with this format:
```js ```js
{ {
"title": "Name of the app", "title": "Name of the app",
"category": "Category name", "category-ids": ["Category id"],
"description": "What this app does", "description": "What this app does",
"source": "Link to source, usually GitHub", "source": "Link to source, usually GitHub",
"screenshots": ["http://something.com/image.png"], "screenshots": ["http://something.com/image.png"],

View File

@ -23,7 +23,7 @@ def apps_for_cat(apps, id)
end end
s = f.select do |a| s = f.select do |a|
cat = a['category'] cat = a['category-ids']
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'].downcase } s.sort_by { |k, v| k['title'].downcase }

View File

@ -16,7 +16,7 @@ end
allowed_categories = osia_allowed_categories(c) allowed_categories = osia_allowed_categories(c)
apps.each do |a| apps.each do |a|
cat = a['category'] cat = a['category-ids']
if cat.nil? if cat.nil?
puts "missing category for #{a}" puts "missing category for #{a}"

File diff suppressed because it is too large Load Diff