From 4b481577114f822f1e69d71f302325d46a912ca9 Mon Sep 17 00:00:00 2001 From: Daniel Khamsing Date: Mon, 8 Aug 2016 13:20:47 -0700 Subject: [PATCH] Update header, close #398 --- .github/osia_convert.rb | 16 +++++++++++----- contents.json | 1 + 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/osia_convert.rb b/.github/osia_convert.rb index bff9bcf3..55f1aca3 100644 --- a/.github/osia_convert.rb +++ b/.github/osia_convert.rb @@ -111,6 +111,14 @@ def output_apps(apps) o end +def output_badges(count) + date = DateTime.now + date_display = date.strftime "%B %e, %Y" + + b = "![](https://img.shields.io/badge/Projects-#{count}-green.svg) [![](https://img.shields.io/badge/Twitter-@opensourceios-blue.svg)](https://twitter.com/opensourceios) ![](https://img.shields.io/badge/Updated-#{date_display}-lightgrey.svg)" + b +end + def output_flag(lang) case lang when 'ger' @@ -151,20 +159,18 @@ end def write_readme(j) t = j['title'] + subt = j['subtitle'] desc = j['description'] h = j['header'] f = j['footer'] cats = j['categories'] apps = j['projects'] - date = DateTime.now - date_display = date.strftime "%B %e, %Y" - output = '# ' + t output << "\n\n" output << desc - output << "\n\nA collaborative list of **#{apps.count}** open-source `iOS`, `watchOS` and `tvOS` apps, your [contribution](https://github.com/dkhamsing/open-source-ios-apps/blob/master/.github/CONTRIBUTING.md) is welcome :smile: " - output << "(updated *#{date_display}*)." + output << "\n\n #{subt} \n" + output << output_badges(apps.count) output << "\n \nJump to \n \n" diff --git a/contents.json b/contents.json index 3cd9ee30..b1942e5b 100644 --- a/contents.json +++ b/contents.json @@ -1,5 +1,6 @@ { "title": "Open-Source iOS Apps", + "subtitle": "A collaborative list of open-source `iOS`, `watchOS` and `tvOS` apps, your [contribution](https://github.com/dkhamsing/open-source-ios-apps/blob/master/.github/CONTRIBUTING.md) is welcome :smile:", "description": "", "header": "```\n 100+ Stars: šŸ”„\n 200+ Stars: šŸ”„šŸ”„\n 500+ Stars: šŸ”„šŸ”„šŸ”„\n1000+ Stars: šŸ”„šŸ”„šŸ”„šŸ”„\n2000+ Stars: šŸ”„šŸ”„šŸ”„šŸ”„šŸ”„\n\nMost projects are in English, exceptions have a flag\nšŸ‡ØšŸ‡³ Project is in Chinese\nšŸ‡ŖšŸ‡ø Project is in Spanish, etc\n\nClick ā–ŗ to show more details\n```", "footer": "## Thanks\n\nThis list was inspired by [awesome-ios](https://github.com/vsouza/awesome-ios) and [awesome-swift](https://github.com/matteocrippa/awesome-swift). Thanks to all the [contributors](https://github.com/dkhamsing/open-source-ios-apps/graphs/contributors) šŸŽ‰ \n\n## Contact\n\n- [github.com/dkhamsing](https://github.com/dkhamsing)\n- [twitter.com/dkhamsing](https://twitter.com/dkhamsing)\n",