Live data from Hacker News

Cleaning up my 200GB iCloud with some JavaScript

andykong.org

151–160 of 192 posts

Re: Cleaning up my 200GB iCloud with some JavaScript

#151
post #69
post #65

Earlier quoted context omitted.

Differential backups or any sort of versioning seemed like one of the most obvious culprits (that and or total redundant storage to preserve the file) but the issue with all of this is it’s entirely opaque. Ultimately you’re increasingly tethered to some service for your storage that you pay for periodically based on total storage yet you have little-to-no information how to best optimize that storage if you want to…

>So as a consumer, do I just wave my hands and keep throwing more and more money at the problem, Yes. I can go and buy 1TB of Microsoft OneDrive or 2TB of Google Drive for less than a Franklin a year, and most people won't even need 1TB let alone 2TB. Both Microsoft and Google also offer 100GB plans for a Jackson a year, which is what I purchase myself. The average person can get by paying a Washington per month to A…

You still need to manage backups. You’re trusting everything to the vendor. I run a docker image weekly that pulls my google photos, copies to my USB drive in my pi, and also copies to backblaze b2.

Re: Cleaning up my 200GB iCloud with some JavaScript

#152

Earlier quoted context omitted.

> For the downvoters, consider this: If I were to manage all this myself, I would need at least three storage mediums with one being a different form factor to satisfy the 3-2-1 backup scheme. I would also need to procure arrangements for that third backup copy in the 3-2-1 scheme. And I would need to spend time managing it all. > That is going to cost me more than a Franklin per year. Life is short, my time is preci…

> Three Franklins and three Jacksons per year + whatever for an external drive for your offsite backups. I know you're just following the theme set by the parent commenter, but there are a bunch of us folk on HN who aren't US residents, and have no idea how much those presidents mean in terms of currency.

In addition to being confusing for non-Americans, it also confusing for Americans because $100 bills in American slang are "Benjamins," not "Franklins." It's most notable use is in the song "It's All About the Benjamins"

Re: Cleaning up my 200GB iCloud with some JavaScript

#153

I'm pretty sure that iCloud stores the full version and downloads a lower quality optimised version to your phone. If you open iPhone settings and browse to: > Apple ID > iCloud > Photos There is an option to 'Optimise iPhone Storage' which is enabled by default. This states: > If your phone is low on space, full resolution photos and videos are automatically replaced with smaller device sized versions. Full-Resoluti…

Downloads should still return the original file though, so that can't be used to explain the storage size discrepancy.

[dead]

Re: Cleaning up my 200GB iCloud with some JavaScript

#154

Photos.app doesn't show file size… so I thought, why not build a little Photos.app extension or a separate app that queries for large files? Turns out that the API doesn't expose "file size", at least I didn't find a straight-forward way. I think that all "photos" or "videos" are just a view of the underlying "photo or video object". If you crop a video, the full-size video will remain. Only if you export the video,…

You might know this already but the Photos catalog/photiolibrary is just a folder. You can actually right click and “show package contents”. From there, you can use something like Daisy Disk to display all the files based on their size. A simple drag and drop has worked for me. Once you find the large file, you can search for the name in the photos app. I’ve deleted some quite large videos this way to clear up some space.

Re: Cleaning up my 200GB iCloud with some JavaScript

#155
post #142

Earlier quoted context omitted.

Since you're willing to write since code apparently: have you checked the internal databases? They're just sqlite, moderately understandable at a glance last time I looked.

Looks promising - will look into it!

So it appears you can conveniently query the DB for filename (+directory), UUID, and (original) file size. But I can't find a good way of opening a Photo by filename or UUID.

After all, the file might not be present locally, so opening it should go through the Photos.app. But once you call AppleScript to open the file, you might as well use the AppleScript to comb through the database like the script I linked to earlier.

Re: Cleaning up my 200GB iCloud with some JavaScript

#156
I am so tired of these patterns. Google Photos also does not allow any easy or good way to clean up junk. Why would they? They want you to run out of space so you can pay for their cloud storage. They also have low incentive to keep photo/video storage space-efficient for the same reason.

Re: Cleaning up my 200GB iCloud with some JavaScript

#157

Photos.app doesn't show file size… so I thought, why not build a little Photos.app extension or a separate app that queries for large files? Turns out that the API doesn't expose "file size", at least I didn't find a straight-forward way. I think that all "photos" or "videos" are just a view of the underlying "photo or video object". If you crop a video, the full-size video will remain. Only if you export the video,…

> I think that all "photos" or "videos" are just a view of the underlying "photo or video object". If you crop a video, the full-size video will remain. Only if you export the video, it will be cropped and the smaller file size will manifest. Yup, the Photos app keeps the unmodified original file, and then any edits/crops are stored separately. You can always revert to the original file and redo your edits. So they m…

Ahh, I did consider PHAsset.fetchAssets but my understanding was that the method will download the file if not present locally - which wouldn't be acceptable for an app, I guess.

Do you know more? The introduction says "Retrieve asset metadata or request full asset content.", but I can't find clarification when it actually accesses full content.

Re: Cleaning up my 200GB iCloud with some JavaScript

#158
post #152

Earlier quoted context omitted.

> Three Franklins and three Jacksons per year + whatever for an external drive for your offsite backups. I know you're just following the theme set by the parent commenter, but there are a bunch of us folk on HN who aren't US residents, and have no idea how much those presidents mean in terms of currency.

In addition to being confusing for non-Americans, it also confusing for Americans because $100 bills in American slang are "Benjamins," not "Franklins." It's most notable use is in the song "It's All About the Benjamins"

I've heard it both ways myself; I like Franklin better since the others are all last/family names too.
Post reply on HN