This is a gentle fork from https://framagit.org/marienfressinaud/photos.marienfressinaud.fr with a responsive and optimized mindset. https://media.larlet.fr/
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
David Larlet eb7dc06813 Bump the priority of the first displayed image il y a 2 ans
theme Bump the priority of the first displayed image il y a 2 ans
.gitignore Define a new custom theme to match larlet.fr/david/ il y a 2 ans
LICENSE Add MIT license il y a 2 ans
Makefile 🐍 Why not generating `make`s help in Python? il y a 2 ans
README.md 🔥 This is the main rewrite from boop to révélateur il y a 2 ans
configuration.py 🔥 This is the main rewrite from boop to révélateur il y a 2 ans
requirements-dev.in Use pip-tools to deal with Python dependencies il y a 2 ans
requirements-dev.txt Use pip-tools to deal with Python dependencies il y a 2 ans
requirements.in Use pip-tools to deal with Python dependencies il y a 2 ans
requirements.txt Use pip-tools to deal with Python dependencies il y a 2 ans
revelateur.py 🔥 This is the main rewrite from boop to révélateur il y a 2 ans

README.md

Révélateur

révélateur \ʁe.ve.la.tœʁ\ masculin : (Photographie) Bain chimique où l’on trempe le cliché pour faire apparaître l’image encore invisible. (Anglais : developer)

History

This is a fork from boop by Marien Fressinaud (thank you!). I used that code as a base to setup my own photos & videos website:

https://media.larlet.fr/

This adaptation tries to generate different images sizes and to serve the correct resolution to the client in order to minimize the weight of the pages. You can set new sizes in configuration.py.

Note that it might also be interesting to check out the original repo, it depends on your requirements.

Installation

Requirements: Python 3.7+ (First released: 2018-06-27)

You have to install a webp converter, there are binaries here, or you can use your OS bundler (for instance homebrew for macOS):

$ brew install webp

Then create and activate a Python virtual env:

$ python -m venv venv
$ source venv/bin/activate

Lastly, install Python dependencies:

$ make install

Put a folder full of photographies in the photos folder.

You can create a metadata.yml file in it with the title of the album (name) and the name of the cover photography (cover):

---
name: "Title of the album"
cover: "filename-of-the-cover-image-without-extension"

Private galleries

If you set a password key in your metadata.yml file, the gallery will turn into a private one. It will not be listed in the default index and only people with the correct URL will be able to see your photos.

⚠️ This is not a very secured way to hide something from the internets!

If you want to share confidential images, find another tool.

There is a command (make ulid) to help you get a password that is readable and spellable across a phone call for instance.

Also note that you must not commit/push your metadata.yml file with a password in it to a public repository, obviously.

Generation

Running make will display the help for all existing commands.

Most of the time you want to run:

$ make build serve

And then go to: http://localhost:8080

⚠️ Note that the default theme contains fonts that I am not allowed to distribute. You have to put your own files there or you can rely on a system font stack.

Deployment

Set a TARGET_SERVER_OUTPUT variable in your .env file:

$ echo TARGET_SERVER_OUTPUT=user@server.url:/path/to/website > .env

Then make publish will rsync the content of the output folder to your server. And hopefully not send existing files twice.

Development

You must install the development dependencies to respect the current code style:

$ python -m pip install -r requirements-dev.txt