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

Uploaded Python 3

File details

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

File metadata

  • Download URL: apowerconverter-1.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 fda900ad761d669304ed20d077536dfe2c363bd09270181dc9b52be2d25e77c7
MD5 ce666ea4c872749ae6b2aaaac3930fbb
BLAKE2b-256 1ec51e579e79ffd9c4e58ea3e3167d8624f0dc3bab9c5c8531c592ba6ac0cc37

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apowerconverter-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 33c519f18ddacfc2a9bec0b6430342f8330556835730c188c6cf05b1584c7de6
MD5 b00a55aec6a20ee9af66084b7ff0fee3
BLAKE2b-256 fbe42894f1ba7565019638464ad70426a78063db7ce851b4ee7b6b4ff1c60b54

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