Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

apowerconverter-1.0.0.tar.gz (13.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

apowerconverter-1.0.0-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file apowerconverter-1.0.0.tar.gz.

File metadata

  • Download URL: apowerconverter-1.0.0.tar.gz
  • Upload date:
  • Size: 13.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for apowerconverter-1.0.0.tar.gz
Algorithm Hash digest
SHA256 d7f48ecc96c83f8ff12196dcdf5caefe6b62d48ce872f0999fd3e04ccd7f43d9
MD5 7ad265ebbb9498c37c8c9021f68d1ff8
BLAKE2b-256 3fd54fca4e6bb3d8259c45ecf1f4e2a0d093819d75aad38cf0786cc44b119982

See more details on using hashes here.

File details

Details for the file apowerconverter-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for apowerconverter-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 877f17a1f68150b07007c33b8b709d492320d1ab28d2c7425a0cd56bacc18613
MD5 7695beaaca321b7ba5ad5af4633ab609
BLAKE2b-256 b0c029a3b731a8a64048b13662a21e753a21ba668b13f76587707403f2fe70dc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page