Skip to main content

A powerful bidirectional converter between DOCX and AsciiDoc formats

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.1.0.tar.gz (14.6 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.1.0-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for apowerconverter-1.1.0.tar.gz
Algorithm Hash digest
SHA256 622d668dd378d897cc467e5fc80f668e7b4b081cf8207aa2f02feeb649a4a6d2
MD5 6d88b6a883165f7d31432708990c2e7f
BLAKE2b-256 219e5aaa5844be2b633e2fb92175f8002dce7c1840478be5b7f6624d001a9d62

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apowerconverter-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 419a463317d1c68f2769d40a3109bd44d7765a7bdc2ceb9f4625ccb71c267100
MD5 9f5f845e208048b4c56bde751d82b314
BLAKE2b-256 0119cf3d10a3a28516219391513dfaa2abce4f8e83ce722bfb5837b261e5cab2

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