Skip to content
/ 365days Public

Codebase for 365days.me, which is a 365 days photo blog that runs via command-line and with no database dependencies. Moved to Bitbucket!!

Notifications You must be signed in to change notification settings

melz/365days

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

365days.me is the codebase for (surprise!) http://365days.me, which hosts a 365-days photo blog challenge.

The project was written using the Silex micro-framework and uses Twig template engine. For historical reasons, the first edition of the website was written using symfony 1.4 but I later ported the code to Silex to make it a little more portable. It was also an excuse to experiment with Silex for the first time.

Background

I wanted to avoid the "regular" workflow for web applications of this nature which consists of "logging" into a website, filling in a form, uploading the photo, add tags, etc. It felt like a colossal waste of time, especially in a single user environment. Not to mention being unable to quickly browse meta data without having to dig through a database.

With this website, photos are named and uploaded into a specific directory and then meta information can be added and/or generated via command line. More instructions is available under Usage.

Requirements

  • PHP 5.4+ with EXIF module enabled.
  • Composer, a dependency manager for PHP.
  • Access to command line interface.

Installation

  • Clone the repository to a directory.
  • Run composer update to update all dependencies.
  • Run chown -R www-data.www-data logs (change as necessary) to make the logs directory writable by the web server.
  • Point your domain name to the /web directory.

Usage

  • Upload your photo into /web/assets, naming the file 001.jpg ... 365.jpg to correspond to the day.
  • Using the command line in your working directory, run php console.php photo:add and answer the questions.
  • The script will create a JSON file inside /data/metadata/XXX.json where XXX is the number of the day. This file will store your answers as well as the extracted EXIF information.
  • Blurbs (in Markdown format), which are optional, can be added into /data/blurb/XXX.md and will be rendered in the day's entry page.

Limitations

  • You can't do much (in terms of adding photos) if you do not have access to the command line.
  • You can only add one photo at a time, as it should be because it was designed to be updated daily. There is no "bulk add" method right now - depending on future needs, I may include a tool for this.

Warning!

The repository history contains photos from my own photo blog. They were added because I originally meant to store my photos in the repository, and then decided that I would like to share the code. Please note that these photos are copyrighted by me and are not meant for re-distribution.

About

Codebase for 365days.me, which is a 365 days photo blog that runs via command-line and with no database dependencies. Moved to Bitbucket!!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages