Skip to content

Commit 156beca

Browse files
authored
Add update time
1 parent 7b67886 commit 156beca

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/scripts/tx_stat.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import json
22
import os
33
import urllib.request
4+
from datetime import datetime
45

56
key = os.environ.get('TX_TOKEN')
67
project = os.environ.get('TX_PROJECT')
@@ -26,4 +27,7 @@
2627
total = total + resourse['attributes']['total_strings']
2728

2829
p = '{:.2%}'.format(translated/total)
29-
print(json.dumps({'translation':p}))
30+
print(json.dumps({
31+
'translation':p,
32+
'updated_at':datetime.utcnow().isoformat(timespec='seconds') + 'Z',
33+
}))

0 commit comments

Comments
 (0)