forked from DerwenAI/pytextrank
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpkg_doc.py
executable file
·46 lines (36 loc) · 1.13 KB
/
pkg_doc.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import pyfixdoc
import sys
######################################################################
## main entry point
if __name__ == "__main__":
# NB: `inspect` is picky about paths and current working directory
# this only works if run from the top-level directory of the repo
sys.path.insert(0, "../")
# customize the following, per use case
import pytextrank # pylint: disable=W0611
class_list = [
"BaseTextRankFactory",
"BaseTextRank",
"PositionRankFactory",
"PositionRank",
"BiasedTextRankFactory",
"BiasedTextRank",
"Lemma",
"Phrase",
"Sentence",
"VectorElem",
]
pkg_doc = pyfixdoc.PackageDoc(
"pytextrank",
"https://github.com/DerwenAI/pytextrank/blob/main",
class_list,
)
# NB: uncomment to analyze/troubleshoot the results of `inspect`
#pkg_doc.show_all_elements(); sys.exit(0)
# build the apidocs markdown
pkg_doc.build()
# output the apidocs markdown
ref_md_file = sys.argv[1]
pkg_doc.write_markdown(ref_md_file)