Skip to content

Commit

Permalink
update README with usage of map listing functions
Browse files Browse the repository at this point in the history
  • Loading branch information
VishnuSanal authored Feb 17, 2024
1 parent 1654235 commit 0a0bdc8
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0a0bdc8

Please sign in to comment.