Add Fate/Samurai Remnant release day counter

This commit is contained in:
Alibek Omarov 2023-08-21 03:13:17 +03:00
parent 07722e276a
commit 41407e7387

View File

@ -1,5 +1,6 @@
#!/usr/bin/env python #!/usr/bin/env python
from datetime import date
import json import json
import os import os
import requests as r import requests as r
@ -76,6 +77,14 @@ def compose_text(data):
percent = d['edited'] / float(d['all']) * 100.0 percent = d['edited'] / float(d['all']) * 100.0
text += '%s: %.2f%% (%d/%d) %s\n' % (k, percent, d['edited'], d['all'], mark) 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:
text += '\n\n%d days until Fate/Samurai Remnant release' % days_until_fsr
elif days_until_fsr == 0:
text += '\n\nFate/Samurai Remnant is going to be released TODAY! 🎉'
elif days_until_fsr > -14:
text += '\n\nFate/Samurai Remnant was released few days ago, did you played it yet?'
return text return text
def main(): def main():