Coder Social home page Coder Social logo

photo2html's Introduction

photo2html

Make an album without using any external service. Creates a static page with flexbox.

Requirements

  • Python 3 or 2.7
  • ImageMagick
    • brew install imagemagick
    • apt-get install ghostscript imagemagick

Install

Put run.py in the folder containing your photos, then:

python run.py

It will create an index.html page, and a thumb folder containing all thumbnails.

Note. The current version of the code assumes your photos have .jpg extension (not uppercase). If not, please change the glob filter on line 22 of run.py.

Useful links

Long story short: sometimes, images are displayed in landscape instead of portrait in browsers. It is because some phones (ex. iPhone) use the Orientation EXIF metadata, which is ignored by browsers unless you have image-orientation: from-image which is only recognized by Firefox so far.
ImageMagick saved us, by using the flag -auto-orient for creating the thumbnails.

Next steps (please open PRs!)

  • Get valid HTML5 code 😇
  • Provide a better default flexbox configuration (= tweak the magic numbers so that any phone has at least two columns of pictures)
  • Use fancybox. Vanilla JS responsive alternatives are welcome.

Authors

Jill-Jênn Vie & Sam Vie

photo2html's People

Contributors

jilljenn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

fnareoh

photo2html's Issues

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.