]>
Raphaël G. Git Repositories - youtubedl/blob - devscripts/gh-pages/update-copyright.py
4 from __future__
import with_statement
, unicode_literals
8 import io
# For Python 2 compatibility
12 year
= str(datetime
.datetime
.now().year
)
13 for fn
in glob
.glob('*.html*'):
14 with io
.open(fn
, encoding
='utf-8') as f
:
16 newc
= re
.sub(r
'(?P<copyright>Copyright © 2006-)(?P<year>[0-9]{4})', 'Copyright © 2006-' + year
, content
)
19 with io
.open(tmpFn
, 'wt', encoding
='utf-8') as outf
: