-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
59a6f19
commit b25897d
Showing
5 changed files
with
68 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Title: Dentelles de Montmirail | ||
Date: 2024-12-14 06:00 | ||
Modified: 2024-12-14 06:00 | ||
Tags: Escalade, Alpinisme | ||
Category: Daily Adventures | ||
Slug: crete-du-turc-dentelles | ||
Author: Walter Dal'Maz Silva | ||
Summary: Course d'arete | ||
Lang: fr | ||
Translation: false | ||
Status: published | ||
|
||
|
||
#### Dentelles de Montmirail | ||
|
||
Objectif [Traversée E-W de la Crête du Turc](https://www.camptocamp.org/routes/691827/fr/dentelles-de-montmirail-chaine-de-gigondas-traversee-e-w-de-la-crete-du-turc) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
tiles: | ||
url: https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png | ||
attr: OpenTopoMap | ||
|
||
altitude_range: | ||
- 150 | ||
- 900 | ||
|
||
grid_interval: 0.025 | ||
tiles: | ||
url: https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png | ||
attr: OpenTopoMap | ||
|
||
altitude_range: | ||
- 150 | ||
- 900 | ||
|
||
grid_interval: 0.025 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
# -*- coding: utf-8 -*- | ||
""" | ||
A simple helper script for reducing images for publishing. | ||
References | ||
---------- | ||
- https://stackoverflow.com/questions/10607468 | ||
- https://stackoverflow.com/questions/76616042 | ||
""" | ||
from pathlib import Path | ||
from PIL import Image | ||
|
||
|
||
def workflow(dname, fname, scale=6): | ||
""" Workflow for reducing image sizes. """ | ||
wd = Path(f"content/media/{dname}") | ||
fpath = wd / fname | ||
npath = wd / f"{fpath.stem}-by-{scale}.jpg" | ||
|
||
if npath.exists(): | ||
print(f"Already generated {npath}") | ||
return | ||
|
||
img = Image.open(fpath) | ||
size = (img.size[0]//scale, img.size[1]//scale) | ||
|
||
tmp = img.resize(size, Image.LANCZOS) | ||
tmp.save(npath, optimize=True, quality=95) | ||
|
||
|
||
if __name__ == "__main__": | ||
dname = "2024-05-20-VTT-Monts-du-Lyonnais" | ||
workflow(dname, "IMG_20240520_100458_721.jpg", scale=6) | ||
workflow(dname, "IMG_20240520_110519_776.jpg", scale=6) | ||
# -*- coding: utf-8 -*- | ||
""" | ||
A simple helper script for reducing images for publishing. | ||
References | ||
---------- | ||
- https://stackoverflow.com/questions/10607468 | ||
- https://stackoverflow.com/questions/76616042 | ||
""" | ||
from pathlib import Path | ||
from PIL import Image | ||
|
||
|
||
def workflow(dname, fname, scale=6): | ||
""" Workflow for reducing image sizes. """ | ||
wd = Path(f"content/media/{dname}") | ||
fpath = wd / fname | ||
npath = wd / f"{fpath.stem}-by-{scale}.jpg" | ||
|
||
if npath.exists(): | ||
print(f"Already generated {npath}") | ||
return | ||
|
||
img = Image.open(fpath) | ||
size = (img.size[0]//scale, img.size[1]//scale) | ||
|
||
tmp = img.resize(size, Image.LANCZOS) | ||
tmp.save(npath, optimize=True, quality=95) | ||
|
||
|
||
if __name__ == "__main__": | ||
dname = "2024-05-20-VTT-Monts-du-Lyonnais" | ||
workflow(dname, "IMG_20240520_100458_721.jpg", scale=6) | ||
workflow(dname, "IMG_20240520_110519_776.jpg", scale=6) |