summaryrefslogtreecommitdiffstats
path: root/doc/doxygen-link.py
Commit message (Collapse)AuthorAgeFilesLines
* doc: workaround LINK_DOC with empty libnl.dictThomas Haller2024-07-191-1/+3
| | | | | | | | Seems recent asciidoc leave us with an empty "libnl.dict". This breaks the script. It's not clear to me, why this happens, or why we need to LINK_DOC at all. Just work around it, so it no longer crashes.
* python: fix flake8 warnings F401Thomas Haller2023-07-251-1/+0
| | | | | | | | | ./doc/doxygen-link.py:4:1: F401 'fileinput' imported but unused ./doc/resolve-asciidoc-refs.py:5:1: F401 'fileinput' imported but unused ./python/doc/conf.py:14:1: F401 'sys' imported but unused ./python/doc/conf.py:14:1: F401 'os' imported but unused ./python/netlink/util.py:13:1: F401 '.core as netlink' imported but unused ./python/netlink/util.py:16:1: F401 'types' imported but unused
* python: reformat all Python files with python-blackThomas Haller2023-07-251-26/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Automated code formatting is great. Use python-black for that ([1]). Black us not configurable much (uncompromising) and follows PEP8. It thus generates quite a standard, pleasing format. But the point isn't whether the formatting is always the most subjectively pleasing. The point is that the style is generated and enforceable by an automated tool. It takes away places for nit picking, while resulting in a more consistent code base. As this reformats the entire code base, it introduces a large diff and interferes with tools like git-blame. That will be somewhat alleviated by adding a "blame.ignoreRevsFile" for git in the next commit. The change is done automatically, by running python-black version black-22.8.0-2.fc38.noarch: $ black . The result is the same as $ ( git grep -l '#!.*\(PYTHON\|python\)' ; git ls-files '*.py' '*.py.in' ) \ | sort -u \ | xargs -d '\n' black Note that the exact result depends on the version of black. Currently that version is black==22.12.0 from pip. Yes, this means when we bump the version in the future, some reformatting will happen. [1] https://github.com/psf/black
* Use print() function in both Python 2 and Python 3Christian Clauss2022-07-061-1/+1
| | | | https://github.com/thom311/libnl/pull/327
* doc: fix doxygen-link.py by skipping invalid entries in libnl.dictThomas Haller2014-06-251-9/+32
| | | | | | | | | | | | | | | | | | | | | | Newer versions of doxygen (on Fedora20) treat the documentation slightly different so that the following entires end up in libnl.dict: \=api/group__attr.html#ga769cc7bd882aab17c3740dd83329d7e6 »·······»·······NLA_PUT=api/group__attr.html#ga769cc7bd882aab17c3740dd83329d7e6 NLA_PUT=api/group__attr.html#ga769cc7bd882aab17c3740dd83329d7e6 Especially, replacing r'\' breaks the generated html documentation. Extend doxygen-link.py to strip whitespaces from the name and skip over r'\'. Also, when replacing the words in the output file, match them using word boundaries r'\b'. Also, don't print an additional newline after each processed line. Acked-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Thomas Haller <thaller@redhat.com>
* doxygen-link: Be python3 compatibleThomas Graf2013-10-221-1/+1
| | | | | Reported-by: Teto <mattator@gmail.com> Signed-off-by: Thomas Graf <tgraf@suug.ch>
* Move to asciidocThomas Graf2011-03-311-0/+20
The core library documentation has been converted to use asciidoc. It provides better flexibility in creating documentation such as tables and more powerful formatting rules. The doxygen based API reference remains and three scripts have been added to: - gen-tags.sh: extract tag information from doxygen reference - tags2dict.sh: generate a name=link dictionary file - doxygen-link.py: replace all references in the asciidoc documentation refering to API functions, struct, etc. with a link into the doxygen API reference. 'make gendoc' continue to generate all documentation. The following tools are required to generate documentation: - asciidoc - mscgen - asciidoc mscgen plugin - pygments - xmlstarlet