Skip to main content

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

Installation

  1. Install Python 3.9 or higher if not already installed:

  2. Install Pandoc:

  3. 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


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.6.tar.gz (87.5 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.6-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: apowerconverter-1.1.6.tar.gz
  • Upload date:
  • Size: 87.5 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.6.tar.gz
Algorithm Hash digest
SHA256 56f5f8aa60e31eb035859c103962804a12233bf830387a51536efba06be04a14
MD5 3e204c2a6ec4b4d4753a6bca8914d85d
BLAKE2b-256 7ba66c6e47e4c9113aac1db7c08e21d90822b0633bbd59da9d9a9b39c33c3b85

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apowerconverter-1.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 6eca1e7afc379507a33dc517d8cb9884b14aa17bec112ee0f048a122d4bfe1cb
MD5 ff986d3c99dae3f0d237ad09cac518ae
BLAKE2b-256 253138aa27eceef81a930029beba333e41c3a5a87f30347650a9bc01b640e869

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