Ejemplo n.º 1
0
def renderer(fp, data, config):
    fp.write(h3(a([
        data["name"],
        data["url"],
    ])))
    fp.write(p(data["description"]))
    newline(fp)
Ejemplo n.º 2
0
def renderer(fp, data, config):
    fp.write(h3(a([data["name"], data["link"]])))

    if data["description"] is not None:
        fp.write(data["description"])
        fp.write("\n")

    fp.write("\n")
Ejemplo n.º 3
0
def renderer(fp, data, config):
    fp.write(h3(data["name"]))

    if data["sourcecode"] is not None:
        li(fp, [
            "Source code: ",
            a(data["sourcecode"]),
        ])

    if data["documentation"] is not None:
        li(fp, [
            "Documentation: ",
            a(data["documentation"]),
        ])

    li(fp, data["company"])
    fp.write("\n")
def renderer(fp, data, config):
    fp.write(
        h3(
            a([
                data["name"],
                config["url"] + "/tree/master/Papers/" +
                name2dir(data["name"]),
            ])))
    fp.write(p(data["description"]))
    fp.write("\n")
def renderer(fp, data, config):
    year, month, day = data["date"].split("/")
    fp.write(
        h2(
            a([data["name"].strip(), data["url"].strip()]) +
            f", {year}/{month}"))
    fp.write(data["authors"])
    newline(fp)
    newline(fp)
    fp.write(p(data["abstract"]))
    newline(fp)
Ejemplo n.º 6
0
def renderer(fp, data, config):
    title = data["title"] if data[
        "subtitle"] is None else f"{data['title']}: {data['subtitle']}"
    fp.write(h3(a([
        title,
        data["url"],
    ])))

    # Authors
    if len(data["authors"]) > 1:
        author = "Authors: "
    else:
        author = "Author: "

    author += ", ".join(data["authors"])
    li(fp, author)

    li(fp, f"Published: {data['published']}")
    newline(fp)
def renderer_subdir(fp, data, config):
    li(fp,
       a([data["name"].strip(), data["url"]]) + ". " + data["authors"].strip())
    newline(fp)
    f.write(badge)
    newline(f)

newline(f)
f.write(config["description"])
newline(f, iter=2)

# Table of Contents ###################################################
f.write(h2("Table of Contents"))
table_of_contents = parse_yaml("data.yaml")
default_level = 1
max_level = config.get("max_level", default_level)
level = default_level
for tol in table_of_contents:
    li(f, a([
        tol["name"],
        config["url"] + "#" + name2link(tol["name"]),
    ]))

    # Deeper levels in table of contents
    while True:
        if level < max_level:
            level += 1
            sub_table_of_contents = find_subdirectories(name2dir(tol["name"]))
            for s in sub_table_of_contents:
                lili(
                    f,
                    a([
                        dir2name(s.name),
                        config["url"] + "/tree/master/" + str(s),
                    ]))
        else: