mirror of
https://github.com/dkhamsing/open-source-ios-apps.git
synced 2024-12-26 16:32:50 +01:00
[script] display tags update
This commit is contained in:
parent
e5192c11e8
commit
dcfb2caf14
55
.github/osia_convert.rb
vendored
55
.github/osia_convert.rb
vendored
@ -45,40 +45,55 @@ def output_apps(apps)
|
||||
screenshots = a['screenshots']
|
||||
license = a['license']
|
||||
|
||||
o << "- #{name}"
|
||||
t = "#{name}"
|
||||
|
||||
if desc.nil?
|
||||
o << ' '
|
||||
t << ' '
|
||||
else
|
||||
o << ": #{desc} " if desc.size>0
|
||||
t << ": #{desc} " if desc.size>0
|
||||
end
|
||||
|
||||
unless itunes.nil?
|
||||
o << "[` App Store`](#{itunes}) "
|
||||
t << "[` App Store`](#{itunes}) "
|
||||
end
|
||||
o << "- #{t} \n"
|
||||
|
||||
o << "<details><summary>"
|
||||
|
||||
details = if tags.nil?
|
||||
'`objc` '
|
||||
else
|
||||
''
|
||||
end
|
||||
|
||||
unless tags.nil?
|
||||
o << '`Swift` ' if tags.include? 'swift'
|
||||
details << '`swift` ' if tags.include? 'swift'
|
||||
|
||||
tags.each do |t|
|
||||
details << "`#{t.downcase}` " if t.downcase!='swift'
|
||||
end
|
||||
end
|
||||
|
||||
unless lang.nil?
|
||||
o << output_flag(lang)
|
||||
details << output_flag(lang)
|
||||
details << ' '
|
||||
end
|
||||
|
||||
unless stars.nil?
|
||||
o << output_stars(stars)
|
||||
details << output_stars(stars)
|
||||
end
|
||||
o << details
|
||||
|
||||
o << "\n"
|
||||
|
||||
show_details = !homepage.nil? || !screenshots.nil? || !license.nil? || !date_added.nil?
|
||||
|
||||
if (!show_details)
|
||||
o << " - #{link}\n"
|
||||
else
|
||||
details = " <details><summary>#{link}</summary>\n"
|
||||
o << "</summary>"
|
||||
|
||||
details_list = []
|
||||
|
||||
details_list.push link
|
||||
|
||||
unless homepage.nil?
|
||||
details_list.push homepage
|
||||
end
|
||||
|
||||
unless date_added.nil?
|
||||
date = DateTime.parse(date_added)
|
||||
formatted_date = date.strftime "%B %e, %Y"
|
||||
@ -90,11 +105,7 @@ def output_apps(apps)
|
||||
details_list.push "License: #{license_display}"
|
||||
end
|
||||
|
||||
unless homepage.nil?
|
||||
details_list.push homepage
|
||||
end
|
||||
|
||||
details << ' '
|
||||
details = ' '
|
||||
details << details_list[0]
|
||||
details_list[1..-1].each { |x| details << "<br> #{x}" }
|
||||
|
||||
@ -108,7 +119,8 @@ def output_apps(apps)
|
||||
|
||||
details << "\n </details>\n"
|
||||
o << details
|
||||
end
|
||||
|
||||
o << "</details> \n"
|
||||
end
|
||||
o
|
||||
end
|
||||
@ -225,7 +237,6 @@ def write_archive(j)
|
||||
t = a['title']
|
||||
s = a['source']
|
||||
output << "- #{t} #{s}\n"
|
||||
# output <<
|
||||
end
|
||||
|
||||
output << "\n"
|
||||
|
Loading…
Reference in New Issue
Block a user