Giter VIP home page Giter VIP logo

amazon-orders-collage's Introduction

amazon-orders-collage

Creates a collage (grid) of product images for each product in an amazon.com order history report.

example output

example output

Why?

I thought it would be interesting to make a "consumer yearbook" of sorts showing a year's worth of Amazon activity. It's nostalgic and #mildlyinteresting.

How to use

  • Clone this repo

  • Install Dependencies npm install

  • Generate an order history report from your Amazon account

  • Save your order history report CSV to your computer

  • Download product images

    • node get-photos.js /path/to/your/order-history-report.csv
    • product images will be saved in product_images/
  • Assemble your collage!

    • node assemble-collage
    • Your collage will be saved in output/amazon-collage.jpg
    • An HTML grid version of your collage will be saved in output/index.html
  • Build Heatmap

    • npm run build will ask you for path of Amazon CSV file. Put assets in output folder
    • npm run serve will serve the contents in output

Customizing Dimensions

You can customize the following layout properties in assemble-collage.js:

  • gridWidth - the number of columns in the collage
  • cellPadding - the padding around each product image (pixels)
  • imageDimension - the dimensions (square) of the product images
  • outputPadding - the padding around the outside of the collage (pixels)

How it works

get-photos.js parses the csv, pulling the ASIN/ISBN value for each product. It then GETs the product's page from amazon.com, parses the html with cheerio, grabs the first product image and saves it in product_images/

assemble-collage.js puts the images together into an web page with a strict grid layout, loads it in a headless browser, and saves an image.

Contributors

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.