Skip to main content

Serbian language Cyrillic ↔ Latin transliteration tools

Project description

pipeline status coverage report

Srtools provides a CLI utility (srtr) 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." | srtr -lc
Ђаче, уштеду плаћај жаљењем због џиновских цифара.
$ echo "Ђаче, уштеду плаћај жаљењем због џиновских цифара." | srtr -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.2.tar.gz (2.6 MB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: srtools-0.1.2.tar.gz
  • Upload date:
  • Size: 2.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.8.0

File hashes

Hashes for srtools-0.1.2.tar.gz
Algorithm Hash digest
SHA256 18f9b1b554949a2eec587ba2ca261b22a11558bded66e28b2fc5b45494f39216
MD5 d5277171b8f38a38e43f3e5e34fa9051
BLAKE2b-256 0d00214d4fd1dd4bde2bb6d2480fab81536b6ae78bddb2752c9e18cc2ca7e8dc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: srtools-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 19.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.8.0

File hashes

Hashes for srtools-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 60bc9e2533128a81dca15fe6da0f790bc3c438a68a29b2b8b7b8eaf0b3e14c8b
MD5 834dae18edb2e9bafc09908cbbd5e09e
BLAKE2b-256 edcdc21efe35f0f61d8682f8e6506c3ac6135b510b597b4c27d04a9753d575cf

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