Skip to content

Commit 7893eea

Browse files
committed
use spdx ids
1 parent cb6d85f commit 7893eea

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

csv2cmi.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@
4040

4141
# define licenses
4242
LICENSES = {
43-
"cc-by": {
43+
"CC-BY-4.0": {
4444
"url": "https://creativecommons.org/licenses/by/4.0/",
4545
"text": "This file is licensed under the terms of the Creative-Commons-License CC-BY 4.0.",
4646
},
47-
"cc0": {
47+
"CC0-1.0": {
4848
"url": "https://creativecommons.org/publicdomain/zero/1.0/",
4949
"text": "This file has been marked as dedicated to the public domain.",
5050
},
@@ -165,7 +165,7 @@ def create_file_desc(self, project: configparser) -> None:
165165
SubElement(tei_publication_stmt, "date").set("when", str(datetime.now().isoformat()))
166166
availability = SubElement(tei_publication_stmt, "availability")
167167
tei_licence = SubElement(availability, "licence")
168-
chosen_license = LICENSES.get(project.get("Project", "license", fallback="cc-by").lower())
168+
chosen_license = LICENSES.get(project.get("Project", "license", fallback="CC-BY-4.0"))
169169
tei_licence.set("target", chosen_license.get("url"))
170170
tei_licence.text = chosen_license["text"]
171171

@@ -541,7 +541,7 @@ def save_to_file(self, file_name: Path) -> None:
541541
# set default values
542542
config["Project"] = {"fileURL": letters_csv.with_suffix(".xml")}
543543
if args.cc0:
544-
config["Project"]["license"] = "cc0"
544+
config["Project"]["license"] = "CC0-1.0"
545545

546546
INI_FILE = "csv2cmi.ini"
547547
try:

0 commit comments

Comments
 (0)