V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
爱意满满的作品展示区。
yanng
V2EX  ›  分享创造

用 go 写了一个 mac 下命令行翻译工具

  •  
  •   yanng · 2014-02-12 12:36:55 +08:00 · 3944 次点击
    这是一个创建于 3739 天前的主题,其中的信息可能已经有所发展或是发生改变。
    目前功能很简单,命令行下英汉互译
    translate hello --> 你好
    translate r 你好 --> hello

    github地址:
    https://github.com/rnoldo/go-translate-cli

    我用起来挺好,希望对你有用
    第 1 条附言  ·  2014-02-12 15:28:06 +08:00
    简化了一下
    from

    translate hello --> 你好
    translate r 你好 --> hello

    to

    translate hello --> 你好
    translate 你好 --> hello
    4 条回复    1970-01-01 08:00:00 +08:00
    xiaket
        1
    xiaket  
       2014-02-12 16:48:32 +08:00
    看了下代码, 貌似调了Google翻译, 这需要比较稳定的网络才行?
    yanng
        2
    yanng  
    OP
       2014-02-12 17:26:40 +08:00 via iPad
    @xiaket 我机子用了smarthosts,用起来没啥问题
    jakwings
        3
    jakwings  
       2014-02-13 04:26:25 +08:00
    可以看看这个 gawk 的实现:https://github.com/soimort/google-translate-cli
    ruandao
        4
    ruandao  
       2014-02-18 12:48:16 +08:00
    一般都是 ctrl + cmd + d 或者,三个指头
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3206 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 40ms · UTC 14:01 · PVG 22:01 · LAX 07:01 · JFK 10:01
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.