Serbian language Cyrillic ↔ Latin transliteration tools
Project description
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file srtools-0.1.13.tar.gz.
File metadata
- Download URL: srtools-0.1.13.tar.gz
- Upload date:
- Size: 30.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.0 CPython/3.10.6 Linux/5.4.109+
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f9b51ab64e1d8a5609b12a1bdea7d6b1908f2269210ed85f0097b0200aa4a69
|
|
| MD5 |
da04fae5f0941f33bdaf9944812be666
|
|
| BLAKE2b-256 |
ab13755904d2088f7b8129d9a6426f2e4b4e065f7e41071adcbc6e0faadb8bc5
|
File details
Details for the file srtools-0.1.13-py3-none-any.whl.
File metadata
- Download URL: srtools-0.1.13-py3-none-any.whl
- Upload date:
- Size: 44.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.0 CPython/3.10.6 Linux/5.4.109+
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
87c4ae316249a686063be3547242641fffaf93814aa494b25dea332adb4cd661
|
|
| MD5 |
9cfdea6940cff875c554bffaaffcea8e
|
|
| BLAKE2b-256 |
513b9cee0a8aa867b55fa36c86016161be6ee00d438f796ed732862529926c10
|