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.1.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.1-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: apowerconverter-1.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 66138f0e9970c971b6b1c21b9038c3acf9814cc9dc4984eda7536e5494d368dc
MD5 d6cc1fccb549430b19ec28bffc51db7e
BLAKE2b-256 33f01de70c5ca95c7fb86181048140a9b1c3bb429e3d9ac4382f1a839aaae1f8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apowerconverter-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c80c4233bda49e32133bc9130a8c9415389b45e0985c6eda87b3f0a0e9873e35
MD5 9d3efe51fb21924a72b81556e8af34cd
BLAKE2b-256 734f06169d2a3cb192043fee19c88bb57dc89c9937268aba00fee7f25f493274

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