File: make.py

package info (click to toggle)
python-pdoc 16.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,080 kB
  • sloc: python: 5,260; javascript: 1,156; makefile: 18; sh: 3
file content (15 lines) | stat: -rw-r--r-- 375 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env python3
import foo

import pdoc

if __name__ == "__main__":
    doc = pdoc.doc.Module(foo)

    # We can override most pdoc doc attributes by just assigning to them.
    doc.get("Foo.A").docstring = "I'm a docstring for Foo.A."

    out = pdoc.render.html_module(module=doc, all_modules={"foo": doc})

    with open("foo.html", "w") as f:
        f.write(out)