Python 让Libluis在树莓皮上跑步和翻译
问这个问题我觉得有点傻,但我真的迷路了,不知道该去哪里(大多数情况下,无论我在哪里看,我都找不到明确的答案) 我正在尝试在树莓圆周率上运行Liblouis盲文格式化程序()。我相当确定它安装在正确的位置,但我不知道如何访问或以任何方式使用它。要么在命令行中,要么在python中,要么在其他任何地方Python 让Libluis在树莓皮上跑步和翻译,python,linux,xhtml,raspberry-pi,Python,Linux,Xhtml,Raspberry Pi,问这个问题我觉得有点傻,但我真的迷路了,不知道该去哪里(大多数情况下,无论我在哪里看,我都找不到明确的答案) 我正在尝试在树莓圆周率上运行Liblouis盲文格式化程序()。我相当确定它安装在正确的位置,但我不知道如何访问或以任何方式使用它。要么在命令行中,要么在python中,要么在其他任何地方 我对java、Python、C++和C++以外的系统不太熟悉,所以我有点迷路了。任何帮助都会很好,哪怕是朝某个方向轻推也会很有帮助。我自己对liblouis不是非常熟悉,但是如果你安装正确,这些似乎是
我对java、Python、C++和C++以外的系统不太熟悉,所以我有点迷路了。任何帮助都会很好,哪怕是朝某个方向轻推也会很有帮助。我自己对liblouis不是非常熟悉,但是如果你安装正确,这些似乎是可用的命令:
lou\u allround
,lou\u checkhyphens
,lou\u checktable
,lou\u debug
,lou\u translate
。您想要的可能是lou\u translate
:
➜ lou_translate --help
Usage: lou_translate [OPTIONS] TABLE[,TABLE,...]
Translate whatever is on standard input and print it on standard
output. It is intended for large-scale testing of the accuracy of
Braille translation and back-translation.
-h, --help display this help and exit
-v, --version display version information and exit
-f, --forward forward translation using the given table
-b, --backward backward translation using the given table
If neither -f nor -b are specified forward translation
is assumed
Report bugs to john.boyer@abilitiessoft.com.
liblouis home page: <http://code.google.com/p/liblouis/>
后一个unicode代码点序列转换为:
⠠⠛⠑⠞⠞⠊⠝⠛ ⠠⠇⠊⠃⠇⠕⠥⠊⠎ ⠞⠕ ⠗⠥⠝ ⠁⠝⠙ ⠞⠗⠁⠝⠎⠇⠁⠞⠑ ⠕⠝ ⠁ ⠠⠗⠁⠎⠏⠃⠑⠗⠗⠽ ⠠⠏⠊代码>
希望这有帮助:)
➜ echo "Getting Liblouis to run and translate on a Raspberry Pi" | lou_translate en-gb-g1.utb
,getting ,liblouis to run and translate on a ,raspberry ,pi
➜ echo "Getting Liblouis to run and translate on a Raspberry Pi" | lou_translate unicode.dis,en-gb-g1.utb
\x2820\x281b\x2811\x281e\x281e\x280a\x281d\x281b \x2820\x2807\x280a\x2803\x2807\x2815\x2825\x280a\x280e \x281e\x2815 \x2817\x2825\x281d \x2801\x281d\x2819 \x281e\x2817\x2801\x281d\x280e\x2807\x2801\x281e\x2811 \x2815\x281d \x2801 \x2820\x2817\x2801\x280e\x280f\x2803\x2811\x2817\x2817\x283d \x2820\x280f\x280a