hrishikeshrt / vaiyyakarana

Vaiyyākaraṇaḥ is a telegram bot that offers various tools for a Sanskrit learner including stem (प्रातिपदिकम्) finder, root (धातुः) finder, declension (सुबन्ताः) generator, conjugation (तिङन्ताः) generator, and compound word (सन्धिसमासौ) splitter.
https://t.me/vyakarana_bot
12 stars 1 forks source link

Formatting of output when displaying verb or word forms #3

Open hrishikeshrt opened 1 year ago

hrishikeshrt commented 1 year ago

Currently, the output format is not clean, especially when viewing on mobile.

This is due to Devanagari fonts not being monospace. One possible solution is suggested by @vipranarayan14 is to generate image of the output and then send that to user as output.

PROs

CONs

vipranarayan14 commented 1 year ago

Thank you for considering my suggestion.

Yes, we may lose the "copy-ability" of the output if we prerender it as an image.

One way to overcome that is by showing a button like "Show as text" after the output image. So, initially when the user requests something like, "/dr_01_0001", first an image with the forms of lat, lrt, lot and lan lakaras will be displayed. Below that there will be two buttons -- "Show all forms" and "Show as text". When the user clicks "Show all forms", an image with all forms will be displayed. Below that there will be one button "Show as text". When the user clicks "Show as text" in either case, the corresponding lakaras will be displayed as text.

Another way is by using the Web Apps feature in the Telegram API. We will have more options with the interface. But it may take more time to implement. Also, the ease of use of the Web App feature from a user perspective has to be considered.