diff --git a/src/imxml2epub.py b/src/imxml2epub.py index cb255ba..1a5ab36 100755 --- a/src/imxml2epub.py +++ b/src/imxml2epub.py @@ -595,9 +595,16 @@ def add_css_snippet(css_snippet, css_file): 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"