diff --git a/README.md b/README.md index 167ea57..e8e45ae 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,9 @@ ![Project Preview](https://user-images.githubusercontent.com/25841814/79395484-5081ae80-7fac-11ea-9e27-ac91472e31dd.png)

- + ![Project Preview](https://user-images.githubusercontent.com/15426564/88030180-8e1c4780-cb58-11ea-8a8b-b3576dd73652.png) - +

📌✨Awesome Readme Stats

@@ -125,6 +125,8 @@ jobs: `SHOW_UPDATED_DATE` flag can be set to `True` to show updated date in end of paragraph +`UPDATED_DATE_FORMAT` flag can be set to put updated date into a format, default is `"%d/%m/%Y %H:%M:%S"` + `SHOW_LINES_OF_CODE` flag can be set to `True` to show the Lines of code writen till date ![Lines of code](https://img.shields.io/badge/From%20Hello%20World%20I've%20written-1.3%20million%20Lines%20of%20code-blue) diff --git a/action.yml b/action.yml index 80b7f18..c1a833d 100644 --- a/action.yml +++ b/action.yml @@ -97,6 +97,11 @@ inputs: description: "Show updated date" default: "True" + UPDATED_DATE_FORMAT: + required: false + description: "Updated date format" + default: "%d/%m/%Y %H:%M:%S" + SHOW_TOTAL_CODE_TIME: required: false description: "Show Total Time you have coded" diff --git a/main.py b/main.py index ffa5c14..99c3866 100644 --- a/main.py +++ b/main.py @@ -46,6 +46,7 @@ locale = os.getenv('INPUT_LOCALE') commit_by_me = os.getenv('INPUT_COMMIT_BY_ME') ignored_repos_name = str(os.getenv('INPUT_IGNORED_REPOS') or '').replace(' ', '').split(',') show_updated_date = os.getenv('INPUT_SHOW_UPDATED_DATE') +updated_date_format = os.getenv('INPUT_UPDATED_DATE_FORMAT') commit_message = os.getenv('INPUT_COMMIT_MESSAGE') show_total_code_time = os.getenv('INPUT_SHOW_TOTAL_CODE_TIME') symbol_version = os.getenv('INPUT_SYMBOL_VERSION').strip() @@ -518,7 +519,7 @@ def get_stats(github): if show_updated_date.lower() in truthy: now = datetime.datetime.utcnow() - d1 = now.strftime("%d/%m/%Y %H:%M:%S") + d1 = now.strftime(updated_date_format) stats = stats + "\n Last Updated on " + d1 + " UTC" return stats