The idea would be to use a tool called Emscripten that compiles your C code into a kind of dense JavaScript code called WebAssembly plus an HTML page, that you can view in a browser. Is ivtt in C?
Sorry, yes, of course it's in C. I'll have a look at this later...
I had a look as well, but the "Hello World" example didn't answer any of the open questions:
- how to enter the command options
- any other way of specifying input/output files that are on the user's local environment
Command line for ascii only text from all folios designated as H , Herbal in ZL IVTT transcription file.
ivtt.exe -x7 +IH ZL3a-n.txt ZL_Herbal.txt
Breakdown
[1] [2] [3] [4] [5]
ivtt.exe -x7 +IH ZL3a-n.txt ZL_Herbal.txt
[1] Executable name
[2] -x7 {Turn into a text‐only Ascii file, preserving uncertain spaces}
[3] +IH {+ keep} {(2 character locus type), I = Ilustration type, H = herbal }
[4] Input file
[5] Output file
Results in a text file containing the voynichese text of the Herbal folios with '?' for unknown letters and' @nnn', ( n is a digit ) for Rare chars
Link to IVTT User manual can be found on this page, subsection 'Transliteration File processing tools'
You are not allowed to view links.
Register or
Login to view.
To compile ivtt.c as a C++ source on Windows with Microsoft Visual Studio (2019) I had to change a few things:
hash == 1;
-> it is probably meant to be: hash = 1;
char folname[] = " ";
-> the string is too short, it should be one character longer to allow folname[in_foli] = 0; when in_foli is 7.
int selpage, selloc;
-> uninitialized int used later, changed to: int selpage, selloc = 0;
char ctest[8] = "#=IVTFF ";
char dtest[8] = "#=VDBTF ";
-> changed to:
const char ctest[9] = "#=IVTFF ";
const char dtest[9] = "#=VDBTF ";
Also I had to add:
#pragma warning( disable : 4996 )
to allow "unsafe" C functions fopen, strcpy
Thanks for that!
I have created version 2.1 (without the #pragma) but I will have to test it before I can replace v2.0 on my web site.
It's taken a while, but this has now been done.
(01-01-2023, 09:17 PM)nickpelling Wrote: You are not allowed to view links. Register or Login to view.Has anyone suggested running ivtt in a browser? i.e. by compiling it for wasm etc
It only took three years after this message... but I created exactly this! I compiled IVTT to WebAssembly via Emscripten and used HTML+CSS+JavaScript to build a nice UI wrapper around it. The process was a lot simpler than I imagined, Emcripten does most of the heavy lifting for you.
I wonder if there'd be any interest in something like this for other tools, for example bitrans.
Nonetheless you can check it out here: You are not allowed to view links.
Register or
Login to view.
And check out the code here: You are not allowed to view links.
Register or
Login to view.
