textile-facebook icon indicating copy to clipboard operation
textile-facebook copied to clipboard

parse JSON export akin to HTML export

Open johanhoff opened this issue 5 years ago • 4 comments

I'll try to parse JSON exports, as said in Issue #10.

This PR is now ready, pending tests and approval.

  • Added switch in .parseZip
    • ⌛️DONE Rename default functionality to .parseHtml
    • ⌛️DONE Add new JSON functionality to .parseJson
  • Add reusable function called .parseZipMap
    • ⌛️DONE Use .parseZipMap in .parseJson
    • ⏳OPTIONAL use .parseZipMap in .parseHtml

johanhoff avatar Apr 13 '19 11:04 johanhoff

Current quick-fix logs errors (last two lines of this log):

app.js:29 received: facebook-ILOVEJSON.zip
app.js:33 read: file data
app.js:54 parsing: zip data
app.js:63 Cannot find 'html/photos.htm'.
app.js:64 You need HTML not JSON export.

johanhoff avatar Apr 13 '19 11:04 johanhoff

The JSON should be parsed now, but I haven't looked into why the file is not downloading. I'll take a look later.

johanhoff avatar Apr 13 '19 15:04 johanhoff

Okay "it works". When I unzip the download, I get this: Screen Shot 2019-04-14 at 6 49 48 AM All my photos are grouped by album in photos_and_videos.

However, I am ashamed to see now two things....

  1. Facebook's JSON Exports natively organize by album!
  2. Not sure what the hell I thought I'd accomplish here!

Constructive Feedback for Textile

A pro tip for 2019

In terms of organization, you get "the same thing" by:

  • Shunting an "HTML export" through fb.textile.photos
  • Or, Simply downloading an "JSON export" on Facebook

The solution for 2020

Well, I came to Textile looking for more than just "Album organization."

  • I want to specify my own folder structure to keep photos forever.
    • I'd like this folder structure to make use of date and location
    • For long-term archiving:
      • I like {YYYY}/{MM}/{DD}/{ZIPCODE}/{ALBUM}/{NAME}.jpg
      • Like 2019/01/01/12345/Schenectady/{NAME.jpg}
    • Or, automatically create "Albums" by date ranges and locations?
      • This is bad for archiving, but good for browsing in Finder.
      • Like 2019Jan_2019Jun_12345_Schenectady/{NAME.jpg}
  • I want one folder structure for iMessage, iCloud, Facebook, etc exports.
  • I want to simply download this file onto my flash drive
  • Bonus if Textile App uses GIT LFS version control
    • I'd like git to keep my usb drive in sync with Textile App
    • I personally use GIT LFS to sync 150 GiB, all my stuff. Slow, but doable.

Questions?

johanhoff avatar Apr 13 '19 23:04 johanhoff

Hey! Sorry for the delayed response. Awesome work + feedback. I'm thinking of adding a continuous exporter example that you can run on your desktop. I'll take what you learned here (2020) to help guide that for sure

andrewxhill avatar May 13 '19 18:05 andrewxhill