gambaroff / clay Goto Github PK
View Code? Open in Web Editor NEWBetter image management
License: Apache License 2.0
Better image management
License: Apache License 2.0
Sites should read a json file describing the structure of the site, written by lambda/backend side of the app. The metadata is called content.json and has a hierarchy. Adjust the image slider code so it reads this content.json
Lambda app should respond to an s3 event that dir structure containing images has changed.
This guide explains the source and steps http://docs.aws.amazon.com/lambda/latest/dg/getting-started-amazons3-events.html and http://docs.aws.amazon.com/lambda/latest/dg/walkthrough-s3-events-adminuser.html
Expect the event to have the format http://docs.aws.amazon.com/AmazonS3/latest/dev/notification-content-structure.html but all you need is the bucket name (well maybe 1-2 more like region).
Write a metadata file in json that reflects the structure of the dir tree, in alphanumeric order. For example:
sculpture
sculpture/2_angel.jpg
sculpture/1_duck.jpg
paintings
paintings/1_amywinehouse.jpg
resulting json:
{
"categories": {
"sculpture":[
"1_duck.jpg",
"2_angel.jpg"
],
"paintings":[
"1_amywinehouse.jpg"
]
}
}
For now don't worry about the case when a user loads 1000 images. The script will run 1000 times, which is fine.
Write documentation on how a developer can set it up (bucket names / iam permissions), using http://docs.aws.amazon.com/lambda/latest/dg/getting-started-custom-events.html as a reference
How cool would it be if you could just write markdown and have it build pretty pages?
There are a number of possible approaches. Look at https://github.com/jekyll/jekyll and jekyll-bootstrap. Unfortunately, IIRC these are ruby, so they cannot be run from lambda (which requires js/nodejs). Though the deploy script could trigger this, a js implementation is preferred.
The repo will have nodejs app to be run in Lambda that will resize images and write metadata json that the frontend will read.
Deploy scripts should pull down git code to current dir where image directory trees are (ie Dropbox folder), and sync code and images to s3. Deploy scripts should not be in git, just samples.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.