A suite of utilities designed to streamline TiDB documentation workflows.
Project description
TiDocs: Tools for TiDB Documentation
A toolkit for streamlining TiDB documentation workflows, specializing in document conversion and formatting.
Installation
pip install tidocs
Merge Release Notes (tidocs merge
)
This addresses a common challenge in documentation workflows: converting Markdown files containing HTML tables into well-formatted Word and PDF documents. While traditional tools like Pandoc exist, they often struggle with complex HTML tables, resulting in poorly formatted output.
Features
- Merge multiple Markdown files into a single document
- Preserve complex HTML table formatting
- Create automated table of contents
- Convert internal links
[Overview](/overview.md)
to external links[Overview](https://docs.pingcap.com/tidb/stable/overview)
.
Usage
The tidocs merge
command provides a web interface for combining multiple release notes into a single, well-formatted Word document.
-
Launch the application
pip install tidocs tidocs merge
The application will start and display a URL:
✨ Running marimo app Merge Release Notes 🔗 URL: http://127.0.0.1:8080
-
Upload release notes
To merge release notes from v1.0.0 to v10.0.0, upload all files from
release-1.0.0.md
torelease-10.0.0.md
. -
Configure document information
These fields will appear on the cover page of the generated Word document.
-
Generate document
Click Download Word Document to export your formatted Word document. The document will include:
- Properly formatted tables
- Complete documentation links
- Generated Table of Contents
-
Post-process document
After generating the Word document, follow these steps to finalize it:
- Open the downloaded document in Microsoft Word.
- Update the table of contents:
On the References tab, click Update Table > Update entire table > OK
- Optional formatting adjustments:
- Adjust table column widths if needed.
- Review and adjust page breaks.
- Check and adjust heading styles.
Changelog
v1.0.4
- Enhance the rendering of abstracts containing multiple paragraphs.
v1.0.3
- Remove "Abstract" heading from the generated Word document.
v1.0.2
- Fix the issue that Pandoc fails to write docx output to terminal on Windows.
v1.0.1
- Fix the issue that Pandoc becomes non-executable after installation on macOS because
Zipfile.extract()
doesn't maintain file permissions.
v1.0.0
- Support merging multiple TiDB release notes Markdown files with HTML tables into one well-formatted Word document.
Project details
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
File details
Details for the file tidocs-1.0.4.tar.gz
.
File metadata
- Download URL: tidocs-1.0.4.tar.gz
- Upload date:
- Size: 57.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: pdm/2.20.1 CPython/3.10.12 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 419d6eaacbc060eefa3e3df4951f90fcffb1f967642237a215efdf53c65fdd51 |
|
MD5 | 0b65f35e53e26a40f25efc282b0a1a39 |
|
BLAKE2b-256 | 05ab6307a56a747ecb9e41dad9222a7291f5ea240ad494a99061e55b5d2a5d96 |
File details
Details for the file tidocs-1.0.4-py3-none-any.whl
.
File metadata
- Download URL: tidocs-1.0.4-py3-none-any.whl
- Upload date:
- Size: 57.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: pdm/2.20.1 CPython/3.10.12 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7986c78ea0460c73f286dbb19f425b7cfef08a3594d267dc0f8257b65d5f59dd |
|
MD5 | 9c3d220da470f2b69e5f65a7b2a5d976 |
|
BLAKE2b-256 | 0b0a8d82a8618cd02abee85dbaf1cde2cad5ecc288412500111657a59e2c2ed0 |