A powerful DOCX to AsciiDoc converter with advanced features
Project description
docx2adoc
A powerful DOCX to AsciiDoc converter with advanced features, smart processing, and excellent automation support.
Features
- Smart DOCX to AsciiDoc conversion
- Automatic section number removal (optional)
- Image extraction and management
- Table formatting with [INFO] tags for empty first columns
- Heading hierarchy normalization
- Recursive directory processing
- Color-coded output (can be disabled)
- Detailed logging support
- Dry-run mode for testing
- Quiet mode for automation
Installation
pip install docx2adoc
Prerequisites
- Python 3.7 or higher
- Pandoc must be installed on your system (Install Pandoc)
Usage
Basic conversion:
docx2adoc document.docx
Convert multiple files:
docx2adoc doc1.docx doc2.docx
Convert with logging:
docx2adoc document.docx --log-file conversion.log
Test run without making changes:
docx2adoc ./documents/ --dry-run
Quiet mode for automation:
docx2adoc document.docx --quiet
Convert recursively with image extraction:
docx2adoc ./documents/ -r -i ./images/ -g
Command Line Options
Main Options
input: Input DOCX file(s) or directory to convert-g, --generalize-headings: Run heading generalization-k, --keep-numbers: Keep section numbers from original document
Input/Output Options
-o, --output-dir DIR: Output directory for converted files-i, --image-dir DIR: Directory to extract images to
Processing Options
-r, --recursive: Recursively process DOCX files in directories
Display Options
--no-color: Disable color output-v, --verbose: Enable verbose output--quiet: Suppress all output except errors--dry-run: Show what would be done without making changes
Logging Options
--log-file FILE: Write detailed logs to specified file
Exit Codes
- 0 (SUCCESS): Successful completion
- 1 (FAILURE): One or more files failed to process
- 2 (CRITICAL): Critical error (e.g., missing dependencies)
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
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 apowerconverter-1.0.7.tar.gz.
File metadata
- Download URL: apowerconverter-1.0.7.tar.gz
- Upload date:
- Size: 14.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
71f80a3b278b1349c4b29b196105e8debc48679316b23703391d57e866dc06aa
|
|
| MD5 |
aa4e0aed01798ca460db122ebb982e42
|
|
| BLAKE2b-256 |
351c3eb3b5f4ce71fbccda500213eedc57478ff915a439feaf6145d4849d60d4
|
File details
Details for the file apowerconverter-1.0.7-py3-none-any.whl.
File metadata
- Download URL: apowerconverter-1.0.7-py3-none-any.whl
- Upload date:
- Size: 13.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f114a83cd8c87a948fbd461c4392e3ce957dde45058f33a0007900d810760ee1
|
|
| MD5 |
320270c53c1cb1b2e5a04af2b079e710
|
|
| BLAKE2b-256 |
1af1282f1aeb1c5b6fa7a7676d2cffd9141ff4e55fa6301fc46de6e2f25bba24
|