A powerful converter from DOCX to AsciiDoc format using Pandoc
Project description
aPowerConverter
A powerful converter from DOCX to AsciiDoc format, using Pandoc with smart processing and formatting options.
Features
- Smart DOCX to AsciiDoc conversion
- Intelligent section number handling
- Automatic image extraction and management
- Smart table formatting with [INFO] tags
- Heading hierarchy normalization
- Document ID insertion
- Detailed logging and progress feedback
- Dry-run mode for testing
- Recursive directory processing
- Color-coded output (can be disabled)
Requirements
Python Requirements (automatically installed)
- Python 3.9 or higher
- pypandoc >= 1.11
External Dependencies
- Pandoc (for conversion)
- Download from https://pandoc.org/installing.html
- Required for all conversions
Installation
-
Install Python 3.9 or higher if not already installed:
- Download from https://www.python.org/downloads/
- Make sure to check "Add Python to PATH" during installation
-
Install Pandoc:
- Download from https://pandoc.org/installing.html
- Follow the installation instructions for your operating system
-
Install aPowerConverter:
pip install aPowerConverter
Usage
Basic Usage
Convert a DOCX file to AsciiDoc:
apower-converter document.docx
Advanced Options
Process multiple DOCX files:
apower-converter doc1.docx doc2.docx
Convert all DOCX files in a directory:
apower-converter ./documents/
Extract images during conversion:
apower-converter document.docx -i ./images/
Keep section numbers:
apower-converter document.docx -k
Generalize headings:
apower-converter document.docx -g
Save output to specific directory:
apower-converter document.docx -o ./output/
For more options:
apower-converter --help
Features in Detail
Smart Table Detection
Tables with empty cells in the first column are automatically marked with [INFO] tags in the AsciiDoc output.
Image Handling
Images are extracted to a configurable directory, with each document's images placed in a subdirectory named after the document.
Heading Normalization
The -g option normalizes heading levels, ensuring a consistent hierarchy starting at level 2 (==).
Document IDs
Each converted document automatically gets a document ID based on the filename, making it easy to cross-reference documents.
License
This project is licensed under the GNU General Public License v3 (GPLv3) - 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.1.4.tar.gz.
File metadata
- Download URL: apowerconverter-1.1.4.tar.gz
- Upload date:
- Size: 87.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7e635fc58d4c34db8108e30ae39645ece998cf0bb601e5e2452d5f04f59a877
|
|
| MD5 |
cb5fc59b58d1103bf185ee8c6d574daf
|
|
| BLAKE2b-256 |
42187b5af850b3c8df94cc7acfef55ff4f9ff4c63081f06c2b050da901515bfa
|
File details
Details for the file apowerconverter-1.1.4-py3-none-any.whl.
File metadata
- Download URL: apowerconverter-1.1.4-py3-none-any.whl
- Upload date:
- Size: 13.1 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 |
b64a82de6f9dd5274b79dbe37401268c5778a10e15179babd47bd8f9730ea959
|
|
| MD5 |
cffef74460fa57784c8a639767d5800f
|
|
| BLAKE2b-256 |
a8cfc3eaf3f5a81f2a914f8b3327ecad2792ed85a218ee22e1408705b95a393b
|