Skip to main content

Serbian language Cyrillic ↔ Latin transliteration tools

Project description

pipeline status coverage report

Srtools provides a CLI utility (srts) and a Python 3 (^3.7) package that helps you transliterate Serbian texts between Cyrillic and Latin.

Here’s a demonstration of the CLI utility:

$ echo "Đače, uštedu plaćaj žaljenjem zbog džinovskih cifara." | srts --lc
Ђаче, уштеду плаћај жаљењем због џиновских цифара.
$ echo "Ђаче, уштеду плаћај жаљењем због џиновских цифара." | srts --cl
Đače, uštedu plaćaj žaljenjem zbog džinovskih cifara.

Here’s how you use the Python package:

from srtools import cyrillic_to_latin, latin_to_cyrillic

assert (
    latin_to_cyrillic("Đače, uštedu plaćaj žaljenjem zbog džinovskih cifara.")
    == "Ђаче, уштеду плаћај жаљењем због џиновских цифара."
)

assert (
    cyrillic_to_latin("Ђаче, уштеду плаћај жаљењем због џиновских цифара.")
    == "Đače, uštedu plaćaj žaljenjem zbog džinovskih cifara."
)

Motivation

I needed a simple commandline utility I can use to pipe in some text and change its script.

I also use this tool to transliterate strings in Serbian LaTeX localization packages. That way I don’t have to maintain individual sets of localization strings for Cyrillic and Latin.

Documentation

Documentation (Sphinx) can be viewed on GitLab pages for this package.

Changelog

The changelog can be found within the documentation, here.

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

srtools-0.1.13.tar.gz (30.2 kB view hashes)

Uploaded Source

Built Distribution

srtools-0.1.13-py3-none-any.whl (44.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page