Mappics is a map based travel photos gallery, with automatic place and weather description of the very moment the photos are taken.
It will process all the images placed in a specific directory and perform these operations:
- it fetches Exif data, (https://en.wikipedia.org/wiki/Exif), which usually contain camera model and settings, GPS information, and date and time the photo was taken
- it fetches place description. A short one (like
Goðafoss Waterfalland a long one (like
Goðafoss Waterfall, Goðafossvegur, Öxará, Þingeyjarsveit, Norðurland eystra, Ísland). This is based on the Exif GPS information stored in the photo and obtained from Nominatim and OpenStreetMap APIs
- it fetches weather forecast in the place and moment the photo was taken. This is based on the Exif GPS information and the creation date of the photo, and obtained from the DarkSky APIs
- it creates a resized version of the image and a thumbnail, and store them in a different folder from the original one
You can see a working version here: http://pics.antodippo.com.
Mappics provides a simple console command to process images. To configure and run the command you will have to:
- obtain API keys from external services:
- deploy the application (see dedicated paragraph for details)
- edit your
/.envfile adding the keys from step 1
- place your images in the
<root>/var/galleriesdirectory (Mappics supports
pngimages), organized in folders (they will become galleries)
- run the console command
bin/console mappics:process-galleriesfrom the
- go to the home page and enjoy your photos!
If you have a lot of images this command can take a long time, so you may want to run it in background:
bin/console mappics:process-galleries &
or, if you want to set-it-and-forget-it and just upload photo every now and then, you could run it as a cron job (it has a lock which prevents multiple execution):
0 * * * * /var/www/mappics/current/bin/console mappics:process-galleries
One option is to make Mappics run on Apache with PHP module. You will have to install and enable the following PHP extensions:
php-curl php-mbstring php-zip php-gd php-xml php-exif
You can find a sample virtual host file in
/docker/vhost.conf and a
Dockerfile to have a better understanting of the system stack needed.
To deploy and update Mappics you can also find a simple configuration for https://deployer.org, in
/deploy.sample.php, so you will have to:
- install Deployer
- edit the sample file adding you host information (see comments in file and documentation)
- rename the file in
dep deploy(to install the latest version)
If you want to deploy a specific version you can also use the tag option:
dep deploy --tag="1.0.0"
Run on your local machine
The suggested way to run and work on Mappics in a local enviroment is Docker:
- install Docker on your machine
- clone the repository:
git clone firstname.lastname@example.org:antodippo/mappics.git
- build Mappics image:
- run tests:
- run application setup:
- run application:
docker-compose up -d
- browse Mappics on http://localhost:8080
You should get an empty Mappics home page. To fill it, see the "Usage" paragraph.