This is a Ruby version Hyperion1.x(which is a tool bases on Python)
Supports the translation work under the command line
rHypersion 1.x was written by Ruby 2.3.0 and some third-party gems provided by the RubyGems.org,which is
friendly to some enthusiasts of Ruby.
There are:
- Ruby open-uri : smallest , but slowest
- Go net/http : Go-lang's net/http no only faster than Ruby open-uri but also has a stabler Garbage Collection mechanism than Nim. But the volume of the lib generated by Go is nearly 10 times larger than Nim's.
- Nim httpclient : fast http speed and small volume , but it is not stable enough to deal with a very large .srt file.
PS:
Because the .so library of the Go-lang took up 7+ M space,so I compressed it as a .rar file.
Therefore,if you want to use the http get engine of Golang,please extract it from the .rar file at first.
-
Download the entrie folder to your local directory
-
Install the
Ruby 2.3.0 or up -
Install the ffi gem of Ruby =>
gems install ffi
(if you want to modify the code , you may also need the development environment of Golang an Nim-lang)
* In the program directory, there is a configure file name appkey, Input you appid in the first line, and the sercetKey in second line
-
Use the
cmd(Windows) orshell(Linux) switch to the place where you put the program -
Input the command in
cmd(Windows) orshell(Linux) like this:
$ ruby ./trans.rb YOU_SOURCE_LANGUAGE YOU_TARGET_LANGUAGE
| Symbol | Significance |
| auto | automatic detection |
| zh | Chinese |
| en | English |
| yue | Cantonese |
| wyw | Classical Chinese |
| jp | Japanese |
| kor | Korean |
| fra | French |
| spa | Spain |
| th | Thai |
| ara | Arabic |
| ru | Russian |
| pt | Portuguese |
| de | German |
| it | Italian |
| el | Greek |
| nl | Dutch |
| pl | Polish |
| bul | Bulgarian |
| est | Estonia Language |
| dan | Danish |
| fin | Finnish |
| cs | Czech |
| rom | Romanian |
| slo | Slovenia Language |
| swe | Swedish |
| hu | Hugarian language |
| cht | Traditional Chinese |