This is a very thin wrapper on the Perl converter found on THL website.
The size limitation on the website(1Mb max) are lifted.
-
Within Python,
unicode2wylie(text)
andwylie2unicode(text)
return the transcoded strings.Limitation:
wylie2unicode
andunicode2wylie
both send the string to be transcoded as the commandline argument Perl receives. As such, strings should not be higher than the limit allowed for command-line arguments.For Windows: as seen here, 2047 or 8191 characters.
For Posix systems: as seen here, 2097152 (my output of
getconf ARG_MAX
) -
batch_convert(mode, include_orig)
simply wrapswylieconvert/Lingua-BO-Wylie/bin/wylie.pl
and converts all .txt files frominput/
tooutput/
. The folders are created if missing on the first run of the script. -
batch_converter.py
wrapsbatch_convert
for the command line.Syntax:
python3 batch_converter.py <mode> <include_orig>
mode
can either bew2u
oru2w
include_orig
is optional and should betrue
Ex:
python3 batch_converter.py u2w
will convert all .txt files from unicode to wylie, not including the original.
The downloadable zip does not contain any information about licence nor states the author.
Any help finding this information will be appreciated.