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.4.tar.gz (87.3 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.4-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: apowerconverter-1.1.4.tar.gz
  • Upload date:
  • Size: 87.3 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.4.tar.gz
Algorithm Hash digest
SHA256 c7e635fc58d4c34db8108e30ae39645ece998cf0bb601e5e2452d5f04f59a877
MD5 cb5fc59b58d1103bf185ee8c6d574daf
BLAKE2b-256 42187b5af850b3c8df94cc7acfef55ff4f9ff4c63081f06c2b050da901515bfa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apowerconverter-1.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b64a82de6f9dd5274b79dbe37401268c5778a10e15179babd47bd8f9730ea959
MD5 cffef74460fa57784c8a639767d5800f
BLAKE2b-256 a8cfc3eaf3f5a81f2a914f8b3327ecad2792ed85a218ee22e1408705b95a393b

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