Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store image assets for items as structured by Facebook photo item data #81

Open
markmhendrickson opened this issue Aug 14, 2017 · 0 comments
Assignees

Comments

@markmhendrickson
Copy link
Member

This entails adding a routine executed after items are stored that extracts the URL for the largest image available image from an item's JSON payload and stores it in the user's storage in same directory as stored JSON file but under a sub-directory called "images".

The algorithm for extracting this URL from the JSON payload should be modelled after the expected payload from Facebook for photo items, but it should be applied to any items in general that have payloads matching the format returned by Facebook for photos. As such, it's design should be agnostic to source and content type if inspired by Facebook as a source and photos from there as a content type.

The images stored in the "images" directory should have filenames using the same base filename as the item's stored JSON file but with a suffix corresponding to the image type. For example, if the stored item JSON file is "2017-05-02-maui-beach.json" then the image file may be stored as "images/2017-05-02-maui-beach.png".

If there are other image URLs in the item's JSON payload that are smaller in dimension, they should be ignored for storage.

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

No branches or pull requests

2 participants