{"id":602731,"date":"2024-10-01T21:46:34","date_gmt":"2024-10-02T04:46:34","guid":{"rendered":"https:\/\/dreness.com\/blog\/?p=602731"},"modified":"2024-10-01T21:46:35","modified_gmt":"2024-10-02T04:46:35","slug":"access-photos-apps-judgements-of-your-photos","status":"publish","type":"post","link":"https:\/\/dreness.com\/blog\/archives\/602731","title":{"rendered":"Access Photos.app&#8217;s Judgements of your Photos"},"content":{"rendered":"\n<p>Ever look at the sqlite3 DB in the Photos.app library bundle <code>~\/Pictures\/Photos Library.photoslibrary<\/code>? So much stuff. I would suggest making a copy of it, and only mess around with the copy.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import sqlite3\n\n# Connect to your database\nconn = sqlite3.connect('\/path\/to\/your\/Photos copy.sqlite')\ncursor = conn.cursor()\n\n# Get the list of tables\ncursor.execute(\"SELECT name FROM sqlite_master WHERE type='table';\")\ntables = cursor.fetchall()\n\n# Loop through the tables and check for columns containing \"SCORE\"\nfor table in tables:\n    table_name = table&#91;0]\n    cursor.execute(f\"PRAGMA table_info({table_name});\")\n    columns = cursor.fetchall()\n    for column in columns:\n        column_name = column&#91;1]\n        if \"SCORE\" in column_name:\n            print(f\"Table '{table_name}' has a column '{column_name}' containing 'SCORE'.\")\n\n# Close the connection\nconn.close()<\/code><\/pre>\n\n\n\n<p>The output of the above code is shown below:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Table 'ZCOMPUTEDASSETATTRIBUTES' has a column 'ZBEHAVIORALSCORE' containing 'SCORE'.\nTable 'ZCOMPUTEDASSETATTRIBUTES' has a column 'ZFAILURESCORE' containing 'SCORE'.\nTable 'ZCOMPUTEDASSETATTRIBUTES' has a column 'ZHARMONIOUSCOLORSCORE' containing 'SCORE'.\nTable 'ZCOMPUTEDASSETATTRIBUTES' has a column 'ZIMMERSIVENESSSCORE' containing 'SCORE'.\nTable 'ZCOMPUTEDASSETATTRIBUTES' has a column 'ZINTERACTIONSCORE' containing 'SCORE'.\nTable 'ZCOMPUTEDASSETATTRIBUTES' has a column 'ZINTERESTINGSUBJECTSCORE' containing 'SCORE'.\nTable 'ZCOMPUTEDASSETATTRIBUTES' has a column 'ZINTRUSIVEOBJECTPRESENCESCORE' containing 'SCORE'.\nTable 'ZCOMPUTEDASSETATTRIBUTES' has a column 'ZLIVELYCOLORSCORE' containing 'SCORE'.\nTable 'ZCOMPUTEDASSETATTRIBUTES' has a column 'ZNOISESCORE' containing 'SCORE'.\nTable 'ZCOMPUTEDASSETATTRIBUTES' has a column 'ZPLEASANTCAMERATILTSCORE' containing 'SCORE'.\nTable 'ZCOMPUTEDASSETATTRIBUTES' has a column 'ZPLEASANTCOMPOSITIONSCORE' containing 'SCORE'.\nTable 'ZCOMPUTEDASSETATTRIBUTES' has a column 'ZPLEASANTLIGHTINGSCORE' containing 'SCORE'.\nTable 'ZCOMPUTEDASSETATTRIBUTES' has a column 'ZPLEASANTPATTERNSCORE' containing 'SCORE'.\nTable 'ZCOMPUTEDASSETATTRIBUTES' has a column 'ZPLEASANTPERSPECTIVESCORE' containing 'SCORE'.\nTable 'ZCOMPUTEDASSETATTRIBUTES' has a column 'ZPLEASANTPOSTPROCESSINGSCORE' containing 'SCORE'.\nTable 'ZCOMPUTEDASSETATTRIBUTES' has a column 'ZPLEASANTREFLECTIONSSCORE' containing 'SCORE'.\nTable 'ZCOMPUTEDASSETATTRIBUTES' has a column 'ZPLEASANTSYMMETRYSCORE' containing 'SCORE'.\nTable 'ZCOMPUTEDASSETATTRIBUTES' has a column 'ZSHARPLYFOCUSEDSUBJECTSCORE' containing 'SCORE'.\nTable 'ZCOMPUTEDASSETATTRIBUTES' has a column 'ZTASTEFULLYBLURREDSCORE' containing 'SCORE'.\nTable 'ZCOMPUTEDASSETATTRIBUTES' has a column 'ZWELLCHOSENSUBJECTSCORE' containing 'SCORE'.\nTable 'ZCOMPUTEDASSETATTRIBUTES' has a column 'ZWELLFRAMEDSUBJECTSCORE' containing 'SCORE'.\nTable 'ZCOMPUTEDASSETATTRIBUTES' has a column 'ZWELLTIMEDSHOTSCORE' containing 'SCORE'.\nTable 'ZDETECTIONTRAIT' has a column 'ZSCORE' containing 'SCORE'.\nTable 'ZMEDIAANALYSISASSETATTRIBUTES' has a column 'ZACTIVITYSCORE' containing 'SCORE'.\nTable 'ZMEDIAANALYSISASSETATTRIBUTES' has a column 'ZAUTOPLAYSUGGESTIONSCORE' containing 'SCORE'.\nTable 'ZMEDIAANALYSISASSETATTRIBUTES' has a column 'ZBLURRINESSSCORE' containing 'SCORE'.\nTable 'ZMEDIAANALYSISASSETATTRIBUTES' has a column 'ZEXPOSURESCORE' containing 'SCORE'.\nTable 'ZMEDIAANALYSISASSETATTRIBUTES' has a column 'ZVIDEOSCORE' containing 'SCORE'.\nTable 'ZMEDIAANALYSISASSETATTRIBUTES' has a column 'ZWALLPAPERSCORE' containing 'SCORE'.\nTable 'ZMEDIAANALYSISASSETATTRIBUTES' has a column 'ZAUDIOSCORE' containing 'SCORE'.\nTable 'ZMEDIAANALYSISASSETATTRIBUTES' has a column 'ZVIDEOSTICKERSUGGESTIONSCORE' containing 'SCORE'.\nTable 'ZMEDIAANALYSISASSETATTRIBUTES' has a column 'ZSETTLINGEFFECTSCORE' containing 'SCORE'.\nTable 'ZMEMORY' has a column 'ZSCORE' containing 'SCORE'.\nTable 'ZMOMENT' has a column 'ZAGGREGATIONSCORE' containing 'SCORE'.\nTable 'ZQUESTION' has a column 'ZSCORE' containing 'SCORE'.\nTable 'ZVISUALSEARCHATTRIBUTES' has a column 'ZSTICKERCONFIDENCESCORE' containing 'SCORE'.\nTable 'ZDETECTEDFACE' has a column 'ZBLURSCORE' containing 'SCORE'.\nTable 'ZPHOTOSHIGHLIGHT' has a column 'ZPROMOTIONSCORE' containing 'SCORE'.\nTable 'ZASSET' has a column 'ZCURATIONSCORE' containing 'SCORE'.\nTable 'ZASSET' has a column 'ZHIGHLIGHTVISIBILITYSCORE' containing 'SCORE'.\nTable 'ZASSET' has a column 'ZICONICSCORE' containing 'SCORE'.\nTable 'ZASSET' has a column 'ZOVERALLAESTHETICSCORE' containing 'SCORE'.\nTable 'ZASSET' has a column 'ZPROMOTIONSCORE' containing 'SCORE'.\nTable 'ZASSET' has a column 'ZSTICKERCONFIDENCESCORE' containing 'SCORE'.<\/code><\/pre>\n\n\n\n<p>&#8230; so then you can do stuff like:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>select\n\tZFILENAME,\n\tZOVERALLAESTHETICSCORE\nfrom\n\tZASSET z\norder by\n\tz.ZOVERALLAESTHETICSCORE DESC\nlimit 50;<\/code><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ever look at the sqlite3 DB in the Photos.app library bundle ~\/Pictures\/Photos Library.photoslibrary? So much stuff. I would suggest making a copy of it, and only mess around with the copy. The output of the above code is shown below: &hellip; <a href=\"https:\/\/dreness.com\/blog\/archives\/602731\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-602731","post","type-post","status-publish","format-standard","hentry","category-bitbucket"],"_links":{"self":[{"href":"https:\/\/dreness.com\/blog\/wp-json\/wp\/v2\/posts\/602731","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dreness.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dreness.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dreness.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dreness.com\/blog\/wp-json\/wp\/v2\/comments?post=602731"}],"version-history":[{"count":1,"href":"https:\/\/dreness.com\/blog\/wp-json\/wp\/v2\/posts\/602731\/revisions"}],"predecessor-version":[{"id":602732,"href":"https:\/\/dreness.com\/blog\/wp-json\/wp\/v2\/posts\/602731\/revisions\/602732"}],"wp:attachment":[{"href":"https:\/\/dreness.com\/blog\/wp-json\/wp\/v2\/media?parent=602731"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dreness.com\/blog\/wp-json\/wp\/v2\/categories?post=602731"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dreness.com\/blog\/wp-json\/wp\/v2\/tags?post=602731"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}