Kartenimport, Metadaten und Versand absichern
This commit is contained in:
1 parent
be6bd49da5
commit
427b6fa7b0
18 files changed
+643
-193
No files matched your search
@@ -111,7 +111,7 @@ public struct MetadataWriter: Sendable {
|
||||
var args = ["-XMP-photoshop:DateCreated=\(datePart)\(timePart.isEmpty ? "" : " " + timePart)"]
|
||||
if writeIIM {
|
||||
args.append("-IPTC:DateCreated=\(datePart)")
|
||||
if !timePart.isEmpty { args.append("-IPTC:TimeCreated=\(timePart)") }
|
||||
args.append("-IPTC:TimeCreated=\(timePart)")
|
||||
}
|
||||
return args
|
||||
}
|
||||
|
||||
@@ -127,6 +127,7 @@ public enum PMSettingsImporter {
|
||||
let n = raw.lowercased().replacingOccurrences(of: " ", with: "").replacingOccurrences(of: "_", with: "")
|
||||
.replacingOccurrences(of: "-", with: "").replacingOccurrences(of: "/", with: "")
|
||||
guard !n.isEmpty else { return nil }
|
||||
if let field = IPTCField.all.first(where: { $0.id.lowercased() == n }) { return field }
|
||||
let aliases: [String: String] = ["captionabstract": "caption", "description": "caption", "caption": "caption",
|
||||
"byline": "creator", "photographer": "creator", "sublocation": "sublocation",
|
||||
"location": "sublocation", "provincestate": "state", "stateprovince": "state",
|
||||
@@ -137,7 +138,7 @@ public enum PMSettingsImporter {
|
||||
return IPTCField.all.first { f in
|
||||
let pm = f.pmLabel.lowercased().replacingOccurrences(of: " ", with: "").replacingOccurrences(of: "/", with: "")
|
||||
.replacingOccurrences(of: "'", with: "").replacingOccurrences(of: ".", with: "")
|
||||
return f.id.lowercased() == n || pm == n || (f.iimTag?.lowercased().replacingOccurrences(of: "iptc:", with: "")
|
||||
return pm == n || (f.iimTag?.lowercased().replacingOccurrences(of: "iptc:", with: "")
|
||||
.replacingOccurrences(of: "-", with: "") == n)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user