A command-line/ruby tool to translate chinese using fy.iciba.com
Add this line to your application's Gemfile:
gem 'iciba'
And then execute:
$ bundle
Or install it yourself as:
$ gem install iciba
Command-line usage:
$ fy words to be translated
$ fy english -s #for first word to be returned
$ fy You will need to have root access to do this. -p #to get pinyin for chinese characters, (hopefully fy.iciba.com is correct)
$ fy http://www.chinadaily.com.cn/business/2012-09/07/content_15742188.htm -l #to download links
Ruby usage:
require 'iciba'
Iciba::Fanyi.new('words to be translated').result
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request