From 1fd0fe5ea477ccea43c78086af440bd32dc702d8 Mon Sep 17 00:00:00 2001 From: Rhet Turnbull Date: Fri, 15 Jan 2021 13:49:26 -0800 Subject: [PATCH] Fixed XMP sidecars to conform with exiftool format, #349, #350 --- osxphotos/templates/xmp_sidecar.mako | 35 +- .../generate_search_info_test_data.py | 2 + tests/generate_sidecars_for_test.py | 113 +++ tests/search_info_test_data_10_15_7.json | 2 +- tests/sidecars/15uNd7%8RguTEgNPKHfTWw.json | 1 + tests/sidecars/15uNd7%8RguTEgNPKHfTWw.xmp | 50 ++ ...d7%8RguTEgNPKHfTWw_albums_as_keywords.json | 1 + ...Nd7%8RguTEgNPKHfTWw_albums_as_keywords.xmp | 56 ++ tests/sidecars/15uNd7%8RguTEgNPKHfTWw_ext.xmp | 50 ++ ...%8RguTEgNPKHfTWw_ignore_date_modified.json | 1 + ...uNd7%8RguTEgNPKHfTWw_keyword_template.json | 1 + ...5uNd7%8RguTEgNPKHfTWw_keyword_template.xmp | 58 ++ .../15uNd7%8RguTEgNPKHfTWw_no_tag_groups.json | 1 + ...7%8RguTEgNPKHfTWw_persons_as_keywords.json | 1 + ...d7%8RguTEgNPKHfTWw_persons_as_keywords.xmp | 52 ++ tests/sidecars/3Jn73XpSQQCluzRBMWRsMA.json | 1 + tests/sidecars/3Jn73XpSQQCluzRBMWRsMA.xmp | 57 ++ ...3XpSQQCluzRBMWRsMA_albums_as_keywords.json | 1 + ...73XpSQQCluzRBMWRsMA_albums_as_keywords.xmp | 57 ++ tests/sidecars/3Jn73XpSQQCluzRBMWRsMA_ext.xmp | 57 ++ ...pSQQCluzRBMWRsMA_ignore_date_modified.json | 1 + ...n73XpSQQCluzRBMWRsMA_keyword_template.json | 1 + ...Jn73XpSQQCluzRBMWRsMA_keyword_template.xmp | 59 ++ .../3Jn73XpSQQCluzRBMWRsMA_no_tag_groups.json | 1 + ...XpSQQCluzRBMWRsMA_persons_as_keywords.json | 1 + ...3XpSQQCluzRBMWRsMA_persons_as_keywords.xmp | 57 ++ .../6191423D-8DB8-4D4C-92BE-9BBBA308AAC4.json | 1 + .../6191423D-8DB8-4D4C-92BE-9BBBA308AAC4.xmp | 47 ++ ...-92BE-9BBBA308AAC4_albums_as_keywords.json | 1 + ...C-92BE-9BBBA308AAC4_albums_as_keywords.xmp | 47 ++ ...91423D-8DB8-4D4C-92BE-9BBBA308AAC4_ext.xmp | 47 ++ ...2BE-9BBBA308AAC4_ignore_date_modified.json | 1 + ...4C-92BE-9BBBA308AAC4_keyword_template.json | 1 + ...D4C-92BE-9BBBA308AAC4_keyword_template.xmp | 49 ++ ...-4D4C-92BE-9BBBA308AAC4_no_tag_groups.json | 1 + ...92BE-9BBBA308AAC4_persons_as_keywords.json | 1 + ...-92BE-9BBBA308AAC4_persons_as_keywords.xmp | 47 ++ tests/sidecars/6bxcNnzRQKGnK4uPrCJ9UQ.json | 1 + tests/sidecars/6bxcNnzRQKGnK4uPrCJ9UQ.xmp | 50 ++ ...NnzRQKGnK4uPrCJ9UQ_albums_as_keywords.json | 1 + ...cNnzRQKGnK4uPrCJ9UQ_albums_as_keywords.xmp | 50 ++ tests/sidecars/6bxcNnzRQKGnK4uPrCJ9UQ_ext.xmp | 50 ++ ...zRQKGnK4uPrCJ9UQ_ignore_date_modified.json | 1 + ...xcNnzRQKGnK4uPrCJ9UQ_keyword_template.json | 1 + ...bxcNnzRQKGnK4uPrCJ9UQ_keyword_template.xmp | 52 ++ .../6bxcNnzRQKGnK4uPrCJ9UQ_no_tag_groups.json | 1 + ...nzRQKGnK4uPrCJ9UQ_persons_as_keywords.json | 1 + ...NnzRQKGnK4uPrCJ9UQ_persons_as_keywords.xmp | 52 ++ tests/sidecars/8SOE9s0XQVGsuq4ONohTng.json | 1 + tests/sidecars/8SOE9s0XQVGsuq4ONohTng.xmp | 51 ++ ...9s0XQVGsuq4ONohTng_albums_as_keywords.json | 1 + ...E9s0XQVGsuq4ONohTng_albums_as_keywords.xmp | 55 ++ tests/sidecars/8SOE9s0XQVGsuq4ONohTng_ext.xmp | 51 ++ ...0XQVGsuq4ONohTng_ignore_date_modified.json | 1 + ...OE9s0XQVGsuq4ONohTng_keyword_template.json | 1 + ...SOE9s0XQVGsuq4ONohTng_keyword_template.xmp | 57 ++ .../8SOE9s0XQVGsuq4ONohTng_no_tag_groups.json | 1 + ...s0XQVGsuq4ONohTng_persons_as_keywords.json | 1 + ...9s0XQVGsuq4ONohTng_persons_as_keywords.xmp | 55 ++ .../A1DD1F98-2ECD-431F-9AC9-5AFEFE2D3A5C.json | 1 + .../A1DD1F98-2ECD-431F-9AC9-5AFEFE2D3A5C.xmp | 45 ++ ...-9AC9-5AFEFE2D3A5C_albums_as_keywords.json | 1 + ...F-9AC9-5AFEFE2D3A5C_albums_as_keywords.xmp | 45 ++ ...DD1F98-2ECD-431F-9AC9-5AFEFE2D3A5C_ext.xmp | 45 ++ ...AC9-5AFEFE2D3A5C_ignore_date_modified.json | 1 + ...1F-9AC9-5AFEFE2D3A5C_keyword_template.json | 1 + ...31F-9AC9-5AFEFE2D3A5C_keyword_template.xmp | 47 ++ ...-431F-9AC9-5AFEFE2D3A5C_no_tag_groups.json | 1 + ...9AC9-5AFEFE2D3A5C_persons_as_keywords.json | 1 + ...-9AC9-5AFEFE2D3A5C_persons_as_keywords.xmp | 45 ++ .../D79B8D77-BFFC-460B-9312-034F2877D35B.json | 1 + .../D79B8D77-BFFC-460B-9312-034F2877D35B.xmp | 52 ++ ...-9312-034F2877D35B_albums_as_keywords.json | 1 + ...B-9312-034F2877D35B_albums_as_keywords.xmp | 56 ++ ...9B8D77-BFFC-460B-9312-034F2877D35B_ext.xmp | 52 ++ ...312-034F2877D35B_ignore_date_modified.json | 1 + ...0B-9312-034F2877D35B_keyword_template.json | 1 + ...60B-9312-034F2877D35B_keyword_template.xmp | 58 ++ ...-460B-9312-034F2877D35B_no_tag_groups.json | 1 + ...9312-034F2877D35B_persons_as_keywords.json | 1 + ...-9312-034F2877D35B_persons_as_keywords.xmp | 54 ++ .../DC99FBDD-7A52-4100-A5BB-344131646C30.json | 1 + .../DC99FBDD-7A52-4100-A5BB-344131646C30.xmp | 57 ++ ...-A5BB-344131646C30_albums_as_keywords.json | 1 + ...0-A5BB-344131646C30_albums_as_keywords.xmp | 57 ++ ...99FBDD-7A52-4100-A5BB-344131646C30_ext.xmp | 57 ++ ...5BB-344131646C30_ignore_date_modified.json | 1 + ...00-A5BB-344131646C30_keyword_template.json | 1 + ...100-A5BB-344131646C30_keyword_template.xmp | 59 ++ ...-4100-A5BB-344131646C30_no_tag_groups.json | 1 + ...A5BB-344131646C30_persons_as_keywords.json | 1 + ...-A5BB-344131646C30_persons_as_keywords.xmp | 57 ++ .../E9BC5C36-7CD1-40A1-A72B-8B8FAC227D51.json | 1 + .../E9BC5C36-7CD1-40A1-A72B-8B8FAC227D51.xmp | 52 ++ ...-A72B-8B8FAC227D51_albums_as_keywords.json | 1 + ...1-A72B-8B8FAC227D51_albums_as_keywords.xmp | 56 ++ ...BC5C36-7CD1-40A1-A72B-8B8FAC227D51_ext.xmp | 52 ++ ...72B-8B8FAC227D51_ignore_date_modified.json | 1 + ...A1-A72B-8B8FAC227D51_keyword_template.json | 1 + ...0A1-A72B-8B8FAC227D51_keyword_template.xmp | 58 ++ ...-40A1-A72B-8B8FAC227D51_no_tag_groups.json | 1 + ...A72B-8B8FAC227D51_persons_as_keywords.json | 1 + ...-A72B-8B8FAC227D51_persons_as_keywords.xmp | 52 ++ .../F12384F6-CD17-4151-ACBA-AE0E3688539E.json | 1 + .../F12384F6-CD17-4151-ACBA-AE0E3688539E.xmp | 51 ++ ...-ACBA-AE0E3688539E_albums_as_keywords.json | 1 + ...1-ACBA-AE0E3688539E_albums_as_keywords.xmp | 55 ++ ...2384F6-CD17-4151-ACBA-AE0E3688539E_ext.xmp | 51 ++ ...CBA-AE0E3688539E_ignore_date_modified.json | 1 + ...51-ACBA-AE0E3688539E_keyword_template.json | 1 + ...151-ACBA-AE0E3688539E_keyword_template.xmp | 57 ++ ...-4151-ACBA-AE0E3688539E_no_tag_groups.json | 1 + ...ACBA-AE0E3688539E_persons_as_keywords.json | 1 + ...-ACBA-AE0E3688539E_persons_as_keywords.xmp | 55 ++ tests/test_export_catalina_10_15_7.py | 650 +++--------------- tests/test_export_mojave_10_14_6.py | 166 +---- tests/test_sidecar_xmp.py | 58 ++ 117 files changed, 3009 insertions(+), 715 deletions(-) rename {utils => tests}/generate_search_info_test_data.py (90%) create mode 100644 tests/generate_sidecars_for_test.py create mode 100644 tests/sidecars/15uNd7%8RguTEgNPKHfTWw.json create mode 100644 tests/sidecars/15uNd7%8RguTEgNPKHfTWw.xmp create mode 100644 tests/sidecars/15uNd7%8RguTEgNPKHfTWw_albums_as_keywords.json create mode 100644 tests/sidecars/15uNd7%8RguTEgNPKHfTWw_albums_as_keywords.xmp create mode 100644 tests/sidecars/15uNd7%8RguTEgNPKHfTWw_ext.xmp create mode 100644 tests/sidecars/15uNd7%8RguTEgNPKHfTWw_ignore_date_modified.json create mode 100644 tests/sidecars/15uNd7%8RguTEgNPKHfTWw_keyword_template.json create mode 100644 tests/sidecars/15uNd7%8RguTEgNPKHfTWw_keyword_template.xmp create mode 100644 tests/sidecars/15uNd7%8RguTEgNPKHfTWw_no_tag_groups.json create mode 100644 tests/sidecars/15uNd7%8RguTEgNPKHfTWw_persons_as_keywords.json create mode 100644 tests/sidecars/15uNd7%8RguTEgNPKHfTWw_persons_as_keywords.xmp create mode 100644 tests/sidecars/3Jn73XpSQQCluzRBMWRsMA.json create mode 100644 tests/sidecars/3Jn73XpSQQCluzRBMWRsMA.xmp create mode 100644 tests/sidecars/3Jn73XpSQQCluzRBMWRsMA_albums_as_keywords.json create mode 100644 tests/sidecars/3Jn73XpSQQCluzRBMWRsMA_albums_as_keywords.xmp create mode 100644 tests/sidecars/3Jn73XpSQQCluzRBMWRsMA_ext.xmp create mode 100644 tests/sidecars/3Jn73XpSQQCluzRBMWRsMA_ignore_date_modified.json create mode 100644 tests/sidecars/3Jn73XpSQQCluzRBMWRsMA_keyword_template.json create mode 100644 tests/sidecars/3Jn73XpSQQCluzRBMWRsMA_keyword_template.xmp create mode 100644 tests/sidecars/3Jn73XpSQQCluzRBMWRsMA_no_tag_groups.json create mode 100644 tests/sidecars/3Jn73XpSQQCluzRBMWRsMA_persons_as_keywords.json create mode 100644 tests/sidecars/3Jn73XpSQQCluzRBMWRsMA_persons_as_keywords.xmp create mode 100644 tests/sidecars/6191423D-8DB8-4D4C-92BE-9BBBA308AAC4.json create mode 100644 tests/sidecars/6191423D-8DB8-4D4C-92BE-9BBBA308AAC4.xmp create mode 100644 tests/sidecars/6191423D-8DB8-4D4C-92BE-9BBBA308AAC4_albums_as_keywords.json create mode 100644 tests/sidecars/6191423D-8DB8-4D4C-92BE-9BBBA308AAC4_albums_as_keywords.xmp create mode 100644 tests/sidecars/6191423D-8DB8-4D4C-92BE-9BBBA308AAC4_ext.xmp create mode 100644 tests/sidecars/6191423D-8DB8-4D4C-92BE-9BBBA308AAC4_ignore_date_modified.json create mode 100644 tests/sidecars/6191423D-8DB8-4D4C-92BE-9BBBA308AAC4_keyword_template.json create mode 100644 tests/sidecars/6191423D-8DB8-4D4C-92BE-9BBBA308AAC4_keyword_template.xmp create mode 100644 tests/sidecars/6191423D-8DB8-4D4C-92BE-9BBBA308AAC4_no_tag_groups.json create mode 100644 tests/sidecars/6191423D-8DB8-4D4C-92BE-9BBBA308AAC4_persons_as_keywords.json create mode 100644 tests/sidecars/6191423D-8DB8-4D4C-92BE-9BBBA308AAC4_persons_as_keywords.xmp create mode 100644 tests/sidecars/6bxcNnzRQKGnK4uPrCJ9UQ.json create mode 100644 tests/sidecars/6bxcNnzRQKGnK4uPrCJ9UQ.xmp create mode 100644 tests/sidecars/6bxcNnzRQKGnK4uPrCJ9UQ_albums_as_keywords.json create mode 100644 tests/sidecars/6bxcNnzRQKGnK4uPrCJ9UQ_albums_as_keywords.xmp create mode 100644 tests/sidecars/6bxcNnzRQKGnK4uPrCJ9UQ_ext.xmp create mode 100644 tests/sidecars/6bxcNnzRQKGnK4uPrCJ9UQ_ignore_date_modified.json create mode 100644 tests/sidecars/6bxcNnzRQKGnK4uPrCJ9UQ_keyword_template.json create mode 100644 tests/sidecars/6bxcNnzRQKGnK4uPrCJ9UQ_keyword_template.xmp create mode 100644 tests/sidecars/6bxcNnzRQKGnK4uPrCJ9UQ_no_tag_groups.json create mode 100644 tests/sidecars/6bxcNnzRQKGnK4uPrCJ9UQ_persons_as_keywords.json create mode 100644 tests/sidecars/6bxcNnzRQKGnK4uPrCJ9UQ_persons_as_keywords.xmp create mode 100644 tests/sidecars/8SOE9s0XQVGsuq4ONohTng.json create mode 100644 tests/sidecars/8SOE9s0XQVGsuq4ONohTng.xmp create mode 100644 tests/sidecars/8SOE9s0XQVGsuq4ONohTng_albums_as_keywords.json create mode 100644 tests/sidecars/8SOE9s0XQVGsuq4ONohTng_albums_as_keywords.xmp create mode 100644 tests/sidecars/8SOE9s0XQVGsuq4ONohTng_ext.xmp create mode 100644 tests/sidecars/8SOE9s0XQVGsuq4ONohTng_ignore_date_modified.json create mode 100644 tests/sidecars/8SOE9s0XQVGsuq4ONohTng_keyword_template.json create mode 100644 tests/sidecars/8SOE9s0XQVGsuq4ONohTng_keyword_template.xmp create mode 100644 tests/sidecars/8SOE9s0XQVGsuq4ONohTng_no_tag_groups.json create mode 100644 tests/sidecars/8SOE9s0XQVGsuq4ONohTng_persons_as_keywords.json create mode 100644 tests/sidecars/8SOE9s0XQVGsuq4ONohTng_persons_as_keywords.xmp create mode 100644 tests/sidecars/A1DD1F98-2ECD-431F-9AC9-5AFEFE2D3A5C.json create mode 100644 tests/sidecars/A1DD1F98-2ECD-431F-9AC9-5AFEFE2D3A5C.xmp create mode 100644 tests/sidecars/A1DD1F98-2ECD-431F-9AC9-5AFEFE2D3A5C_albums_as_keywords.json create mode 100644 tests/sidecars/A1DD1F98-2ECD-431F-9AC9-5AFEFE2D3A5C_albums_as_keywords.xmp create mode 100644 tests/sidecars/A1DD1F98-2ECD-431F-9AC9-5AFEFE2D3A5C_ext.xmp create mode 100644 tests/sidecars/A1DD1F98-2ECD-431F-9AC9-5AFEFE2D3A5C_ignore_date_modified.json create mode 100644 tests/sidecars/A1DD1F98-2ECD-431F-9AC9-5AFEFE2D3A5C_keyword_template.json create mode 100644 tests/sidecars/A1DD1F98-2ECD-431F-9AC9-5AFEFE2D3A5C_keyword_template.xmp create mode 100644 tests/sidecars/A1DD1F98-2ECD-431F-9AC9-5AFEFE2D3A5C_no_tag_groups.json create mode 100644 tests/sidecars/A1DD1F98-2ECD-431F-9AC9-5AFEFE2D3A5C_persons_as_keywords.json create mode 100644 tests/sidecars/A1DD1F98-2ECD-431F-9AC9-5AFEFE2D3A5C_persons_as_keywords.xmp create mode 100644 tests/sidecars/D79B8D77-BFFC-460B-9312-034F2877D35B.json create mode 100644 tests/sidecars/D79B8D77-BFFC-460B-9312-034F2877D35B.xmp create mode 100644 tests/sidecars/D79B8D77-BFFC-460B-9312-034F2877D35B_albums_as_keywords.json create mode 100644 tests/sidecars/D79B8D77-BFFC-460B-9312-034F2877D35B_albums_as_keywords.xmp create mode 100644 tests/sidecars/D79B8D77-BFFC-460B-9312-034F2877D35B_ext.xmp create mode 100644 tests/sidecars/D79B8D77-BFFC-460B-9312-034F2877D35B_ignore_date_modified.json create mode 100644 tests/sidecars/D79B8D77-BFFC-460B-9312-034F2877D35B_keyword_template.json create mode 100644 tests/sidecars/D79B8D77-BFFC-460B-9312-034F2877D35B_keyword_template.xmp create mode 100644 tests/sidecars/D79B8D77-BFFC-460B-9312-034F2877D35B_no_tag_groups.json create mode 100644 tests/sidecars/D79B8D77-BFFC-460B-9312-034F2877D35B_persons_as_keywords.json create mode 100644 tests/sidecars/D79B8D77-BFFC-460B-9312-034F2877D35B_persons_as_keywords.xmp create mode 100644 tests/sidecars/DC99FBDD-7A52-4100-A5BB-344131646C30.json create mode 100644 tests/sidecars/DC99FBDD-7A52-4100-A5BB-344131646C30.xmp create mode 100644 tests/sidecars/DC99FBDD-7A52-4100-A5BB-344131646C30_albums_as_keywords.json create mode 100644 tests/sidecars/DC99FBDD-7A52-4100-A5BB-344131646C30_albums_as_keywords.xmp create mode 100644 tests/sidecars/DC99FBDD-7A52-4100-A5BB-344131646C30_ext.xmp create mode 100644 tests/sidecars/DC99FBDD-7A52-4100-A5BB-344131646C30_ignore_date_modified.json create mode 100644 tests/sidecars/DC99FBDD-7A52-4100-A5BB-344131646C30_keyword_template.json create mode 100644 tests/sidecars/DC99FBDD-7A52-4100-A5BB-344131646C30_keyword_template.xmp create mode 100644 tests/sidecars/DC99FBDD-7A52-4100-A5BB-344131646C30_no_tag_groups.json create mode 100644 tests/sidecars/DC99FBDD-7A52-4100-A5BB-344131646C30_persons_as_keywords.json create mode 100644 tests/sidecars/DC99FBDD-7A52-4100-A5BB-344131646C30_persons_as_keywords.xmp create mode 100644 tests/sidecars/E9BC5C36-7CD1-40A1-A72B-8B8FAC227D51.json create mode 100644 tests/sidecars/E9BC5C36-7CD1-40A1-A72B-8B8FAC227D51.xmp create mode 100644 tests/sidecars/E9BC5C36-7CD1-40A1-A72B-8B8FAC227D51_albums_as_keywords.json create mode 100644 tests/sidecars/E9BC5C36-7CD1-40A1-A72B-8B8FAC227D51_albums_as_keywords.xmp create mode 100644 tests/sidecars/E9BC5C36-7CD1-40A1-A72B-8B8FAC227D51_ext.xmp create mode 100644 tests/sidecars/E9BC5C36-7CD1-40A1-A72B-8B8FAC227D51_ignore_date_modified.json create mode 100644 tests/sidecars/E9BC5C36-7CD1-40A1-A72B-8B8FAC227D51_keyword_template.json create mode 100644 tests/sidecars/E9BC5C36-7CD1-40A1-A72B-8B8FAC227D51_keyword_template.xmp create mode 100644 tests/sidecars/E9BC5C36-7CD1-40A1-A72B-8B8FAC227D51_no_tag_groups.json create mode 100644 tests/sidecars/E9BC5C36-7CD1-40A1-A72B-8B8FAC227D51_persons_as_keywords.json create mode 100644 tests/sidecars/E9BC5C36-7CD1-40A1-A72B-8B8FAC227D51_persons_as_keywords.xmp create mode 100644 tests/sidecars/F12384F6-CD17-4151-ACBA-AE0E3688539E.json create mode 100644 tests/sidecars/F12384F6-CD17-4151-ACBA-AE0E3688539E.xmp create mode 100644 tests/sidecars/F12384F6-CD17-4151-ACBA-AE0E3688539E_albums_as_keywords.json create mode 100644 tests/sidecars/F12384F6-CD17-4151-ACBA-AE0E3688539E_albums_as_keywords.xmp create mode 100644 tests/sidecars/F12384F6-CD17-4151-ACBA-AE0E3688539E_ext.xmp create mode 100644 tests/sidecars/F12384F6-CD17-4151-ACBA-AE0E3688539E_ignore_date_modified.json create mode 100644 tests/sidecars/F12384F6-CD17-4151-ACBA-AE0E3688539E_keyword_template.json create mode 100644 tests/sidecars/F12384F6-CD17-4151-ACBA-AE0E3688539E_keyword_template.xmp create mode 100644 tests/sidecars/F12384F6-CD17-4151-ACBA-AE0E3688539E_no_tag_groups.json create mode 100644 tests/sidecars/F12384F6-CD17-4151-ACBA-AE0E3688539E_persons_as_keywords.json create mode 100644 tests/sidecars/F12384F6-CD17-4151-ACBA-AE0E3688539E_persons_as_keywords.xmp create mode 100644 tests/test_sidecar_xmp.py diff --git a/osxphotos/templates/xmp_sidecar.mako b/osxphotos/templates/xmp_sidecar.mako index 12bd2080..1eff48eb 100644 --- a/osxphotos/templates/xmp_sidecar.mako +++ b/osxphotos/templates/xmp_sidecar.mako @@ -10,28 +10,44 @@ <%def name="dc_description(desc)"> % if desc is None: - + + + + + % else: - ${desc | x} + + + ${desc | x} + + % endif <%def name="dc_title(title)"> % if title is None: - + + + + + % else: - ${title | x} + + + ${title | x} + + % endif <%def name="dc_subject(subject)"> % if subject: - - % for subj in subject: - ${subj | x} - % endfor - + + % for subj in subject: + ${subj | x} + % endfor + % endif @@ -86,7 +102,6 @@ - tests/search_info_test_data_10_15_7.json import json diff --git a/tests/generate_sidecars_for_test.py b/tests/generate_sidecars_for_test.py new file mode 100644 index 00000000..3a7dd328 --- /dev/null +++ b/tests/generate_sidecars_for_test.py @@ -0,0 +1,113 @@ +""" Generate sidecars used for tests """ + +# Generates sidecars used for test cases +# tests generate sidecars and compare to the ones generated here to assert nothing changed +# Run this any time you change code that would result in a change to sidecar files + +import pathlib + +import osxphotos + +PHOTOS_DB_15_7 = "./tests/Test-10.15.7.photoslibrary/database/photos.db" +PHOTOS_DB_14_6 = "./tests/Test-10.14.6.photoslibrary/database/photos.db" + +UUID_DICT_15_7 = { + "not_favorite": "A1DD1F98-2ECD-431F-9AC9-5AFEFE2D3A5C", + "has_adjustments": "E9BC5C36-7CD1-40A1-A72B-8B8FAC227D51", + "location": "DC99FBDD-7A52-4100-A5BB-344131646C30", + "no_location": "6191423D-8DB8-4D4C-92BE-9BBBA308AAC4", + "export": "D79B8D77-BFFC-460B-9312-034F2877D35B", # "Pumkins2.jpg" + "xmp": "F12384F6-CD17-4151-ACBA-AE0E3688539E", # Pumkins1.jpg +} + +UUID_DICT_14_6 = { + "has_adjustments": "6bxcNnzRQKGnK4uPrCJ9UQ", + "no_adjustments": "15uNd7%8RguTEgNPKHfTWw", + "location": "3Jn73XpSQQCluzRBMWRsMA", + "xmp": "8SOE9s0XQVGsuq4ONohTng", +} + +SIDECAR_DIR = "tests/sidecars" + + +def generate_sidecars(dbname, uuid_dict): + """ generate XMP and JSON sidecars for testing """ + photosdb = osxphotos.PhotosDB(dbname) + + for _, uuid in uuid_dict.items(): + photo = photosdb.get_photo(uuid) + + # plain xmp + sidecar = str(pathlib.Path(SIDECAR_DIR) / f"{uuid}.xmp") + xmp = photo._xmp_sidecar() + with open(sidecar, "w") as file: + file.write(xmp) + + # with extension + ext = osxphotos.utils.get_preferred_uti_extension(photo.uti) + ext = "jpg" if ext == "jpeg" else ext + sidecar = str(pathlib.Path(SIDECAR_DIR) / f"{uuid}_ext.xmp") + xmp = photo._xmp_sidecar(extension=ext) + with open(sidecar, "w") as file: + file.write(xmp) + + # persons_as_keywords + sidecar = str(pathlib.Path(SIDECAR_DIR) / f"{uuid}_persons_as_keywords.xmp") + xmp = photo._xmp_sidecar(use_persons_as_keywords=True, extension=ext) + with open(sidecar, "w") as file: + file.write(xmp) + + # albums_as_keywords + sidecar = str(pathlib.Path(SIDECAR_DIR) / f"{uuid}_albums_as_keywords.xmp") + xmp = photo._xmp_sidecar(use_albums_as_keywords=True, extension=ext) + with open(sidecar, "w") as file: + file.write(xmp) + + # keyword_template + sidecar = str(pathlib.Path(SIDECAR_DIR) / f"{uuid}_keyword_template.xmp") + xmp = photo._xmp_sidecar( + keyword_template=["{created.year}", "{folder_album}"], extension=ext + ) + with open(sidecar, "w") as file: + file.write(xmp) + + # generate JSON files + sidecar = str(pathlib.Path(SIDECAR_DIR) / f"{uuid}.json") + json_ = photo._exiftool_json_sidecar() + with open(sidecar, "w") as file: + file.write(json_) + + # no tag groups + sidecar = str(pathlib.Path(SIDECAR_DIR) / f"{uuid}_no_tag_groups.json") + json_ = photo._exiftool_json_sidecar(tag_groups=False) + with open(sidecar, "w") as file: + file.write(json_) + + # ignore_date_modified + sidecar = str(pathlib.Path(SIDECAR_DIR) / f"{uuid}_ignore_date_modified.json") + json_ = photo._exiftool_json_sidecar(ignore_date_modified=True) + with open(sidecar, "w") as file: + file.write(json_) + + # keyword_template + sidecar = str(pathlib.Path(SIDECAR_DIR) / f"{uuid}_keyword_template.json") + json_ = photo._exiftool_json_sidecar(keyword_template=["{folder_album}"]) + with open(sidecar, "w") as file: + file.write(json_) + + # persons_as_keywords + sidecar = str(pathlib.Path(SIDECAR_DIR) / f"{uuid}_persons_as_keywords.json") + json_ = photo._exiftool_json_sidecar(use_persons_as_keywords=True) + with open(sidecar, "w") as file: + file.write(json_) + + # albums_as_keywords + sidecar = str(pathlib.Path(SIDECAR_DIR) / f"{uuid}_albums_as_keywords.json") + json_ = photo._exiftool_json_sidecar(use_albums_as_keywords=True) + with open(sidecar, "w") as file: + file.write(json_) + + +if __name__ == "__main__": + generate_sidecars(PHOTOS_DB_15_7, UUID_DICT_15_7) + generate_sidecars(PHOTOS_DB_14_6, UUID_DICT_14_6) diff --git a/tests/search_info_test_data_10_15_7.json b/tests/search_info_test_data_10_15_7.json index 43a82d72..6e6b58dc 100644 --- a/tests/search_info_test_data_10_15_7.json +++ b/tests/search_info_test_data_10_15_7.json @@ -1 +1 @@ -{"UUID_SEARCH_INFO": {"C8EAF50A-D891-4E0C-8086-C417E1284153": {"labels": ["Food", "Butter"], "place_names": ["Durham Bulls Athletic Park"], "streets": ["Blackwell St"], "neighborhoods": ["American Tobacco District", "Downtown Durham"], "city": "Durham", "locality_names": ["Durham"], "state": "North Carolina", "state_abbreviation": "NC", "country": "United States", "bodies_of_water": [], "month": "October", "year": "2018", "holidays": [], "activities": ["Entertainment", "Travel", "Dining", "Dinner", "Trip"], "season": "Fall", "venues": ["Pie Pusher's", "Luna Rotisserie and Empanadas", "Copa", "The Pinhook"], "venue_types": [], "media_types": []}, "71DFB4C3-E868-4BE4-906E-D96BD8692D7E": {"labels": ["Sunset Sunrise", "Desert", "Sky", "Outdoor", "Land"], "place_names": ["Royal Palms State Beach"], "streets": [], "neighborhoods": ["San Pedro"], "city": "Los Angeles", "locality_names": [], "state": "California", "state_abbreviation": "", "country": "United States", "bodies_of_water": ["Catalina Channel"], "month": "November", "year": "2017", "holidays": [], "activities": ["Beach Activity", "Activity"], "season": "Fall", "venues": [], "venue_types": [], "media_types": ["Live Photos"]}, "2C151013-5BBA-4D00-B70F-1C9420418B86": {"labels": ["Water Body", "Water", "People", "Bench", "Vegetation", "Forest", "Outdoor", "Land", "Furniture"], "place_names": [], "streets": [], "neighborhoods": [], "city": "", "locality_names": [], "state": "", "state_abbreviation": "", "country": "", "bodies_of_water": [], "month": "December", "year": "2014", "holidays": ["Christmas Day"], "activities": ["Celebration", "Holiday"], "season": "Winter", "venues": [], "venue_types": [], "media_types": []}}, "UUID_SEARCH_INFO_NORMALIZED": {"C8EAF50A-D891-4E0C-8086-C417E1284153": {"labels": ["food", "butter"], "place_names": ["durham bulls athletic park"], "streets": ["blackwell st"], "neighborhoods": ["american tobacco district", "downtown durham"], "city": "durham", "locality_names": ["durham"], "state": "north carolina", "state_abbreviation": "nc", "country": "united states", "bodies_of_water": [], "month": "october", "year": "2018", "holidays": [], "activities": ["entertainment", "travel", "dining", "dinner", "trip"], "season": "fall", "venues": ["pie pusher's", "luna rotisserie and empanadas", "copa", "the pinhook"], "venue_types": [], "media_types": []}, "71DFB4C3-E868-4BE4-906E-D96BD8692D7E": {"labels": ["sunset sunrise", "desert", "sky", "outdoor", "land"], "place_names": ["royal palms state beach"], "streets": [], "neighborhoods": ["san pedro"], "city": "los angeles", "locality_names": [], "state": "california", "state_abbreviation": "", "country": "united states", "bodies_of_water": ["catalina channel"], "month": "november", "year": "2017", "holidays": [], "activities": ["beach activity", "activity"], "season": "fall", "venues": [], "venue_types": [], "media_types": ["live photos"]}, "2C151013-5BBA-4D00-B70F-1C9420418B86": {"labels": ["water body", "water", "people", "bench", "vegetation", "forest", "outdoor", "land", "furniture"], "place_names": [], "streets": [], "neighborhoods": [], "city": "", "locality_names": [], "state": "", "state_abbreviation": "", "country": "", "bodies_of_water": [], "month": "december", "year": "2014", "holidays": ["christmas day"], "activities": ["celebration", "holiday"], "season": "winter", "venues": [], "venue_types": [], "media_types": []}}, "UUID_SEARCH_INFO_ALL": {"C8EAF50A-D891-4E0C-8086-C417E1284153": ["Food", "Butter", "Durham Bulls Athletic Park", "Blackwell St", "American Tobacco District", "Downtown Durham", "Durham", "Entertainment", "Travel", "Dining", "Dinner", "Trip", "Pie Pusher's", "Luna Rotisserie and Empanadas", "Copa", "The Pinhook", "Durham", "North Carolina", "NC", "United States", "October", "2018", "Fall"], "71DFB4C3-E868-4BE4-906E-D96BD8692D7E": ["Sunset Sunrise", "Desert", "Sky", "Outdoor", "Land", "Royal Palms State Beach", "San Pedro", "Catalina Channel", "Beach Activity", "Activity", "Live Photos", "Los Angeles", "California", "United States", "November", "2017", "Fall"], "2C151013-5BBA-4D00-B70F-1C9420418B86": ["Water Body", "Water", "People", "Bench", "Vegetation", "Forest", "Outdoor", "Land", "Furniture", "Christmas Day", "Celebration", "Holiday", "December", "2014", "Winter"]}, "UUID_SEARCH_INFO_ALL_NORMALIZED": {"C8EAF50A-D891-4E0C-8086-C417E1284153": ["food", "butter", "durham bulls athletic park", "blackwell st", "american tobacco district", "downtown durham", "durham", "entertainment", "travel", "dining", "dinner", "trip", "pie pusher's", "luna rotisserie and empanadas", "copa", "the pinhook", "durham", "north carolina", "nc", "united states", "october", "2018", "fall"], "71DFB4C3-E868-4BE4-906E-D96BD8692D7E": ["sunset sunrise", "desert", "sky", "outdoor", "land", "royal palms state beach", "san pedro", "catalina channel", "beach activity", "activity", "live photos", "los angeles", "california", "united states", "november", "2017", "fall"], "2C151013-5BBA-4D00-B70F-1C9420418B86": ["water body", "water", "people", "bench", "vegetation", "forest", "outdoor", "land", "furniture", "christmas day", "celebration", "holiday", "december", "2014", "winter"]}} +{"UUID_SEARCH_INFO": {"C8EAF50A-D891-4E0C-8086-C417E1284153": {"labels": ["Food", "Butter"], "place_names": ["Durham Bulls Athletic Park"], "streets": ["Blackwell St"], "neighborhoods": ["American Tobacco District", "Downtown Durham"], "city": "Durham", "locality_names": ["Durham"], "state": "North Carolina", "state_abbreviation": "NC", "country": "United States", "bodies_of_water": [], "month": "October", "year": "2018", "holidays": [], "activities": ["Dinner", "Travel", "Entertainment", "Dining", "Trip"], "season": "Fall", "venues": ["Copa", "Pie Pusher's", "The Pinhook", "Luna Rotisserie and Empanadas"], "venue_types": ["Cocktail Bar", "Nightlife", "Pizza", "Restaurant", "Bar", "Tapas & Small Plates", "Food", "Empanadas", "Chicken Wings", "Arts & Entertainment", "Latin American", "Cuban", "Music Venue"], "media_types": []}, "71DFB4C3-E868-4BE4-906E-D96BD8692D7E": {"labels": ["Desert", "Land", "Sky", "Sunset Sunrise", "Outdoor"], "place_names": ["Royal Palms State Beach"], "streets": [], "neighborhoods": ["San Pedro"], "city": "Los Angeles", "locality_names": [], "state": "California", "state_abbreviation": "", "country": "United States", "bodies_of_water": ["Catalina Channel"], "month": "November", "year": "2017", "holidays": [], "activities": ["Beach Activity", "Activity"], "season": "Fall", "venues": [], "venue_types": [], "media_types": ["Live Photos"]}, "2C151013-5BBA-4D00-B70F-1C9420418B86": {"labels": ["People", "Forest", "Land", "Furniture", "Bench", "Plant", "Outdoor", "Vegetation", "Water", "Water Body"], "place_names": [], "streets": [], "neighborhoods": [], "city": "", "locality_names": [], "state": "", "state_abbreviation": "", "country": "", "bodies_of_water": [], "month": "December", "year": "2014", "holidays": ["Christmas Day"], "activities": ["Celebration", "Holiday"], "season": "Winter", "venues": [], "venue_types": [], "media_types": []}}, "UUID_SEARCH_INFO_NORMALIZED": {"C8EAF50A-D891-4E0C-8086-C417E1284153": {"labels": ["food", "butter"], "place_names": ["durham bulls athletic park"], "streets": ["blackwell st"], "neighborhoods": ["american tobacco district", "downtown durham"], "city": "durham", "locality_names": ["durham"], "state": "north carolina", "state_abbreviation": "nc", "country": "united states", "bodies_of_water": [], "month": "october", "year": "2018", "holidays": [], "activities": ["dinner", "travel", "entertainment", "dining", "trip"], "season": "fall", "venues": ["copa", "pie pusher's", "the pinhook", "luna rotisserie and empanadas"], "venue_types": ["cocktail bar", "nightlife", "pizza", "restaurant", "bar", "tapas & small plates", "food", "empanadas", "chicken wings", "arts & entertainment", "latin american", "cuban", "music venue"], "media_types": []}, "71DFB4C3-E868-4BE4-906E-D96BD8692D7E": {"labels": ["desert", "land", "sky", "sunset sunrise", "outdoor"], "place_names": ["royal palms state beach"], "streets": [], "neighborhoods": ["san pedro"], "city": "los angeles", "locality_names": [], "state": "california", "state_abbreviation": "", "country": "united states", "bodies_of_water": ["catalina channel"], "month": "november", "year": "2017", "holidays": [], "activities": ["beach activity", "activity"], "season": "fall", "venues": [], "venue_types": [], "media_types": ["live photos"]}, "2C151013-5BBA-4D00-B70F-1C9420418B86": {"labels": ["people", "forest", "land", "furniture", "bench", "plant", "outdoor", "vegetation", "water", "water body"], "place_names": [], "streets": [], "neighborhoods": [], "city": "", "locality_names": [], "state": "", "state_abbreviation": "", "country": "", "bodies_of_water": [], "month": "december", "year": "2014", "holidays": ["christmas day"], "activities": ["celebration", "holiday"], "season": "winter", "venues": [], "venue_types": [], "media_types": []}}, "UUID_SEARCH_INFO_ALL": {"C8EAF50A-D891-4E0C-8086-C417E1284153": ["Food", "Butter", "Durham Bulls Athletic Park", "Blackwell St", "American Tobacco District", "Downtown Durham", "Durham", "Dinner", "Travel", "Entertainment", "Dining", "Trip", "Copa", "Pie Pusher's", "The Pinhook", "Luna Rotisserie and Empanadas", "Cocktail Bar", "Nightlife", "Pizza", "Restaurant", "Bar", "Tapas & Small Plates", "Food", "Empanadas", "Chicken Wings", "Arts & Entertainment", "Latin American", "Cuban", "Music Venue", "Durham", "North Carolina", "NC", "United States", "October", "2018", "Fall"], "71DFB4C3-E868-4BE4-906E-D96BD8692D7E": ["Desert", "Land", "Sky", "Sunset Sunrise", "Outdoor", "Royal Palms State Beach", "San Pedro", "Catalina Channel", "Beach Activity", "Activity", "Live Photos", "Los Angeles", "California", "United States", "November", "2017", "Fall"], "2C151013-5BBA-4D00-B70F-1C9420418B86": ["People", "Forest", "Land", "Furniture", "Bench", "Plant", "Outdoor", "Vegetation", "Water", "Water Body", "Christmas Day", "Celebration", "Holiday", "December", "2014", "Winter"]}, "UUID_SEARCH_INFO_ALL_NORMALIZED": {"C8EAF50A-D891-4E0C-8086-C417E1284153": ["food", "butter", "durham bulls athletic park", "blackwell st", "american tobacco district", "downtown durham", "durham", "dinner", "travel", "entertainment", "dining", "trip", "copa", "pie pusher's", "the pinhook", "luna rotisserie and empanadas", "cocktail bar", "nightlife", "pizza", "restaurant", "bar", "tapas & small plates", "food", "empanadas", "chicken wings", "arts & entertainment", "latin american", "cuban", "music venue", "durham", "north carolina", "nc", "united states", "october", "2018", "fall"], "71DFB4C3-E868-4BE4-906E-D96BD8692D7E": ["desert", "land", "sky", "sunset sunrise", "outdoor", "royal palms state beach", "san pedro", "catalina channel", "beach activity", "activity", "live photos", "los angeles", "california", "united states", "november", "2017", "fall"], "2C151013-5BBA-4D00-B70F-1C9420418B86": ["people", "forest", "land", "furniture", "bench", "plant", "outdoor", "vegetation", "water", "water body", "christmas day", "celebration", "holiday", "december", "2014", "winter"]}} diff --git a/tests/sidecars/15uNd7%8RguTEgNPKHfTWw.json b/tests/sidecars/15uNd7%8RguTEgNPKHfTWw.json new file mode 100644 index 00000000..46a05ddc --- /dev/null +++ b/tests/sidecars/15uNd7%8RguTEgNPKHfTWw.json @@ -0,0 +1 @@ +[{"EXIF:ImageDescription": "Girl holding pumpkin", "XMP:Description": "Girl holding pumpkin", "XMP:Title": "I found one!", "IPTC:Keywords": ["Kids"], "XMP:Subject": ["Kids"], "XMP:TagsList": ["Kids"], "XMP:PersonInImage": ["Katie"], "EXIF:DateTimeOriginal": "2018:09:28 16:07:07", "EXIF:CreateDate": "2018:09:28 16:07:07", "EXIF:OffsetTimeOriginal": "-04:00", "IPTC:DateCreated": "2018:09:28", "IPTC:TimeCreated": "16:07:07-04:00", "EXIF:ModifyDate": "2018:09:28 16:07:07"}] \ No newline at end of file diff --git a/tests/sidecars/15uNd7%8RguTEgNPKHfTWw.xmp b/tests/sidecars/15uNd7%8RguTEgNPKHfTWw.xmp new file mode 100644 index 00000000..7804a0da --- /dev/null +++ b/tests/sidecars/15uNd7%8RguTEgNPKHfTWw.xmp @@ -0,0 +1,50 @@ + + + + + jpg + + + Girl holding pumpkin + + + + + I found one! + + + + + Kids + + + 2018-09-28T16:07:07-04:00 + + + + + Katie + + + + + + + Kids + + + + + 2018-09-28T16:07:07 + 2018-09-28T16:07:07 + + + + + \ No newline at end of file diff --git a/tests/sidecars/15uNd7%8RguTEgNPKHfTWw_albums_as_keywords.json b/tests/sidecars/15uNd7%8RguTEgNPKHfTWw_albums_as_keywords.json new file mode 100644 index 00000000..ce00803a --- /dev/null +++ b/tests/sidecars/15uNd7%8RguTEgNPKHfTWw_albums_as_keywords.json @@ -0,0 +1 @@ +[{"EXIF:ImageDescription": "Girl holding pumpkin", "XMP:Description": "Girl holding pumpkin", "XMP:Title": "I found one!", "IPTC:Keywords": ["AlbumInFolder", "Kids", "Pumpkin Farm", "Test Album (1)"], "XMP:Subject": ["AlbumInFolder", "Kids", "Pumpkin Farm", "Test Album (1)"], "XMP:TagsList": ["AlbumInFolder", "Kids", "Pumpkin Farm", "Test Album (1)"], "XMP:PersonInImage": ["Katie"], "EXIF:DateTimeOriginal": "2018:09:28 16:07:07", "EXIF:CreateDate": "2018:09:28 16:07:07", "EXIF:OffsetTimeOriginal": "-04:00", "IPTC:DateCreated": "2018:09:28", "IPTC:TimeCreated": "16:07:07-04:00", "EXIF:ModifyDate": "2018:09:28 16:07:07"}] \ No newline at end of file diff --git a/tests/sidecars/15uNd7%8RguTEgNPKHfTWw_albums_as_keywords.xmp b/tests/sidecars/15uNd7%8RguTEgNPKHfTWw_albums_as_keywords.xmp new file mode 100644 index 00000000..05a7efbb --- /dev/null +++ b/tests/sidecars/15uNd7%8RguTEgNPKHfTWw_albums_as_keywords.xmp @@ -0,0 +1,56 @@ + + + + + jpg + + + Girl holding pumpkin + + + + + I found one! + + + + + AlbumInFolder + Kids + Pumpkin Farm + Test Album (1) + + + 2018-09-28T16:07:07-04:00 + + + + + Katie + + + + + + + AlbumInFolder + Kids + Pumpkin Farm + Test Album (1) + + + + + 2018-09-28T16:07:07 + 2018-09-28T16:07:07 + + + + + \ No newline at end of file diff --git a/tests/sidecars/15uNd7%8RguTEgNPKHfTWw_ext.xmp b/tests/sidecars/15uNd7%8RguTEgNPKHfTWw_ext.xmp new file mode 100644 index 00000000..7804a0da --- /dev/null +++ b/tests/sidecars/15uNd7%8RguTEgNPKHfTWw_ext.xmp @@ -0,0 +1,50 @@ + + + + + jpg + + + Girl holding pumpkin + + + + + I found one! + + + + + Kids + + + 2018-09-28T16:07:07-04:00 + + + + + Katie + + + + + + + Kids + + + + + 2018-09-28T16:07:07 + 2018-09-28T16:07:07 + + + + + \ No newline at end of file diff --git a/tests/sidecars/15uNd7%8RguTEgNPKHfTWw_ignore_date_modified.json b/tests/sidecars/15uNd7%8RguTEgNPKHfTWw_ignore_date_modified.json new file mode 100644 index 00000000..46a05ddc --- /dev/null +++ b/tests/sidecars/15uNd7%8RguTEgNPKHfTWw_ignore_date_modified.json @@ -0,0 +1 @@ +[{"EXIF:ImageDescription": "Girl holding pumpkin", "XMP:Description": "Girl holding pumpkin", "XMP:Title": "I found one!", "IPTC:Keywords": ["Kids"], "XMP:Subject": ["Kids"], "XMP:TagsList": ["Kids"], "XMP:PersonInImage": ["Katie"], "EXIF:DateTimeOriginal": "2018:09:28 16:07:07", "EXIF:CreateDate": "2018:09:28 16:07:07", "EXIF:OffsetTimeOriginal": "-04:00", "IPTC:DateCreated": "2018:09:28", "IPTC:TimeCreated": "16:07:07-04:00", "EXIF:ModifyDate": "2018:09:28 16:07:07"}] \ No newline at end of file diff --git a/tests/sidecars/15uNd7%8RguTEgNPKHfTWw_keyword_template.json b/tests/sidecars/15uNd7%8RguTEgNPKHfTWw_keyword_template.json new file mode 100644 index 00000000..f15de18d --- /dev/null +++ b/tests/sidecars/15uNd7%8RguTEgNPKHfTWw_keyword_template.json @@ -0,0 +1 @@ +[{"EXIF:ImageDescription": "Girl holding pumpkin", "XMP:Description": "Girl holding pumpkin", "XMP:Title": "I found one!", "IPTC:Keywords": ["Folder1/SubFolder2/AlbumInFolder", "Kids", "Pumpkin Farm", "Test Album (1)"], "XMP:Subject": ["Folder1/SubFolder2/AlbumInFolder", "Kids", "Pumpkin Farm", "Test Album (1)"], "XMP:TagsList": ["Folder1/SubFolder2/AlbumInFolder", "Kids", "Pumpkin Farm", "Test Album (1)"], "XMP:PersonInImage": ["Katie"], "EXIF:DateTimeOriginal": "2018:09:28 16:07:07", "EXIF:CreateDate": "2018:09:28 16:07:07", "EXIF:OffsetTimeOriginal": "-04:00", "IPTC:DateCreated": "2018:09:28", "IPTC:TimeCreated": "16:07:07-04:00", "EXIF:ModifyDate": "2018:09:28 16:07:07"}] \ No newline at end of file diff --git a/tests/sidecars/15uNd7%8RguTEgNPKHfTWw_keyword_template.xmp b/tests/sidecars/15uNd7%8RguTEgNPKHfTWw_keyword_template.xmp new file mode 100644 index 00000000..111ea08b --- /dev/null +++ b/tests/sidecars/15uNd7%8RguTEgNPKHfTWw_keyword_template.xmp @@ -0,0 +1,58 @@ + + + + + jpg + + + Girl holding pumpkin + + + + + I found one! + + + + + 2018 + Folder1/SubFolder2/AlbumInFolder + Kids + Pumpkin Farm + Test Album (1) + + + 2018-09-28T16:07:07-04:00 + + + + + Katie + + + + + + + 2018 + Folder1/SubFolder2/AlbumInFolder + Kids + Pumpkin Farm + Test Album (1) + + + + + 2018-09-28T16:07:07 + 2018-09-28T16:07:07 + + + + + \ No newline at end of file diff --git a/tests/sidecars/15uNd7%8RguTEgNPKHfTWw_no_tag_groups.json b/tests/sidecars/15uNd7%8RguTEgNPKHfTWw_no_tag_groups.json new file mode 100644 index 00000000..9cabe3b0 --- /dev/null +++ b/tests/sidecars/15uNd7%8RguTEgNPKHfTWw_no_tag_groups.json @@ -0,0 +1 @@ +[{"ImageDescription": "Girl holding pumpkin", "Description": "Girl holding pumpkin", "Title": "I found one!", "Keywords": ["Kids"], "Subject": ["Kids"], "TagsList": ["Kids"], "PersonInImage": ["Katie"], "DateTimeOriginal": "2018:09:28 16:07:07", "CreateDate": "2018:09:28 16:07:07", "OffsetTimeOriginal": "-04:00", "DateCreated": "2018:09:28", "TimeCreated": "16:07:07-04:00", "ModifyDate": "2018:09:28 16:07:07"}] \ No newline at end of file diff --git a/tests/sidecars/15uNd7%8RguTEgNPKHfTWw_persons_as_keywords.json b/tests/sidecars/15uNd7%8RguTEgNPKHfTWw_persons_as_keywords.json new file mode 100644 index 00000000..03d49334 --- /dev/null +++ b/tests/sidecars/15uNd7%8RguTEgNPKHfTWw_persons_as_keywords.json @@ -0,0 +1 @@ +[{"EXIF:ImageDescription": "Girl holding pumpkin", "XMP:Description": "Girl holding pumpkin", "XMP:Title": "I found one!", "IPTC:Keywords": ["Katie", "Kids"], "XMP:Subject": ["Katie", "Kids"], "XMP:TagsList": ["Katie", "Kids"], "XMP:PersonInImage": ["Katie"], "EXIF:DateTimeOriginal": "2018:09:28 16:07:07", "EXIF:CreateDate": "2018:09:28 16:07:07", "EXIF:OffsetTimeOriginal": "-04:00", "IPTC:DateCreated": "2018:09:28", "IPTC:TimeCreated": "16:07:07-04:00", "EXIF:ModifyDate": "2018:09:28 16:07:07"}] \ No newline at end of file diff --git a/tests/sidecars/15uNd7%8RguTEgNPKHfTWw_persons_as_keywords.xmp b/tests/sidecars/15uNd7%8RguTEgNPKHfTWw_persons_as_keywords.xmp new file mode 100644 index 00000000..2c19d1f4 --- /dev/null +++ b/tests/sidecars/15uNd7%8RguTEgNPKHfTWw_persons_as_keywords.xmp @@ -0,0 +1,52 @@ + + + + + jpg + + + Girl holding pumpkin + + + + + I found one! + + + + + Katie + Kids + + + 2018-09-28T16:07:07-04:00 + + + + + Katie + + + + + + + Katie + Kids + + + + + 2018-09-28T16:07:07 + 2018-09-28T16:07:07 + + + + + \ No newline at end of file diff --git a/tests/sidecars/3Jn73XpSQQCluzRBMWRsMA.json b/tests/sidecars/3Jn73XpSQQCluzRBMWRsMA.json new file mode 100644 index 00000000..dd873ad7 --- /dev/null +++ b/tests/sidecars/3Jn73XpSQQCluzRBMWRsMA.json @@ -0,0 +1 @@ +[{"XMP:Title": "St. James's Park", "IPTC:Keywords": ["England", "London", "London 2018", "St. James's Park", "UK", "United Kingdom"], "XMP:Subject": ["England", "London", "London 2018", "St. James's Park", "UK", "United Kingdom"], "XMP:TagsList": ["England", "London", "London 2018", "St. James's Park", "UK", "United Kingdom"], "EXIF:GPSLatitude": 51.50357167, "EXIF:GPSLongitude": -0.1318055, "EXIF:GPSLatitudeRef": "N", "EXIF:GPSLongitudeRef": "W", "EXIF:DateTimeOriginal": "2018:10:13 09:18:12", "EXIF:CreateDate": "2018:10:13 09:18:12", "EXIF:OffsetTimeOriginal": "-04:00", "IPTC:DateCreated": "2018:10:13", "IPTC:TimeCreated": "09:18:12-04:00", "EXIF:ModifyDate": "2019:12:01 11:43:45"}] \ No newline at end of file diff --git a/tests/sidecars/3Jn73XpSQQCluzRBMWRsMA.xmp b/tests/sidecars/3Jn73XpSQQCluzRBMWRsMA.xmp new file mode 100644 index 00000000..87fd86ea --- /dev/null +++ b/tests/sidecars/3Jn73XpSQQCluzRBMWRsMA.xmp @@ -0,0 +1,57 @@ + + + + + jpg + + + + + + + + St. James's Park + + + + + England + London + London 2018 + St. James's Park + UK + United Kingdom + + + 2018-10-13T09:18:12.501000-04:00 + + + + + + + England + London + London 2018 + St. James's Park + UK + United Kingdom + + + + + 2018-10-13T09:18:12 + 2018-10-13T09:18:12 + + + 0,7.908329999999999W + 51,30.21430019999997N + + + \ No newline at end of file diff --git a/tests/sidecars/3Jn73XpSQQCluzRBMWRsMA_albums_as_keywords.json b/tests/sidecars/3Jn73XpSQQCluzRBMWRsMA_albums_as_keywords.json new file mode 100644 index 00000000..dd873ad7 --- /dev/null +++ b/tests/sidecars/3Jn73XpSQQCluzRBMWRsMA_albums_as_keywords.json @@ -0,0 +1 @@ +[{"XMP:Title": "St. James's Park", "IPTC:Keywords": ["England", "London", "London 2018", "St. James's Park", "UK", "United Kingdom"], "XMP:Subject": ["England", "London", "London 2018", "St. James's Park", "UK", "United Kingdom"], "XMP:TagsList": ["England", "London", "London 2018", "St. James's Park", "UK", "United Kingdom"], "EXIF:GPSLatitude": 51.50357167, "EXIF:GPSLongitude": -0.1318055, "EXIF:GPSLatitudeRef": "N", "EXIF:GPSLongitudeRef": "W", "EXIF:DateTimeOriginal": "2018:10:13 09:18:12", "EXIF:CreateDate": "2018:10:13 09:18:12", "EXIF:OffsetTimeOriginal": "-04:00", "IPTC:DateCreated": "2018:10:13", "IPTC:TimeCreated": "09:18:12-04:00", "EXIF:ModifyDate": "2019:12:01 11:43:45"}] \ No newline at end of file diff --git a/tests/sidecars/3Jn73XpSQQCluzRBMWRsMA_albums_as_keywords.xmp b/tests/sidecars/3Jn73XpSQQCluzRBMWRsMA_albums_as_keywords.xmp new file mode 100644 index 00000000..87fd86ea --- /dev/null +++ b/tests/sidecars/3Jn73XpSQQCluzRBMWRsMA_albums_as_keywords.xmp @@ -0,0 +1,57 @@ + + + + + jpg + + + + + + + + St. James's Park + + + + + England + London + London 2018 + St. James's Park + UK + United Kingdom + + + 2018-10-13T09:18:12.501000-04:00 + + + + + + + England + London + London 2018 + St. James's Park + UK + United Kingdom + + + + + 2018-10-13T09:18:12 + 2018-10-13T09:18:12 + + + 0,7.908329999999999W + 51,30.21430019999997N + + + \ No newline at end of file diff --git a/tests/sidecars/3Jn73XpSQQCluzRBMWRsMA_ext.xmp b/tests/sidecars/3Jn73XpSQQCluzRBMWRsMA_ext.xmp new file mode 100644 index 00000000..87fd86ea --- /dev/null +++ b/tests/sidecars/3Jn73XpSQQCluzRBMWRsMA_ext.xmp @@ -0,0 +1,57 @@ + + + + + jpg + + + + + + + + St. James's Park + + + + + England + London + London 2018 + St. James's Park + UK + United Kingdom + + + 2018-10-13T09:18:12.501000-04:00 + + + + + + + England + London + London 2018 + St. James's Park + UK + United Kingdom + + + + + 2018-10-13T09:18:12 + 2018-10-13T09:18:12 + + + 0,7.908329999999999W + 51,30.21430019999997N + + + \ No newline at end of file diff --git a/tests/sidecars/3Jn73XpSQQCluzRBMWRsMA_ignore_date_modified.json b/tests/sidecars/3Jn73XpSQQCluzRBMWRsMA_ignore_date_modified.json new file mode 100644 index 00000000..fff9c102 --- /dev/null +++ b/tests/sidecars/3Jn73XpSQQCluzRBMWRsMA_ignore_date_modified.json @@ -0,0 +1 @@ +[{"XMP:Title": "St. James's Park", "IPTC:Keywords": ["England", "London", "London 2018", "St. James's Park", "UK", "United Kingdom"], "XMP:Subject": ["England", "London", "London 2018", "St. James's Park", "UK", "United Kingdom"], "XMP:TagsList": ["England", "London", "London 2018", "St. James's Park", "UK", "United Kingdom"], "EXIF:GPSLatitude": 51.50357167, "EXIF:GPSLongitude": -0.1318055, "EXIF:GPSLatitudeRef": "N", "EXIF:GPSLongitudeRef": "W", "EXIF:DateTimeOriginal": "2018:10:13 09:18:12", "EXIF:CreateDate": "2018:10:13 09:18:12", "EXIF:OffsetTimeOriginal": "-04:00", "IPTC:DateCreated": "2018:10:13", "IPTC:TimeCreated": "09:18:12-04:00", "EXIF:ModifyDate": "2018:10:13 09:18:12"}] \ No newline at end of file diff --git a/tests/sidecars/3Jn73XpSQQCluzRBMWRsMA_keyword_template.json b/tests/sidecars/3Jn73XpSQQCluzRBMWRsMA_keyword_template.json new file mode 100644 index 00000000..dd873ad7 --- /dev/null +++ b/tests/sidecars/3Jn73XpSQQCluzRBMWRsMA_keyword_template.json @@ -0,0 +1 @@ +[{"XMP:Title": "St. James's Park", "IPTC:Keywords": ["England", "London", "London 2018", "St. James's Park", "UK", "United Kingdom"], "XMP:Subject": ["England", "London", "London 2018", "St. James's Park", "UK", "United Kingdom"], "XMP:TagsList": ["England", "London", "London 2018", "St. James's Park", "UK", "United Kingdom"], "EXIF:GPSLatitude": 51.50357167, "EXIF:GPSLongitude": -0.1318055, "EXIF:GPSLatitudeRef": "N", "EXIF:GPSLongitudeRef": "W", "EXIF:DateTimeOriginal": "2018:10:13 09:18:12", "EXIF:CreateDate": "2018:10:13 09:18:12", "EXIF:OffsetTimeOriginal": "-04:00", "IPTC:DateCreated": "2018:10:13", "IPTC:TimeCreated": "09:18:12-04:00", "EXIF:ModifyDate": "2019:12:01 11:43:45"}] \ No newline at end of file diff --git a/tests/sidecars/3Jn73XpSQQCluzRBMWRsMA_keyword_template.xmp b/tests/sidecars/3Jn73XpSQQCluzRBMWRsMA_keyword_template.xmp new file mode 100644 index 00000000..357429f9 --- /dev/null +++ b/tests/sidecars/3Jn73XpSQQCluzRBMWRsMA_keyword_template.xmp @@ -0,0 +1,59 @@ + + + + + jpg + + + + + + + + St. James's Park + + + + + 2018 + England + London + London 2018 + St. James's Park + UK + United Kingdom + + + 2018-10-13T09:18:12.501000-04:00 + + + + + + + 2018 + England + London + London 2018 + St. James's Park + UK + United Kingdom + + + + + 2018-10-13T09:18:12 + 2018-10-13T09:18:12 + + + 0,7.908329999999999W + 51,30.21430019999997N + + + \ No newline at end of file diff --git a/tests/sidecars/3Jn73XpSQQCluzRBMWRsMA_no_tag_groups.json b/tests/sidecars/3Jn73XpSQQCluzRBMWRsMA_no_tag_groups.json new file mode 100644 index 00000000..b00ce310 --- /dev/null +++ b/tests/sidecars/3Jn73XpSQQCluzRBMWRsMA_no_tag_groups.json @@ -0,0 +1 @@ +[{"Title": "St. James's Park", "Keywords": ["England", "London", "London 2018", "St. James's Park", "UK", "United Kingdom"], "Subject": ["England", "London", "London 2018", "St. James's Park", "UK", "United Kingdom"], "TagsList": ["England", "London", "London 2018", "St. James's Park", "UK", "United Kingdom"], "GPSLatitude": 51.50357167, "GPSLongitude": -0.1318055, "GPSLatitudeRef": "N", "GPSLongitudeRef": "W", "DateTimeOriginal": "2018:10:13 09:18:12", "CreateDate": "2018:10:13 09:18:12", "OffsetTimeOriginal": "-04:00", "DateCreated": "2018:10:13", "TimeCreated": "09:18:12-04:00", "ModifyDate": "2019:12:01 11:43:45"}] \ No newline at end of file diff --git a/tests/sidecars/3Jn73XpSQQCluzRBMWRsMA_persons_as_keywords.json b/tests/sidecars/3Jn73XpSQQCluzRBMWRsMA_persons_as_keywords.json new file mode 100644 index 00000000..dd873ad7 --- /dev/null +++ b/tests/sidecars/3Jn73XpSQQCluzRBMWRsMA_persons_as_keywords.json @@ -0,0 +1 @@ +[{"XMP:Title": "St. James's Park", "IPTC:Keywords": ["England", "London", "London 2018", "St. James's Park", "UK", "United Kingdom"], "XMP:Subject": ["England", "London", "London 2018", "St. James's Park", "UK", "United Kingdom"], "XMP:TagsList": ["England", "London", "London 2018", "St. James's Park", "UK", "United Kingdom"], "EXIF:GPSLatitude": 51.50357167, "EXIF:GPSLongitude": -0.1318055, "EXIF:GPSLatitudeRef": "N", "EXIF:GPSLongitudeRef": "W", "EXIF:DateTimeOriginal": "2018:10:13 09:18:12", "EXIF:CreateDate": "2018:10:13 09:18:12", "EXIF:OffsetTimeOriginal": "-04:00", "IPTC:DateCreated": "2018:10:13", "IPTC:TimeCreated": "09:18:12-04:00", "EXIF:ModifyDate": "2019:12:01 11:43:45"}] \ No newline at end of file diff --git a/tests/sidecars/3Jn73XpSQQCluzRBMWRsMA_persons_as_keywords.xmp b/tests/sidecars/3Jn73XpSQQCluzRBMWRsMA_persons_as_keywords.xmp new file mode 100644 index 00000000..87fd86ea --- /dev/null +++ b/tests/sidecars/3Jn73XpSQQCluzRBMWRsMA_persons_as_keywords.xmp @@ -0,0 +1,57 @@ + + + + + jpg + + + + + + + + St. James's Park + + + + + England + London + London 2018 + St. James's Park + UK + United Kingdom + + + 2018-10-13T09:18:12.501000-04:00 + + + + + + + England + London + London 2018 + St. James's Park + UK + United Kingdom + + + + + 2018-10-13T09:18:12 + 2018-10-13T09:18:12 + + + 0,7.908329999999999W + 51,30.21430019999997N + + + \ No newline at end of file diff --git a/tests/sidecars/6191423D-8DB8-4D4C-92BE-9BBBA308AAC4.json b/tests/sidecars/6191423D-8DB8-4D4C-92BE-9BBBA308AAC4.json new file mode 100644 index 00000000..1190b169 --- /dev/null +++ b/tests/sidecars/6191423D-8DB8-4D4C-92BE-9BBBA308AAC4.json @@ -0,0 +1 @@ +[{"EXIF:ImageDescription": "Wedding tulips", "XMP:Description": "Wedding tulips", "XMP:Title": "Tulips tied together at a flower shop", "IPTC:Keywords": ["flowers", "wedding"], "XMP:Subject": ["flowers", "wedding"], "XMP:TagsList": ["flowers", "wedding"], "EXIF:DateTimeOriginal": "2019:07:04 16:24:01", "EXIF:CreateDate": "2019:07:04 16:24:01", "EXIF:OffsetTimeOriginal": "-04:00", "IPTC:DateCreated": "2019:07:04", "IPTC:TimeCreated": "16:24:01-04:00", "EXIF:ModifyDate": "2020:05:28 23:39:38"}] \ No newline at end of file diff --git a/tests/sidecars/6191423D-8DB8-4D4C-92BE-9BBBA308AAC4.xmp b/tests/sidecars/6191423D-8DB8-4D4C-92BE-9BBBA308AAC4.xmp new file mode 100644 index 00000000..f8a26dac --- /dev/null +++ b/tests/sidecars/6191423D-8DB8-4D4C-92BE-9BBBA308AAC4.xmp @@ -0,0 +1,47 @@ + + + + + jpg + + + Wedding tulips + + + + + Tulips tied together at a flower shop + + + + + flowers + wedding + + + 2019-07-04T16:24:01-04:00 + + + + + + + flowers + wedding + + + + + 2019-07-04T16:24:01 + 2019-07-04T16:24:01 + + + + + \ No newline at end of file diff --git a/tests/sidecars/6191423D-8DB8-4D4C-92BE-9BBBA308AAC4_albums_as_keywords.json b/tests/sidecars/6191423D-8DB8-4D4C-92BE-9BBBA308AAC4_albums_as_keywords.json new file mode 100644 index 00000000..1190b169 --- /dev/null +++ b/tests/sidecars/6191423D-8DB8-4D4C-92BE-9BBBA308AAC4_albums_as_keywords.json @@ -0,0 +1 @@ +[{"EXIF:ImageDescription": "Wedding tulips", "XMP:Description": "Wedding tulips", "XMP:Title": "Tulips tied together at a flower shop", "IPTC:Keywords": ["flowers", "wedding"], "XMP:Subject": ["flowers", "wedding"], "XMP:TagsList": ["flowers", "wedding"], "EXIF:DateTimeOriginal": "2019:07:04 16:24:01", "EXIF:CreateDate": "2019:07:04 16:24:01", "EXIF:OffsetTimeOriginal": "-04:00", "IPTC:DateCreated": "2019:07:04", "IPTC:TimeCreated": "16:24:01-04:00", "EXIF:ModifyDate": "2020:05:28 23:39:38"}] \ No newline at end of file diff --git a/tests/sidecars/6191423D-8DB8-4D4C-92BE-9BBBA308AAC4_albums_as_keywords.xmp b/tests/sidecars/6191423D-8DB8-4D4C-92BE-9BBBA308AAC4_albums_as_keywords.xmp new file mode 100644 index 00000000..f8a26dac --- /dev/null +++ b/tests/sidecars/6191423D-8DB8-4D4C-92BE-9BBBA308AAC4_albums_as_keywords.xmp @@ -0,0 +1,47 @@ + + + + + jpg + + + Wedding tulips + + + + + Tulips tied together at a flower shop + + + + + flowers + wedding + + + 2019-07-04T16:24:01-04:00 + + + + + + + flowers + wedding + + + + + 2019-07-04T16:24:01 + 2019-07-04T16:24:01 + + + + + \ No newline at end of file diff --git a/tests/sidecars/6191423D-8DB8-4D4C-92BE-9BBBA308AAC4_ext.xmp b/tests/sidecars/6191423D-8DB8-4D4C-92BE-9BBBA308AAC4_ext.xmp new file mode 100644 index 00000000..f8a26dac --- /dev/null +++ b/tests/sidecars/6191423D-8DB8-4D4C-92BE-9BBBA308AAC4_ext.xmp @@ -0,0 +1,47 @@ + + + + + jpg + + + Wedding tulips + + + + + Tulips tied together at a flower shop + + + + + flowers + wedding + + + 2019-07-04T16:24:01-04:00 + + + + + + + flowers + wedding + + + + + 2019-07-04T16:24:01 + 2019-07-04T16:24:01 + + + + + \ No newline at end of file diff --git a/tests/sidecars/6191423D-8DB8-4D4C-92BE-9BBBA308AAC4_ignore_date_modified.json b/tests/sidecars/6191423D-8DB8-4D4C-92BE-9BBBA308AAC4_ignore_date_modified.json new file mode 100644 index 00000000..1854fe1b --- /dev/null +++ b/tests/sidecars/6191423D-8DB8-4D4C-92BE-9BBBA308AAC4_ignore_date_modified.json @@ -0,0 +1 @@ +[{"EXIF:ImageDescription": "Wedding tulips", "XMP:Description": "Wedding tulips", "XMP:Title": "Tulips tied together at a flower shop", "IPTC:Keywords": ["flowers", "wedding"], "XMP:Subject": ["flowers", "wedding"], "XMP:TagsList": ["flowers", "wedding"], "EXIF:DateTimeOriginal": "2019:07:04 16:24:01", "EXIF:CreateDate": "2019:07:04 16:24:01", "EXIF:OffsetTimeOriginal": "-04:00", "IPTC:DateCreated": "2019:07:04", "IPTC:TimeCreated": "16:24:01-04:00", "EXIF:ModifyDate": "2019:07:04 16:24:01"}] \ No newline at end of file diff --git a/tests/sidecars/6191423D-8DB8-4D4C-92BE-9BBBA308AAC4_keyword_template.json b/tests/sidecars/6191423D-8DB8-4D4C-92BE-9BBBA308AAC4_keyword_template.json new file mode 100644 index 00000000..1190b169 --- /dev/null +++ b/tests/sidecars/6191423D-8DB8-4D4C-92BE-9BBBA308AAC4_keyword_template.json @@ -0,0 +1 @@ +[{"EXIF:ImageDescription": "Wedding tulips", "XMP:Description": "Wedding tulips", "XMP:Title": "Tulips tied together at a flower shop", "IPTC:Keywords": ["flowers", "wedding"], "XMP:Subject": ["flowers", "wedding"], "XMP:TagsList": ["flowers", "wedding"], "EXIF:DateTimeOriginal": "2019:07:04 16:24:01", "EXIF:CreateDate": "2019:07:04 16:24:01", "EXIF:OffsetTimeOriginal": "-04:00", "IPTC:DateCreated": "2019:07:04", "IPTC:TimeCreated": "16:24:01-04:00", "EXIF:ModifyDate": "2020:05:28 23:39:38"}] \ No newline at end of file diff --git a/tests/sidecars/6191423D-8DB8-4D4C-92BE-9BBBA308AAC4_keyword_template.xmp b/tests/sidecars/6191423D-8DB8-4D4C-92BE-9BBBA308AAC4_keyword_template.xmp new file mode 100644 index 00000000..824614a1 --- /dev/null +++ b/tests/sidecars/6191423D-8DB8-4D4C-92BE-9BBBA308AAC4_keyword_template.xmp @@ -0,0 +1,49 @@ + + + + + jpg + + + Wedding tulips + + + + + Tulips tied together at a flower shop + + + + + 2019 + flowers + wedding + + + 2019-07-04T16:24:01-04:00 + + + + + + + 2019 + flowers + wedding + + + + + 2019-07-04T16:24:01 + 2019-07-04T16:24:01 + + + + + \ No newline at end of file diff --git a/tests/sidecars/6191423D-8DB8-4D4C-92BE-9BBBA308AAC4_no_tag_groups.json b/tests/sidecars/6191423D-8DB8-4D4C-92BE-9BBBA308AAC4_no_tag_groups.json new file mode 100644 index 00000000..d2884783 --- /dev/null +++ b/tests/sidecars/6191423D-8DB8-4D4C-92BE-9BBBA308AAC4_no_tag_groups.json @@ -0,0 +1 @@ +[{"ImageDescription": "Wedding tulips", "Description": "Wedding tulips", "Title": "Tulips tied together at a flower shop", "Keywords": ["flowers", "wedding"], "Subject": ["flowers", "wedding"], "TagsList": ["flowers", "wedding"], "DateTimeOriginal": "2019:07:04 16:24:01", "CreateDate": "2019:07:04 16:24:01", "OffsetTimeOriginal": "-04:00", "DateCreated": "2019:07:04", "TimeCreated": "16:24:01-04:00", "ModifyDate": "2020:05:28 23:39:38"}] \ No newline at end of file diff --git a/tests/sidecars/6191423D-8DB8-4D4C-92BE-9BBBA308AAC4_persons_as_keywords.json b/tests/sidecars/6191423D-8DB8-4D4C-92BE-9BBBA308AAC4_persons_as_keywords.json new file mode 100644 index 00000000..1190b169 --- /dev/null +++ b/tests/sidecars/6191423D-8DB8-4D4C-92BE-9BBBA308AAC4_persons_as_keywords.json @@ -0,0 +1 @@ +[{"EXIF:ImageDescription": "Wedding tulips", "XMP:Description": "Wedding tulips", "XMP:Title": "Tulips tied together at a flower shop", "IPTC:Keywords": ["flowers", "wedding"], "XMP:Subject": ["flowers", "wedding"], "XMP:TagsList": ["flowers", "wedding"], "EXIF:DateTimeOriginal": "2019:07:04 16:24:01", "EXIF:CreateDate": "2019:07:04 16:24:01", "EXIF:OffsetTimeOriginal": "-04:00", "IPTC:DateCreated": "2019:07:04", "IPTC:TimeCreated": "16:24:01-04:00", "EXIF:ModifyDate": "2020:05:28 23:39:38"}] \ No newline at end of file diff --git a/tests/sidecars/6191423D-8DB8-4D4C-92BE-9BBBA308AAC4_persons_as_keywords.xmp b/tests/sidecars/6191423D-8DB8-4D4C-92BE-9BBBA308AAC4_persons_as_keywords.xmp new file mode 100644 index 00000000..f8a26dac --- /dev/null +++ b/tests/sidecars/6191423D-8DB8-4D4C-92BE-9BBBA308AAC4_persons_as_keywords.xmp @@ -0,0 +1,47 @@ + + + + + jpg + + + Wedding tulips + + + + + Tulips tied together at a flower shop + + + + + flowers + wedding + + + 2019-07-04T16:24:01-04:00 + + + + + + + flowers + wedding + + + + + 2019-07-04T16:24:01 + 2019-07-04T16:24:01 + + + + + \ No newline at end of file diff --git a/tests/sidecars/6bxcNnzRQKGnK4uPrCJ9UQ.json b/tests/sidecars/6bxcNnzRQKGnK4uPrCJ9UQ.json new file mode 100644 index 00000000..448fa279 --- /dev/null +++ b/tests/sidecars/6bxcNnzRQKGnK4uPrCJ9UQ.json @@ -0,0 +1 @@ +[{"EXIF:ImageDescription": "Bride Wedding day", "XMP:Description": "Bride Wedding day", "IPTC:Keywords": ["wedding"], "XMP:Subject": ["wedding"], "XMP:TagsList": ["wedding"], "XMP:PersonInImage": ["Maria"], "EXIF:DateTimeOriginal": "2019:04:15 14:40:24", "EXIF:CreateDate": "2019:04:15 14:40:24", "EXIF:OffsetTimeOriginal": "-04:00", "IPTC:DateCreated": "2019:04:15", "IPTC:TimeCreated": "14:40:24-04:00", "EXIF:ModifyDate": "2019:11:27 01:30:16"}] \ No newline at end of file diff --git a/tests/sidecars/6bxcNnzRQKGnK4uPrCJ9UQ.xmp b/tests/sidecars/6bxcNnzRQKGnK4uPrCJ9UQ.xmp new file mode 100644 index 00000000..80e7acaf --- /dev/null +++ b/tests/sidecars/6bxcNnzRQKGnK4uPrCJ9UQ.xmp @@ -0,0 +1,50 @@ + + + + + jpg + + + Bride Wedding day + + + + + + + + + + wedding + + + 2019-04-15T14:40:24.086000-04:00 + + + + + Maria + + + + + + + wedding + + + + + 2019-04-15T14:40:24 + 2019-04-15T14:40:24 + + + + + \ No newline at end of file diff --git a/tests/sidecars/6bxcNnzRQKGnK4uPrCJ9UQ_albums_as_keywords.json b/tests/sidecars/6bxcNnzRQKGnK4uPrCJ9UQ_albums_as_keywords.json new file mode 100644 index 00000000..448fa279 --- /dev/null +++ b/tests/sidecars/6bxcNnzRQKGnK4uPrCJ9UQ_albums_as_keywords.json @@ -0,0 +1 @@ +[{"EXIF:ImageDescription": "Bride Wedding day", "XMP:Description": "Bride Wedding day", "IPTC:Keywords": ["wedding"], "XMP:Subject": ["wedding"], "XMP:TagsList": ["wedding"], "XMP:PersonInImage": ["Maria"], "EXIF:DateTimeOriginal": "2019:04:15 14:40:24", "EXIF:CreateDate": "2019:04:15 14:40:24", "EXIF:OffsetTimeOriginal": "-04:00", "IPTC:DateCreated": "2019:04:15", "IPTC:TimeCreated": "14:40:24-04:00", "EXIF:ModifyDate": "2019:11:27 01:30:16"}] \ No newline at end of file diff --git a/tests/sidecars/6bxcNnzRQKGnK4uPrCJ9UQ_albums_as_keywords.xmp b/tests/sidecars/6bxcNnzRQKGnK4uPrCJ9UQ_albums_as_keywords.xmp new file mode 100644 index 00000000..80e7acaf --- /dev/null +++ b/tests/sidecars/6bxcNnzRQKGnK4uPrCJ9UQ_albums_as_keywords.xmp @@ -0,0 +1,50 @@ + + + + + jpg + + + Bride Wedding day + + + + + + + + + + wedding + + + 2019-04-15T14:40:24.086000-04:00 + + + + + Maria + + + + + + + wedding + + + + + 2019-04-15T14:40:24 + 2019-04-15T14:40:24 + + + + + \ No newline at end of file diff --git a/tests/sidecars/6bxcNnzRQKGnK4uPrCJ9UQ_ext.xmp b/tests/sidecars/6bxcNnzRQKGnK4uPrCJ9UQ_ext.xmp new file mode 100644 index 00000000..80e7acaf --- /dev/null +++ b/tests/sidecars/6bxcNnzRQKGnK4uPrCJ9UQ_ext.xmp @@ -0,0 +1,50 @@ + + + + + jpg + + + Bride Wedding day + + + + + + + + + + wedding + + + 2019-04-15T14:40:24.086000-04:00 + + + + + Maria + + + + + + + wedding + + + + + 2019-04-15T14:40:24 + 2019-04-15T14:40:24 + + + + + \ No newline at end of file diff --git a/tests/sidecars/6bxcNnzRQKGnK4uPrCJ9UQ_ignore_date_modified.json b/tests/sidecars/6bxcNnzRQKGnK4uPrCJ9UQ_ignore_date_modified.json new file mode 100644 index 00000000..aadf1d83 --- /dev/null +++ b/tests/sidecars/6bxcNnzRQKGnK4uPrCJ9UQ_ignore_date_modified.json @@ -0,0 +1 @@ +[{"EXIF:ImageDescription": "Bride Wedding day", "XMP:Description": "Bride Wedding day", "IPTC:Keywords": ["wedding"], "XMP:Subject": ["wedding"], "XMP:TagsList": ["wedding"], "XMP:PersonInImage": ["Maria"], "EXIF:DateTimeOriginal": "2019:04:15 14:40:24", "EXIF:CreateDate": "2019:04:15 14:40:24", "EXIF:OffsetTimeOriginal": "-04:00", "IPTC:DateCreated": "2019:04:15", "IPTC:TimeCreated": "14:40:24-04:00", "EXIF:ModifyDate": "2019:04:15 14:40:24"}] \ No newline at end of file diff --git a/tests/sidecars/6bxcNnzRQKGnK4uPrCJ9UQ_keyword_template.json b/tests/sidecars/6bxcNnzRQKGnK4uPrCJ9UQ_keyword_template.json new file mode 100644 index 00000000..448fa279 --- /dev/null +++ b/tests/sidecars/6bxcNnzRQKGnK4uPrCJ9UQ_keyword_template.json @@ -0,0 +1 @@ +[{"EXIF:ImageDescription": "Bride Wedding day", "XMP:Description": "Bride Wedding day", "IPTC:Keywords": ["wedding"], "XMP:Subject": ["wedding"], "XMP:TagsList": ["wedding"], "XMP:PersonInImage": ["Maria"], "EXIF:DateTimeOriginal": "2019:04:15 14:40:24", "EXIF:CreateDate": "2019:04:15 14:40:24", "EXIF:OffsetTimeOriginal": "-04:00", "IPTC:DateCreated": "2019:04:15", "IPTC:TimeCreated": "14:40:24-04:00", "EXIF:ModifyDate": "2019:11:27 01:30:16"}] \ No newline at end of file diff --git a/tests/sidecars/6bxcNnzRQKGnK4uPrCJ9UQ_keyword_template.xmp b/tests/sidecars/6bxcNnzRQKGnK4uPrCJ9UQ_keyword_template.xmp new file mode 100644 index 00000000..83439c42 --- /dev/null +++ b/tests/sidecars/6bxcNnzRQKGnK4uPrCJ9UQ_keyword_template.xmp @@ -0,0 +1,52 @@ + + + + + jpg + + + Bride Wedding day + + + + + + + + + + 2019 + wedding + + + 2019-04-15T14:40:24.086000-04:00 + + + + + Maria + + + + + + + 2019 + wedding + + + + + 2019-04-15T14:40:24 + 2019-04-15T14:40:24 + + + + + \ No newline at end of file diff --git a/tests/sidecars/6bxcNnzRQKGnK4uPrCJ9UQ_no_tag_groups.json b/tests/sidecars/6bxcNnzRQKGnK4uPrCJ9UQ_no_tag_groups.json new file mode 100644 index 00000000..0026b939 --- /dev/null +++ b/tests/sidecars/6bxcNnzRQKGnK4uPrCJ9UQ_no_tag_groups.json @@ -0,0 +1 @@ +[{"ImageDescription": "Bride Wedding day", "Description": "Bride Wedding day", "Keywords": ["wedding"], "Subject": ["wedding"], "TagsList": ["wedding"], "PersonInImage": ["Maria"], "DateTimeOriginal": "2019:04:15 14:40:24", "CreateDate": "2019:04:15 14:40:24", "OffsetTimeOriginal": "-04:00", "DateCreated": "2019:04:15", "TimeCreated": "14:40:24-04:00", "ModifyDate": "2019:11:27 01:30:16"}] \ No newline at end of file diff --git a/tests/sidecars/6bxcNnzRQKGnK4uPrCJ9UQ_persons_as_keywords.json b/tests/sidecars/6bxcNnzRQKGnK4uPrCJ9UQ_persons_as_keywords.json new file mode 100644 index 00000000..98d2c6d6 --- /dev/null +++ b/tests/sidecars/6bxcNnzRQKGnK4uPrCJ9UQ_persons_as_keywords.json @@ -0,0 +1 @@ +[{"EXIF:ImageDescription": "Bride Wedding day", "XMP:Description": "Bride Wedding day", "IPTC:Keywords": ["Maria", "wedding"], "XMP:Subject": ["Maria", "wedding"], "XMP:TagsList": ["Maria", "wedding"], "XMP:PersonInImage": ["Maria"], "EXIF:DateTimeOriginal": "2019:04:15 14:40:24", "EXIF:CreateDate": "2019:04:15 14:40:24", "EXIF:OffsetTimeOriginal": "-04:00", "IPTC:DateCreated": "2019:04:15", "IPTC:TimeCreated": "14:40:24-04:00", "EXIF:ModifyDate": "2019:11:27 01:30:16"}] \ No newline at end of file diff --git a/tests/sidecars/6bxcNnzRQKGnK4uPrCJ9UQ_persons_as_keywords.xmp b/tests/sidecars/6bxcNnzRQKGnK4uPrCJ9UQ_persons_as_keywords.xmp new file mode 100644 index 00000000..fe0d4c9e --- /dev/null +++ b/tests/sidecars/6bxcNnzRQKGnK4uPrCJ9UQ_persons_as_keywords.xmp @@ -0,0 +1,52 @@ + + + + + jpg + + + Bride Wedding day + + + + + + + + + + Maria + wedding + + + 2019-04-15T14:40:24.086000-04:00 + + + + + Maria + + + + + + + Maria + wedding + + + + + 2019-04-15T14:40:24 + 2019-04-15T14:40:24 + + + + + \ No newline at end of file diff --git a/tests/sidecars/8SOE9s0XQVGsuq4ONohTng.json b/tests/sidecars/8SOE9s0XQVGsuq4ONohTng.json new file mode 100644 index 00000000..8448cb6a --- /dev/null +++ b/tests/sidecars/8SOE9s0XQVGsuq4ONohTng.json @@ -0,0 +1 @@ +[{"EXIF:ImageDescription": "Girls with pumpkins", "XMP:Description": "Girls with pumpkins", "XMP:Title": "Can we carry this?", "IPTC:Keywords": ["Kids"], "XMP:Subject": ["Kids"], "XMP:TagsList": ["Kids"], "XMP:PersonInImage": ["Katie", "Suzy"], "EXIF:DateTimeOriginal": "2018:09:28 15:35:49", "EXIF:CreateDate": "2018:09:28 15:35:49", "EXIF:OffsetTimeOriginal": "-04:00", "IPTC:DateCreated": "2018:09:28", "IPTC:TimeCreated": "15:35:49-04:00", "EXIF:ModifyDate": "2018:09:28 15:35:49"}] \ No newline at end of file diff --git a/tests/sidecars/8SOE9s0XQVGsuq4ONohTng.xmp b/tests/sidecars/8SOE9s0XQVGsuq4ONohTng.xmp new file mode 100644 index 00000000..eefbf799 --- /dev/null +++ b/tests/sidecars/8SOE9s0XQVGsuq4ONohTng.xmp @@ -0,0 +1,51 @@ + + + + + jpg + + + Girls with pumpkins + + + + + Can we carry this? + + + + + Kids + + + 2018-09-28T15:35:49.063000-04:00 + + + + + Katie + Suzy + + + + + + + Kids + + + + + 2018-09-28T15:35:49 + 2018-09-28T15:35:49 + + + + + \ No newline at end of file diff --git a/tests/sidecars/8SOE9s0XQVGsuq4ONohTng_albums_as_keywords.json b/tests/sidecars/8SOE9s0XQVGsuq4ONohTng_albums_as_keywords.json new file mode 100644 index 00000000..20b7119f --- /dev/null +++ b/tests/sidecars/8SOE9s0XQVGsuq4ONohTng_albums_as_keywords.json @@ -0,0 +1 @@ +[{"EXIF:ImageDescription": "Girls with pumpkins", "XMP:Description": "Girls with pumpkins", "XMP:Title": "Can we carry this?", "IPTC:Keywords": ["Kids", "Pumpkin Farm", "Test Album"], "XMP:Subject": ["Kids", "Pumpkin Farm", "Test Album"], "XMP:TagsList": ["Kids", "Pumpkin Farm", "Test Album"], "XMP:PersonInImage": ["Katie", "Suzy"], "EXIF:DateTimeOriginal": "2018:09:28 15:35:49", "EXIF:CreateDate": "2018:09:28 15:35:49", "EXIF:OffsetTimeOriginal": "-04:00", "IPTC:DateCreated": "2018:09:28", "IPTC:TimeCreated": "15:35:49-04:00", "EXIF:ModifyDate": "2018:09:28 15:35:49"}] \ No newline at end of file diff --git a/tests/sidecars/8SOE9s0XQVGsuq4ONohTng_albums_as_keywords.xmp b/tests/sidecars/8SOE9s0XQVGsuq4ONohTng_albums_as_keywords.xmp new file mode 100644 index 00000000..1da407f7 --- /dev/null +++ b/tests/sidecars/8SOE9s0XQVGsuq4ONohTng_albums_as_keywords.xmp @@ -0,0 +1,55 @@ + + + + + jpg + + + Girls with pumpkins + + + + + Can we carry this? + + + + + Kids + Pumpkin Farm + Test Album + + + 2018-09-28T15:35:49.063000-04:00 + + + + + Katie + Suzy + + + + + + + Kids + Pumpkin Farm + Test Album + + + + + 2018-09-28T15:35:49 + 2018-09-28T15:35:49 + + + + + \ No newline at end of file diff --git a/tests/sidecars/8SOE9s0XQVGsuq4ONohTng_ext.xmp b/tests/sidecars/8SOE9s0XQVGsuq4ONohTng_ext.xmp new file mode 100644 index 00000000..eefbf799 --- /dev/null +++ b/tests/sidecars/8SOE9s0XQVGsuq4ONohTng_ext.xmp @@ -0,0 +1,51 @@ + + + + + jpg + + + Girls with pumpkins + + + + + Can we carry this? + + + + + Kids + + + 2018-09-28T15:35:49.063000-04:00 + + + + + Katie + Suzy + + + + + + + Kids + + + + + 2018-09-28T15:35:49 + 2018-09-28T15:35:49 + + + + + \ No newline at end of file diff --git a/tests/sidecars/8SOE9s0XQVGsuq4ONohTng_ignore_date_modified.json b/tests/sidecars/8SOE9s0XQVGsuq4ONohTng_ignore_date_modified.json new file mode 100644 index 00000000..8448cb6a --- /dev/null +++ b/tests/sidecars/8SOE9s0XQVGsuq4ONohTng_ignore_date_modified.json @@ -0,0 +1 @@ +[{"EXIF:ImageDescription": "Girls with pumpkins", "XMP:Description": "Girls with pumpkins", "XMP:Title": "Can we carry this?", "IPTC:Keywords": ["Kids"], "XMP:Subject": ["Kids"], "XMP:TagsList": ["Kids"], "XMP:PersonInImage": ["Katie", "Suzy"], "EXIF:DateTimeOriginal": "2018:09:28 15:35:49", "EXIF:CreateDate": "2018:09:28 15:35:49", "EXIF:OffsetTimeOriginal": "-04:00", "IPTC:DateCreated": "2018:09:28", "IPTC:TimeCreated": "15:35:49-04:00", "EXIF:ModifyDate": "2018:09:28 15:35:49"}] \ No newline at end of file diff --git a/tests/sidecars/8SOE9s0XQVGsuq4ONohTng_keyword_template.json b/tests/sidecars/8SOE9s0XQVGsuq4ONohTng_keyword_template.json new file mode 100644 index 00000000..20b7119f --- /dev/null +++ b/tests/sidecars/8SOE9s0XQVGsuq4ONohTng_keyword_template.json @@ -0,0 +1 @@ +[{"EXIF:ImageDescription": "Girls with pumpkins", "XMP:Description": "Girls with pumpkins", "XMP:Title": "Can we carry this?", "IPTC:Keywords": ["Kids", "Pumpkin Farm", "Test Album"], "XMP:Subject": ["Kids", "Pumpkin Farm", "Test Album"], "XMP:TagsList": ["Kids", "Pumpkin Farm", "Test Album"], "XMP:PersonInImage": ["Katie", "Suzy"], "EXIF:DateTimeOriginal": "2018:09:28 15:35:49", "EXIF:CreateDate": "2018:09:28 15:35:49", "EXIF:OffsetTimeOriginal": "-04:00", "IPTC:DateCreated": "2018:09:28", "IPTC:TimeCreated": "15:35:49-04:00", "EXIF:ModifyDate": "2018:09:28 15:35:49"}] \ No newline at end of file diff --git a/tests/sidecars/8SOE9s0XQVGsuq4ONohTng_keyword_template.xmp b/tests/sidecars/8SOE9s0XQVGsuq4ONohTng_keyword_template.xmp new file mode 100644 index 00000000..9d8ebc36 --- /dev/null +++ b/tests/sidecars/8SOE9s0XQVGsuq4ONohTng_keyword_template.xmp @@ -0,0 +1,57 @@ + + + + + jpg + + + Girls with pumpkins + + + + + Can we carry this? + + + + + 2018 + Kids + Pumpkin Farm + Test Album + + + 2018-09-28T15:35:49.063000-04:00 + + + + + Katie + Suzy + + + + + + + 2018 + Kids + Pumpkin Farm + Test Album + + + + + 2018-09-28T15:35:49 + 2018-09-28T15:35:49 + + + + + \ No newline at end of file diff --git a/tests/sidecars/8SOE9s0XQVGsuq4ONohTng_no_tag_groups.json b/tests/sidecars/8SOE9s0XQVGsuq4ONohTng_no_tag_groups.json new file mode 100644 index 00000000..88d0077c --- /dev/null +++ b/tests/sidecars/8SOE9s0XQVGsuq4ONohTng_no_tag_groups.json @@ -0,0 +1 @@ +[{"ImageDescription": "Girls with pumpkins", "Description": "Girls with pumpkins", "Title": "Can we carry this?", "Keywords": ["Kids"], "Subject": ["Kids"], "TagsList": ["Kids"], "PersonInImage": ["Katie", "Suzy"], "DateTimeOriginal": "2018:09:28 15:35:49", "CreateDate": "2018:09:28 15:35:49", "OffsetTimeOriginal": "-04:00", "DateCreated": "2018:09:28", "TimeCreated": "15:35:49-04:00", "ModifyDate": "2018:09:28 15:35:49"}] \ No newline at end of file diff --git a/tests/sidecars/8SOE9s0XQVGsuq4ONohTng_persons_as_keywords.json b/tests/sidecars/8SOE9s0XQVGsuq4ONohTng_persons_as_keywords.json new file mode 100644 index 00000000..a649026f --- /dev/null +++ b/tests/sidecars/8SOE9s0XQVGsuq4ONohTng_persons_as_keywords.json @@ -0,0 +1 @@ +[{"EXIF:ImageDescription": "Girls with pumpkins", "XMP:Description": "Girls with pumpkins", "XMP:Title": "Can we carry this?", "IPTC:Keywords": ["Katie", "Kids", "Suzy"], "XMP:Subject": ["Katie", "Kids", "Suzy"], "XMP:TagsList": ["Katie", "Kids", "Suzy"], "XMP:PersonInImage": ["Katie", "Suzy"], "EXIF:DateTimeOriginal": "2018:09:28 15:35:49", "EXIF:CreateDate": "2018:09:28 15:35:49", "EXIF:OffsetTimeOriginal": "-04:00", "IPTC:DateCreated": "2018:09:28", "IPTC:TimeCreated": "15:35:49-04:00", "EXIF:ModifyDate": "2018:09:28 15:35:49"}] \ No newline at end of file diff --git a/tests/sidecars/8SOE9s0XQVGsuq4ONohTng_persons_as_keywords.xmp b/tests/sidecars/8SOE9s0XQVGsuq4ONohTng_persons_as_keywords.xmp new file mode 100644 index 00000000..51694ba9 --- /dev/null +++ b/tests/sidecars/8SOE9s0XQVGsuq4ONohTng_persons_as_keywords.xmp @@ -0,0 +1,55 @@ + + + + + jpg + + + Girls with pumpkins + + + + + Can we carry this? + + + + + Katie + Kids + Suzy + + + 2018-09-28T15:35:49.063000-04:00 + + + + + Katie + Suzy + + + + + + + Katie + Kids + Suzy + + + + + 2018-09-28T15:35:49 + 2018-09-28T15:35:49 + + + + + \ No newline at end of file diff --git a/tests/sidecars/A1DD1F98-2ECD-431F-9AC9-5AFEFE2D3A5C.json b/tests/sidecars/A1DD1F98-2ECD-431F-9AC9-5AFEFE2D3A5C.json new file mode 100644 index 00000000..f5ebbb1f --- /dev/null +++ b/tests/sidecars/A1DD1F98-2ECD-431F-9AC9-5AFEFE2D3A5C.json @@ -0,0 +1 @@ +[{"XMP:Title": "Pumpkin heads", "IPTC:Keywords": ["Kids"], "XMP:Subject": ["Kids"], "XMP:TagsList": ["Kids"], "EXIF:DateTimeOriginal": "2018:09:28 15:39:59", "EXIF:CreateDate": "2018:09:28 15:39:59", "EXIF:OffsetTimeOriginal": "-04:00", "IPTC:DateCreated": "2018:09:28", "IPTC:TimeCreated": "15:39:59-04:00", "EXIF:ModifyDate": "2018:09:28 15:39:59"}] \ No newline at end of file diff --git a/tests/sidecars/A1DD1F98-2ECD-431F-9AC9-5AFEFE2D3A5C.xmp b/tests/sidecars/A1DD1F98-2ECD-431F-9AC9-5AFEFE2D3A5C.xmp new file mode 100644 index 00000000..893b24e9 --- /dev/null +++ b/tests/sidecars/A1DD1F98-2ECD-431F-9AC9-5AFEFE2D3A5C.xmp @@ -0,0 +1,45 @@ + + + + + jpg + + + + + + + + Pumpkin heads + + + + + Kids + + + 2018-09-28T15:39:59.008000-04:00 + + + + + + + Kids + + + + + 2018-09-28T15:39:59 + 2018-09-28T15:39:59 + + + + + \ No newline at end of file diff --git a/tests/sidecars/A1DD1F98-2ECD-431F-9AC9-5AFEFE2D3A5C_albums_as_keywords.json b/tests/sidecars/A1DD1F98-2ECD-431F-9AC9-5AFEFE2D3A5C_albums_as_keywords.json new file mode 100644 index 00000000..f5ebbb1f --- /dev/null +++ b/tests/sidecars/A1DD1F98-2ECD-431F-9AC9-5AFEFE2D3A5C_albums_as_keywords.json @@ -0,0 +1 @@ +[{"XMP:Title": "Pumpkin heads", "IPTC:Keywords": ["Kids"], "XMP:Subject": ["Kids"], "XMP:TagsList": ["Kids"], "EXIF:DateTimeOriginal": "2018:09:28 15:39:59", "EXIF:CreateDate": "2018:09:28 15:39:59", "EXIF:OffsetTimeOriginal": "-04:00", "IPTC:DateCreated": "2018:09:28", "IPTC:TimeCreated": "15:39:59-04:00", "EXIF:ModifyDate": "2018:09:28 15:39:59"}] \ No newline at end of file diff --git a/tests/sidecars/A1DD1F98-2ECD-431F-9AC9-5AFEFE2D3A5C_albums_as_keywords.xmp b/tests/sidecars/A1DD1F98-2ECD-431F-9AC9-5AFEFE2D3A5C_albums_as_keywords.xmp new file mode 100644 index 00000000..893b24e9 --- /dev/null +++ b/tests/sidecars/A1DD1F98-2ECD-431F-9AC9-5AFEFE2D3A5C_albums_as_keywords.xmp @@ -0,0 +1,45 @@ + + + + + jpg + + + + + + + + Pumpkin heads + + + + + Kids + + + 2018-09-28T15:39:59.008000-04:00 + + + + + + + Kids + + + + + 2018-09-28T15:39:59 + 2018-09-28T15:39:59 + + + + + \ No newline at end of file diff --git a/tests/sidecars/A1DD1F98-2ECD-431F-9AC9-5AFEFE2D3A5C_ext.xmp b/tests/sidecars/A1DD1F98-2ECD-431F-9AC9-5AFEFE2D3A5C_ext.xmp new file mode 100644 index 00000000..893b24e9 --- /dev/null +++ b/tests/sidecars/A1DD1F98-2ECD-431F-9AC9-5AFEFE2D3A5C_ext.xmp @@ -0,0 +1,45 @@ + + + + + jpg + + + + + + + + Pumpkin heads + + + + + Kids + + + 2018-09-28T15:39:59.008000-04:00 + + + + + + + Kids + + + + + 2018-09-28T15:39:59 + 2018-09-28T15:39:59 + + + + + \ No newline at end of file diff --git a/tests/sidecars/A1DD1F98-2ECD-431F-9AC9-5AFEFE2D3A5C_ignore_date_modified.json b/tests/sidecars/A1DD1F98-2ECD-431F-9AC9-5AFEFE2D3A5C_ignore_date_modified.json new file mode 100644 index 00000000..f5ebbb1f --- /dev/null +++ b/tests/sidecars/A1DD1F98-2ECD-431F-9AC9-5AFEFE2D3A5C_ignore_date_modified.json @@ -0,0 +1 @@ +[{"XMP:Title": "Pumpkin heads", "IPTC:Keywords": ["Kids"], "XMP:Subject": ["Kids"], "XMP:TagsList": ["Kids"], "EXIF:DateTimeOriginal": "2018:09:28 15:39:59", "EXIF:CreateDate": "2018:09:28 15:39:59", "EXIF:OffsetTimeOriginal": "-04:00", "IPTC:DateCreated": "2018:09:28", "IPTC:TimeCreated": "15:39:59-04:00", "EXIF:ModifyDate": "2018:09:28 15:39:59"}] \ No newline at end of file diff --git a/tests/sidecars/A1DD1F98-2ECD-431F-9AC9-5AFEFE2D3A5C_keyword_template.json b/tests/sidecars/A1DD1F98-2ECD-431F-9AC9-5AFEFE2D3A5C_keyword_template.json new file mode 100644 index 00000000..f5ebbb1f --- /dev/null +++ b/tests/sidecars/A1DD1F98-2ECD-431F-9AC9-5AFEFE2D3A5C_keyword_template.json @@ -0,0 +1 @@ +[{"XMP:Title": "Pumpkin heads", "IPTC:Keywords": ["Kids"], "XMP:Subject": ["Kids"], "XMP:TagsList": ["Kids"], "EXIF:DateTimeOriginal": "2018:09:28 15:39:59", "EXIF:CreateDate": "2018:09:28 15:39:59", "EXIF:OffsetTimeOriginal": "-04:00", "IPTC:DateCreated": "2018:09:28", "IPTC:TimeCreated": "15:39:59-04:00", "EXIF:ModifyDate": "2018:09:28 15:39:59"}] \ No newline at end of file diff --git a/tests/sidecars/A1DD1F98-2ECD-431F-9AC9-5AFEFE2D3A5C_keyword_template.xmp b/tests/sidecars/A1DD1F98-2ECD-431F-9AC9-5AFEFE2D3A5C_keyword_template.xmp new file mode 100644 index 00000000..0f1606c5 --- /dev/null +++ b/tests/sidecars/A1DD1F98-2ECD-431F-9AC9-5AFEFE2D3A5C_keyword_template.xmp @@ -0,0 +1,47 @@ + + + + + jpg + + + + + + + + Pumpkin heads + + + + + 2018 + Kids + + + 2018-09-28T15:39:59.008000-04:00 + + + + + + + 2018 + Kids + + + + + 2018-09-28T15:39:59 + 2018-09-28T15:39:59 + + + + + \ No newline at end of file diff --git a/tests/sidecars/A1DD1F98-2ECD-431F-9AC9-5AFEFE2D3A5C_no_tag_groups.json b/tests/sidecars/A1DD1F98-2ECD-431F-9AC9-5AFEFE2D3A5C_no_tag_groups.json new file mode 100644 index 00000000..8ac9f415 --- /dev/null +++ b/tests/sidecars/A1DD1F98-2ECD-431F-9AC9-5AFEFE2D3A5C_no_tag_groups.json @@ -0,0 +1 @@ +[{"Title": "Pumpkin heads", "Keywords": ["Kids"], "Subject": ["Kids"], "TagsList": ["Kids"], "DateTimeOriginal": "2018:09:28 15:39:59", "CreateDate": "2018:09:28 15:39:59", "OffsetTimeOriginal": "-04:00", "DateCreated": "2018:09:28", "TimeCreated": "15:39:59-04:00", "ModifyDate": "2018:09:28 15:39:59"}] \ No newline at end of file diff --git a/tests/sidecars/A1DD1F98-2ECD-431F-9AC9-5AFEFE2D3A5C_persons_as_keywords.json b/tests/sidecars/A1DD1F98-2ECD-431F-9AC9-5AFEFE2D3A5C_persons_as_keywords.json new file mode 100644 index 00000000..f5ebbb1f --- /dev/null +++ b/tests/sidecars/A1DD1F98-2ECD-431F-9AC9-5AFEFE2D3A5C_persons_as_keywords.json @@ -0,0 +1 @@ +[{"XMP:Title": "Pumpkin heads", "IPTC:Keywords": ["Kids"], "XMP:Subject": ["Kids"], "XMP:TagsList": ["Kids"], "EXIF:DateTimeOriginal": "2018:09:28 15:39:59", "EXIF:CreateDate": "2018:09:28 15:39:59", "EXIF:OffsetTimeOriginal": "-04:00", "IPTC:DateCreated": "2018:09:28", "IPTC:TimeCreated": "15:39:59-04:00", "EXIF:ModifyDate": "2018:09:28 15:39:59"}] \ No newline at end of file diff --git a/tests/sidecars/A1DD1F98-2ECD-431F-9AC9-5AFEFE2D3A5C_persons_as_keywords.xmp b/tests/sidecars/A1DD1F98-2ECD-431F-9AC9-5AFEFE2D3A5C_persons_as_keywords.xmp new file mode 100644 index 00000000..893b24e9 --- /dev/null +++ b/tests/sidecars/A1DD1F98-2ECD-431F-9AC9-5AFEFE2D3A5C_persons_as_keywords.xmp @@ -0,0 +1,45 @@ + + + + + jpg + + + + + + + + Pumpkin heads + + + + + Kids + + + 2018-09-28T15:39:59.008000-04:00 + + + + + + + Kids + + + + + 2018-09-28T15:39:59 + 2018-09-28T15:39:59 + + + + + \ No newline at end of file diff --git a/tests/sidecars/D79B8D77-BFFC-460B-9312-034F2877D35B.json b/tests/sidecars/D79B8D77-BFFC-460B-9312-034F2877D35B.json new file mode 100644 index 00000000..1f3e0c7b --- /dev/null +++ b/tests/sidecars/D79B8D77-BFFC-460B-9312-034F2877D35B.json @@ -0,0 +1 @@ +[{"EXIF:ImageDescription": "Girl holding pumpkin", "XMP:Description": "Girl holding pumpkin", "XMP:Title": "I found one!", "IPTC:Keywords": ["Kids"], "XMP:Subject": ["Kids"], "XMP:TagsList": ["Kids"], "XMP:PersonInImage": ["Katie"], "EXIF:GPSLatitude": 41.256566, "EXIF:GPSLongitude": -95.940257, "EXIF:GPSLatitudeRef": "N", "EXIF:GPSLongitudeRef": "W", "EXIF:DateTimeOriginal": "2018:09:28 16:07:07", "EXIF:CreateDate": "2018:09:28 16:07:07", "EXIF:OffsetTimeOriginal": "-04:00", "IPTC:DateCreated": "2018:09:28", "IPTC:TimeCreated": "16:07:07-04:00", "EXIF:ModifyDate": "2018:09:28 16:07:07"}] \ No newline at end of file diff --git a/tests/sidecars/D79B8D77-BFFC-460B-9312-034F2877D35B.xmp b/tests/sidecars/D79B8D77-BFFC-460B-9312-034F2877D35B.xmp new file mode 100644 index 00000000..e91b9086 --- /dev/null +++ b/tests/sidecars/D79B8D77-BFFC-460B-9312-034F2877D35B.xmp @@ -0,0 +1,52 @@ + + + + + jpg + + + Girl holding pumpkin + + + + + I found one! + + + + + Kids + + + 2018-09-28T16:07:07-04:00 + + + + + Katie + + + + + + + Kids + + + + + 2018-09-28T16:07:07 + 2018-09-28T16:07:07 + + + 95,56.415420000000154W + 41,15.393959999999964N + + + \ No newline at end of file diff --git a/tests/sidecars/D79B8D77-BFFC-460B-9312-034F2877D35B_albums_as_keywords.json b/tests/sidecars/D79B8D77-BFFC-460B-9312-034F2877D35B_albums_as_keywords.json new file mode 100644 index 00000000..e1d1b375 --- /dev/null +++ b/tests/sidecars/D79B8D77-BFFC-460B-9312-034F2877D35B_albums_as_keywords.json @@ -0,0 +1 @@ +[{"EXIF:ImageDescription": "Girl holding pumpkin", "XMP:Description": "Girl holding pumpkin", "XMP:Title": "I found one!", "IPTC:Keywords": ["Kids", "Pumpkin Farm", "Test Album"], "XMP:Subject": ["Kids", "Pumpkin Farm", "Test Album"], "XMP:TagsList": ["Kids", "Pumpkin Farm", "Test Album"], "XMP:PersonInImage": ["Katie"], "EXIF:GPSLatitude": 41.256566, "EXIF:GPSLongitude": -95.940257, "EXIF:GPSLatitudeRef": "N", "EXIF:GPSLongitudeRef": "W", "EXIF:DateTimeOriginal": "2018:09:28 16:07:07", "EXIF:CreateDate": "2018:09:28 16:07:07", "EXIF:OffsetTimeOriginal": "-04:00", "IPTC:DateCreated": "2018:09:28", "IPTC:TimeCreated": "16:07:07-04:00", "EXIF:ModifyDate": "2018:09:28 16:07:07"}] \ No newline at end of file diff --git a/tests/sidecars/D79B8D77-BFFC-460B-9312-034F2877D35B_albums_as_keywords.xmp b/tests/sidecars/D79B8D77-BFFC-460B-9312-034F2877D35B_albums_as_keywords.xmp new file mode 100644 index 00000000..8824a77a --- /dev/null +++ b/tests/sidecars/D79B8D77-BFFC-460B-9312-034F2877D35B_albums_as_keywords.xmp @@ -0,0 +1,56 @@ + + + + + jpg + + + Girl holding pumpkin + + + + + I found one! + + + + + Kids + Pumpkin Farm + Test Album + + + 2018-09-28T16:07:07-04:00 + + + + + Katie + + + + + + + Kids + Pumpkin Farm + Test Album + + + + + 2018-09-28T16:07:07 + 2018-09-28T16:07:07 + + + 95,56.415420000000154W + 41,15.393959999999964N + + + \ No newline at end of file diff --git a/tests/sidecars/D79B8D77-BFFC-460B-9312-034F2877D35B_ext.xmp b/tests/sidecars/D79B8D77-BFFC-460B-9312-034F2877D35B_ext.xmp new file mode 100644 index 00000000..e91b9086 --- /dev/null +++ b/tests/sidecars/D79B8D77-BFFC-460B-9312-034F2877D35B_ext.xmp @@ -0,0 +1,52 @@ + + + + + jpg + + + Girl holding pumpkin + + + + + I found one! + + + + + Kids + + + 2018-09-28T16:07:07-04:00 + + + + + Katie + + + + + + + Kids + + + + + 2018-09-28T16:07:07 + 2018-09-28T16:07:07 + + + 95,56.415420000000154W + 41,15.393959999999964N + + + \ No newline at end of file diff --git a/tests/sidecars/D79B8D77-BFFC-460B-9312-034F2877D35B_ignore_date_modified.json b/tests/sidecars/D79B8D77-BFFC-460B-9312-034F2877D35B_ignore_date_modified.json new file mode 100644 index 00000000..1f3e0c7b --- /dev/null +++ b/tests/sidecars/D79B8D77-BFFC-460B-9312-034F2877D35B_ignore_date_modified.json @@ -0,0 +1 @@ +[{"EXIF:ImageDescription": "Girl holding pumpkin", "XMP:Description": "Girl holding pumpkin", "XMP:Title": "I found one!", "IPTC:Keywords": ["Kids"], "XMP:Subject": ["Kids"], "XMP:TagsList": ["Kids"], "XMP:PersonInImage": ["Katie"], "EXIF:GPSLatitude": 41.256566, "EXIF:GPSLongitude": -95.940257, "EXIF:GPSLatitudeRef": "N", "EXIF:GPSLongitudeRef": "W", "EXIF:DateTimeOriginal": "2018:09:28 16:07:07", "EXIF:CreateDate": "2018:09:28 16:07:07", "EXIF:OffsetTimeOriginal": "-04:00", "IPTC:DateCreated": "2018:09:28", "IPTC:TimeCreated": "16:07:07-04:00", "EXIF:ModifyDate": "2018:09:28 16:07:07"}] \ No newline at end of file diff --git a/tests/sidecars/D79B8D77-BFFC-460B-9312-034F2877D35B_keyword_template.json b/tests/sidecars/D79B8D77-BFFC-460B-9312-034F2877D35B_keyword_template.json new file mode 100644 index 00000000..e1d1b375 --- /dev/null +++ b/tests/sidecars/D79B8D77-BFFC-460B-9312-034F2877D35B_keyword_template.json @@ -0,0 +1 @@ +[{"EXIF:ImageDescription": "Girl holding pumpkin", "XMP:Description": "Girl holding pumpkin", "XMP:Title": "I found one!", "IPTC:Keywords": ["Kids", "Pumpkin Farm", "Test Album"], "XMP:Subject": ["Kids", "Pumpkin Farm", "Test Album"], "XMP:TagsList": ["Kids", "Pumpkin Farm", "Test Album"], "XMP:PersonInImage": ["Katie"], "EXIF:GPSLatitude": 41.256566, "EXIF:GPSLongitude": -95.940257, "EXIF:GPSLatitudeRef": "N", "EXIF:GPSLongitudeRef": "W", "EXIF:DateTimeOriginal": "2018:09:28 16:07:07", "EXIF:CreateDate": "2018:09:28 16:07:07", "EXIF:OffsetTimeOriginal": "-04:00", "IPTC:DateCreated": "2018:09:28", "IPTC:TimeCreated": "16:07:07-04:00", "EXIF:ModifyDate": "2018:09:28 16:07:07"}] \ No newline at end of file diff --git a/tests/sidecars/D79B8D77-BFFC-460B-9312-034F2877D35B_keyword_template.xmp b/tests/sidecars/D79B8D77-BFFC-460B-9312-034F2877D35B_keyword_template.xmp new file mode 100644 index 00000000..33161448 --- /dev/null +++ b/tests/sidecars/D79B8D77-BFFC-460B-9312-034F2877D35B_keyword_template.xmp @@ -0,0 +1,58 @@ + + + + + jpg + + + Girl holding pumpkin + + + + + I found one! + + + + + 2018 + Kids + Pumpkin Farm + Test Album + + + 2018-09-28T16:07:07-04:00 + + + + + Katie + + + + + + + 2018 + Kids + Pumpkin Farm + Test Album + + + + + 2018-09-28T16:07:07 + 2018-09-28T16:07:07 + + + 95,56.415420000000154W + 41,15.393959999999964N + + + \ No newline at end of file diff --git a/tests/sidecars/D79B8D77-BFFC-460B-9312-034F2877D35B_no_tag_groups.json b/tests/sidecars/D79B8D77-BFFC-460B-9312-034F2877D35B_no_tag_groups.json new file mode 100644 index 00000000..b6dbeed0 --- /dev/null +++ b/tests/sidecars/D79B8D77-BFFC-460B-9312-034F2877D35B_no_tag_groups.json @@ -0,0 +1 @@ +[{"ImageDescription": "Girl holding pumpkin", "Description": "Girl holding pumpkin", "Title": "I found one!", "Keywords": ["Kids"], "Subject": ["Kids"], "TagsList": ["Kids"], "PersonInImage": ["Katie"], "GPSLatitude": 41.256566, "GPSLongitude": -95.940257, "GPSLatitudeRef": "N", "GPSLongitudeRef": "W", "DateTimeOriginal": "2018:09:28 16:07:07", "CreateDate": "2018:09:28 16:07:07", "OffsetTimeOriginal": "-04:00", "DateCreated": "2018:09:28", "TimeCreated": "16:07:07-04:00", "ModifyDate": "2018:09:28 16:07:07"}] \ No newline at end of file diff --git a/tests/sidecars/D79B8D77-BFFC-460B-9312-034F2877D35B_persons_as_keywords.json b/tests/sidecars/D79B8D77-BFFC-460B-9312-034F2877D35B_persons_as_keywords.json new file mode 100644 index 00000000..574d2459 --- /dev/null +++ b/tests/sidecars/D79B8D77-BFFC-460B-9312-034F2877D35B_persons_as_keywords.json @@ -0,0 +1 @@ +[{"EXIF:ImageDescription": "Girl holding pumpkin", "XMP:Description": "Girl holding pumpkin", "XMP:Title": "I found one!", "IPTC:Keywords": ["Katie", "Kids"], "XMP:Subject": ["Katie", "Kids"], "XMP:TagsList": ["Katie", "Kids"], "XMP:PersonInImage": ["Katie"], "EXIF:GPSLatitude": 41.256566, "EXIF:GPSLongitude": -95.940257, "EXIF:GPSLatitudeRef": "N", "EXIF:GPSLongitudeRef": "W", "EXIF:DateTimeOriginal": "2018:09:28 16:07:07", "EXIF:CreateDate": "2018:09:28 16:07:07", "EXIF:OffsetTimeOriginal": "-04:00", "IPTC:DateCreated": "2018:09:28", "IPTC:TimeCreated": "16:07:07-04:00", "EXIF:ModifyDate": "2018:09:28 16:07:07"}] \ No newline at end of file diff --git a/tests/sidecars/D79B8D77-BFFC-460B-9312-034F2877D35B_persons_as_keywords.xmp b/tests/sidecars/D79B8D77-BFFC-460B-9312-034F2877D35B_persons_as_keywords.xmp new file mode 100644 index 00000000..7d600e0f --- /dev/null +++ b/tests/sidecars/D79B8D77-BFFC-460B-9312-034F2877D35B_persons_as_keywords.xmp @@ -0,0 +1,54 @@ + + + + + jpg + + + Girl holding pumpkin + + + + + I found one! + + + + + Katie + Kids + + + 2018-09-28T16:07:07-04:00 + + + + + Katie + + + + + + + Katie + Kids + + + + + 2018-09-28T16:07:07 + 2018-09-28T16:07:07 + + + 95,56.415420000000154W + 41,15.393959999999964N + + + \ No newline at end of file diff --git a/tests/sidecars/DC99FBDD-7A52-4100-A5BB-344131646C30.json b/tests/sidecars/DC99FBDD-7A52-4100-A5BB-344131646C30.json new file mode 100644 index 00000000..d8524997 --- /dev/null +++ b/tests/sidecars/DC99FBDD-7A52-4100-A5BB-344131646C30.json @@ -0,0 +1 @@ +[{"XMP:Title": "St. James's Park", "IPTC:Keywords": ["England", "London", "London 2018", "St. James's Park", "UK", "United Kingdom"], "XMP:Subject": ["England", "London", "London 2018", "St. James's Park", "UK", "United Kingdom"], "XMP:TagsList": ["England", "London", "London 2018", "St. James's Park", "UK", "United Kingdom"], "EXIF:GPSLatitude": 51.50357167, "EXIF:GPSLongitude": -0.1318055, "EXIF:GPSLatitudeRef": "N", "EXIF:GPSLongitudeRef": "W", "EXIF:DateTimeOriginal": "2018:10:13 09:18:12", "EXIF:CreateDate": "2018:10:13 09:18:12", "EXIF:OffsetTimeOriginal": "-04:00", "IPTC:DateCreated": "2018:10:13", "IPTC:TimeCreated": "09:18:12-04:00", "EXIF:ModifyDate": "2019:12:01 11:27:48"}] \ No newline at end of file diff --git a/tests/sidecars/DC99FBDD-7A52-4100-A5BB-344131646C30.xmp b/tests/sidecars/DC99FBDD-7A52-4100-A5BB-344131646C30.xmp new file mode 100644 index 00000000..87fd86ea --- /dev/null +++ b/tests/sidecars/DC99FBDD-7A52-4100-A5BB-344131646C30.xmp @@ -0,0 +1,57 @@ + + + + + jpg + + + + + + + + St. James's Park + + + + + England + London + London 2018 + St. James's Park + UK + United Kingdom + + + 2018-10-13T09:18:12.501000-04:00 + + + + + + + England + London + London 2018 + St. James's Park + UK + United Kingdom + + + + + 2018-10-13T09:18:12 + 2018-10-13T09:18:12 + + + 0,7.908329999999999W + 51,30.21430019999997N + + + \ No newline at end of file diff --git a/tests/sidecars/DC99FBDD-7A52-4100-A5BB-344131646C30_albums_as_keywords.json b/tests/sidecars/DC99FBDD-7A52-4100-A5BB-344131646C30_albums_as_keywords.json new file mode 100644 index 00000000..d8524997 --- /dev/null +++ b/tests/sidecars/DC99FBDD-7A52-4100-A5BB-344131646C30_albums_as_keywords.json @@ -0,0 +1 @@ +[{"XMP:Title": "St. James's Park", "IPTC:Keywords": ["England", "London", "London 2018", "St. James's Park", "UK", "United Kingdom"], "XMP:Subject": ["England", "London", "London 2018", "St. James's Park", "UK", "United Kingdom"], "XMP:TagsList": ["England", "London", "London 2018", "St. James's Park", "UK", "United Kingdom"], "EXIF:GPSLatitude": 51.50357167, "EXIF:GPSLongitude": -0.1318055, "EXIF:GPSLatitudeRef": "N", "EXIF:GPSLongitudeRef": "W", "EXIF:DateTimeOriginal": "2018:10:13 09:18:12", "EXIF:CreateDate": "2018:10:13 09:18:12", "EXIF:OffsetTimeOriginal": "-04:00", "IPTC:DateCreated": "2018:10:13", "IPTC:TimeCreated": "09:18:12-04:00", "EXIF:ModifyDate": "2019:12:01 11:27:48"}] \ No newline at end of file diff --git a/tests/sidecars/DC99FBDD-7A52-4100-A5BB-344131646C30_albums_as_keywords.xmp b/tests/sidecars/DC99FBDD-7A52-4100-A5BB-344131646C30_albums_as_keywords.xmp new file mode 100644 index 00000000..87fd86ea --- /dev/null +++ b/tests/sidecars/DC99FBDD-7A52-4100-A5BB-344131646C30_albums_as_keywords.xmp @@ -0,0 +1,57 @@ + + + + + jpg + + + + + + + + St. James's Park + + + + + England + London + London 2018 + St. James's Park + UK + United Kingdom + + + 2018-10-13T09:18:12.501000-04:00 + + + + + + + England + London + London 2018 + St. James's Park + UK + United Kingdom + + + + + 2018-10-13T09:18:12 + 2018-10-13T09:18:12 + + + 0,7.908329999999999W + 51,30.21430019999997N + + + \ No newline at end of file diff --git a/tests/sidecars/DC99FBDD-7A52-4100-A5BB-344131646C30_ext.xmp b/tests/sidecars/DC99FBDD-7A52-4100-A5BB-344131646C30_ext.xmp new file mode 100644 index 00000000..87fd86ea --- /dev/null +++ b/tests/sidecars/DC99FBDD-7A52-4100-A5BB-344131646C30_ext.xmp @@ -0,0 +1,57 @@ + + + + + jpg + + + + + + + + St. James's Park + + + + + England + London + London 2018 + St. James's Park + UK + United Kingdom + + + 2018-10-13T09:18:12.501000-04:00 + + + + + + + England + London + London 2018 + St. James's Park + UK + United Kingdom + + + + + 2018-10-13T09:18:12 + 2018-10-13T09:18:12 + + + 0,7.908329999999999W + 51,30.21430019999997N + + + \ No newline at end of file diff --git a/tests/sidecars/DC99FBDD-7A52-4100-A5BB-344131646C30_ignore_date_modified.json b/tests/sidecars/DC99FBDD-7A52-4100-A5BB-344131646C30_ignore_date_modified.json new file mode 100644 index 00000000..fff9c102 --- /dev/null +++ b/tests/sidecars/DC99FBDD-7A52-4100-A5BB-344131646C30_ignore_date_modified.json @@ -0,0 +1 @@ +[{"XMP:Title": "St. James's Park", "IPTC:Keywords": ["England", "London", "London 2018", "St. James's Park", "UK", "United Kingdom"], "XMP:Subject": ["England", "London", "London 2018", "St. James's Park", "UK", "United Kingdom"], "XMP:TagsList": ["England", "London", "London 2018", "St. James's Park", "UK", "United Kingdom"], "EXIF:GPSLatitude": 51.50357167, "EXIF:GPSLongitude": -0.1318055, "EXIF:GPSLatitudeRef": "N", "EXIF:GPSLongitudeRef": "W", "EXIF:DateTimeOriginal": "2018:10:13 09:18:12", "EXIF:CreateDate": "2018:10:13 09:18:12", "EXIF:OffsetTimeOriginal": "-04:00", "IPTC:DateCreated": "2018:10:13", "IPTC:TimeCreated": "09:18:12-04:00", "EXIF:ModifyDate": "2018:10:13 09:18:12"}] \ No newline at end of file diff --git a/tests/sidecars/DC99FBDD-7A52-4100-A5BB-344131646C30_keyword_template.json b/tests/sidecars/DC99FBDD-7A52-4100-A5BB-344131646C30_keyword_template.json new file mode 100644 index 00000000..d8524997 --- /dev/null +++ b/tests/sidecars/DC99FBDD-7A52-4100-A5BB-344131646C30_keyword_template.json @@ -0,0 +1 @@ +[{"XMP:Title": "St. James's Park", "IPTC:Keywords": ["England", "London", "London 2018", "St. James's Park", "UK", "United Kingdom"], "XMP:Subject": ["England", "London", "London 2018", "St. James's Park", "UK", "United Kingdom"], "XMP:TagsList": ["England", "London", "London 2018", "St. James's Park", "UK", "United Kingdom"], "EXIF:GPSLatitude": 51.50357167, "EXIF:GPSLongitude": -0.1318055, "EXIF:GPSLatitudeRef": "N", "EXIF:GPSLongitudeRef": "W", "EXIF:DateTimeOriginal": "2018:10:13 09:18:12", "EXIF:CreateDate": "2018:10:13 09:18:12", "EXIF:OffsetTimeOriginal": "-04:00", "IPTC:DateCreated": "2018:10:13", "IPTC:TimeCreated": "09:18:12-04:00", "EXIF:ModifyDate": "2019:12:01 11:27:48"}] \ No newline at end of file diff --git a/tests/sidecars/DC99FBDD-7A52-4100-A5BB-344131646C30_keyword_template.xmp b/tests/sidecars/DC99FBDD-7A52-4100-A5BB-344131646C30_keyword_template.xmp new file mode 100644 index 00000000..357429f9 --- /dev/null +++ b/tests/sidecars/DC99FBDD-7A52-4100-A5BB-344131646C30_keyword_template.xmp @@ -0,0 +1,59 @@ + + + + + jpg + + + + + + + + St. James's Park + + + + + 2018 + England + London + London 2018 + St. James's Park + UK + United Kingdom + + + 2018-10-13T09:18:12.501000-04:00 + + + + + + + 2018 + England + London + London 2018 + St. James's Park + UK + United Kingdom + + + + + 2018-10-13T09:18:12 + 2018-10-13T09:18:12 + + + 0,7.908329999999999W + 51,30.21430019999997N + + + \ No newline at end of file diff --git a/tests/sidecars/DC99FBDD-7A52-4100-A5BB-344131646C30_no_tag_groups.json b/tests/sidecars/DC99FBDD-7A52-4100-A5BB-344131646C30_no_tag_groups.json new file mode 100644 index 00000000..1da12591 --- /dev/null +++ b/tests/sidecars/DC99FBDD-7A52-4100-A5BB-344131646C30_no_tag_groups.json @@ -0,0 +1 @@ +[{"Title": "St. James's Park", "Keywords": ["England", "London", "London 2018", "St. James's Park", "UK", "United Kingdom"], "Subject": ["England", "London", "London 2018", "St. James's Park", "UK", "United Kingdom"], "TagsList": ["England", "London", "London 2018", "St. James's Park", "UK", "United Kingdom"], "GPSLatitude": 51.50357167, "GPSLongitude": -0.1318055, "GPSLatitudeRef": "N", "GPSLongitudeRef": "W", "DateTimeOriginal": "2018:10:13 09:18:12", "CreateDate": "2018:10:13 09:18:12", "OffsetTimeOriginal": "-04:00", "DateCreated": "2018:10:13", "TimeCreated": "09:18:12-04:00", "ModifyDate": "2019:12:01 11:27:48"}] \ No newline at end of file diff --git a/tests/sidecars/DC99FBDD-7A52-4100-A5BB-344131646C30_persons_as_keywords.json b/tests/sidecars/DC99FBDD-7A52-4100-A5BB-344131646C30_persons_as_keywords.json new file mode 100644 index 00000000..d8524997 --- /dev/null +++ b/tests/sidecars/DC99FBDD-7A52-4100-A5BB-344131646C30_persons_as_keywords.json @@ -0,0 +1 @@ +[{"XMP:Title": "St. James's Park", "IPTC:Keywords": ["England", "London", "London 2018", "St. James's Park", "UK", "United Kingdom"], "XMP:Subject": ["England", "London", "London 2018", "St. James's Park", "UK", "United Kingdom"], "XMP:TagsList": ["England", "London", "London 2018", "St. James's Park", "UK", "United Kingdom"], "EXIF:GPSLatitude": 51.50357167, "EXIF:GPSLongitude": -0.1318055, "EXIF:GPSLatitudeRef": "N", "EXIF:GPSLongitudeRef": "W", "EXIF:DateTimeOriginal": "2018:10:13 09:18:12", "EXIF:CreateDate": "2018:10:13 09:18:12", "EXIF:OffsetTimeOriginal": "-04:00", "IPTC:DateCreated": "2018:10:13", "IPTC:TimeCreated": "09:18:12-04:00", "EXIF:ModifyDate": "2019:12:01 11:27:48"}] \ No newline at end of file diff --git a/tests/sidecars/DC99FBDD-7A52-4100-A5BB-344131646C30_persons_as_keywords.xmp b/tests/sidecars/DC99FBDD-7A52-4100-A5BB-344131646C30_persons_as_keywords.xmp new file mode 100644 index 00000000..87fd86ea --- /dev/null +++ b/tests/sidecars/DC99FBDD-7A52-4100-A5BB-344131646C30_persons_as_keywords.xmp @@ -0,0 +1,57 @@ + + + + + jpg + + + + + + + + St. James's Park + + + + + England + London + London 2018 + St. James's Park + UK + United Kingdom + + + 2018-10-13T09:18:12.501000-04:00 + + + + + + + England + London + London 2018 + St. James's Park + UK + United Kingdom + + + + + 2018-10-13T09:18:12 + 2018-10-13T09:18:12 + + + 0,7.908329999999999W + 51,30.21430019999997N + + + \ No newline at end of file diff --git a/tests/sidecars/E9BC5C36-7CD1-40A1-A72B-8B8FAC227D51.json b/tests/sidecars/E9BC5C36-7CD1-40A1-A72B-8B8FAC227D51.json new file mode 100644 index 00000000..2d7dbadb --- /dev/null +++ b/tests/sidecars/E9BC5C36-7CD1-40A1-A72B-8B8FAC227D51.json @@ -0,0 +1 @@ +[{"EXIF:ImageDescription": "Bride Wedding day", "XMP:Description": "Bride Wedding day", "IPTC:Keywords": ["Maria", "wedding"], "XMP:Subject": ["Maria", "wedding"], "XMP:TagsList": ["Maria", "wedding"], "XMP:PersonInImage": ["Maria"], "EXIF:DateTimeOriginal": "2019:04:15 14:40:24", "EXIF:CreateDate": "2019:04:15 14:40:24", "EXIF:OffsetTimeOriginal": "-04:00", "IPTC:DateCreated": "2019:04:15", "IPTC:TimeCreated": "14:40:24-04:00", "EXIF:ModifyDate": "2019:07:27 17:33:28"}] \ No newline at end of file diff --git a/tests/sidecars/E9BC5C36-7CD1-40A1-A72B-8B8FAC227D51.xmp b/tests/sidecars/E9BC5C36-7CD1-40A1-A72B-8B8FAC227D51.xmp new file mode 100644 index 00000000..fe0d4c9e --- /dev/null +++ b/tests/sidecars/E9BC5C36-7CD1-40A1-A72B-8B8FAC227D51.xmp @@ -0,0 +1,52 @@ + + + + + jpg + + + Bride Wedding day + + + + + + + + + + Maria + wedding + + + 2019-04-15T14:40:24.086000-04:00 + + + + + Maria + + + + + + + Maria + wedding + + + + + 2019-04-15T14:40:24 + 2019-04-15T14:40:24 + + + + + \ No newline at end of file diff --git a/tests/sidecars/E9BC5C36-7CD1-40A1-A72B-8B8FAC227D51_albums_as_keywords.json b/tests/sidecars/E9BC5C36-7CD1-40A1-A72B-8B8FAC227D51_albums_as_keywords.json new file mode 100644 index 00000000..34251222 --- /dev/null +++ b/tests/sidecars/E9BC5C36-7CD1-40A1-A72B-8B8FAC227D51_albums_as_keywords.json @@ -0,0 +1 @@ +[{"EXIF:ImageDescription": "Bride Wedding day", "XMP:Description": "Bride Wedding day", "IPTC:Keywords": ["AlbumInFolder", "I have a deleted twin", "Maria", "wedding"], "XMP:Subject": ["AlbumInFolder", "I have a deleted twin", "Maria", "wedding"], "XMP:TagsList": ["AlbumInFolder", "I have a deleted twin", "Maria", "wedding"], "XMP:PersonInImage": ["Maria"], "EXIF:DateTimeOriginal": "2019:04:15 14:40:24", "EXIF:CreateDate": "2019:04:15 14:40:24", "EXIF:OffsetTimeOriginal": "-04:00", "IPTC:DateCreated": "2019:04:15", "IPTC:TimeCreated": "14:40:24-04:00", "EXIF:ModifyDate": "2019:07:27 17:33:28"}] \ No newline at end of file diff --git a/tests/sidecars/E9BC5C36-7CD1-40A1-A72B-8B8FAC227D51_albums_as_keywords.xmp b/tests/sidecars/E9BC5C36-7CD1-40A1-A72B-8B8FAC227D51_albums_as_keywords.xmp new file mode 100644 index 00000000..60d724eb --- /dev/null +++ b/tests/sidecars/E9BC5C36-7CD1-40A1-A72B-8B8FAC227D51_albums_as_keywords.xmp @@ -0,0 +1,56 @@ + + + + + jpg + + + Bride Wedding day + + + + + + + + + + AlbumInFolder + I have a deleted twin + Maria + wedding + + + 2019-04-15T14:40:24.086000-04:00 + + + + + Maria + + + + + + + AlbumInFolder + I have a deleted twin + Maria + wedding + + + + + 2019-04-15T14:40:24 + 2019-04-15T14:40:24 + + + + + \ No newline at end of file diff --git a/tests/sidecars/E9BC5C36-7CD1-40A1-A72B-8B8FAC227D51_ext.xmp b/tests/sidecars/E9BC5C36-7CD1-40A1-A72B-8B8FAC227D51_ext.xmp new file mode 100644 index 00000000..fe0d4c9e --- /dev/null +++ b/tests/sidecars/E9BC5C36-7CD1-40A1-A72B-8B8FAC227D51_ext.xmp @@ -0,0 +1,52 @@ + + + + + jpg + + + Bride Wedding day + + + + + + + + + + Maria + wedding + + + 2019-04-15T14:40:24.086000-04:00 + + + + + Maria + + + + + + + Maria + wedding + + + + + 2019-04-15T14:40:24 + 2019-04-15T14:40:24 + + + + + \ No newline at end of file diff --git a/tests/sidecars/E9BC5C36-7CD1-40A1-A72B-8B8FAC227D51_ignore_date_modified.json b/tests/sidecars/E9BC5C36-7CD1-40A1-A72B-8B8FAC227D51_ignore_date_modified.json new file mode 100644 index 00000000..a544cb63 --- /dev/null +++ b/tests/sidecars/E9BC5C36-7CD1-40A1-A72B-8B8FAC227D51_ignore_date_modified.json @@ -0,0 +1 @@ +[{"EXIF:ImageDescription": "Bride Wedding day", "XMP:Description": "Bride Wedding day", "IPTC:Keywords": ["Maria", "wedding"], "XMP:Subject": ["Maria", "wedding"], "XMP:TagsList": ["Maria", "wedding"], "XMP:PersonInImage": ["Maria"], "EXIF:DateTimeOriginal": "2019:04:15 14:40:24", "EXIF:CreateDate": "2019:04:15 14:40:24", "EXIF:OffsetTimeOriginal": "-04:00", "IPTC:DateCreated": "2019:04:15", "IPTC:TimeCreated": "14:40:24-04:00", "EXIF:ModifyDate": "2019:04:15 14:40:24"}] \ No newline at end of file diff --git a/tests/sidecars/E9BC5C36-7CD1-40A1-A72B-8B8FAC227D51_keyword_template.json b/tests/sidecars/E9BC5C36-7CD1-40A1-A72B-8B8FAC227D51_keyword_template.json new file mode 100644 index 00000000..a16244a5 --- /dev/null +++ b/tests/sidecars/E9BC5C36-7CD1-40A1-A72B-8B8FAC227D51_keyword_template.json @@ -0,0 +1 @@ +[{"EXIF:ImageDescription": "Bride Wedding day", "XMP:Description": "Bride Wedding day", "IPTC:Keywords": ["Folder1/SubFolder2/AlbumInFolder", "I have a deleted twin", "Maria", "wedding"], "XMP:Subject": ["Folder1/SubFolder2/AlbumInFolder", "I have a deleted twin", "Maria", "wedding"], "XMP:TagsList": ["Folder1/SubFolder2/AlbumInFolder", "I have a deleted twin", "Maria", "wedding"], "XMP:PersonInImage": ["Maria"], "EXIF:DateTimeOriginal": "2019:04:15 14:40:24", "EXIF:CreateDate": "2019:04:15 14:40:24", "EXIF:OffsetTimeOriginal": "-04:00", "IPTC:DateCreated": "2019:04:15", "IPTC:TimeCreated": "14:40:24-04:00", "EXIF:ModifyDate": "2019:07:27 17:33:28"}] \ No newline at end of file diff --git a/tests/sidecars/E9BC5C36-7CD1-40A1-A72B-8B8FAC227D51_keyword_template.xmp b/tests/sidecars/E9BC5C36-7CD1-40A1-A72B-8B8FAC227D51_keyword_template.xmp new file mode 100644 index 00000000..0ba0e481 --- /dev/null +++ b/tests/sidecars/E9BC5C36-7CD1-40A1-A72B-8B8FAC227D51_keyword_template.xmp @@ -0,0 +1,58 @@ + + + + + jpg + + + Bride Wedding day + + + + + + + + + + 2019 + Folder1/SubFolder2/AlbumInFolder + I have a deleted twin + Maria + wedding + + + 2019-04-15T14:40:24.086000-04:00 + + + + + Maria + + + + + + + 2019 + Folder1/SubFolder2/AlbumInFolder + I have a deleted twin + Maria + wedding + + + + + 2019-04-15T14:40:24 + 2019-04-15T14:40:24 + + + + + \ No newline at end of file diff --git a/tests/sidecars/E9BC5C36-7CD1-40A1-A72B-8B8FAC227D51_no_tag_groups.json b/tests/sidecars/E9BC5C36-7CD1-40A1-A72B-8B8FAC227D51_no_tag_groups.json new file mode 100644 index 00000000..20fb59e2 --- /dev/null +++ b/tests/sidecars/E9BC5C36-7CD1-40A1-A72B-8B8FAC227D51_no_tag_groups.json @@ -0,0 +1 @@ +[{"ImageDescription": "Bride Wedding day", "Description": "Bride Wedding day", "Keywords": ["Maria", "wedding"], "Subject": ["Maria", "wedding"], "TagsList": ["Maria", "wedding"], "PersonInImage": ["Maria"], "DateTimeOriginal": "2019:04:15 14:40:24", "CreateDate": "2019:04:15 14:40:24", "OffsetTimeOriginal": "-04:00", "DateCreated": "2019:04:15", "TimeCreated": "14:40:24-04:00", "ModifyDate": "2019:07:27 17:33:28"}] \ No newline at end of file diff --git a/tests/sidecars/E9BC5C36-7CD1-40A1-A72B-8B8FAC227D51_persons_as_keywords.json b/tests/sidecars/E9BC5C36-7CD1-40A1-A72B-8B8FAC227D51_persons_as_keywords.json new file mode 100644 index 00000000..2d7dbadb --- /dev/null +++ b/tests/sidecars/E9BC5C36-7CD1-40A1-A72B-8B8FAC227D51_persons_as_keywords.json @@ -0,0 +1 @@ +[{"EXIF:ImageDescription": "Bride Wedding day", "XMP:Description": "Bride Wedding day", "IPTC:Keywords": ["Maria", "wedding"], "XMP:Subject": ["Maria", "wedding"], "XMP:TagsList": ["Maria", "wedding"], "XMP:PersonInImage": ["Maria"], "EXIF:DateTimeOriginal": "2019:04:15 14:40:24", "EXIF:CreateDate": "2019:04:15 14:40:24", "EXIF:OffsetTimeOriginal": "-04:00", "IPTC:DateCreated": "2019:04:15", "IPTC:TimeCreated": "14:40:24-04:00", "EXIF:ModifyDate": "2019:07:27 17:33:28"}] \ No newline at end of file diff --git a/tests/sidecars/E9BC5C36-7CD1-40A1-A72B-8B8FAC227D51_persons_as_keywords.xmp b/tests/sidecars/E9BC5C36-7CD1-40A1-A72B-8B8FAC227D51_persons_as_keywords.xmp new file mode 100644 index 00000000..fe0d4c9e --- /dev/null +++ b/tests/sidecars/E9BC5C36-7CD1-40A1-A72B-8B8FAC227D51_persons_as_keywords.xmp @@ -0,0 +1,52 @@ + + + + + jpg + + + Bride Wedding day + + + + + + + + + + Maria + wedding + + + 2019-04-15T14:40:24.086000-04:00 + + + + + Maria + + + + + + + Maria + wedding + + + + + 2019-04-15T14:40:24 + 2019-04-15T14:40:24 + + + + + \ No newline at end of file diff --git a/tests/sidecars/F12384F6-CD17-4151-ACBA-AE0E3688539E.json b/tests/sidecars/F12384F6-CD17-4151-ACBA-AE0E3688539E.json new file mode 100644 index 00000000..8448cb6a --- /dev/null +++ b/tests/sidecars/F12384F6-CD17-4151-ACBA-AE0E3688539E.json @@ -0,0 +1 @@ +[{"EXIF:ImageDescription": "Girls with pumpkins", "XMP:Description": "Girls with pumpkins", "XMP:Title": "Can we carry this?", "IPTC:Keywords": ["Kids"], "XMP:Subject": ["Kids"], "XMP:TagsList": ["Kids"], "XMP:PersonInImage": ["Katie", "Suzy"], "EXIF:DateTimeOriginal": "2018:09:28 15:35:49", "EXIF:CreateDate": "2018:09:28 15:35:49", "EXIF:OffsetTimeOriginal": "-04:00", "IPTC:DateCreated": "2018:09:28", "IPTC:TimeCreated": "15:35:49-04:00", "EXIF:ModifyDate": "2018:09:28 15:35:49"}] \ No newline at end of file diff --git a/tests/sidecars/F12384F6-CD17-4151-ACBA-AE0E3688539E.xmp b/tests/sidecars/F12384F6-CD17-4151-ACBA-AE0E3688539E.xmp new file mode 100644 index 00000000..eefbf799 --- /dev/null +++ b/tests/sidecars/F12384F6-CD17-4151-ACBA-AE0E3688539E.xmp @@ -0,0 +1,51 @@ + + + + + jpg + + + Girls with pumpkins + + + + + Can we carry this? + + + + + Kids + + + 2018-09-28T15:35:49.063000-04:00 + + + + + Katie + Suzy + + + + + + + Kids + + + + + 2018-09-28T15:35:49 + 2018-09-28T15:35:49 + + + + + \ No newline at end of file diff --git a/tests/sidecars/F12384F6-CD17-4151-ACBA-AE0E3688539E_albums_as_keywords.json b/tests/sidecars/F12384F6-CD17-4151-ACBA-AE0E3688539E_albums_as_keywords.json new file mode 100644 index 00000000..20b7119f --- /dev/null +++ b/tests/sidecars/F12384F6-CD17-4151-ACBA-AE0E3688539E_albums_as_keywords.json @@ -0,0 +1 @@ +[{"EXIF:ImageDescription": "Girls with pumpkins", "XMP:Description": "Girls with pumpkins", "XMP:Title": "Can we carry this?", "IPTC:Keywords": ["Kids", "Pumpkin Farm", "Test Album"], "XMP:Subject": ["Kids", "Pumpkin Farm", "Test Album"], "XMP:TagsList": ["Kids", "Pumpkin Farm", "Test Album"], "XMP:PersonInImage": ["Katie", "Suzy"], "EXIF:DateTimeOriginal": "2018:09:28 15:35:49", "EXIF:CreateDate": "2018:09:28 15:35:49", "EXIF:OffsetTimeOriginal": "-04:00", "IPTC:DateCreated": "2018:09:28", "IPTC:TimeCreated": "15:35:49-04:00", "EXIF:ModifyDate": "2018:09:28 15:35:49"}] \ No newline at end of file diff --git a/tests/sidecars/F12384F6-CD17-4151-ACBA-AE0E3688539E_albums_as_keywords.xmp b/tests/sidecars/F12384F6-CD17-4151-ACBA-AE0E3688539E_albums_as_keywords.xmp new file mode 100644 index 00000000..1da407f7 --- /dev/null +++ b/tests/sidecars/F12384F6-CD17-4151-ACBA-AE0E3688539E_albums_as_keywords.xmp @@ -0,0 +1,55 @@ + + + + + jpg + + + Girls with pumpkins + + + + + Can we carry this? + + + + + Kids + Pumpkin Farm + Test Album + + + 2018-09-28T15:35:49.063000-04:00 + + + + + Katie + Suzy + + + + + + + Kids + Pumpkin Farm + Test Album + + + + + 2018-09-28T15:35:49 + 2018-09-28T15:35:49 + + + + + \ No newline at end of file diff --git a/tests/sidecars/F12384F6-CD17-4151-ACBA-AE0E3688539E_ext.xmp b/tests/sidecars/F12384F6-CD17-4151-ACBA-AE0E3688539E_ext.xmp new file mode 100644 index 00000000..eefbf799 --- /dev/null +++ b/tests/sidecars/F12384F6-CD17-4151-ACBA-AE0E3688539E_ext.xmp @@ -0,0 +1,51 @@ + + + + + jpg + + + Girls with pumpkins + + + + + Can we carry this? + + + + + Kids + + + 2018-09-28T15:35:49.063000-04:00 + + + + + Katie + Suzy + + + + + + + Kids + + + + + 2018-09-28T15:35:49 + 2018-09-28T15:35:49 + + + + + \ No newline at end of file diff --git a/tests/sidecars/F12384F6-CD17-4151-ACBA-AE0E3688539E_ignore_date_modified.json b/tests/sidecars/F12384F6-CD17-4151-ACBA-AE0E3688539E_ignore_date_modified.json new file mode 100644 index 00000000..8448cb6a --- /dev/null +++ b/tests/sidecars/F12384F6-CD17-4151-ACBA-AE0E3688539E_ignore_date_modified.json @@ -0,0 +1 @@ +[{"EXIF:ImageDescription": "Girls with pumpkins", "XMP:Description": "Girls with pumpkins", "XMP:Title": "Can we carry this?", "IPTC:Keywords": ["Kids"], "XMP:Subject": ["Kids"], "XMP:TagsList": ["Kids"], "XMP:PersonInImage": ["Katie", "Suzy"], "EXIF:DateTimeOriginal": "2018:09:28 15:35:49", "EXIF:CreateDate": "2018:09:28 15:35:49", "EXIF:OffsetTimeOriginal": "-04:00", "IPTC:DateCreated": "2018:09:28", "IPTC:TimeCreated": "15:35:49-04:00", "EXIF:ModifyDate": "2018:09:28 15:35:49"}] \ No newline at end of file diff --git a/tests/sidecars/F12384F6-CD17-4151-ACBA-AE0E3688539E_keyword_template.json b/tests/sidecars/F12384F6-CD17-4151-ACBA-AE0E3688539E_keyword_template.json new file mode 100644 index 00000000..20b7119f --- /dev/null +++ b/tests/sidecars/F12384F6-CD17-4151-ACBA-AE0E3688539E_keyword_template.json @@ -0,0 +1 @@ +[{"EXIF:ImageDescription": "Girls with pumpkins", "XMP:Description": "Girls with pumpkins", "XMP:Title": "Can we carry this?", "IPTC:Keywords": ["Kids", "Pumpkin Farm", "Test Album"], "XMP:Subject": ["Kids", "Pumpkin Farm", "Test Album"], "XMP:TagsList": ["Kids", "Pumpkin Farm", "Test Album"], "XMP:PersonInImage": ["Katie", "Suzy"], "EXIF:DateTimeOriginal": "2018:09:28 15:35:49", "EXIF:CreateDate": "2018:09:28 15:35:49", "EXIF:OffsetTimeOriginal": "-04:00", "IPTC:DateCreated": "2018:09:28", "IPTC:TimeCreated": "15:35:49-04:00", "EXIF:ModifyDate": "2018:09:28 15:35:49"}] \ No newline at end of file diff --git a/tests/sidecars/F12384F6-CD17-4151-ACBA-AE0E3688539E_keyword_template.xmp b/tests/sidecars/F12384F6-CD17-4151-ACBA-AE0E3688539E_keyword_template.xmp new file mode 100644 index 00000000..9d8ebc36 --- /dev/null +++ b/tests/sidecars/F12384F6-CD17-4151-ACBA-AE0E3688539E_keyword_template.xmp @@ -0,0 +1,57 @@ + + + + + jpg + + + Girls with pumpkins + + + + + Can we carry this? + + + + + 2018 + Kids + Pumpkin Farm + Test Album + + + 2018-09-28T15:35:49.063000-04:00 + + + + + Katie + Suzy + + + + + + + 2018 + Kids + Pumpkin Farm + Test Album + + + + + 2018-09-28T15:35:49 + 2018-09-28T15:35:49 + + + + + \ No newline at end of file diff --git a/tests/sidecars/F12384F6-CD17-4151-ACBA-AE0E3688539E_no_tag_groups.json b/tests/sidecars/F12384F6-CD17-4151-ACBA-AE0E3688539E_no_tag_groups.json new file mode 100644 index 00000000..88d0077c --- /dev/null +++ b/tests/sidecars/F12384F6-CD17-4151-ACBA-AE0E3688539E_no_tag_groups.json @@ -0,0 +1 @@ +[{"ImageDescription": "Girls with pumpkins", "Description": "Girls with pumpkins", "Title": "Can we carry this?", "Keywords": ["Kids"], "Subject": ["Kids"], "TagsList": ["Kids"], "PersonInImage": ["Katie", "Suzy"], "DateTimeOriginal": "2018:09:28 15:35:49", "CreateDate": "2018:09:28 15:35:49", "OffsetTimeOriginal": "-04:00", "DateCreated": "2018:09:28", "TimeCreated": "15:35:49-04:00", "ModifyDate": "2018:09:28 15:35:49"}] \ No newline at end of file diff --git a/tests/sidecars/F12384F6-CD17-4151-ACBA-AE0E3688539E_persons_as_keywords.json b/tests/sidecars/F12384F6-CD17-4151-ACBA-AE0E3688539E_persons_as_keywords.json new file mode 100644 index 00000000..a649026f --- /dev/null +++ b/tests/sidecars/F12384F6-CD17-4151-ACBA-AE0E3688539E_persons_as_keywords.json @@ -0,0 +1 @@ +[{"EXIF:ImageDescription": "Girls with pumpkins", "XMP:Description": "Girls with pumpkins", "XMP:Title": "Can we carry this?", "IPTC:Keywords": ["Katie", "Kids", "Suzy"], "XMP:Subject": ["Katie", "Kids", "Suzy"], "XMP:TagsList": ["Katie", "Kids", "Suzy"], "XMP:PersonInImage": ["Katie", "Suzy"], "EXIF:DateTimeOriginal": "2018:09:28 15:35:49", "EXIF:CreateDate": "2018:09:28 15:35:49", "EXIF:OffsetTimeOriginal": "-04:00", "IPTC:DateCreated": "2018:09:28", "IPTC:TimeCreated": "15:35:49-04:00", "EXIF:ModifyDate": "2018:09:28 15:35:49"}] \ No newline at end of file diff --git a/tests/sidecars/F12384F6-CD17-4151-ACBA-AE0E3688539E_persons_as_keywords.xmp b/tests/sidecars/F12384F6-CD17-4151-ACBA-AE0E3688539E_persons_as_keywords.xmp new file mode 100644 index 00000000..51694ba9 --- /dev/null +++ b/tests/sidecars/F12384F6-CD17-4151-ACBA-AE0E3688539E_persons_as_keywords.xmp @@ -0,0 +1,55 @@ + + + + + jpg + + + Girls with pumpkins + + + + + Can we carry this? + + + + + Katie + Kids + Suzy + + + 2018-09-28T15:35:49.063000-04:00 + + + + + Katie + Suzy + + + + + + + Katie + Kids + Suzy + + + + + 2018-09-28T15:35:49 + 2018-09-28T15:35:49 + + + + + \ No newline at end of file diff --git a/tests/test_export_catalina_10_15_7.py b/tests/test_export_catalina_10_15_7.py index 9e41b23e..c7edf618 100644 --- a/tests/test_export_catalina_10_15_7.py +++ b/tests/test_export_catalina_10_15_7.py @@ -1,3 +1,8 @@ +""" Test export for 10.15.7 """ + +import json +import pathlib + import pytest import osxphotos @@ -12,6 +17,7 @@ except: exiftool = None PHOTOS_DB = "./tests/Test-10.15.7.photoslibrary/database/photos.db" +SIDECAR_DIR = "./tests/sidecars" @pytest.fixture(scope="module") @@ -76,50 +82,6 @@ XMP_FILENAME = "Pumkins1.jpg.xmp" XMP_JPG_FILENAME = "Pumkins1.jpg" EXIF_JSON_UUID = UUID_DICT["has_adjustments"] -EXIF_JSON_EXPECTED = """ - [{"EXIF:ImageDescription": "Bride Wedding day", - "XMP:Description": "Bride Wedding day", - "XMP:TagsList": ["Maria", "wedding"], - "IPTC:Keywords": ["Maria", "wedding"], - "XMP:PersonInImage": ["Maria"], - "XMP:Subject": ["wedding", "Maria"], - "EXIF:DateTimeOriginal": "2019:04:15 14:40:24", - "EXIF:CreateDate": "2019:04:15 14:40:24", - "EXIF:OffsetTimeOriginal": "-04:00", - "IPTC:DateCreated": "2019:04:15", - "IPTC:TimeCreated": "14:40:24-04:00", - "EXIF:ModifyDate": "2019:07:27 17:33:28"}] - """ - -EXIFTOOL_SIDECAR_EXPECTED = """ - [{"ImageDescription": "Bride Wedding day", - "Description": "Bride Wedding day", - "TagsList": ["Maria", "wedding"], - "Keywords": ["Maria", "wedding"], - "PersonInImage": ["Maria"], - "Subject": ["wedding", "Maria"], - "DateTimeOriginal": "2019:04:15 14:40:24", - "CreateDate": "2019:04:15 14:40:24", - "OffsetTimeOriginal": "-04:00", - "DateCreated": "2019:04:15", - "TimeCreated": "14:40:24-04:00", - "ModifyDate": "2019:07:27 17:33:28"}] - """ - -EXIF_JSON_EXPECTED_IGNORE_DATE_MODIFIED = """ - [{"EXIF:ImageDescription": "Bride Wedding day", - "XMP:Description": "Bride Wedding day", - "XMP:TagsList": ["Maria", "wedding"], - "IPTC:Keywords": ["Maria", "wedding"], - "XMP:PersonInImage": ["Maria"], - "XMP:Subject": ["wedding", "Maria"], - "EXIF:DateTimeOriginal": "2019:04:15 14:40:24", - "EXIF:CreateDate": "2019:04:15 14:40:24", - "EXIF:OffsetTimeOriginal": "-04:00", - "IPTC:DateCreated": "2019:04:15", - "IPTC:TimeCreated": "14:40:24-04:00", - "EXIF:ModifyDate": "2019:04:15 14:40:24"}] - """ def test_export_1(photosdb): @@ -175,10 +137,9 @@ def test_export_3(photosdb): filename = photos[0].filename filename2 = pathlib.Path(filename) filename2 = f"{filename2.stem} (1){filename2.suffix}" - expected_dest = os.path.join(dest, filename) expected_dest_2 = os.path.join(dest, filename2) - got_dest = photos[0].export(dest)[0] + got_dest_1 = photos[0].export(dest)[0] got_dest_2 = photos[0].export(dest)[0] assert got_dest_2 == expected_dest_2 @@ -200,10 +161,9 @@ def test_export_4(photosdb): timestamp = time.time() filename = f"osxphotos-export-2-test-{timestamp}.jpg" filename2 = f"osxphotos-export-2-test-{timestamp} (1).jpg" - expected_dest = os.path.join(dest, filename) expected_dest_2 = os.path.join(dest, filename2) - got_dest = photos[0].export(dest, filename)[0] + got_dest_1 = photos[0].export(dest, filename)[0] got_dest_2 = photos[0].export(dest, filename)[0] assert got_dest_2 == expected_dest_2 @@ -440,56 +400,37 @@ def test_dd_to_dms_str_4(): def test_exiftool_json_sidecar(photosdb): - import json - photos = photosdb.photos(uuid=[EXIF_JSON_UUID]) + uuid = EXIF_JSON_UUID + photo = photosdb.get_photo(uuid) - json_expected = json.loads(EXIF_JSON_EXPECTED)[0] + with open(str(pathlib.Path(SIDECAR_DIR) / f"{uuid}.json"), "r") as fp: + json_expected = json.load(fp)[0] - json_got = photos[0]._exiftool_json_sidecar() + json_got = photo._exiftool_json_sidecar() json_got = json.loads(json_got)[0] - # some gymnastics to account for different sort order in different pythons - for k, v in json_got.items(): - if type(v) in (list, tuple): - assert sorted(json_expected[k]) == sorted(v) - else: - assert json_expected[k] == v - - for k, v in json_expected.items(): - if type(v) in (list, tuple): - assert sorted(json_got[k]) == sorted(v) - else: - assert json_got[k] == v + assert json_got == json_expected def test_exiftool_json_sidecar_ignore_date_modified(photosdb): - import json - photos = photosdb.photos(uuid=[EXIF_JSON_UUID]) + uuid = EXIF_JSON_UUID + photo = photosdb.get_photo(uuid) - json_expected = json.loads(EXIF_JSON_EXPECTED_IGNORE_DATE_MODIFIED)[0] + with open( + str(pathlib.Path(SIDECAR_DIR) / f"{uuid}_ignore_date_modified.json"), "r" + ) as fp: + json_expected = json.load(fp)[0] - json_got = photos[0]._exiftool_json_sidecar(ignore_date_modified=True) + json_got = photo._exiftool_json_sidecar(ignore_date_modified=True) json_got = json.loads(json_got)[0] - # some gymnastics to account for different sort order in different pythons - for k, v in json_got.items(): - if type(v) in (list, tuple): - assert sorted(json_expected[k]) == sorted(v) - else: - assert json_expected[k] == v - - for k, v in json_expected.items(): - if type(v) in (list, tuple): - assert sorted(json_got[k]) == sorted(v) - else: - assert json_got[k] == v + assert json_got == json_expected def test_exiftool_json_sidecar_keyword_template_long(caplog, photosdb): from osxphotos._constants import _MAX_IPTC_KEYWORD_LEN - import json photos = photosdb.photos(uuid=[EXIF_JSON_UUID]) @@ -536,165 +477,62 @@ def test_exiftool_json_sidecar_keyword_template_long(caplog, photosdb): def test_exiftool_json_sidecar_keyword_template(photosdb): - import json - photos = photosdb.photos(uuid=[EXIF_JSON_UUID]) + uuid = EXIF_JSON_UUID + photo = photosdb.get_photo(uuid) - json_expected = json.loads( - """ - [{"EXIF:ImageDescription": "Bride Wedding day", - "XMP:Description": "Bride Wedding day", - "XMP:TagsList": ["Maria", "wedding", "Folder1/SubFolder2/AlbumInFolder", "I have a deleted twin"], - "IPTC:Keywords": ["Maria", "wedding", "Folder1/SubFolder2/AlbumInFolder", "I have a deleted twin"], - "XMP:Subject": ["Maria", "wedding", "Folder1/SubFolder2/AlbumInFolder", "I have a deleted twin"], - "XMP:PersonInImage": ["Maria"], - "EXIF:DateTimeOriginal": "2019:04:15 14:40:24", - "EXIF:CreateDate": "2019:04:15 14:40:24", - "EXIF:OffsetTimeOriginal": "-04:00", - "IPTC:DateCreated": "2019:04:15", - "IPTC:TimeCreated": "14:40:24-04:00", - "EXIF:ModifyDate": "2019:07:27 17:33:28"}] - """ - )[0] + with open( + str(pathlib.Path(SIDECAR_DIR) / f"{uuid}_keyword_template.json"), "r" + ) as fp: + json_expected = json.load(fp) + json_got = photo._exiftool_json_sidecar(keyword_template=["{folder_album}"]) + json_got = json.loads(json_got) - json_got = photos[0]._exiftool_json_sidecar(keyword_template=["{folder_album}"]) - json_got = json.loads(json_got)[0] - - # some gymnastics to account for different sort order in different pythons - for k, v in json_got.items(): - if type(v) in (list, tuple): - assert sorted(json_expected[k]) == sorted(v) - else: - assert json_expected[k] == v - - for k, v in json_expected.items(): - if type(v) in (list, tuple): - assert sorted(json_got[k]) == sorted(v) - else: - assert json_got[k] == v - - # some gymnastics to account for different sort order in different pythons - for k, v in json_got.items(): - if type(v) in (list, tuple): - assert sorted(json_expected[k]) == sorted(v) - else: - assert json_expected[k] == v - - for k, v in json_expected.items(): - if type(v) in (list, tuple): - assert sorted(json_got[k]) == sorted(v) - else: - assert json_got[k] == v - - for k, v in json_expected.items(): - if type(v) in (list, tuple): - assert sorted(json_got[k]) == sorted(v) - else: - assert json_got[k] == v + assert json_got == json_expected def test_exiftool_json_sidecar_use_persons_keyword(photosdb): - import json - photos = photosdb.photos(uuid=[UUID_DICT["xmp"]]) + uuid = UUID_DICT["xmp"] + photo = photosdb.get_photo(uuid) - json_expected = json.loads( - """ - [{"EXIF:ImageDescription": "Girls with pumpkins", - "XMP:Description": "Girls with pumpkins", - "XMP:Title": "Can we carry this?", - "XMP:TagsList": ["Kids", "Suzy", "Katie"], - "IPTC:Keywords": ["Kids", "Suzy", "Katie"], - "XMP:PersonInImage": ["Suzy", "Katie"], - "XMP:Subject": ["Kids", "Suzy", "Katie"], - "EXIF:DateTimeOriginal": "2018:09:28 15:35:49", - "EXIF:CreateDate": "2018:09:28 15:35:49", - "EXIF:OffsetTimeOriginal": "-04:00", - "IPTC:DateCreated": "2018:09:28", - "IPTC:TimeCreated": "15:35:49-04:00", - "EXIF:ModifyDate": "2018:09:28 15:35:49"}] - """ - )[0] + with open( + str(pathlib.Path(SIDECAR_DIR) / f"{uuid}_persons_as_keywords.json"), "r" + ) as fp: + json_expected = json.load(fp)[0] - json_got = photos[0]._exiftool_json_sidecar(use_persons_as_keywords=True) + json_got = photo._exiftool_json_sidecar(use_persons_as_keywords=True) json_got = json.loads(json_got)[0] - # some gymnastics to account for different sort order in different pythons - for k, v in json_got.items(): - if type(v) in (list, tuple): - assert sorted(json_expected[k]) == sorted(v) - else: - assert json_expected[k] == v - - for k, v in json_expected.items(): - if type(v) in (list, tuple): - assert sorted(json_got[k]) == sorted(v) - else: - assert json_got[k] == v + assert json_got == json_expected -def test_exiftool_json_sidecar_use_albums_keyword(photosdb): - import json +def test_exiftool_json_sidecar_use_albums_keywords(photosdb): - photos = photosdb.photos(uuid=[UUID_DICT["xmp"]]) + uuid = UUID_DICT["xmp"] + photo = photosdb.get_photo(uuid) - json_expected = json.loads( - """ - [{"EXIF:ImageDescription": "Girls with pumpkins", - "XMP:Description": "Girls with pumpkins", - "XMP:Title": "Can we carry this?", - "XMP:TagsList": ["Kids", "Pumpkin Farm", "Test Album"], - "IPTC:Keywords": ["Kids", "Pumpkin Farm", "Test Album"], - "XMP:PersonInImage": ["Suzy", "Katie"], - "XMP:Subject": ["Kids", "Pumpkin Farm", "Test Album"], - "EXIF:DateTimeOriginal": "2018:09:28 15:35:49", - "EXIF:CreateDate": "2018:09:28 15:35:49", - "EXIF:OffsetTimeOriginal": "-04:00", - "IPTC:DateCreated": "2018:09:28", - "IPTC:TimeCreated": "15:35:49-04:00", - "EXIF:ModifyDate": "2018:09:28 15:35:49"}] - """ - )[0] + with open( + str(pathlib.Path(SIDECAR_DIR) / f"{uuid}_albums_as_keywords.json"), "r" + ) as fp: + json_expected = json.load(fp) - json_got = photos[0]._exiftool_json_sidecar(use_albums_as_keywords=True) - json_got = json.loads(json_got)[0] + json_got = photo._exiftool_json_sidecar(use_albums_as_keywords=True) + json_got = json.loads(json_got) - # some gymnastics to account for different sort order in different pythons - for k, v in json_got.items(): - if type(v) in (list, tuple): - assert sorted(json_expected[k]) == sorted(v) - else: - assert json_expected[k] == v - - for k, v in json_expected.items(): - if type(v) in (list, tuple): - assert sorted(json_got[k]) == sorted(v) - else: - assert json_got[k] == v + assert json_got == json_expected def test_exiftool_sidecar(photosdb): - import json + uuid = EXIF_JSON_UUID + photo = photosdb.get_photo(uuid) - photos = photosdb.photos(uuid=[EXIF_JSON_UUID]) + with open(pathlib.Path(SIDECAR_DIR) / f"{uuid}_no_tag_groups.json", "r") as fp: + json_expected = fp.read() - json_expected = json.loads(EXIFTOOL_SIDECAR_EXPECTED)[0] + json_got = photo._exiftool_json_sidecar(tag_groups=False) - json_got = photos[0]._exiftool_json_sidecar(tag_groups=False) - json_got = json.loads(json_got)[0] - - # some gymnastics to account for different sort order in different pythons - for k, v in json_got.items(): - if type(v) in (list, tuple): - assert sorted(json_expected[k]) == sorted(v) - else: - assert json_expected[k] == v - - for k, v in json_expected.items(): - if type(v) in (list, tuple): - assert sorted(json_got[k]) == sorted(v) - else: - assert json_got[k] == v + assert json_got == json_expected @pytest.mark.skipif(exiftool is None, reason="exiftool not installed") @@ -713,383 +551,75 @@ def test_xmp_sidecar_is_valid(tmp_path, photosdb): def test_xmp_sidecar(photosdb): - photos = photosdb.photos(uuid=[UUID_DICT["xmp"]]) - - xmp_expected = """ - - - - - jpg - Girls with pumpkins - Can we carry this? - - - Kids - - - 2018-09-28T15:35:49.063000-04:00 - - - - - Suzy - Katie - - - - - - - Kids - - - - - 2018-09-28T15:35:49 - 2018-09-28T15:35:49 - - - - - """ - - xmp_expected_lines = [line.strip() for line in xmp_expected.split("\n")] + uuid = UUID_DICT["xmp"] + photos = photosdb.photos(uuid=[uuid]) + with open(f"tests/sidecars/{uuid}.xmp", "r") as file: + xmp_expected = file.read() xmp_got = photos[0]._xmp_sidecar(extension="jpg") - xmp_got_lines = [line.strip() for line in xmp_got.split("\n")] - - for line_expected, line_got in zip( - sorted(xmp_expected_lines), sorted(xmp_got_lines) - ): - assert line_expected == line_got + assert xmp_got == xmp_expected def test_xmp_sidecar_extension(photosdb): """ test XMP sidecar when no extension is passed """ - photos = photosdb.photos(uuid=[UUID_DICT["xmp"]]) + uuid = UUID_DICT["xmp"] + photos = photosdb.photos(uuid=[uuid]) - xmp_expected = """ - - - - - jpg - Girls with pumpkins - Can we carry this? - - - Kids - - - 2018-09-28T15:35:49.063000-04:00 - - - - - Suzy - Katie - - - - - - - Kids - - - - - 2018-09-28T15:35:49 - 2018-09-28T15:35:49 - - - - - """ - - xmp_expected_lines = [line.strip() for line in xmp_expected.split("\n")] + with open(f"tests/sidecars/{uuid}.xmp", "r") as file: + xmp_expected = file.read() + xmp_expected_lines = [line.strip() for line in xmp_expected.split("\n")] xmp_got = photos[0]._xmp_sidecar() - xmp_got_lines = [line.strip() for line in xmp_got.split("\n")] - - for line_expected, line_got in zip( - sorted(xmp_expected_lines), sorted(xmp_got_lines) - ): - assert line_expected == line_got + assert xmp_got == xmp_expected def test_xmp_sidecar_use_persons_keyword(photosdb): - photos = photosdb.photos(uuid=[UUID_DICT["xmp"]]) + uuid = UUID_DICT["xmp"] + photo = photosdb.get_photo(uuid) - xmp_expected = """ - - - - - jpg - Girls with pumpkins - Can we carry this? - - - Kids - Suzy - Katie - - - 2018-09-28T15:35:49.063000-04:00 - - - - - Suzy - Katie - - - - - - - Kids - Suzy - Katie - - - - - 2018-09-28T15:35:49 - 2018-09-28T15:35:49 - - - - - """ + with open(pathlib.Path(SIDECAR_DIR) / f"{uuid}_persons_as_keywords.xmp") as fp: + xmp_expected = fp.read() - xmp_expected_lines = [line.strip() for line in xmp_expected.split("\n")] - - xmp_got = photos[0]._xmp_sidecar(use_persons_as_keywords=True, extension="jpg") - xmp_got_lines = [line.strip() for line in xmp_got.split("\n")] - - for line_expected, line_got in zip( - sorted(xmp_expected_lines), sorted(xmp_got_lines) - ): - assert line_expected == line_got + xmp_got = photo._xmp_sidecar(use_persons_as_keywords=True, extension="jpg") + assert xmp_got == xmp_expected def test_xmp_sidecar_use_albums_keyword(photosdb): - photos = photosdb.photos(uuid=[UUID_DICT["xmp"]]) + uuid = UUID_DICT["xmp"] + photo = photosdb.get_photo(uuid) - xmp_expected = """ - - - - - jpg - Girls with pumpkins - Can we carry this? - - - Kids - Pumpkin Farm - Test Album - - - 2018-09-28T15:35:49.063000-04:00 - - - - - Suzy - Katie - - - - - - - Kids - Pumpkin Farm - Test Album - - - - - 2018-09-28T15:35:49 - 2018-09-28T15:35:49 - - - - - """ + with open(pathlib.Path(SIDECAR_DIR) / f"{uuid}_albums_as_keywords.xmp") as fp: + xmp_expected = fp.read() - xmp_expected_lines = [line.strip() for line in xmp_expected.split("\n")] - - xmp_got = photos[0]._xmp_sidecar(use_albums_as_keywords=True, extension="jpg") - xmp_got_lines = [line.strip() for line in xmp_got.split("\n")] - - for line_expected, line_got in zip( - sorted(xmp_expected_lines), sorted(xmp_got_lines) - ): - assert line_expected == line_got + xmp_got = photo._xmp_sidecar(use_albums_as_keywords=True, extension="jpg") + assert xmp_got == xmp_expected def test_xmp_sidecar_gps(photosdb): """ Test export XMP sidecar with GPS info """ - photos = photosdb.photos(uuid=[UUID_DICT["location"]]) + uuid = UUID_DICT["location"] + photo = photosdb.get_photo(uuid) - xmp_expected = """ - - - - - jpg - - St. James's Park - - - UK - England - London - United Kingdom - London 2018 - St. James's Park - - - 2018-10-13T09:18:12.501000-04:00 - - - - - - - UK - England - London - United Kingdom - London 2018 - St. James's Park - - - - - 2018-10-13T09:18:12 - 2018-10-13T09:18:12 - - - 0,7.908329999999999W - 51,30.21430019999997N - - -""" + with open(pathlib.Path(SIDECAR_DIR) / f"{uuid}.xmp") as fp: + xmp_expected = fp.read() - xmp_expected_lines = [line.strip() for line in xmp_expected.split("\n")] - - xmp_got = photos[0]._xmp_sidecar(extension="jpg") - xmp_got_lines = [line.strip() for line in xmp_got.split("\n")] - - for line_expected, line_got in zip( - sorted(xmp_expected_lines), sorted(xmp_got_lines) - ): - assert line_expected == line_got + xmp_got = photo._xmp_sidecar() + assert xmp_got == xmp_expected def test_xmp_sidecar_keyword_template(photosdb): - photos = photosdb.photos(uuid=[UUID_DICT["xmp"]]) + uuid = UUID_DICT["location"] + photo = photosdb.get_photo(uuid) - xmp_expected = """ - - - - - jpg - Girls with pumpkins - Can we carry this? - - - Kids - Pumpkin Farm - Test Album - 2018 - - - 2018-09-28T15:35:49.063000-04:00 - - - - - Suzy - Katie - - - - - - - Kids - Pumpkin Farm - Test Album - 2018 - - - - - 2018-09-28T15:35:49 - 2018-09-28T15:35:49 - - - - - """ + with open(pathlib.Path(SIDECAR_DIR) / f"{uuid}_keyword_template.xmp") as fp: + xmp_expected = fp.read() - xmp_expected_lines = [line.strip() for line in xmp_expected.split("\n")] - - xmp_got = photos[0]._xmp_sidecar( + xmp_got = photo._xmp_sidecar( keyword_template=["{created.year}", "{folder_album}"], extension="jpg" ) - xmp_got_lines = [line.strip() for line in xmp_got.split("\n")] - - for line_expected, line_got in zip( - sorted(xmp_expected_lines), sorted(xmp_got_lines) - ): - assert line_expected == line_got + assert xmp_got == xmp_expected diff --git a/tests/test_export_mojave_10_14_6.py b/tests/test_export_mojave_10_14_6.py index 5fbab61b..a53a74b1 100644 --- a/tests/test_export_mojave_10_14_6.py +++ b/tests/test_export_mojave_10_14_6.py @@ -1,8 +1,9 @@ import pytest +import json import osxphotos from osxphotos._constants import _UNKNOWN_PERSON - +import pathlib PHOTOS_DB = "./tests/Test-10.14.6.photoslibrary/database/photos.db" PHOTOS_DB_PATH = "/Test-10.14.6.photoslibrary/database/photos.db" @@ -44,22 +45,7 @@ UUID_DICT = { "xmp": "8SOE9s0XQVGsuq4ONohTng", } -EXIF_JSON_EXPECTED = """ - [{"XMP:Title": "St. James\'s Park", - "XMP:TagsList": ["UK", "England", "London", "United Kingdom", "London 2018", "St. James\'s Park"], - "IPTC:Keywords": ["UK", "England", "London", "United Kingdom", "London 2018", "St. James\'s Park"], - "XMP:Subject": ["UK", "England", "London", "United Kingdom", "London 2018", "St. James\'s Park"], - "EXIF:GPSLatitude": 51.50357167, - "EXIF:GPSLongitude": -0.1318055, - "EXIF:GPSLatitudeRef": "N", - "EXIF:GPSLongitudeRef": "W", - "EXIF:DateTimeOriginal": "2018:10:13 09:18:12", - "EXIF:CreateDate": "2018:10:13 09:18:12", - "EXIF:OffsetTimeOriginal": "-04:00", - "IPTC:DateCreated": "2018:10:13", - "IPTC:TimeCreated": "09:18:12-04:00", - "EXIF:ModifyDate": "2019:12:01 11:43:45"}] - """ +SIDECAR_DIR = "./tests/sidecars" @pytest.fixture(scope="module") @@ -348,150 +334,42 @@ def test_export_13(photosdb): def test_exiftool_json_sidecar(photosdb): - import json - photos = photosdb.photos(uuid=[UUID_DICT["location"]]) + uuid = UUID_DICT["location"] + photo = photosdb.get_photo(uuid) - json_expected = json.loads(EXIF_JSON_EXPECTED)[0] + with open(str(pathlib.Path(SIDECAR_DIR) / f"{uuid}.json"), "r") as fp: + json_expected = json.load(fp)[0] - json_got = photos[0]._exiftool_json_sidecar() + json_got = photo._exiftool_json_sidecar() json_got = json.loads(json_got)[0] - # some gymnastics to account for different sort order in different pythons - for k, v in json_got.items(): - if type(v) in (list, tuple): - assert sorted(json_expected[k]) == sorted(v) - else: - assert json_expected[k] == v - - for k, v in json_expected.items(): - if type(v) in (list, tuple): - assert sorted(json_got[k]) == sorted(v) - else: - assert json_got[k] == v + assert json_got == json_expected def test_xmp_sidecar(photosdb): - photos = photosdb.photos(uuid=[UUID_DICT["xmp"]]) + uuid = UUID_DICT["xmp"] + photo = photosdb.get_photo(uuid) - xmp_expected = """ - - - - - jpg - Girls with pumpkins - Can we carry this? - - - Kids - - - 2018-09-28T15:35:49.063000-04:00 - - - - - Katie - Suzy - - - - - - - Kids - - - - - 2018-09-28T15:35:49 - 2018-09-28T15:35:49 - - - - - """ + with open(pathlib.Path(SIDECAR_DIR) / f"{uuid}_ext.xmp") as fp: + xmp_expected = fp.read() - xmp_expected_lines = [line.strip() for line in xmp_expected.split("\n")] + xmp_got = photo._xmp_sidecar(extension="jpg") - xmp_got = photos[0]._xmp_sidecar(extension="jpg") - xmp_got_lines = [line.strip() for line in xmp_got.split("\n")] - - for line_expected, line_got in zip(xmp_expected_lines, xmp_got_lines): - assert line_expected == line_got + assert xmp_got == xmp_expected def test_xmp_sidecar_keyword_template(photosdb): - photos = photosdb.photos(uuid=[UUID_DICT["xmp"]]) + uuid = UUID_DICT["xmp"] + photo = photosdb.get_photo(uuid) - xmp_expected = """ - - - - - jpg - Girls with pumpkins - Can we carry this? - - - Kids - Test Album - Pumpkin Farm - 2018 - - - 2018-09-28T15:35:49.063000-04:00 - - - - - Suzy - Katie - - - - - - - Kids - Test Album - Pumpkin Farm - 2018 - - - - - 2018-09-28T15:35:49 - 2018-09-28T15:35:49 - - - - - """ + with open(pathlib.Path(SIDECAR_DIR) / f"{uuid}_keyword_template.xmp") as fp: + xmp_expected = fp.read() - xmp_expected_lines = [line.strip() for line in xmp_expected.split("\n")] - - xmp_got = photos[0]._xmp_sidecar( - keyword_template=["{folder_album}", "{created.year}"], extension="jpg" + xmp_got = photo._xmp_sidecar( + keyword_template=["{created.year}", "{folder_album}"], extension="jpg" ) - xmp_got_lines = [line.strip() for line in xmp_got.split("\n")] - for line_expected, line_got in zip( - sorted(xmp_expected_lines), sorted(xmp_got_lines) - ): - assert line_expected == line_got + assert xmp_got == xmp_expected diff --git a/tests/test_sidecar_xmp.py b/tests/test_sidecar_xmp.py new file mode 100644 index 00000000..2847927d --- /dev/null +++ b/tests/test_sidecar_xmp.py @@ -0,0 +1,58 @@ +""" Test XMP sidecar """ + +import pathlib +import tempfile + +import pytest + +import osxphotos +from osxphotos._constants import SIDECAR_XMP +from osxphotos.exiftool import ExifTool, get_exiftool_path +from osxphotos.fileutil import FileUtil + +PHOTOS_DB_15_7 = "tests/Test-10.15.7.photoslibrary" + +XMP_TEST_CASES = { + "no_title": "1EB2B765-0765-43BA-A90C-0D0580E6172C", + "no_keywords": "3DD2C897-F19E-4CA6-8C22-B027D5A71907", + "video": "35329C57-B963-48D6-BB75-6AFF9370CBBC", + "title_descr_tag_person": "D79B8D77-BFFC-460B-9312-034F2877D35B", + "descr_tag_person": "E9BC5C36-7CD1-40A1-A72B-8B8FAC227D51", +} + + +# determine if exiftool installed so exiftool tests can be skipped +try: + exiftool = get_exiftool_path() +except: + exiftool = None + + +@pytest.fixture(scope="module") +def photosdb(): + return osxphotos.PhotosDB(dbfile=PHOTOS_DB_15_7) + + +@pytest.mark.skipif(exiftool is None, reason="exiftool not installed") +def test_sidecar_xmp(photosdb): + for test_case, uuid in XMP_TEST_CASES.items(): + tempdir = tempfile.TemporaryDirectory(prefix="osxphotos") + dest = tempdir.name + photo = photosdb.get_photo(uuid) + photo.export2(dest, photo.original_filename, sidecar=SIDECAR_XMP) + filepath = str(pathlib.Path(dest) / photo.original_filename) + xmppath = filepath + ".xmp" + + # update the exif and ensure no warnings or errors + exif = ExifTool(filepath) + output, warning, error = exif.run_commands("-tagsfromfile", xmppath, "-all:all") + assert not warning + assert not error + + # merge xmp sidecar and ensure no warnings or errors + test_xmp = str(pathlib.Path(dest) / "test.xmp") + FileUtil.copy(xmppath, test_xmp) + exif = ExifTool(test_xmp) + output, warning, error = exif.run_commands("-tagsfromfile", xmppath, "-all:all", test_xmp, no_file=True) + assert not warning + assert not error