Metadata-Version: 2.4
Name: aPowerConverter
Version: 1.1.3
Summary: A powerful bidirectional converter between DOCX and AsciiDoc formats using Pandoc and Asciidoctor
Home-page: https://github.com/Attoz/aPowerConverter
Author: Attoz
Author-email: attoz@users.noreply.github.com
Project-URL: Bug Tracker, https://github.com/Attoz/aPowerConverter/issues
Project-URL: Documentation, https://github.com/Attoz/aPowerConverter#readme
Project-URL: Source Code, https://github.com/Attoz/aPowerConverter
Keywords: docx,asciidoc,converter,documentation,word,markup,text processing,pandoc,asciidoctor,bidirectional
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Documentation
Classifier: Topic :: Office/Business
Classifier: Topic :: Software Development :: Documentation
Classifier: Topic :: Text Processing :: Markup
Classifier: Topic :: Utilities
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pypandoc>=1.11
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license-file
Dynamic: project-url
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# aPowerConverter

A powerful bidirectional converter between DOCX and AsciiDoc formats with advanced features.

## Features

- Bidirectional conversion:
  - DOCX → AsciiDoc
  - AsciiDoc → DOCX (new!)
- Smart document processing:
  - Automatic document ID insertion (`[[filename]]`)
  - Table formatting with [INFO] tags
  - Heading hierarchy normalization (DOCX → AsciiDoc)
  - Section number removal (optional, DOCX → AsciiDoc)
- Image handling:
  - Automatic image extraction and organization
  - Relative path handling for portability
  - Optional image directory specification
- Batch processing:
  - Multiple file conversion
  - Directory scanning
  - Recursive subdirectory support
- User-friendly interface:
  - Progress tracking
  - Color-coded output
  - Detailed logging
  - Dry-run mode

## Requirements

### Core Dependencies
- Python 3.7 or higher
- Pandoc (for all conversions)
- Asciidoctor (for AsciiDoc → DOCX conversion)

### Installation Steps

1. Install Python dependencies:
```bash
pip install aPowerConverter
```

2. Install Pandoc:
- Windows: Download from [pandoc.org/installing.html](https://pandoc.org/installing.html)
- Linux: `sudo apt-get install pandoc` or equivalent
- macOS: `brew install pandoc`

3. Install Asciidoctor (required for AsciiDoc → DOCX conversion):
- Install Ruby first if not present
- Then run: `gem install asciidoctor`

## Usage

### Basic Conversion

Convert DOCX to AsciiDoc:
```bash
apowerconverter document.docx
```

Convert AsciiDoc to DOCX:
```bash
apowerconverter document.adoc
```

### Advanced Options

With image extraction:
```bash
apowerconverter document.docx -i ./images/
```

Keep section numbers (DOCX → AsciiDoc):
```bash
apowerconverter document.docx -k
```

Generalize headings (DOCX → AsciiDoc):
```bash
apowerconverter document.docx -g
```

Convert multiple files:
```bash
apowerconverter doc1.docx doc2.adoc doc3.docx
```

Process directory recursively:
```bash
apowerconverter ./documents/ -r
```

Specify output directory:
```bash
apowerconverter document.docx -o ./output/
```

### Additional Options

- `--dry-run`: Show what would be done without making changes
- `--quiet`: Suppress all output except errors
- `--no-color`: Disable color output
- `--log-file FILE`: Write detailed logs to specified file
- `--verbose`: Enable verbose output

## Exit Codes

- 0: Success - All files processed successfully
- 1: Failure - One or more files failed to process
- 2: Critical - Missing dependencies or invalid arguments

## Examples

Convert a single DOCX file:
```bash
apowerconverter mydoc.docx
```

Convert an AsciiDoc file with images:
```bash
apowerconverter mydoc.adoc -i ./images/
```

Convert all documents in a directory:
```bash
apowerconverter ./docs/ -r -i ./images/ -o ./converted/
```

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