From 0a4712f9a8e714fcac18a2bac9e61dae12f3248d Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Sun, 21 Jun 2020 13:46:39 +0000 Subject: [PATCH] Be more thorough about file copyrights Add a copyright header to the .gitignore file with start and end years determined from its commit history. Add copyright headers for the current year to overrides.log and qa.log, and also add functionality to correlate() which adds these headers from now on. Update the copyright year on overrides.conf, which was missed in 8a37edd and later commits. All files tracked in this repository now declare a copyright and refer to the main LICENSE file for licensing terms. --- .gitignore | 4 ++++ overrides.conf | 2 +- overrides.log | 4 ++++ qa.log | 4 ++++ weather.py | 12 ++++++++++++ 5 files changed, 25 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index fb885e9..6f0f1d6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ +# Copyright (c) 2012-2020 Jeremy Stanley . Permission to +# use, copy, modify, and distribute this software is granted under terms +# provided in the LICENSE file distributed with this software. + *_old *Gaz_*_national.zip COOP-ACT.TXT diff --git a/overrides.conf b/overrides.conf index f563ebe..12825d3 100644 --- a/overrides.conf +++ b/overrides.conf @@ -1,4 +1,4 @@ -# Copyright (c) 2006-2016 Jeremy Stanley . Permission to +# Copyright (c) 2006-2020 Jeremy Stanley . Permission to # use, copy, modify, and distribute this software is granted under terms # provided in the LICENSE file distributed with this software. diff --git a/overrides.log b/overrides.log index 0e98bd9..69d3b61 100644 --- a/overrides.log +++ b/overrides.log @@ -1,3 +1,7 @@ +# Copyright (c) 2020 Jeremy Stanley . Permission to +# use, copy, modify, and distribute this software is granted under terms +# provided in the LICENSE file distributed with this software. + added zone hkz000 (+4 options) changed station cahr (+3 options) changed station cerm (+3 options) diff --git a/qa.log b/qa.log index 9454294..9ca6503 100644 --- a/qa.log +++ b/qa.log @@ -1,3 +1,7 @@ +# Copyright (c) 2020 Jeremy Stanley . Permission to +# use, copy, modify, and distribute this software is granted under terms +# provided in the LICENSE file distributed with this software. + cpxl: no description cpxl: no location ctnk: no description diff --git a/weather.py b/weather.py index ee25089..5b71fc0 100644 --- a/weather.py +++ b/weather.py @@ -1739,6 +1739,12 @@ def correlate(): if os.path.exists(overrideslog_fn): os.rename(overrideslog_fn, "%s_old"%overrideslog_fn) overrideslog_fd = codecs.open(overrideslog_fn, "w", "utf8") + import time + overrideslog_fd.write( + '# Copyright (c) %s Jeremy Stanley . Permission to\n' + '# use, copy, modify, and distribute this software is granted under terms\n' + '# provided in the LICENSE file distributed with this software.\n\n' + % time.gmtime().tm_year) overrideslog_fd.writelines(overrideslog) overrideslog_fd.close() print("done (%s overridden sections: +%s/-%s/!%s)." % ( @@ -2087,6 +2093,12 @@ def correlate(): if os.path.exists(qalog_fn): os.rename(qalog_fn, "%s_old"%qalog_fn) qalog_fd = codecs.open(qalog_fn, "w", "utf8") + import time + qalog_fd.write( + '# Copyright (c) %s Jeremy Stanley . Permission to\n' + '# use, copy, modify, and distribute this software is granted under terms\n' + '# provided in the LICENSE file distributed with this software.\n\n' + % time.gmtime().tm_year) qalog_fd.writelines(qalog) qalog_fd.close() if qalog: -- 2.11.0