diff options
author | Bob Halley <halley@dnspython.org> | 2017-01-14 08:21:06 -0800 |
---|---|---|
committer | Bob Halley <halley@dnspython.org> | 2017-01-14 08:21:06 -0800 |
commit | caee7d577bdb9675cf4a4015a480c3529a5d1140 (patch) | |
tree | 0be3034da5342b8fb5dcf1d13296afd626b50ae8 /doc | |
parent | 9c8296a3b9964f8bbfb31ce3d7c4d75d2afd0e29 (diff) | |
download | dnspython-caee7d577bdb9675cf4a4015a480c3529a5d1140.tar.gz |
add doc gen helper
Diffstat (limited to 'doc')
-rw-r--r-- | doc/util/auto-values.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/doc/util/auto-values.py b/doc/util/auto-values.py new file mode 100644 index 0000000..cd73818 --- /dev/null +++ b/doc/util/auto-values.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python3 + +import importlib +import sys + +name = sys.argv[1] +title = sys.argv[2] + +print(title) +print('=' * len(title)) +print() + +module = importlib.import_module(name) +for t in sorted(module._by_text.keys()): + print('.. py:data:: {}.{}'.format(name, t)) + print(' :annotation: = {}'.format(module._by_text[t])) |