Skip to main content

doxytag2zealdb

doxytag2zealdb creates a SQLite3 database from a Doxygen tag file to enable searchable Doxygen docsets with categorized entries in tools like helm-dash, Zeal, and Dash.

Introduction

Doxygen's GENERATE_DOCSET configuration option does most of the work to get a usable docset for use with helm-dash and friends. However, one still has to write a SQLite3 database to facilitate searching and browsing by entry type.

doxytag2zealdb uses Beautiful Soup to traverse Doxygen tag files, then extracts and prepares entries to write to the DB as suggested in the Dash guide on generating docsets. By default, it also updates Info.plist, which is expected to be one directory-level up from the output DB, to indicate that a Dash-style docset index is used (for Dash users). This can be disabled by specifying --dont-update-info-plist.

doxytag2zealdb has been developed against the Doxygen tag file output for a few C++ codebases. At present:

  • Several Doxygen tag file entry types are mapped to their corresponding docset entry types. There may be more mapping opportunities to the entry types in the docset generation guide.

  • There are command-line options to include function arguments and return types in entry names (e.g., some_func(int &output, const double input) -> bool by specifying --include-function-signatures) and include the parent scope in entry names for class/struct/namespace members (e.g., SomeClass::Method by specifying --include-parent-scopes). These options can be combined.

Requirements

Python 2.7 or Python 3 with beautifulsoup4 (4.4.1), lxml (3.6.0), and docopt (0.6.2)

Installation

The doxytag2zealdb module can be executed directly from a repository clone or extracted source tarball, provided that the requirements are installed, using python -m doxytag2zealdb.

Alternatively, one may may run setup.py (python setup.py install) or install from PyPI (pip install [--user] [--upgrade] doxytag2zealdb). Note that the entrypoint is simply doxytag2zealdb when installing via these methods.

Typical Usage

  1. Suppose you have a project named foo with Doxygen configuration in foo.dox. As suggested in the Doxygen section of the Dash docset guide, at least make sure GENERATE_DOCSET = yes in foo.dox. Ensure HTML output is enabled and also specify tag file generation with GENERATE_TAGFILE = /path/to/desired/foo.tag. You may wish to further customize DOCSET_BUNDLE_ID (which controls the name of the docset subdirectory), other DOCSET_* options, and the other options mentioned in the guide.

  2. If the top-level Doxygen output directory is output, go to output/html/ and run make. An error about missing docsetutil is fine (and expected when not using macOS and an old-enough Xcode install). Also, output/html/$(DOCSET_BUNDLE_ID).docset/Contents/Info.plist should have the isDashDocset key set to true. doxytag2zealdb will do this automatically; additionally pass --dont-update-info-plist in the next step if this is not desired.

  3. The SQLite DB is expected to be named docSet.dsidx and placed in the directory output/html/$(DOCSET_BUNDLE_ID).docset/Contents/Resources/, where $(DOCSET_BUNDLE_ID) may be something like org.doxygen.Project if left uncustomized in foo.dox. This is where doxytag2zealdb comes in:

     [python -m] doxytag2zealdb --tag /path/to/desired/foo.tag \
       --db /path/to/output/html/$(DOCSET_BUNDLE_ID).docset/Contents/Resources/docSet.dsidx \
       --include-parent-scopes --include-function-signatures
    
  4. After adding an icon and whatever else, output/html/$(DOCSET_BUNDLE_ID).docset should be ready to use with the tool of your choice.

Extending It

There are multiple ways to extend doxytag2zealdb's behavior:

  • Options can be added to existing TagProcessors. See TagProcessor and functionTagProcessor for examples of this. Also see how keyword arguments get passed around from doxytag2zealdb.py to TagfileProcessor to TagProcessors and their superclasses.

  • One can subclass TagProcessor (or one of its existing child classes) to handle a new tag case. Then add it to the registrations in TagfileProcessor.init_tag_processors() or separately register it at runtime, if you like.

  • Command-line options are easily added using docopt. See the module docstring and code in doxytag2zealdb.py.

  • ...

Contributing

Please file issues and submit pull (merge) requests upstream at https://gitlab.com/vedvyas/doxytag2zealdb.

License

doxytag2zealdb is distributed under the terms of the GNU General Public License version 3 or (at your option) any later version. Please see COPYING.

Release files for doxytag2zealdb 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for doxytag2zealdb 0.3.1
File Size Uploaded
doxytag2zealdb-0.3.1.tar.gz 28.2 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for doxytag2zealdb 0.3.1
File Interpreter ABI Platform
doxytag2zealdb-0.3.1-py3-none-any.whl Python 3 none any Details
doxytag2zealdb-0.3.1-py2-none-any.whl Python 2 none any Details

Total release size: 117.1 kB

Release files / doxytag2zealdb-0.3.1.tar.gz

Download URL doxytag2zealdb-0.3.1.tar.gz
Size 28.2 kB
Tags Source
SHA-256 checksum
How to use checksums
42f8e2218469e029a80524c2e45ff8b3da53d45fc867514f389d028c9f5bb8a3
BLAKE2b-256 checksum
How to use checksums
312ad848482eab1eae103bf433ae2489facdc34a4b4756a8033128eefa005b7f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.34.0 CPython/3.7.4

Release files / doxytag2zealdb-0.3.1-py3-none-any.whl

Download URL doxytag2zealdb-0.3.1-py3-none-any.whl
Size 44.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fd731ee85e8087ef119900a8997afc988ccd66aebe175528cf6f01aa6663c955
BLAKE2b-256 checksum
How to use checksums
f7526eef10d66ed89b5ca625c7708d3fc06544d6e94c57f36c7bd1a813f41126
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.34.0 CPython/3.7.4

Release files / doxytag2zealdb-0.3.1-py2-none-any.whl

Download URL doxytag2zealdb-0.3.1-py2-none-any.whl
Size 44.4 kB
Tags Python 2
SHA-256 checksum
How to use checksums
a6a637219840580d5110c4d5491f522d676e62ebbe05a7eb86ce6e89f45b4529
BLAKE2b-256 checksum
How to use checksums
f4adbdafe421a11de83490c2609d6cb919f2851b17f958d35061a4cef6be05b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.34.0 CPython/3.7.4

Release history Release notifications | RSS feed

This release

0.3.1 This release

3 release files

0.3.0

3 release files

0.2.6

2 release files

0.1.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page