Skip to content

the Ruby version of Hyperion1.x but has three http-get engines

License

Notifications You must be signed in to change notification settings

fansubgroup/rHyperion1.x

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rHyperion1.x

This is a Ruby version Hyperion1.x(which is a tool bases on Python)

Supports the translation work under the command line

There are some new features in this version

[1] First, rHyperion1.x is based on Ruby

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.

[2] Second, rHyperion1.x has three http get engines for you to choose

There are:

  1. Ruby open-uri : smallest , but slowest
  2. 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.
  3. 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.

How to use these tool?

  • 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) or shell (Linux) switch to the place where you put the program

  • Input the command in cmd (Windows) or shell (Linux) like this:

$ ruby ./trans.rb YOU_SOURCE_LANGUAGE YOU_TARGET_LANGUAGE

This coeerspondence table is here

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

About

the Ruby version of Hyperion1.x but has three http-get engines

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published