# Preeti Unicode Converter
A highly customizable Python package for converting Preeti font text to Unicode (Nepali). Supports multiple input and output formats including PDF, DOCX, and TXT files with enterprise-level features.
[](https://python.org)
[](LICENSE)
[](https://pypi.org/project/preeti-unicode/)
## Features
### Core Functionality
- **Text Conversion**: Convert Preeti font text to proper Unicode Nepali text
- **Multiple Formats**: Support for PDF, DOCX, TXT, and HTML files
- **Batch Processing**: Convert multiple files simultaneously with parallel processing
- **CLI Interface**: Command-line tool for easy integration into workflows
### Advanced Features
- **Dynamic Font Support**: Add custom font mappings and user-defined conversion rules
- **Plugin Architecture**: Extensible system for custom conversion logic
- **Processing Pipelines**: Configurable conversion workflows with middleware support
- **Caching System**: Improved performance with intelligent caching
- **Progress Tracking**: Real-time progress monitoring for large operations
- **Error Handling**: Comprehensive error management with graceful degradation
### Enterprise Features
- **PDF Processing**: Robust PDF handling with integrity validation and corruption detection
- **Parallel Processing**: Multi-threaded processing for high-performance batch operations
- **Logging System**: Structured logging with multiple output formats
- **Configuration Management**: Flexible configuration system with environment variable support
## Installation
### Using pip (Recommended)
```bash
pip install preeti-unicode
```
### Using uv (Fast)
```bash
uv add preeti-unicode
```
### From Source
```bash
git clone https://github.com/diwaskunwar/preeti-unicode.git
cd preeti-unicode
pip install -e .
```
## Quick Start
### Basic Text Conversion
```python
from preeti_unicode import convert_text
# Convert Preeti text to Unicode
result = convert_text("g]kfn")
print(result) # Output: नेपाल
# Convert with custom options
result = convert_text("g]kfn @)!&", convert_numbers=True)
print(result) # Output: नेपाल २०१७
```
### File Conversion
```python
from preeti_unicode import file_converter
# Convert a PDF file to Unicode text
success = file_converter(
input_file="document.pdf",
input_format="pdf",
output_file="converted.txt",
output_format="txt"
)
# Convert DOCX to HTML
success = file_converter(
input_file="document.docx",
input_format="docx",
output_file="converted.html",
output_format="html"
)
```
### Quick Testing
```python
from preeti_unicode import test
# Test string conversion
test("string", "g]kfn")
# Test file conversion capabilities
test("txt") # Test TXT file conversion
test("pdf") # Test PDF file conversion
test("docx") # Test DOCX file conversion
test("all") # Test all formats
```
## Command Line Interface
### Text Conversion
```bash
# Convert text directly
preeti-unicode text "g]kfn"
# Convert without number conversion
preeti-unicode text "g]kfn @)!&" --no-convert-numbers
```
### File Conversion
```bash
# Convert a single file
preeti-unicode file input.pdf output.txt --output-format txt
# Convert with explicit input format
preeti-unicode file input.pdf output.docx --input-format pdf --output-format docx
```
### Batch Conversion
```bash
# Convert multiple files
preeti-unicode batch *.pdf --input-format pdf --output-format txt --output-dir converted/
# Convert all files in a directory
preeti-unicode batch documents/ --input-format pdf --output-format html --output-dir output/
```
## Testing
The package includes a comprehensive test system that you can use to verify functionality:
```python
from preeti_unicode import test
# Test basic string conversion
test("string") # Uses default sample text
test("string", "your_preeti_text_here") # Test with your own text
# Test file format support
test("txt") # Test TXT file conversion
test("pdf") # Test PDF file conversion (requires reportlab)
test("docx") # Test DOCX file conversion (requires python-docx)
# Test everything at once
test("all") # Comprehensive test of all features
```
## Supported Formats
### Input Formats
- **PDF**: Full support with integrity validation and password protection handling
- **DOCX**: Microsoft Word documents with formatting preservation
- **TXT**: Plain text files with encoding detection
### Output Formats
- **PDF**: Generate Unicode PDF documents
- **DOCX**: Create formatted Word documents
- **TXT**: Plain text output with proper encoding
- **HTML**: Web-ready HTML with proper Unicode rendering
## Contributing
We welcome contributions! Please feel free to submit issues and pull requests.
### Development Setup
```bash
git clone https://github.com/diwaskunwar/preeti-unicode.git
cd preeti-unicode
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -e .
```
### Running Tests
```bash
# Run the built-in test suite
python -c "from preeti_unicode import test; test('all')"
```
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## Support
- **Issues**: [GitHub Issues](https://github.com/diwaskunwar/preeti-unicode/issues)
- **Documentation**: Check the docstrings and examples in this README
## Acknowledgments
- Thanks to the Nepali computing community for font specifications
- Built with modern Python packaging standards using uv and proper package structure
Raw data
{
"_id": null,
"home_page": null,
"name": "preeti-unicode-converter",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8.1",
"maintainer_email": "Diwas Kunwar <diwas.kuwar@gmail.com>",
"keywords": "conversion, devanagari, font, nepali, preeti, unicode",
"author": null,
"author_email": "Diwas Kunwar <diwas.kuwar@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/7a/2b/014bda9c24b23a2cd50387442d5c65dabf39907fe180489a8a15c55f44c5/preeti_unicode_converter-0.1.1.tar.gz",
"platform": null,
"description": "# Preeti Unicode Converter\n\nA highly customizable Python package for converting Preeti font text to Unicode (Nepali). Supports multiple input and output formats including PDF, DOCX, and TXT files with enterprise-level features.\n\n[](https://python.org)\n[](LICENSE)\n[](https://pypi.org/project/preeti-unicode/)\n\n## Features\n\n### Core Functionality\n- **Text Conversion**: Convert Preeti font text to proper Unicode Nepali text\n- **Multiple Formats**: Support for PDF, DOCX, TXT, and HTML files\n- **Batch Processing**: Convert multiple files simultaneously with parallel processing\n- **CLI Interface**: Command-line tool for easy integration into workflows\n\n### Advanced Features\n- **Dynamic Font Support**: Add custom font mappings and user-defined conversion rules\n- **Plugin Architecture**: Extensible system for custom conversion logic\n- **Processing Pipelines**: Configurable conversion workflows with middleware support\n- **Caching System**: Improved performance with intelligent caching\n- **Progress Tracking**: Real-time progress monitoring for large operations\n- **Error Handling**: Comprehensive error management with graceful degradation\n\n### Enterprise Features\n- **PDF Processing**: Robust PDF handling with integrity validation and corruption detection\n- **Parallel Processing**: Multi-threaded processing for high-performance batch operations\n- **Logging System**: Structured logging with multiple output formats\n- **Configuration Management**: Flexible configuration system with environment variable support\n\n## Installation\n\n### Using pip (Recommended)\n```bash\npip install preeti-unicode\n```\n\n### Using uv (Fast)\n```bash\nuv add preeti-unicode\n```\n\n### From Source\n```bash\ngit clone https://github.com/diwaskunwar/preeti-unicode.git\ncd preeti-unicode\npip install -e .\n```\n\n## Quick Start\n\n### Basic Text Conversion\n```python\nfrom preeti_unicode import convert_text\n\n# Convert Preeti text to Unicode\nresult = convert_text(\"g]kfn\")\nprint(result) # Output: \u0928\u0947\u092a\u093e\u0932\n\n# Convert with custom options\nresult = convert_text(\"g]kfn @)!&\", convert_numbers=True)\nprint(result) # Output: \u0928\u0947\u092a\u093e\u0932 \u0968\u0966\u0967\u096d\n```\n\n### File Conversion\n```python\nfrom preeti_unicode import file_converter\n\n# Convert a PDF file to Unicode text\nsuccess = file_converter(\n input_file=\"document.pdf\",\n input_format=\"pdf\",\n output_file=\"converted.txt\",\n output_format=\"txt\"\n)\n\n# Convert DOCX to HTML\nsuccess = file_converter(\n input_file=\"document.docx\",\n input_format=\"docx\",\n output_file=\"converted.html\",\n output_format=\"html\"\n)\n```\n\n### Quick Testing\n```python\nfrom preeti_unicode import test\n\n# Test string conversion\ntest(\"string\", \"g]kfn\")\n\n# Test file conversion capabilities\ntest(\"txt\") # Test TXT file conversion\ntest(\"pdf\") # Test PDF file conversion\ntest(\"docx\") # Test DOCX file conversion\ntest(\"all\") # Test all formats\n```\n\n## Command Line Interface\n\n### Text Conversion\n```bash\n# Convert text directly\npreeti-unicode text \"g]kfn\"\n\n# Convert without number conversion\npreeti-unicode text \"g]kfn @)!&\" --no-convert-numbers\n```\n\n### File Conversion\n```bash\n# Convert a single file\npreeti-unicode file input.pdf output.txt --output-format txt\n\n# Convert with explicit input format\npreeti-unicode file input.pdf output.docx --input-format pdf --output-format docx\n```\n\n### Batch Conversion\n```bash\n# Convert multiple files\npreeti-unicode batch *.pdf --input-format pdf --output-format txt --output-dir converted/\n\n# Convert all files in a directory\npreeti-unicode batch documents/ --input-format pdf --output-format html --output-dir output/\n```\n\n## Testing\n\nThe package includes a comprehensive test system that you can use to verify functionality:\n\n```python\nfrom preeti_unicode import test\n\n# Test basic string conversion\ntest(\"string\") # Uses default sample text\ntest(\"string\", \"your_preeti_text_here\") # Test with your own text\n\n# Test file format support\ntest(\"txt\") # Test TXT file conversion\ntest(\"pdf\") # Test PDF file conversion (requires reportlab)\ntest(\"docx\") # Test DOCX file conversion (requires python-docx)\n\n# Test everything at once\ntest(\"all\") # Comprehensive test of all features\n```\n\n## Supported Formats\n\n### Input Formats\n- **PDF**: Full support with integrity validation and password protection handling\n- **DOCX**: Microsoft Word documents with formatting preservation\n- **TXT**: Plain text files with encoding detection\n\n### Output Formats\n- **PDF**: Generate Unicode PDF documents\n- **DOCX**: Create formatted Word documents\n- **TXT**: Plain text output with proper encoding\n- **HTML**: Web-ready HTML with proper Unicode rendering\n\n## Contributing\n\nWe welcome contributions! Please feel free to submit issues and pull requests.\n\n### Development Setup\n```bash\ngit clone https://github.com/diwaskunwar/preeti-unicode.git\ncd preeti-unicode\npython -m venv venv\nsource venv/bin/activate # On Windows: venv\\Scripts\\activate\npip install -e .\n```\n\n### Running Tests\n```bash\n# Run the built-in test suite\npython -c \"from preeti_unicode import test; test('all')\"\n```\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Support\n\n- **Issues**: [GitHub Issues](https://github.com/diwaskunwar/preeti-unicode/issues)\n- **Documentation**: Check the docstrings and examples in this README\n\n## Acknowledgments\n\n- Thanks to the Nepali computing community for font specifications\n- Built with modern Python packaging standards using uv and proper package structure",
"bugtrack_url": null,
"license": "MIT",
"summary": "A highly customizable Python package for converting Preeti font text to Unicode (Nepali)",
"version": "0.1.1",
"project_urls": {
"Homepage": "https://github.com/diwaskunwar/preeti-unicode-converter",
"Issues": "https://github.com/diwaskunwar/preeti-unicode-converter/issues",
"Repository": "https://github.com/diwaskunwar/preeti-unicode-converter"
},
"split_keywords": [
"conversion",
" devanagari",
" font",
" nepali",
" preeti",
" unicode"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "f7f8db20ec92cf6d71dac0c5dc1da5046e1ad66352c1e818476b93e6eb64a83a",
"md5": "385c5c5a3e8d4c13bc90b5b70d57fab6",
"sha256": "cdf192a1576b301dfa5a257ab2f65f9c6e3b0ca287691616b8cb45dd68ae5a16"
},
"downloads": -1,
"filename": "preeti_unicode_converter-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "385c5c5a3e8d4c13bc90b5b70d57fab6",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8.1",
"size": 69753,
"upload_time": "2025-07-20T11:48:53",
"upload_time_iso_8601": "2025-07-20T11:48:53.147522Z",
"url": "https://files.pythonhosted.org/packages/f7/f8/db20ec92cf6d71dac0c5dc1da5046e1ad66352c1e818476b93e6eb64a83a/preeti_unicode_converter-0.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "7a2b014bda9c24b23a2cd50387442d5c65dabf39907fe180489a8a15c55f44c5",
"md5": "20fd4b70de88fd4f0f13fcabe97a47a5",
"sha256": "144000bc2b265e18b29d80d07065cfbd88f6371816c30dcf6fdacc1f535e0122"
},
"downloads": -1,
"filename": "preeti_unicode_converter-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "20fd4b70de88fd4f0f13fcabe97a47a5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8.1",
"size": 53737,
"upload_time": "2025-07-20T11:48:54",
"upload_time_iso_8601": "2025-07-20T11:48:54.373935Z",
"url": "https://files.pythonhosted.org/packages/7a/2b/014bda9c24b23a2cd50387442d5c65dabf39907fe180489a8a15c55f44c5/preeti_unicode_converter-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-20 11:48:54",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "diwaskunwar",
"github_project": "preeti-unicode-converter",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "preeti-unicode-converter"
}