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.

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.7.tar.gz (2.6 MB view details)

Uploaded Source

Built Distribution

srtools-0.1.7-py3-none-any.whl (19.9 kB view details)

Uploaded Python 3

File details

Details for the file srtools-0.1.7.tar.gz.

File metadata

  • Download URL: srtools-0.1.7.tar.gz
  • Upload date:
  • Size: 2.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.9.1

File hashes

Hashes for srtools-0.1.7.tar.gz
Algorithm Hash digest
SHA256 7b0f29fb293dfa3e911f41caf073bc85f5788de360d3ab4a9c836f8d192a3219
MD5 baffba36c9645986da0c8487cc87a58a
BLAKE2b-256 42fdebf3af91839d6363578447e10915cfd8017fe68e5f9df1e1f40da54bfb31

See more details on using hashes here.

File details

Details for the file srtools-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: srtools-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 19.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.9.1

File hashes

Hashes for srtools-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 fc5491f7e9231474fbfe24abae93a7c14807a75219cfe4e13cffdf5785dba044
MD5 60c67a853a169e1e5d67d56db8d4f292
BLAKE2b-256 7750e62dc158326424838d3d92c2e04e084216f96144f8cb95be40dcc0e8d7a6

See more details on using hashes here.

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