Compare commits
No commits in common. "611a25529333ce8c3686ea2fcedc826f1acad282" and "f5af0f8d8547b9658fb696ec310d83474ae740a8" have entirely different histories.
611a255293
...
f5af0f8d85
|
@ -56,11 +56,6 @@
|
||||||
a {
|
a {
|
||||||
color: $color-overlay-text;
|
color: $color-overlay-text;
|
||||||
display: block;
|
display: block;
|
||||||
text-decoration: none;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
img {
|
img {
|
||||||
|
|
|
@ -7,7 +7,6 @@ from os import utime
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from re import search, sub
|
from re import search, sub
|
||||||
from sys import stderr
|
from sys import stderr
|
||||||
from urllib.parse import unquote
|
|
||||||
from yaml import CDumper, dump
|
from yaml import CDumper, dump
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
|
@ -40,7 +39,7 @@ def parse_http_datetime(dt):
|
||||||
return datetime.strptime(dt.replace('GMT', '+0000'), '%a, %d %b %Y %H:%M:%S %z')
|
return datetime.strptime(dt.replace('GMT', '+0000'), '%a, %d %b %Y %H:%M:%S %z')
|
||||||
|
|
||||||
def download_image(url, target):
|
def download_image(url, target):
|
||||||
name = unquote(url.rsplit('/', 1)[-1])
|
name = url.rsplit('/', 1)[-1]
|
||||||
image = target / name
|
image = target / name
|
||||||
|
|
||||||
if image.exists():
|
if image.exists():
|
||||||
|
@ -64,7 +63,7 @@ def download_image(url, target):
|
||||||
print(f"downloaded image '{name}' (last modified: {last_modified.strftime('%a, %d %b %Y %H:%M:%S %Z')})", file=stderr)
|
print(f"downloaded image '{name}' (last modified: {last_modified.strftime('%a, %d %b %Y %H:%M:%S %Z')})", file=stderr)
|
||||||
|
|
||||||
def download_gallery(path):
|
def download_gallery(path):
|
||||||
slug = unquote(path.removeprefix(f'{GALLERIES_PATH}/'))
|
slug = path.removeprefix(f'{GALLERIES_PATH}/')
|
||||||
|
|
||||||
target = TARGET_DIR / slug
|
target = TARGET_DIR / slug
|
||||||
target.mkdir(parents=True, exist_ok=True)
|
target.mkdir(parents=True, exist_ok=True)
|
||||||
|
|
Loading…
Reference in New Issue