X-Git-Url: https://git.cworth.org/git?p=turbot-web;a=blobdiff_plain;f=html_generator.py;h=0fef3d421c3f1b9158a7e97932f07b43342b24a6;hp=de7291c2518076e0e8e17b02cfd3e6cfe5652fae;hb=HEAD;hpb=95d1e0c60e2f514fd67f8f619c15e9820a873cb4 diff --git a/html_generator.py b/html_generator.py index de7291c..f187032 100644 --- a/html_generator.py +++ b/html_generator.py @@ -18,11 +18,10 @@ import boto3 from boto3.dynamodb.conditions import Key import os import re +import sys WEBROOT = "/srv/halibut.cworth.org/www" -website = "https://halibut.cworth.org/" -#change this if we're using AWS or some other subdomain instead def hunt_file(hunt, name): """Return a path file 'name' within the given hunt. @@ -31,6 +30,12 @@ def hunt_file(hunt, name): return "{}/{}/{}".format(WEBROOT, hunt['channel_id'], name) +def internal_link(hunt, name): + """Returns a path for a link on this site.""" + + # Just generate a relative link, (which is just the name itself) + return "{}".format(name) + def filename_from_name(name): """Returns a string derived from name, but with all spaces and slashes replaced with underscores, (for making a clean filename)""" @@ -140,6 +145,7 @@ def overview(hunt, puzzles, rounds): '
\n', ' \n', ' \n', + ' \n', '\n', ' \n', ' \n' '\n', - ' \n' + ' \n', '\n',] columns = ['