diff --git a/src/www/res/Dosis-Bold.ttf b/src/www/res/Dosis-Bold.ttf deleted file mode 100644 index d5e938e..0000000 Binary files a/src/www/res/Dosis-Bold.ttf and /dev/null differ diff --git a/src/www/res/Dosis-ExtraBold.ttf b/src/www/res/Dosis-ExtraBold.ttf deleted file mode 100644 index 2144a25..0000000 Binary files a/src/www/res/Dosis-ExtraBold.ttf and /dev/null differ diff --git a/src/www/res/Dosis-ExtraLight.ttf b/src/www/res/Dosis-ExtraLight.ttf deleted file mode 100644 index 2e3bf1b..0000000 Binary files a/src/www/res/Dosis-ExtraLight.ttf and /dev/null differ diff --git a/src/www/res/Dosis-Light.ttf b/src/www/res/Dosis-Light.ttf deleted file mode 100644 index a22e7d7..0000000 Binary files a/src/www/res/Dosis-Light.ttf and /dev/null differ diff --git a/src/www/res/Dosis-Medium.ttf b/src/www/res/Dosis-Medium.ttf deleted file mode 100644 index 3254ef5..0000000 Binary files a/src/www/res/Dosis-Medium.ttf and /dev/null differ diff --git a/src/www/res/Dosis-Regular.ttf b/src/www/res/Dosis-Regular.ttf deleted file mode 100644 index 4b20862..0000000 Binary files a/src/www/res/Dosis-Regular.ttf and /dev/null differ diff --git a/src/www/res/Dosis-SemiBold.ttf b/src/www/res/Dosis-SemiBold.ttf deleted file mode 100644 index 5f48caf..0000000 Binary files a/src/www/res/Dosis-SemiBold.ttf and /dev/null differ diff --git a/src/www/res/Dosis.css b/src/www/res/Dosis.css deleted file mode 100644 index 2945a7f..0000000 --- a/src/www/res/Dosis.css +++ /dev/null @@ -1,6 +0,0 @@ -@font-face { - font-family: 'Dosis'; - font-style: normal; - font-weight: 400; - src: local('Dosis Regular'), local('Dosis-Regular'), url(Dosis-Regular.ttf) format('truetype'); -} diff --git a/src/www/res/Inconsolata-Bold.ttf b/src/www/res/Inconsolata-Bold.ttf new file mode 100644 index 0000000..035d579 Binary files /dev/null and b/src/www/res/Inconsolata-Bold.ttf differ diff --git a/src/www/res/Inconsolata-Regular.ttf b/src/www/res/Inconsolata-Regular.ttf new file mode 100644 index 0000000..bbc9647 Binary files /dev/null and b/src/www/res/Inconsolata-Regular.ttf differ diff --git a/src/www/res/style.css b/src/www/res/style.css index f6802c1..c8ab4de 100644 --- a/src/www/res/style.css +++ b/src/www/res/style.css @@ -17,10 +17,10 @@ src: local('Lato Italic'), local('Lato-Italic'), url(Lato-Italic.ttf) format('truetype'); } @font-face { - font-family: 'Dosis'; + font-family: 'Inconsolata'; font-style: normal; font-weight: 400; - src: local('Dosis Regular'), local('Dosis-Regular'), url(Dosis-Regular.ttf) format('truetype'); + src: local('Inconsolata Regular'), local('Inconsolata-Regular'), url(Inconsolata-Regular.ttf) format('truetype'); } @@ -38,7 +38,7 @@ body { } pre, tt { - font-family: 'Dosis', monospace; + font-family: Inconsolata, monospace; background-color: rgba(0, 0, 0, 0.3); } diff --git a/tools/devel-server.py b/tools/devel-server.py index 9b925cd..4b9ecd2 100755 --- a/tools/devel-server.py +++ b/tools/devel-server.py @@ -21,6 +21,8 @@ except ImportError: NOT_FOUND = (404, 'Not Found', 'Nothing matches the given URI') INTERNAL_SERVER_ERROR = (500, 'Internal Server Error', 'Server got itself in trouble') +sys.dont_write_bytecode = True + # XXX: This will eventually cause a problem. Do something more clever here. seed = 1 @@ -48,7 +50,7 @@ def mdpage(body): title = "Result" title = title.lstrip("#") title = title.strip() - return page(title, mistune.markdown(body)) + return page(title, mistune.markdown(body, escape=False)) class ThreadingServer(socketserver.ThreadingMixIn, http.server.HTTPServer): @@ -162,11 +164,12 @@ you are a fool. body.write("") body.write("

Author

{}

".format(puzzle.author)) body.write("

Summary

{}

".format(puzzle.summary)) - body.write("

Debug Log

") - body.write('") + if puzzle.logs: + body.write("

Debug Log

") + body.write('") elif len(parts) == 5: # Serve up a puzzle file try: diff --git a/tools/moth.py b/tools/moth.py index 25ee393..7ba1a23 100644 --- a/tools/moth.py +++ b/tools/moth.py @@ -146,6 +146,11 @@ class Puzzle: name = self.random_hash() self.files[name] = PuzzleFile(stream, name, visible) + def randword(self): + """Return a randomly-chosen word""" + + return self.rand.choice(ANSWER_WORDS) + def make_answer(self, word_count, sep=' '): """Generate and return a new answer. It's automatically added to the puzzle answer list. :param int word_count: The number of words to include in the answer. @@ -153,7 +158,8 @@ class Puzzle: :returns: The answer string """ - answer = sep.join(self.rand.sample(ANSWER_WORDS, word_count)) + words = [self.randword() for i in range(word_count)] + answer = sep.join(words) self.answers.append(answer) return answer @@ -162,7 +168,7 @@ class Puzzle: def html_body(self): """Format and return the markdown for the puzzle body.""" - return mistune.markdown(self.get_body()) + return mistune.markdown(self.get_body(), escape=False) def hashes(self): "Return a list of answer hashes"