示例#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)
示例#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
        })
示例#3
0
 def calendar():
     return md_page("calendar", "curse_of_strahd", build_toc=False)
示例#4
0
 def page(name):
     return md_page(name, "waterdeep")
示例#5
0
 def gm_notes(name):
     return md_page(name, "pirates", directory="gm_notes")
示例#6
0
 def home():
     return md_page("Here There Be Pirates!", "pirates")
示例#7
0
 def gm_notes(name):
     return md_page(name, "dragon_heist", directory="gm_notes")
示例#8
0
 def home():
     return md_page("Dragon Heist", "dragon_heist")
示例#9
0
 def equipment(name):
     return md_page(name, "dnd", "equipment")
示例#10
0
 def dnd_class(name):
     return md_page(name, "dnd", "class")
示例#11
0
 def background(name):
     return md_page(name, "dnd", "background")
示例#12
0
 def advancement(name):
     return md_page(name, "dnd", "advancement")
示例#13
0
 def home():
     return md_page("5e Wiki", "dnd", build_toc=False)
示例#14
0
 def calendar():
     return md_page("calendar", "waterdeep", build_toc=False)
示例#15
0
 def gm_notes(name):
     return md_page(name, "waterdeep", directory="gm_notes")
示例#16
0
 def home():
     return md_page("Numenera Home", "numenera", build_toc=False)
示例#17
0
 def page(name):
     return md_page(name, "numenera")
示例#18
0
 def general(name):
     return md_page(name, "dnd", "general")
示例#19
0
 def page(name):
     return md_page(name, "dragon_heist")
示例#20
0
 def race(name):
     return md_page(name, "dnd", "race")
示例#21
0
 def calendar():
     return md_page("calendar", "dragon_heist", build_toc=False)
示例#22
0
 def subclass(name):
     return md_page(name, "dnd", "subclass")
示例#23
0
 def page(name):
     return md_page(name, "pirates")
示例#24
0
 def gm_notes(name):
     return md_page(name, "curse_of_strahd", directory="gm_notes")
示例#25
0
 def player_soundboard():
     return md_page("Player Soundboard", "common", build_toc=False)
示例#26
0
 def home():
     return md_page("Curse of Strahd", "curse_of_strahd")
示例#27
0
 def page(name):
     return md_page(name, "curse_of_strahd")
示例#28
0
 def home():
     return md_page("Waterdeep Adventures", "waterdeep")