diff --git a/main.py b/main.py index 311a3dd..1f93c8e 100755 --- a/main.py +++ b/main.py @@ -63,20 +63,28 @@ def dump_and_compare_data(new): os.rename('last.json.new', 'last.json') def compose_text(data): - text = 'Today\'s CCC Editing Progress: \n' +# text = 'Today\'s CCC Editing Progress: \n' + text = 'CCC editing is finished! 🎉' + days_until_ccc = (date(2023, 12, 25) - date.today()).days + if days_until_ccc > 0: + text += '\n\n%d days until Fate/Extra CCC translation release' % days_until_ccc + elif days_until_ccc == 0: + text += '\n\nFate/Extra CCC is going to be released TODAY! 🎉' + elif days_until_ccc > -14: + text += '\n\nFate/Extra CCC was released few days ago, did you played it yet?' - for k in data: - d = data[k] - mark = '' - if d['update']: - if d['edited'] == d['all']: - mark = '🎉' # my font can't render this emoji lul - else: - mark = '⚠️' - - percent = d['edited'] / float(d['all']) * 100.0 - - text += '%s: %.2f%% (%d/%d) %s\n' % (k, percent, d['edited'], d['all'], mark) +# for k in data: +# d = data[k] +# mark = '' +# if d['update']: +# if d['edited'] == d['all']: +# mark = '🎉' # my font can't render this emoji lul +# else: +# mark = '⚠️' +# +# percent = d['edited'] / float(d['all']) * 100.0 +# +# text += '%s: %.2f%% (%d/%d) %s\n' % (k, percent, d['edited'], d['all'], mark) days_until_fsr = (date(2023, 9, 29) - date.today()).days if days_until_fsr > 0: