GithubHelp home page GithubHelp logo

prestonjcrowe / personal-photo-gallery Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 62.55 MB

simple and easy photo gallery to showcase my pretty pictures

HTML 19.50% JavaScript 49.93% CSS 6.51% Python 24.06%

personal-photo-gallery's Introduction

Photo Gallery

A simple photo gallery built in react along with a python script to keep track of the images and their metadata. All images in gallery-controller/images are uploaded to S3 along with a JSON document detailing their size, date, and other metadata. The front end then accesses this file and uses it as a directory to load the images and render the gallery view. You can see a live version at photos.prestoncrowe.com.

Setup

Run npm install in the root directory to install dependencies. You must have AWS credentials in ~/.aws/credentials in order to connect to S3 as well as an empty bucket to be populated with your images. Create the folder hierarchy replicated below in gallery-controller/images:

ROOT_DIR/
  - travel photos | 01-01-2005
      - photo1.png
      - another_photo.jpg
  - seattle | 01-01-1970
      - ...
  - ...

You must also populate config.json with details pertaining to your bucket:

{
    "base_url": "https://YOUR-BUCKET.s3.amazonaws.com/",
    "root_dir": "./images",
    "bucket": "YOUR_BUCKET",
    "index_name": "index.json",
    "date_format": "%m-%d-%Y",
    "delmiter": "|"
}

Run the gallery controller with python3 controller.py to upload all your images to S3 and generate the index file.

Set the INDEX_URL constant in src/App.js to the public URL of this generated index file (https://...s3.amazonaws.com/index.json).

Run npm start to run the front end and serve your gallery.

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.