Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Observe license from publication.cfg
  • Loading branch information
kthoden committed Sep 25, 2020
1 parent 53f737f commit e460896
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/imxml2epub.py
Expand Up @@ -595,9 +595,16 @@ xmlPublisher = etree.Element("{http://purl.org/dc/elements/1.1/}publisher")
xmlPublisher.text = "Edition Open Access"
xmlMetadata.append(xmlPublisher)
# Prepare Rights
xmlPublisher = etree.Element("{http://purl.org/dc/elements/1.1/}rights")
xmlPublisher.text = "Published under Creative Commons by-nc-sa 3.0 Germany Licence"
xmlMetadata.append(xmlPublisher)
str_license = cfgPublication.get("Technical", "License")
xml_license = etree.Element("{http://purl.org/dc/elements/1.1/}rights")
if str_license == "by-nc-sa":
xml_license.text = """Published under Creative Commons by-nc-sa 3.0 Germany Licence"""
elif str_license == "by-sa":
xml_license.text = """Published under Creative Commons Attribution-ShareAlike 4.0 International Licence"""
else:
logging.error("No license found. Exiting")
sys.exit( 1 )
xmlMetadata.append(xml_license)
# Prepare Source
xmlSource = etree.Element("{http://purl.org/dc/elements/1.1/}source")
xmlSource.text = "Max Planck Research Library for the History and Development of Knowledge"
Expand Down

0 comments on commit e460896

Please sign in to comment.