# This is the open-adventure dungeon text coverage report generator. It
# consumes a YAML description of the dungeon and determines whether the
# various strings contained are present within the test check files.
+#
+# The default HTML output is appropriate for use with Gitlab CI.
+# You can override it with a command-line argument.
import os
+import sys
import yaml
import re
print(" actions............: {}% covered ({} of {})".format(actions_percent, actions_covered, actions_total))
print(" specials...........: {}% covered ({} of {})".format(special_percent, special_covered, special_total))
+ if len(sys.argv) > 1:
+ html_output_path = sys.argv[1]
+
# render HTML report
with open(html_output_path, "w") as f:
f.write(html_template.format(
this must really be an oyster. (I never was very good at identifying
bivalves.) Whatever it is, it has now snapped shut again.
+> open oyster
+
+The oyster creaks open, revealing nothing but oyster inside. It
+promptly snaps shut again.
+
> s
You're at complex junction.
> in
+Tsk! A wizard wouldn't have to take 350 turns. This is going to cost
+you a couple of points.
+
You're inside building.
There is a golden chain lying in a heap on the floor!
> drop ruby
-Tsk! A wizard wouldn't have to take 350 turns. This is going to cost
-you a couple of points.
-
OK
> drop sapphire
> d
-You're at complex junction.
-
-> e
-
Your lamp is getting dim. You'd best start wrapping this up, unless
you can find some fresh batteries. I seem to recall there's a vending
machine in the maze. Bring some coins with you.
+You're at complex junction.
+
+> e
+
You are in an anteroom leading to a large passage to the east. Small
passages go west and up. The remnants of recent digging are evident.
A sign in midair here says "Cave under construction beyond this point.
> e
+Your lamp has run out of power.
+
There is no way to go that direction.
You're in Plover Room.
> e
-Your lamp has run out of power.
-
There is no way to go that direction.
You're in Plover Room.
wall, burying the snakes in the rubble. A river of molten lava pours
in through the hole, destroying everything in its path, including you!
-You scored 399 out of a possible 430, using 476 turns.
+You scored 399 out of a possible 430, using 477 turns.
Your score puts you in Master Adventurer Class B.