Compare commits

..

18 Commits

Author SHA1 Message Date
9797bad66a src/MDConcEntryTypes.php aktualisiert
Den Import-Error auslösenden Begriff "spende" auf "1: Donation" gesetzt.
2026-03-24 09:40:45 +01:00
08d71ac7f4 Extend mapping for alternative titles 2026-03-23 18:12:43 +01:00
019817f54e Extend concordance lists 2026-03-19 17:49:09 +01:00
45e2dc20f2 Map Beschriftung (mittig) 2026-03-16 19:39:28 +01:00
f5b6dbb106 Merge pull request 'ufladerer-patch-1' (#18) from ufladerer-patch-1 into master
Reviewed-on: #18
2026-02-19 14:19:34 +01:00
718e915218 src/MDConcLicenses.php aktualisiert 2026-02-19 11:20:00 +01:00
47c59c0222 src/MDConcLicenses.php aktualisiert
added new rights statements
2026-02-19 11:12:38 +01:00
4a9f51761b Map further concordances 2026-02-17 23:21:34 +01:00
c2912644f9 Extend mapping 2026-02-09 18:11:18 +01:00
5dcfbaa0a1 Ignore fully numeric inputs in MDConcObjectTagRelTypes, map them to
general tags
2026-02-06 00:20:00 +01:00
7630e46a36 src/MDConcEntryTypes.php aktualisiert
Merge pull request 'src/MDConcEntryTypes.php aktualisiert' (#17) from cpitzen-patch-1 into master
Reviewed-on: #17
2026-01-22 18:23:44 +01:00
36db6f2213 src/MDConcEntryTypes.php aktualisiert 2026-01-21 15:40:01 +01:00
be5a2b84a8 Extend MDConcMarkingType 2025-12-22 18:22:54 +01:00
312826259e Update concordance lists 2025-12-17 16:49:47 +01:00
7ea8d14689 Add quotes around error-causing text / unmapped value in MDImporterMissingConcordance 2025-12-17 15:44:35 +01:00
38a732de6d Extend concordance lists 2025-12-16 12:38:45 +01:00
1c2c25f45b Map "zugeschrieben an" 2025-12-15 17:31:26 +01:00
1ce75c2c9c Add function for getting and cleaning missing concordance list 2025-12-15 17:29:00 +01:00
10 changed files with 85 additions and 8 deletions

View File

@@ -11,6 +11,33 @@ final class MDImporterMissingConcordance extends Exception {
/** @var array<string, array<string>> */
private static array $_missing_concordances = [];
public static bool $suppress_shutdown_function = false;
private static bool $_shutdown_function_registered = false;
/**
* Gets the text for registering shutdown functions.
*
* @return string
*/
public static function getCleanMissingConcordanceReport():string {
if (empty(self::$_missing_concordances)) return '';
$output = PHP_EOL . PHP_EOL . "There are unmapped concordances. Please map them before proceeding." . PHP_EOL . "You may use https://concordance.museum-digital.org/ to do the mapping" . PHP_EOL . PHP_EOL;
foreach (self::$_missing_concordances as $key => $values) {
sort($values);
$output .= PHP_EOL . PHP_EOL . $key . PHP_EOL . PHP_EOL;
$output .= implode(PHP_EOL, array_unique($values));
}
$output .= PHP_EOL;
// Reset missing concordance report.
self::$_missing_concordances = [];
return $output;
}
/**
* Sets up an error.
@@ -24,17 +51,14 @@ final class MDImporterMissingConcordance extends Exception {
if (class_exists("MD_IMPORTER_CONF") && MD_IMPORTER_CONF::$dry_run === true) {
if (empty(self::$_missing_concordances)) {
if (self::$_shutdown_function_registered === false) {
// Register printing at the end
register_shutdown_function(function() {
echo PHP_EOL . PHP_EOL . "There are unmapped concordances. Please map them before proceeding." . PHP_EOL . "You may use https://concordance.museum-digital.org/ to do the mapping" . PHP_EOL . PHP_EOL;
foreach (self::$_missing_concordances as $key => $values) {
sort($values);
echo PHP_EOL . PHP_EOL . $key . PHP_EOL . PHP_EOL;
echo implode(PHP_EOL, array_unique($values));
}
if (self::$suppress_shutdown_function === true) return;
echo self::getCleanMissingConcordanceReport();
});
self::$_shutdown_function_registered = true;
}
@@ -46,7 +70,7 @@ final class MDImporterMissingConcordance extends Exception {
}
$exception = new MDImporterMissingConcordance("Unmapped specific value of type " . $target_type . ": " . $value_to_map . PHP_EOL . "Please consult https://concordance.museum-digital.org for filling out missing concordances");
$exception = new MDImporterMissingConcordance("Unmapped specific value of type " . $target_type . ": '" . $value_to_map . '\'' . PHP_EOL . "Please consult https://concordance.museum-digital.org for filling out missing concordances");
$exception->target_type = $target_type;
$exception->value_to_map = $value_to_map;

View File

@@ -332,6 +332,7 @@ final class MDConcActor implements MDImporterConcordanceListInterface {
"nach" => 4,
'Original / Vorlage' => 4,
'Original / Vorlage zu' => 4,
'Kopie nach / Orginal Figurengruppe' => 4,
"Schöpfer der Vorlage" => 4,
"Schöpferin der Vorlage" => 4,
"Schöpfer*in der Vorlage" => 4,
@@ -515,6 +516,7 @@ final class MDConcActor implements MDImporterConcordanceListInterface {
"Maler*in" => 9,
'Maler/in' => 9, // painted by
"Malerin, Grafikerin" => 9,
"Maler (zugeschrieben)" => 9,
"Malermeister" => 9,
"Malermeisterin" => 9,
"Malermeister*in" => 9,
@@ -609,6 +611,7 @@ final class MDConcActor implements MDImporterConcordanceListInterface {
"Lithographie" => 12,
"Lithographin" => 12,
"Lithograph*in" => 12,
"Lithograph & Verleger" => 12,
"Radierer" => 12,
"Radiererin" => 12,
"Radierer*in" => 12,
@@ -1026,6 +1029,7 @@ final class MDConcActor implements MDImporterConcordanceListInterface {
"Exilpolitiker" => 23,
'Impulsgebende Person' => 23,
"zugeschrieben" => 23,
"zugeschrieben an" => 23,
"Feldwebel" => 23,
"Feuerwehrmann im 2. Weltkrieg" => 23,

View File

@@ -33,6 +33,9 @@ final class MDConcCertainty implements MDImporterConcordanceListInterface {
'zugeschriebe' => false,
'zugeschrieben' => false,
'zugeschrieben an' => false,
'Ausführung' => false,
'Entwurf' => false,
'geschätzt / unsicher / vermutet' => false,
// Certain

View File

@@ -66,6 +66,7 @@ final class MDConcEntryTypes implements MDImporterConcordanceListInterface {
"Geschenk (Lederscheide" => "1",
"Geschenk 20.10.03" => "1",
"Schenkung" => "1",
"Schenkung / Spende" => "1",
"Schenkung/abgeschr. B. DHM" => "1",
"Schenkung an die Stadt Ravensburg" => "1",
"Schenkung & Nachlass lt. Testament vom 18.09.2001" => "1",
@@ -93,6 +94,9 @@ final class MDConcEntryTypes implements MDImporterConcordanceListInterface {
"Schenkung/abgeschr.B. DHM" => "1",
"Sachspende" => "1",
"Spende" => "1",
"spende" => "1",
"Sepnde" => "1",
"Spene" => "1",
"Anonyme Spende" => "1",
"Kostenlose" => "1",
"Überlassung" => "1",

View File

@@ -46,6 +46,7 @@ final class MDConcLicenses implements MDImporterConcordanceListInterface {
"https://creativecommons.org/licenses/by/4.0/deed.de" => "CC BY",
"Namensnennung 4.0. International (CC BY 4.0)" => "CC BY",
"Namensnennung 4.0 International - CC BY 4.0" => "CC BY",
"Namensnennung 4.0 International - (CC BY 4.0)" => "CC BY",
"CC BY SA" => "CC BY-SA",
"CC BY-SA-" => "CC BY-SA",
@@ -82,6 +83,7 @@ final class MDConcLicenses implements MDImporterConcordanceListInterface {
"https://creativecommons.org/licenses/by-sa/4.0/deed.de" => "CC BY-SA",
"Namensnennung - Weitergabe unter gleichen Bedingungen 4.0 International (CC BY-SA 4.0)" => "CC BY-SA",
"Namensnennung 4.0 International (CC BY 4.0)" => "CC BY-SA",
"CC BY-SA 4.0 - Namensnennung, Weitergabe unter gleichen Bedingungen" => "CC BY-SA",
"CC BY_NC" => "CC BY-NC",
"CC_BY_NC" => "CC BY-NC",
@@ -89,6 +91,7 @@ final class MDConcLicenses implements MDImporterConcordanceListInterface {
"CC.BY-NC" => "CC BY-NC",
"http://creativecommons.org/licenses/by-nc/4.0/" => "CC BY-NC",
"https://creativecommons.org/licenses/by-nc/4.0/" => "CC BY-NC",
"CC BY-NC 4.0 - Namensnennung, nicht kommerziell, keine Bearbeitung" => "CC BY-NC",
"CC BY_NC_SA" => "CC BY-NC-SA",
"CC_BY_NC_SA" => "CC BY-NC-SA",
@@ -103,6 +106,7 @@ final class MDConcLicenses implements MDImporterConcordanceListInterface {
"http://creativecommons.org/licenses/by-nc-sa/4.0/" => "CC BY-NC-SA",
"https://creativecommons.org/licenses/by-nc-sa/4.0/" => "CC BY-NC-SA",
"Namensnennung - Nicht kommerziell - Weitergabe unter gleichen Bedingungen 4.0 International (CC BY-NC-SA 4.0)" => "CC BY-NC-SA",
"CC BY-NC-SA 4.0 - Namensnennung, nicht kommerziell, Weitergabe unter gleichen Bedingungen" => "CC BY-NC-SA",
"CC BY_NC_ND" => "CC BY-NC-ND",
"CC_BY_NC_ND" => "CC BY-NC-ND",
@@ -115,6 +119,8 @@ final class MDConcLicenses implements MDImporterConcordanceListInterface {
"https://creativecommons.org/licenses/by-nc-nd/4.0/deed.de" => "CC BY-NC-ND",
"https://creativecommons.org/licenses/by-nc-nd/3.0/de/" => "CC BY-NC-ND",
"CC BY-ND 4.0 - Namensnennung, Keine Bearbeitungen 4.0" => "CC BY-ND",
"https://www.deutsche-digitale-bibliothek.de/content/lizenzen/rv-fz" => "RR-F",
"https://www.deutsche-digitale-bibliothek.de/content/lizenzen/rv-fz/" => "RR-F",
"https//www.deutsche-digitale-bibliothek.de/content/lizenzen/rv-fz" => "RR-F",

View File

@@ -102,8 +102,10 @@ final class MDConcMarkingPosition implements MDImporterConcordanceListInterface
"unterer Bildrand rechts" => "bottom_right",
"Bildrand rechts unten" => "bottom_right",
"Rechts unten" => "bottom_right",
"rechts unten" => "bottom_right",
"Unten rechts" => "bottom_right",
"unten rechts" => "bottom_right",
"untenb rechts" => "bottom_right",
// Top Left
"linker, oberer Bildrand" => "top_left",

View File

@@ -40,6 +40,7 @@ final class MDConcMarkingType implements MDImporterConcordanceListInterface {
"handschriftlich - Beschriftung durch Hersteller*in" => "handwritten",
"Beschriftung" => "handwritten",
"Beschriftung (handschriftlich)" => "handwritten",
"Beschriftung (mittig)" => "handwritten",
"Beschriftung (spiegelverkehrt und gedreht)" => "handwritten",
"Beschriftung (spiegelverkehrt)" => "handwritten",
"Beschriftung auf Montierung (handschriftlich)" => "handwritten",
@@ -288,6 +289,7 @@ final class MDConcMarkingType implements MDImporterConcordanceListInterface {
"Beschriftung auf Schmuckrahmen (gedruckt)" => "overprint",
"Datierung (gedruckt)" => "overprint",
"Titel (gedruckt)" => "overprint",
"Titel (gedruckt)" => "overprint",
"Wappen (gedruckt)" => "overprint",
"Widmung (gedruckt)" => "overprint",
@@ -355,6 +357,7 @@ final class MDConcMarkingType implements MDImporterConcordanceListInterface {
"Nummer graviert, gedruckt" => "engraving",
"eingraviert und geätzt" => "engraving",
"Schnitt" => "engraving",
"Beschriftung (graviert)" => "engraving",
# Screwed on
"angeschraubt" => "screwed",
@@ -385,6 +388,7 @@ final class MDConcMarkingType implements MDImporterConcordanceListInterface {
"Prägung" => "embossing",
"geflechelt" => "embossing",
"Inschrift, geprägt" => "embossing",
"Signatur (geprägt)" => "embossing",
"schwarze Prägung" => "embossing",
"aufgesetzt und genutet, eingeprägt" => "embossing",
"mit eingeprägtem Golddruck" => "embossing",
@@ -462,11 +466,14 @@ final class MDConcMarkingType implements MDImporterConcordanceListInterface {
"Signatur (gemalt)" => "signature",
"Signatur (gezeichnet)" => "signature",
"Gez. u. gest. v. F. Foltz in Darmstadt., Andernach." => "signature",
"Signatur mit Datierung" => "signature",
"Signatur mit Datierung (handschriftlich)" => "signature",
"Signatur mit Datierung (gedruckt)" => "signature",
"Signatur mit Datierung (gemalt)" => "signature",
"Signatur mit Datierung (gestempelt)" => "signature",
"Signatur mit Datierung (gezeichnet)" => "signature",
"Signatur mit Datierung (gedruckt)" => "signature",
"Signatur und Datierung (gedruckt)" => "signature",
"Signatur mit Datum (handschriftlich)" => "signature",
"Signatur mit Datum (gedruckt)" => "signature",
"Signatur mit Datum (gemalt)" => "signature",

View File

@@ -189,6 +189,7 @@ final class MDConcMeasurementTypes implements MDImporterConcordanceListInterface
"Höhe (Heft)",
"Höhe (Foto)",
"Höhe (Dose)",
"Höhe (Außenmaß)",
"Höhe (netto)",
"Höhe (a mit b-d)",
"Höhe (e)",
@@ -373,6 +374,7 @@ final class MDConcMeasurementTypes implements MDImporterConcordanceListInterface
"Höhe (a)",
"Höhe (a mit b)",
'Höhe (Passepartout)',
'Höhe (Passepartout Standardformat)',
'Höhe (Unterlage)',
'Höhe (Buch)',
'Höhe (Jeder Druck)',
@@ -449,6 +451,7 @@ final class MDConcMeasurementTypes implements MDImporterConcordanceListInterface
"Tiefe max",
"Tiefe/Länge (Objekt)",
"Außenmaß (Tiefe)",
"Tiefe (Außenmaß)",
"Teife",
"length",
"Länge (1b)",
@@ -541,6 +544,7 @@ final class MDConcMeasurementTypes implements MDImporterConcordanceListInterface
"Breite (Etui)",
"Breite (Heft)",
"Breite (netto)",
"Breite (Außenmaß)",
"Breite (Foto)",
"Breite (a)",
"Breite (S 7069a)",
@@ -629,6 +633,7 @@ final class MDConcMeasurementTypes implements MDImporterConcordanceListInterface
'Breite (Einleger 20)',
'Breite (Einleger 21)',
'Breite (Passepartout)',
'Breite (Passepartout Standardformat)',
'Breite (Unterlage)',
'Breite (Buch)',
'Breite (Dose)',
@@ -779,6 +784,7 @@ final class MDConcMeasurementTypes implements MDImporterConcordanceListInterface
"Höhe (Platte/Bild)",
"Höhe (Druckstock/Bild)",
"Höhe max (Darstellung)",
"Höhe max (Platte/Bild)",
"Höhe (Chine collé)",
"Höhe (Batt)",
"Bildmass (Höhe)" => MDMeasurementType::height_image_size,
@@ -794,6 +800,7 @@ final class MDConcMeasurementTypes implements MDImporterConcordanceListInterface
"Breite (Bild/Platte)",
"Breite (Druckstock/Bild)",
"Breite max (Darstellung)",
"Breite max (Platte/Bild)",
"Breite (Chine collé)",
"Bildmass (Breite)" => MDMeasurementType::width_image_size,
@@ -821,6 +828,8 @@ final class MDConcMeasurementTypes implements MDImporterConcordanceListInterface
"Rahmenmass (Tiefe)" => MDMeasurementType::length_frame,
"Höhe min.",
'Höhe min (Darstellung)',
'Höhe min (Druckstock)',
'Höhe min (Blatt)',
'Höhe min (Platte)',
'Höhe min (Einleger)',
@@ -829,11 +838,14 @@ final class MDConcMeasurementTypes implements MDImporterConcordanceListInterface
'Höhe min (Einleger 3)',
'Höhe min (Einleger 4)',
'Höhe min (Einleger 5)',
"Höhe min (Platte/Bild)",
'Höhe min (Schuber)' => MDMeasurementType::height_min,
"Höhe max.",
'Höhe max (Darstellung)',
'Höhe max (Blatt)',
'Höhe max (Platte)',
'Höhe max (Druckstock)',
'Höhe max (Einleger)',
'Höhe max (Einleger 1)',
'Höhe max (Einleger 2)',
@@ -856,6 +868,8 @@ final class MDConcMeasurementTypes implements MDImporterConcordanceListInterface
'Breite min (Platte)',
'Breite min (Einleger)',
'Breite min (Darstellung)',
"Breite min (Druckstock)",
"Breite min (Platte/Bild)",
'Breite min (Schuber)' => MDMeasurementType::width_min,
"Breite max.",
@@ -869,6 +883,7 @@ final class MDConcMeasurementTypes implements MDImporterConcordanceListInterface
'Breite max (Einleger 5)',
'Breite max (Einleger 4-6)',
'Breite max (Darstellung)',
"Breite max (Druckstock)",
'Breite max (Schuber)' => MDMeasurementType::width_max,
"Diameter min." => MDMeasurementType::diameter_min,

View File

@@ -103,6 +103,8 @@ final class MDConcObjectTagRelTypes implements MDImporterConcordanceListInterfac
return self::RELATION_TYPE_NAMES[trim(strtolower($input))];
}
if (is_numeric($input)) return 'tag';
if (isset(self::RELATION_TYPES_MAPPED_TO_EVENTS[strtolower($input)])) {
throw new MDImporterTagRelationTypeIsEventType("Tag-object relationship type is signifies not tags, but an event component.");
}

View File

@@ -16,6 +16,9 @@ final class MDConcTitleTypes implements MDImporterConcordanceListInterface {
// Empty
"" => "",
"Objekttitel" => "",
"Werktitel" => "",
"Werktitel deskriptiv" => "",
// Scientific names
"Science" => "Science",
@@ -33,6 +36,13 @@ final class MDConcTitleTypes implements MDImporterConcordanceListInterface {
"mundartl" => "Dialect",
"mundartlich" => "Dialect",
// Professional jargon
'Professional' => 'Professional jargon',
// Sociolect
'Sociolect' => 'Sociolect',
'Soziolekt' => 'Sociolect',
];
/**