nichijou
V2EX  ›  问与答

[求助]Alfred,怎么 tweak 这个有道词典的 workflow

  •  
  •   nichijou · Sep 4, 2017 · 1902 views
    This topic created in 3177 days ago, the information mentioned may be changed or developed.

    这个 workflow https://github.com/JinnLynn/alfred-workflows/tree/master/src/chinese-dictionary

    script filter 里调用的 python

    python cndict.py "{query}"
    

    里面部分代码是这样的

    .....
    ret = translate(w)
    is_eng = isEnglish(w)
    feedback = alfred.Feedback()
    translation = ret.get('translation', [])
    basic = ret.get('basic', {})
    phonetic = basic.get('phonetic')
    us_phonetic = basic.get('us-phonetic')
    uk_phonetic = basic.get('uk-phonetic')
    .....
    feedback.output()
    
    

    我想在下一个 run script obejct 里面获取这个 us_phonetic 该怎么弄呀?

    query=${1/\ \ /                                   :drill:\\n[}
    printf "\n* $query]" >>/Users/nichijou/Dropbox/vocabulary.org
    

    想把它 append 到一个文件

    1 replies    2017-09-04 19:40:43 +08:00
    nichijou
        1
    nichijou  
    OP
       Sep 4, 2017
    管理员帮转到 macOS 节点?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1005 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 281ms · UTC 18:19 · PVG 02:19 · LAX 11:19 · JFK 14:19
    ♥ Do have faith in what you're doing.