Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use converter/mapping in a web interface? #31

Open
kaanchan opened this issue May 8, 2023 · 2 comments
Open

How to use converter/mapping in a web interface? #31

kaanchan opened this issue May 8, 2023 · 2 comments

Comments

@kaanchan
Copy link

kaanchan commented May 8, 2023

I have written a converter for Devanagari New (font) to Unicode. It is working well for our purposes but requires the conversion tools. Is there a way to use the mapping file such that I can call it from a simple web interface? I'd like to past in some Devanagari New text in a text box and get back Unicode text in another text box within a browser.

@kaanchan kaanchan changed the title How to use conversion in a web interface? How to use converter/mapping in a web interface? May 8, 2023
@devosb
Copy link
Contributor

devosb commented May 10, 2023

We don't have a web site, nor even the software for a such a site, to enable use of a TECkit map. SIL Converters, built on top of TECkit, has more options for conversion (such as within Microsoft Word) but no web interface.

If you would like to share the map, we have a collection of TECkit maps that I could add your map to.

@bobeaton
Copy link

Kaanchan, is your new converter a TECkit map? or is it an html webpage which contains the code (java?) that does the conversion?

If the former, then I think the answer is no, unless the web page you're hosting is on a server. If the server is Windows, then you could install SILConverters on that machine and call it from the page -- it's all COM based, so however you would call a COM object from your webpage, you could call the EncConverters core to do the conversion... You might get some hints from this page: https://software.sil.org/silconverters/silconverters-developer/ (I also just asked ChatGPT, "is it possible to call a COM object from javascript in an HTML webpage?" and it gives the code to use! You could also look at any of the *.vbs scripts that are installed into the C:\ProgramData\SIL\SILConverters40\MapsTables folder (e.g. SILGreek.tec.vbs if you install the BasicConverters package), which will show you how to use EncConverters via COM.

If the latter (the code to do the conversion is in the html page), then there's a 'Technical Hindi (Google group) Html Converter' feature in SILConverters (it's under the MapsTables feature tree node if you install the 'Indic Converters' feature). If you install that, then in the Add Converter dialog, you'll see the "Technical Hindi (Google group) Html Converter" option, and in the About tab of the resulting dialog, it'll show you where you can download one of those html pages. If you add the same kind of input boxes to your page as they have in theirs, then you'd be able to use the code w/in the html page to do conversions... But that would only be in currently enabled client applications; not from a website except as mentioned above.

Spinning up a RestAPI to do conversions on a server is something I'm planning to do someday, but haven't had the time yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants