rewrites and gones moved to settings, step 1

This commit is contained in:
Peter Molnar 2019-08-12 10:48:03 +01:00
parent 0c8a72e26e
commit 137522c23d

View file

@ -179,7 +179,7 @@ photo = struct(
"default": 720, "default": 720,
"sizes": { "sizes": {
# 90 = s # 90 = s
# 360 = m 240: "_m",
720: "", 720: "",
1280: "_b", 1280: "_b",
}, },
@ -187,17 +187,30 @@ photo = struct(
} }
) )
# symlinks = { rewrites = {
#'files/a-view-from-barbican-1280x720.jpg': 'a-view-from-barbican/a-view-from-barbican_b.jpg', "^/(?:sysadmin|it|linux-tech-coding|sysadmin-blog)/?(page.*)?$": "category/article/",
#'files/hills_from_beachy_head-540x226.jpg': 'hills-from-beachy-head/hills-from-beachy-head.jpg', "^/(?:fotography|photoblog)/?(page.*)?$": "/category/photo/",
#'files/seven_sisters_from_beachy_head-540x304.jpg': 'seven-sisters-from-beachy-head/seven-sisters-from-beachy-head.jpg', "^blog/?(page.*)?$": "/category/journal/",
#'files/the_countryside-540x304.jpg': 'the-countryside/the-countryside.jpg', "^blips/?(page.*)?$": "/category/note/",
#'files/MGP0538-540x358.jpg': '', "^/r/?(page.*)?$": "/category/note/",
#'files/IMGP0539-540x358.jpg': '', "^/(?:linux-tech-coding|it|sysadmin-blog|sysadmin|fotography|blips|blog|photoblog|article|journal|photo|note|r)/((?!page).*)": "/",
#'files/IMGP0538-540x358.jpg': '', "^(/.well-known/(host-meta|webfinger).*)": "https://fed.brid.gy$1",
# } }
gones = [
"^/cache/.*$",
"^/tag/.*$",
"^/comment/.*$",
"^/files/.*$",
"^/wp-content/.*$",
"^/broadcast/wp-ffpc\.message$",
]
if os.path.isdir("/dev/shm") and os.access("/dev/shm", os.W_OK):
tmpdir = "/dev/shm/nasg"
else:
tmpdir = os.path.join(gettempdir(), "nasg")
tmpdir = os.path.join(gettempdir(), "nasg")
if not os.path.isdir(tmpdir): if not os.path.isdir(tmpdir):
os.makedirs(tmpdir) os.makedirs(tmpdir)