Exemple #1
0
 def index_help():
     repo = Repo()
     last_commit = repo.head.commit
     commit_history = "{} ({})".format(last_commit.message,
                                       ctime(last_commit.committed_date))
     return md_page("home",
                    "common",
                    build_toc=False,
                    commit_history=commit_history,
                    up_to_date_msg=False,
                    last_restart=START_TIME)
Exemple #2
0
def open_monster_sheet(name):
    try:
        return md_page(name, "dnd", "monster", build_toc=False)
    except HTTPError:
        # If we can't find a template or MD file, check for a TOML file itself and just load the monster-sheet
        toml_path = pjoin("dnd/monster", title_to_page_name(name) + ".toml")
        if not isfile(pjoin("data", toml_path)):
            raise HTTPError(404,
                            f"Can't find a page for \"/dnd/monster/{name}\"")
        toml_dict = toml.load(pjoin("data", toml_path))
        if "redirect" in toml_dict:
            return redirect(toml_dict["redirect"])
        md_text = MD.parse_md(INCLUDE_MD.format(toml_path), namespace="dnd")
        return template("common/page.tpl", {
            "title": toml_dict["name"],
            "text": md_text
        })
Exemple #3
0
 def calendar():
     return md_page("calendar", "curse_of_strahd", build_toc=False)
Exemple #4
0
 def page(name):
     return md_page(name, "waterdeep")
Exemple #5
0
 def gm_notes(name):
     return md_page(name, "pirates", directory="gm_notes")
Exemple #6
0
 def home():
     return md_page("Here There Be Pirates!", "pirates")
Exemple #7
0
 def gm_notes(name):
     return md_page(name, "dragon_heist", directory="gm_notes")
Exemple #8
0
 def home():
     return md_page("Dragon Heist", "dragon_heist")
Exemple #9
0
 def equipment(name):
     return md_page(name, "dnd", "equipment")
Exemple #10
0
 def dnd_class(name):
     return md_page(name, "dnd", "class")
Exemple #11
0
 def background(name):
     return md_page(name, "dnd", "background")
Exemple #12
0
 def advancement(name):
     return md_page(name, "dnd", "advancement")
Exemple #13
0
 def home():
     return md_page("5e Wiki", "dnd", build_toc=False)
Exemple #14
0
 def calendar():
     return md_page("calendar", "waterdeep", build_toc=False)
Exemple #15
0
 def gm_notes(name):
     return md_page(name, "waterdeep", directory="gm_notes")
Exemple #16
0
 def home():
     return md_page("Numenera Home", "numenera", build_toc=False)
Exemple #17
0
 def page(name):
     return md_page(name, "numenera")
Exemple #18
0
 def general(name):
     return md_page(name, "dnd", "general")
Exemple #19
0
 def page(name):
     return md_page(name, "dragon_heist")
Exemple #20
0
 def race(name):
     return md_page(name, "dnd", "race")
Exemple #21
0
 def calendar():
     return md_page("calendar", "dragon_heist", build_toc=False)
Exemple #22
0
 def subclass(name):
     return md_page(name, "dnd", "subclass")
Exemple #23
0
 def page(name):
     return md_page(name, "pirates")
Exemple #24
0
 def gm_notes(name):
     return md_page(name, "curse_of_strahd", directory="gm_notes")
Exemple #25
0
 def player_soundboard():
     return md_page("Player Soundboard", "common", build_toc=False)
Exemple #26
0
 def home():
     return md_page("Curse of Strahd", "curse_of_strahd")
Exemple #27
0
 def page(name):
     return md_page(name, "curse_of_strahd")
Exemple #28
0
 def home():
     return md_page("Waterdeep Adventures", "waterdeep")