From f08c8faaff874425c8157a8b77bbd6ce8270b1b7 Mon Sep 17 00:00:00 2001 From: "GONCALVES Nelson (T0025615)" Date: Thu, 21 Dec 2023 11:02:45 +0100 Subject: [PATCH] Generate identifiers in opf metadata file --- cps/tasks/metadata_backup.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cps/tasks/metadata_backup.py b/cps/tasks/metadata_backup.py index 1751feeb..c99fc91e 100644 --- a/cps/tasks/metadata_backup.py +++ b/cps/tasks/metadata_backup.py @@ -137,6 +137,10 @@ class TaskBackupMetadata(CalibreTask): identifier2 = etree.SubElement(metadata, PURL + "identifier", id="uuid_id", nsmap=NSMAP) identifier2.set(OPF + "scheme", "uuid") identifier2.text = book.uuid + for i in book.identifiers: + identifier = etree.SubElement(metadata, PURL + "identifier", nsmap=NSMAP) + identifier.set(OPF + "scheme", i.format_type()) + identifier.text = str(i.val) title = etree.SubElement(metadata, PURL + "title", nsmap=NSMAP) title.text = book.title for author in book.authors: