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

Uploaded Python 3

File details

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

File metadata

  • Download URL: apowerconverter-1.1.5.tar.gz
  • Upload date:
  • Size: 87.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.1.5.tar.gz
Algorithm Hash digest
SHA256 82aec6e42d6fe153d8ed2f8c4490bb95f0ed145360388c2c23ff3678a0689643
MD5 6bd5d59116d607dfbba98578c0028289
BLAKE2b-256 205c3205d0f858ac3127448922d8e83b814f0dfbda7e0af0a1742fa67c825ec9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apowerconverter-1.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 7d571783292c3f01349c271b836bea4f7a2c7dbd3aac555b9d51aab15291bebe
MD5 543f0340850bc85e7aae1c720e8cee1f
BLAKE2b-256 e718d535bd053559793642d6ca62c097f2e564dd9567d244b1c3abc88421c272

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