爱意满满的作品展示区。
wdssmq

「小代码」搜狗输入法自定义短语分片管理「 Python 」

  •  
  •   wdssmq ·
    wdssmq · 2h 30m ago · 126 views

    · 这次也是 Python 脚本,所以需要会相应的使用姿势...

    · 输入法的快捷短语文件有些长,就终于决定拆成多个文件然后由脚本自动拼接;

    · 发布地址:https://gitee.com/wdssmq/StaleCode/tree/main/py-sogou-phrases

    · 可以在分片中按原格式写(.ini):

    ; 常用短语
    vsc,3=Visual Studio Code
    zbp,3=Z-BlogPHP
    
    

    · 也可以用 yaml ,同个文件里还可以再分组:

    groups:
      - name: "shell 命令"
        items:
          # --- ssh 相关 ---
          - comment: ssh 相关
          - trigger:
            key: ssk
            index: 3
            text: ssh-keygen -t ecdsa
          - trigger:
            key: ssp
            index: 3
            text: code ~/.ssh/id_ecdsa.pub
          - trigger:
            key: ssa
            index: 3
            text: code ~/.ssh/authorized_keys
          - trigger:
            key: ssc
            index: 3
            text: cd ~/.ssh && ls && code config
    
    

    ↑ 配置比较长的原因之一是我搞了不少常用命令进去……

    · 结果:

    ; 常用短语
    vsc,3=Visual Studio Code
    zbp,3=Z-BlogPHP
    
    ;  shell 命令
    ; ----------------------------------------
    ; ssh 相关
    ssk,3=ssh-keygen -t ecdsa
    ssp,3=code ~/.ssh/id_ecdsa.pub
    ssa,3=code ~/.ssh/authorized_keys
    ssc,3=cd ~/.ssh && ls && code config
    
    

    · 更多「小代码」:https://cn.bing.com/search?q=小代码+沉冰浮水

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   6021 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 39ms · UTC 06:25 · PVG 14:25 · LAX 23:25 · JFK 02:25
    ♥ Do have faith in what you're doing.