Convert Markdown files to index.html for Odoo modules
Project description
md2indexhtml
md2indexhtml is a Python package designed to simplify the creation of index.html files for Odoo modules. It converts Markdown files to HTML with a clean, modern style that integrates well with Odoo's documentation system.
Features
- Automatically converts Markdown to styled HTML
- Creates
index.htmlin thestatic/descriptiondirectory (Odoo standard location) - Generates a clean, professional table of contents
- Applies modern, responsive styling without requiring external CSS
- Simple command-line interface
Installation
Install the package using pip:
pip install md2indexhtml
Usage
Basic Usage
The simplest way to use md2indexhtml is to run it in your Odoo module directory:
cd your_odoo_module
md2indexhtml README.md
This will:
- Convert your README.md to HTML
- Create a
static/descriptiondirectory if it doesn't exist - Save the converted file as
index.htmlin that directory
Without Arguments
If you run md2indexhtml without any arguments in a directory containing a markdown file:
cd your_odoo_module
md2indexhtml
It will automatically:
- Find the first .md file in the current directory
- Convert it to HTML
- Save it as
static/description/index.html
Python API
You can also use the package programmatically in your Python code:
from md2indexhtml import convert_md_to_html
# Convert specific file
convert_md_to_html("README.md")
# Or let it find a markdown file automatically
convert_md_to_html()
Output Example
The converted HTML file will include:
- Responsive design
- Table of contents with smooth scrolling
- Syntax highlighting for code blocks
- Modern typography and spacing
- Mobile-friendly layout
Styling
The package includes a built-in style system that provides:
- Clean, professional typography
- Syntax highlighting for code blocks
- Responsive tables
- Block quotes styling
- Hierarchical heading styles
- Mobile-friendly design
All styles are included inline in the HTML file, so no external CSS files are needed.
Use with Odoo
This package is specifically designed for Odoo module documentation. When you publish your module, the generated index.html in static/description will automatically be used as the module's documentation page on the Odoo Apps store.
Contributing
Contributions are welcome! Please feel free to submit a pull request or open an issue on GitHub.
License
This project is licensed under the MIT License.
Author
Fasil (@fasilwdr) Email: fasilwdr@hotmail.com
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file md2indexhtml-0.1.5.tar.gz.
File metadata
- Download URL: md2indexhtml-0.1.5.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
915f9e3f480dbb23bec9a8691904a2dcdbb6c6510a37d299e49a5bb6f52a8ef9
|
|
| MD5 |
821313e6556da2918f0becaa6ecbdb63
|
|
| BLAKE2b-256 |
81e2f6fe8ee164c566a5a590d6fc87ca31dd640aaf5885d983d2abd6b00fe8bf
|
Provenance
The following attestation bundles were made for md2indexhtml-0.1.5.tar.gz:
Publisher:
publish.yml on fasilwdr/md2indexhtml
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
md2indexhtml-0.1.5.tar.gz -
Subject digest:
915f9e3f480dbb23bec9a8691904a2dcdbb6c6510a37d299e49a5bb6f52a8ef9 - Sigstore transparency entry: 170697606
- Sigstore integration time:
-
Permalink:
fasilwdr/md2indexhtml@ac9eea1a14d39fbc347acac58624fe67b41a7ab6 -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/fasilwdr
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ac9eea1a14d39fbc347acac58624fe67b41a7ab6 -
Trigger Event:
release
-
Statement type:
File details
Details for the file md2indexhtml-0.1.5-py3-none-any.whl.
File metadata
- Download URL: md2indexhtml-0.1.5-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da52ba46e5ce3c14fbc367255f9a28fed508fe94f1ba0e1d03d421c2b92e22a3
|
|
| MD5 |
bbb0e4d5b54505b195ba84cd3f7a74a2
|
|
| BLAKE2b-256 |
a0b52234513e6bff77241a5055b032153a686d57ca8c81e4dd16975fea3c59a7
|
Provenance
The following attestation bundles were made for md2indexhtml-0.1.5-py3-none-any.whl:
Publisher:
publish.yml on fasilwdr/md2indexhtml
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
md2indexhtml-0.1.5-py3-none-any.whl -
Subject digest:
da52ba46e5ce3c14fbc367255f9a28fed508fe94f1ba0e1d03d421c2b92e22a3 - Sigstore transparency entry: 170697608
- Sigstore integration time:
-
Permalink:
fasilwdr/md2indexhtml@ac9eea1a14d39fbc347acac58624fe67b41a7ab6 -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/fasilwdr
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ac9eea1a14d39fbc347acac58624fe67b41a7ab6 -
Trigger Event:
release
-
Statement type: