From 0a0bdc87761773d3b5821738048744ea58b99c80 Mon Sep 17 00:00:00 2001 From: Vishnu Sanal T <50027064+VishnuSanal@users.noreply.github.com> Date: Sat, 17 Feb 2024 22:53:43 +0530 Subject: [PATCH] update README with usage of map listing functions --- README.md | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index ba7917a..7f8afce 100644 --- a/README.md +++ b/README.md @@ -10,14 +10,21 @@ to Unicode and vice-versa. More fonts can be added by placing their maps in ## Usage ``` ->>> from libindic.payyans import Payyans ->>> instance = Payyans() ->>> result = instance.ASCII2Unicode("aebmfw", "ambili") ->>> print(result) -മലയാളം ->>> result2 = instance.Unicode2ASCII(u"കേരളം", "ambili") ->>> print(result2) -tIcfw +from libindic.payyans import Payyans + +instance = Payyans() + +result = instance.ASCII2Unicode("aebmfw", "ambili") +print(result) # മലയാളം + +result2 = instance.Unicode2ASCII(u"കേരളം", "ambili") +print(result2) # tIcfw + +maps = instance.listAvailableMaps() +print(maps) # Haritha, ML-TTAmbili, ML-TTKarthika, ML-TTNandini, ML-TTRevathi, MLB-TTIndulekha, Manorama, Matweb, TM-TTValluvar, banglapedia, charaka, panchari, revathi, uma + +hatritha_map = instance.printMap('Haritha') +print(hatritha_map) # prints the whole mapping file ``` [Watch this video to know more about what ASCII and Unicode encodings are](https://smc.org.in/articles/ascii-unicode-fonts)