-
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor XMP read and write to write immich image properties using a …
…specific namespace: xmlns:immichgo="http://ns.immich-go.com/immich-go/1.0/"
- Loading branch information
Showing
10 changed files
with
380 additions
and
250 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package convert | ||
|
||
import "strings" | ||
|
||
func BoolToString(b bool) string { | ||
if b { | ||
return "True" | ||
} | ||
return "False" | ||
} | ||
|
||
func StringToBool(s string) bool { | ||
return strings.ToLower(s) == "true" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package convert | ||
|
||
import "strconv" | ||
|
||
func IntToString(i int) string { | ||
return strconv.Itoa(i) | ||
} | ||
|
||
func StringToInt(s string) int { | ||
i, _ := strconv.Atoi(s) | ||
return i | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,35 @@ | ||
<?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'?> | ||
<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='Image::ExifTool 12.97'> | ||
<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'> | ||
|
||
<rdf:Description rdf:about='' | ||
xmlns:dc='http://purl.org/dc/elements/1.1/'> | ||
<dc:description> | ||
<rdf:Alt> | ||
<rdf:li xml:lang='x-default'>C'est une <grotte></rdf:li> | ||
</rdf:Alt> | ||
</dc:description> | ||
</rdf:Description> | ||
|
||
<rdf:Description rdf:about='' | ||
xmlns:digiKam='http://www.digikam.org/ns/1.0/'> | ||
<digiKam:TagsList> | ||
<rdf:Seq> | ||
<rdf:li>activities/spleleo</rdf:li> | ||
<rdf:li>airshow</rdf:li> | ||
</rdf:Seq> | ||
</digiKam:TagsList> | ||
</rdf:Description> | ||
|
||
<rdf:Description rdf:about='' | ||
xmlns:exif='http://ns.adobe.com/exif/1.0/'> | ||
<exif:GPSLatitude>16,33.10142023S</exif:GPSLatitude> | ||
<exif:GPSLongitude>62,40.48970971W</exif:GPSLongitude> | ||
</rdf:Description> | ||
|
||
<rdf:Description rdf:about='' | ||
xmlns:tiff='http://ns.adobe.com/tiff/1.0/'> | ||
<tiff:ImageDescription> | ||
<rdf:Alt> | ||
<rdf:li xml:lang='x-default'>C'est une <grotte></rdf:li> | ||
</rdf:Alt> | ||
</tiff:ImageDescription> | ||
</rdf:Description> | ||
|
||
<rdf:Description rdf:about='' | ||
xmlns:xmp='http://ns.adobe.com/xap/1.0/'> | ||
<xmp:Rating>5</xmp:Rating> | ||
</rdf:Description> | ||
|
||
<rdf:Description rdf:about="" xmlns:dc="http://purl.org/dc/elements/1.1/"> | ||
<dc:relation> | ||
<rdf:Bag> | ||
<rdf:li>Vacation 2024</rdf:li> | ||
<rdf:li>Family Reunion</rdf:li> | ||
</rdf:Bag> | ||
</dc:relation> | ||
</rdf:Description> | ||
|
||
</rdf:RDF> | ||
</x:xmpmeta> | ||
<?xpacket end='w'?> | ||
<x:xmpmeta xmlns:x="adobe:ns:meta/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:exif="http://ns.adobe.com/exif/1.0/" xmlns:xmp="http://ns.adobe.com/xap/1.0/" xmlns:tiff="http://ns.adobe.com/tiff/1.0/" xmlns:digikam="http://www.digikam.org/ns/1.0/" xmlns:immichgo="http://ns.immich-go.com/immich-go/1.0/" x:xmptk="immich-go version:dev, commit:none, date:unknown"> | ||
<rdf:RDF> | ||
<rdf:Description> | ||
<immichgo:ImmichGoProperties> | ||
<immichgo:title>This is a title</immichgo:title> | ||
<immichgo:DateTimeOriginal>2023-10-10T01:11:00.000-04:00</immichgo:DateTimeOriginal> | ||
<immichgo:trashed>False</immichgo:trashed> | ||
<immichgo:archived>False</immichgo:archived> | ||
<immichgo:fromPartner>False</immichgo:fromPartner> | ||
<immichgo:favorite>True</immichgo:favorite> | ||
<immichgo:rating>3</immichgo:rating> | ||
<immichgo:albums> | ||
<rdf:Bag> | ||
<rdf:Li> | ||
<immichgo:album> | ||
<immichgo:title>Vacation 2024</immichgo:title> | ||
<immichgo:description>Vacation 2024 hawaii and more</immichgo:description> | ||
<immichgo:latitude>19,49.23661N</immichgo:latitude> | ||
<immichgo:longitude>155,28.39525W</immichgo:longitude> | ||
</immichgo:album> | ||
</rdf:Li> | ||
<rdf:Li> | ||
<immichgo:album> | ||
<immichgo:title>Family Reunion</immichgo:title> | ||
<immichgo:latitude>48,51.50221N</immichgo:latitude> | ||
<immichgo:longitude>2,17.51406E</immichgo:longitude> | ||
</immichgo:album> | ||
</rdf:Li> | ||
</rdf:Bag> | ||
</immichgo:albums> | ||
</immichgo:ImmichGoProperties> | ||
</rdf:Description> | ||
</rdf:RDF> | ||
</x:xmpmeta><?xpacket end='w'?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,17 @@ | ||
<x:xmpmeta xmlns:x="adobe:ns:meta/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | ||
xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:exif="http://ns.adobe.com/exif/1.0/" | ||
xmlns:xmp="http://ns.adobe.com/xap/1.0/" xmlns:tiff="http://ns.adobe.com/tiff/1.0/" | ||
xmlns:digikam="http://www.digikam.org/ns/1.0/" x:xmptk="immich-go v0.22"> | ||
<rdf:RDF> | ||
<rdf:Description rdf:about=""> | ||
<dc:description> | ||
<rdf:Alt> | ||
<rdf:li xml:lang="x-default">This a description</rdf:li> | ||
</rdf:Alt> | ||
</dc:description> | ||
</rdf:Description> | ||
<rdf:Description rdf:about=""> | ||
<tiff:ImageDescription> | ||
<rdf:Alt> | ||
<rdf:li xml:lang="x-default">This a description</rdf:li> | ||
</rdf:Alt> | ||
</tiff:ImageDescription> | ||
</rdf:Description> | ||
<rdf:Description rdf:about=""> | ||
<digikam:TagsList> | ||
<rdf:Seq> | ||
<rdf:li xml:lang="x-default">tag1</rdf:li> | ||
<rdf:li xml:lang="x-default">tag2/tag21</rdf:li> | ||
<rdf:li xml:lang="x-default">tag3</rdf:li> | ||
</rdf:Seq> | ||
</digikam:TagsList> | ||
</rdf:Description> | ||
<rdf:Description rdf:about=""> | ||
<exif:DateTimeOriginal>2023-10-10T01:11:00.000-04:00</exif:DateTimeOriginal> | ||
<exif:GPSLatitude>16,33.10142023S</exif:GPSLatitude> | ||
<exif:GPSLongitude>62,40.48970971W</exif:GPSLongitude> | ||
</rdf:Description> | ||
<rdf:Description rdf:about=""> | ||
<xmp:Rating>3</xmp:Rating> | ||
</rdf:Description> | ||
</rdf:RDF> | ||
</x:xmpmeta> | ||
<?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'?> | ||
<x:xmpmeta xmlns:x="adobe:ns:meta/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:exif="http://ns.adobe.com/exif/1.0/" xmlns:xmp="http://ns.adobe.com/xap/1.0/" xmlns:tiff="http://ns.adobe.com/tiff/1.0/" xmlns:digikam="http://www.digikam.org/ns/1.0/" xmlns:immichgo="http://ns.immich-go.com/immich-go/1.0/" x:xmptk="immich-go version:dev, commit:none, date:unknown"> | ||
<rdf:RDF> | ||
<rdf:Description> | ||
<immichgo:ImmichGoProperties> | ||
<immichgo:DateTimeOriginal>0001-01-01T00:00:00.000+00:00</immichgo:DateTimeOriginal> | ||
<immichgo:trashed>False</immichgo:trashed> | ||
<immichgo:archived>False</immichgo:archived> | ||
<immichgo:fromPartner>False</immichgo:fromPartner> | ||
<immichgo:favorite>False</immichgo:favorite> | ||
<immichgo:rating>5</immichgo:rating> | ||
<immichgo:latitude>16,33.10142S</immichgo:latitude> | ||
<immichgo:longitude>62,40.48971W</immichgo:longitude> | ||
</immichgo:ImmichGoProperties> | ||
</rdf:Description> | ||
</rdf:RDF> | ||
</x:xmpmeta><?xpacket end='w'?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.