Skip to content

Conversation

@johanhoff
Copy link

@johanhoff johanhoff commented Apr 13, 2019

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
Copy link
Author

johanhoff commented Apr 13, 2019

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
Copy link
Author

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 johanhoff changed the title Log error if HTML not detected parse JSON export akin to HTML export Apr 13, 2019
Copy link
Author

@johanhoff johanhoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uncertain why file fails to download... need to debug now.

else {
Textile.parseJson(zip);
}
},
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added switch in Textile.parseZip

}
});
return true
},
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add reusable function called Textile.parseZipMap
⌛️Use Textile.parseZipMap in Textile.parseJson
⏳Reuse Textile.parseZipMap in Textile.parseHtml

Copy link
Author

@johanhoff johanhoff Apr 13, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So we "Don't repeat ourselves", we could reuse our new parseZipMap function in parseHtml, but that may call for a separate pull request with separate testing.

You can accept this PR without a decision on this.

Textile.addDownload();
});
});
},
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⌛️Add new JSON functionality to Textile.parseJson

@johanhoff
Copy link
Author

johanhoff commented Apr 13, 2019

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?

@andrewxhill
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants