aboutsummaryrefslogtreecommitdiffstats
path: root/devscripts/gh-pages/update-copyright.py
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2021-06-09 12:23:42 -0500
committerJesús <heckyel@hyperbola.info>2021-06-09 12:23:42 -0500
commitff87b367dce059d04f3f1dc11000553a065f8f0f (patch)
treecac7ecfc0ff70c036c84e22acc8dc10279d22f06 /devscripts/gh-pages/update-copyright.py
parentc2350cac243ba1ec1586fe85b0d62d1b700047a2 (diff)
downloadhypervideo-pre-ff87b367dce059d04f3f1dc11000553a065f8f0f.tar.lz
hypervideo-pre-ff87b367dce059d04f3f1dc11000553a065f8f0f.tar.xz
hypervideo-pre-ff87b367dce059d04f3f1dc11000553a065f8f0f.zip
brand
Diffstat (limited to 'devscripts/gh-pages/update-copyright.py')
-rwxr-xr-xdevscripts/gh-pages/update-copyright.py21
1 files changed, 0 insertions, 21 deletions
diff --git a/devscripts/gh-pages/update-copyright.py b/devscripts/gh-pages/update-copyright.py
deleted file mode 100755
index 61487f925..000000000
--- a/devscripts/gh-pages/update-copyright.py
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/usr/bin/env python
-# coding: utf-8
-
-from __future__ import with_statement, unicode_literals
-
-import datetime
-import glob
-import io # For Python 2 compatibility
-import os
-import re
-
-year = str(datetime.datetime.now().year)
-for fn in glob.glob('*.html*'):
- with io.open(fn, encoding='utf-8') as f:
- content = f.read()
- newc = re.sub(r'(?P<copyright>Copyright © 2011-)(?P<year>[0-9]{4})', 'Copyright © 2011-' + year, content)
- if content != newc:
- tmpFn = fn + '.part'
- with io.open(tmpFn, 'wt', encoding='utf-8') as outf:
- outf.write(newc)
- os.rename(tmpFn, fn)