We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3899e4f commit 80bba96Copy full SHA for 80bba96
cache.appcache
@@ -1,6 +1,7 @@
1
CACHE MANIFEST
2
3
# Adds the ability to play the game offline.
4
+# Updated: 2017-10-18 23:58:47.587
5
6
# Main page
7
index.html
sw.js
update.py
@@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+import datetime
+import re
+def format_time():
+ t = datetime.datetime.now()
+ s = t.strftime('%Y-%m-%d %H:%M:%S.%f')
+ tail = s[-7:]
8
+ f = round(float(tail), 3)
9
+ temp = "%.3f" % f
10
+ return "# Updated: "+"%s%s" % (s[:-7], temp[1:])
11
+
12
+if __name__=="__main__":
13
+ file=open("cache.appcache","r")
14
+ data=file.read()
15
+ file.close()
16
+ data=re.sub(r'# Updated:.*',format_time(),data)
17
+ new_file=open("cache.appcache","w")
18
+ new_file.write(data)
19
+ new_file.close()
20
0 commit comments