From deeaa81260253a473ff6521b951d82f8afcf5dd4 Mon Sep 17 00:00:00 2001 From: Rohit Tanwar Date: Sun, 21 Jan 2018 13:21:45 +0530 Subject: [PATCH] EMOJID --- README.md | 6 +++--- scripts/readme.py | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e0aeb962d..e2a0dcf1f 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ **Note**:- This is in no way affiliated with the original [30-seconds-of-code](https://github.com/Chalarangelo/30-seconds-of-code/). -# :books: list +# :books: List ### chunk @@ -198,7 +198,7 @@ zip(['a', 'b'], [1, 2], [True, False]) # [['a', 1, True], ['b', 2, False]] zip(['a'], [1, 2], [True, False]) # [['a', 1, True], [None, 2, False]] zip(['a'], [1, 2], [True, False], fill_value = '_') # [['a', 1, True], ['_', 2, False]] ``` -# :scroll: string +# :scroll: String ### count_vowels @@ -222,7 +222,7 @@ count_vowels('foobar') # 3 count_vowels('gym') # 0 ``` -# :heavy_division_sign: math +# :heavy_division_sign: Math ### gcd diff --git a/scripts/readme.py b/scripts/readme.py index bbec3ebdd..2aafc9e8b 100644 --- a/scripts/readme.py +++ b/scripts/readme.py @@ -1,4 +1,6 @@ import os +def title_case(str): + return str[:1].upper() + str[1:].lower() EMOJIS = { 'adapter': ':electric_plug:', 'list': ':books:', @@ -32,7 +34,7 @@ end = open("static-parts/readme-end.md").read() toAppend = '' tag_dict = tagger() for category in tag_dict: - toAppend = toAppend + '# ' + EMOJIS[category] + ' ' + category +'\n\n' + toAppend = toAppend + '# ' + EMOJIS[category] + ' ' + title_case(category) +'\n\n' for snippet in tag_dict[category]: someFile = open("snippets/" + snippet + '.md') fileData = someFile.read()