Convert HTML documentation to Dash/Zeal docsets easily. This tool helps you transform your HTML documentation into a format compatible with documentation browsers like Dash and Zeal.
- Convert HTML documentation to Dash/Zeal compatible docsets
- Automatic index generation for quick searching
- Support for custom icons
- Configurable metadata
- Support for different entry types (Function, Class, Section, etc.)
- Python 3.7 or higher
- pip package manager
git clone https://github.com/Var7600/website2docset.git
cd website2docset
pip install -e .Convert a documentation directory to a docset:
website2docset.py -n MyDocs -v 1.0 path/to/docs options:
-n, --name Name of the docset
-v, --version Version of the docset (default: 0.0)
-i, --icon Path to PNG icon (16x16 pixels)
-d, --destination Output directory-
Create a basic docset:
website2docset.py -n Python3 -v 1.0 ./python-docs
-
Include a custom icon:
website2docset.py -n Python3 -v 1.0 -i icon.png ./python-docs
-
Specify output directory:
website2docset.py -n Python -v 1.0 -d ~/Docsets ./python-docs
Your HTML documentation should follow this structure:
documentation/
├── index.html
├── page1.html
├── page2.html
└── assets/
├── css/
└── js/
The index.htmlfile should contain links/href references to all documentation pages with appropriate class attributes for indexing.
The following entry types are supported in your HTML:
-
Function
-
Class
-
Section
-
Guide
-
Library
-
Type
-
Variable
-
Macro
for more about supported entry types see https://kapeli.com/docsets#supportedentrytypes
Add them as class attributes to your links(entry types should be first in your class attributes):
<a href="function.html" class="Function">My Function</a># Clone the repository
git clone https://github.com/Var7600/website2docset.git
cd website2docset
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install development dependencies
pip install -r requirements.txtpython -m pytest tests/This project follows PEP 8 guidelines. To check your code:
flake8 website2docset.pystatic analyzer mypy. To check your code:
mypy website2docset.pyContributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/Develop) - Commit your changes (
git commit -m 'Add some feature') - Push to the branch (
git push origin feature/Develop) - Open a Pull Request
- Write tests for new features
- Update documentation as needed
- Follow the existing code style
- Write meaningful commit messages
MIT License - see the LICENSE file for details.
If you find any bugs or have feature requests, please create an issue on GitHub.