This is a gentle fork from https://framagit.org/marienfressinaud/photos.marienfressinaud.fr with a responsive and optimized mindset. https://media.larlet.fr/
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. # Révélateur
  2. > [révélateur](https://fr.wiktionary.org/wiki/r%C3%A9v%C3%A9lateur#Nom_commun_2) \ʁe.ve.la.tœʁ\ masculin : (Photographie) Bain chimique où l’on trempe le cliché pour faire apparaître l’image encore invisible. (Anglais : [developer](https://fr.wiktionary.org/wiki/developer#en))
  3. ## History
  4. This is a fork from [boop](https://framagit.org/marienfressinaud/photos.marienfressinaud.fr) by Marien Fressinaud (thank you!).
  5. I used that code as a base to setup my own photos & videos website:
  6. [https://media.larlet.fr/](https://media.larlet.fr/)
  7. This adaptation tries to generate different images sizes and to serve
  8. the correct resolution to the client in order to minimize the weight of
  9. the pages. You can set new sizes in `configuration.py`.
  10. Note that it might also be interesting to check out the original repo,
  11. it depends on your requirements.
  12. ## Installation
  13. Requirements: Python 3.7+ (First released: 2018-06-27)
  14. You have to install a webp converter, there are [binaries here](https://developers.google.com/speed/webp/download),
  15. or you can use your OS bundler (for instance homebrew for macOS):
  16. $ brew install webp
  17. Then create and activate a Python virtual env:
  18. $ python -m venv venv
  19. $ source venv/bin/activate
  20. Lastly, install Python dependencies:
  21. $ make install
  22. ## Gallery creation
  23. Put a folder full of photographies in the `photos` folder.
  24. You can create a `metadata.yml` file in it with the title of
  25. the album (`name`) and the name of the cover photography (`cover`):
  26. ```
  27. ---
  28. name: "Title of the album"
  29. cover: "filename-of-the-cover-image-without-extension"
  30. ```
  31. ### Private galleries
  32. If you set a `password` key in your `metadata.yml` file, the gallery
  33. will turn into a private one. It will not be listed in the default index
  34. and only people with the correct URL will be able to see your photos.
  35. ⚠️ This is not a very secured way to hide something from the internets!
  36. If you want to share confidential images, find another tool.
  37. There is a command (`make ulid`) to help you get a password that is
  38. readable and spellable across a phone call for instance.
  39. Also note that you must not commit/push your `metadata.yml` file
  40. with a password in it to a public repository, obviously.
  41. ## Generation
  42. Running `make` will display the help for all existing commands.
  43. Most of the time you want to run:
  44. $ make build serve
  45. And then go to: [http://localhost:8080](http://localhost:8080)
  46. ⚠️ Note that the default theme contains fonts that I am not allowed to
  47. distribute. You have to put your own files there or you can rely on a
  48. [system font stack](https://css-tricks.com/snippets/css/system-font-stack/).
  49. ## Deployment
  50. Set a `TARGET_SERVER_OUTPUT` variable in your `.env` file:
  51. $ echo TARGET_SERVER_OUTPUT=user@server.url:/path/to/website > .env
  52. Then `make publish` will rsync the content of the `output` folder
  53. to your server. And hopefully not send existing files twice.
  54. ## Development
  55. You must install the development dependencies to respect the current
  56. code style:
  57. $ python -m pip install -r requirements-dev.txt