Skip to main content

nepali-converter

Convert legacy Nepali font encodings (Preeti, Kantipur, Sagarmatha, Himalb) to Unicode Devanagari. Also rescues legacy-encoded text from PDFs (non-OCR).

Package size: 15 kB (wheel) / 20 kB (sdist)

Part of the nepali-fonts project.

Installation

pip install nepali-converter

For PDF rescue support:

pip install nepali-converter[pdf]

CLI usage

Convert a legacy-encoded text file:

nepali-convert input.txt --font preeti --output output.txt

Auto-detect the legacy font:

nepali-convert input.txt --output output.txt

Read from stdin:

echo "g]kfn" | nepali-convert - --font preeti

Rescue text from a legacy-font PDF:

nepali-convert --pdf document.pdf --output rescued.txt
nepali-convert --pdf document.pdf --pages 1-5 --output rescued.txt

Python API

from nepali_converter import convert, detect_font

# Convert with a known font
text = convert("g]kfn", "preeti")  # → "नेपाल"

# Auto-detect the font
font = detect_font(legacy_text)
if font:
    text = convert(legacy_text, font)

# Rescue text from a PDF (requires nepali-converter[pdf])
from nepali_converter import rescue_pdf
rescued = rescue_pdf("document.pdf", pages=(1, 10))

Supported fonts

Font Encoding
Preeti Windows-1252 (cp1252)
Kantipur Windows-1252 (cp1252)
Sagarmatha Windows-1252 (cp1252)
Himalb (Fontasy Himali TT) Windows-1252 (cp1252)

License

MIT

Metadata

Release files for nepali-converter 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nepali-converter 0.1.1
File Size Uploaded Provenance Actions
nepali_converter-0.1.1.tar.gz 21.3 kB Without provenance Details for nepali_converter-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nepali-converter 0.1.1
File Interpreter ABI Platform Actions
nepali_converter-0.1.1-py3-none-any.whl Python 3 none any Details for nepali_converter-0.1.1-py3-none-any.whl

Total release size: 37.0 kB

Release files / nepali_converter-0.1.1.tar.gz

Download URL nepali_converter-0.1.1.tar.gz
Size 21.3 kB
Tags Source
SHA-256 checksum
How to use checksums
1d2f4e000bb9b7a583bffdfcc616181a7c185541d45090f6c1bcd24551a42111
BLAKE2b-256 checksum
How to use checksums
7c0b2fd90dc4e103e069e799a47abad61be2ad38eb1375023e26acf222cdbf9a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / nepali_converter-0.1.1-py3-none-any.whl

Download URL nepali_converter-0.1.1-py3-none-any.whl
Size 15.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9a7f1f0e607bb25866003f674b24caf1ac8e0b0054583754ffd4cbc971a148c6
BLAKE2b-256 checksum
How to use checksums
0445ebea8882118cfb61783dcd20be59e69279bd10743f102ab7f3a37e823dc0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for nepali-converter 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page