Giter Club home page Giter Club logo

anki_tools's Introduction

anki_tools's People

Contributors

cdpath avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

anki_tools's Issues

查询单词释义为空时,不应该添加到记忆库

你好,非常感谢你写了这个脚本。让我可以以非常低成本的方式进行修改,初步使用发现空的释义也会添加到记忆库。这是由于你对 $definition的检查放在了look_up函数,而在 main 函数没有再次检查,具体为什么还需要在 main 中检查,你可以参考 why-does-exit-1-not-exit-the-script。我进行了一点修改 fix 这个问题。代码如下:

main()
{
    local definition=$(look_up $safe_entry)
    ## $definition 应在当前 shell 判断,函数中是在 subshell 执行,因此实际上不能终止程序
    if [[ -z "$definition" ]]; then
        exit 1
    else
        payload=$(gen_post_data "$definition")
        res=$(curl -sX POST -d "$payload" "localhost:8765")
        check_result "$res" "$definition"
    fi
}

因为我做了一些中文适配可自己用,所以就不提 pull requests 了,你可以自行修改。

感谢你的付出!

突然不work了?

你好,
今天突然发现这个popclip to anki的插件不work了。
我就开了popclip to anki这一个anki插件。已经用了一个月左右,昨天还有效的,不知原因为何,能帮忙看看吗?
万分感谢!

附上错误的信息:

Error
An error occurred. Please start Anki while holding down the shift key, which will temporarily disable the add-ons you have installed.
If the issue only occurs when add-ons are enabled, please use the Tools > Add-ons menu item to disable some add-ons and restart Anki, repeating until you discover the add-on that is causing the problem.
When you've discovered the add-on that is causing the problem, please report the issue on the add-on support site.
Debug info:
Anki 2.1.46 (94913ec2) Python 3.8.6 Qt 5.14.2 PyQt 5.14.2
Platform: Mac 10.16
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2021-12-03 11:57:31
Add-ons possibly involved: ⁨AnkiConnect⁩

Caught exception:
Traceback (most recent call last):
File "/Users/ruitaowu/Library/Application Support/Anki2/addons21/2055492159/init.py", line 88, in advance
self.server.advance()
File "/Users/ruitaowu/Library/Application Support/Anki2/addons21/2055492159/web.py", line 128, in advance
self.advanceClients()
File "/Users/ruitaowu/Library/Application Support/Anki2/addons21/2055492159/web.py", line 143, in advanceClients
self.clients = list(filter(lambda c: c.advance(), self.clients))
File "/Users/ruitaowu/Library/Application Support/Anki2/addons21/2055492159/web.py", line 143, in
self.clients = list(filter(lambda c: c.advance(), self.clients))
File "/Users/ruitaowu/Library/Application Support/Anki2/addons21/2055492159/web.py", line 66, in advance
self.writeBuff += self.handler(req)
File "/Users/ruitaowu/Library/Application Support/Anki2/addons21/2055492159/web.py", line 199, in handlerWrapper
if params.get('action', '') == 'requestPermission':
UnboundLocalError: local variable 'params' referenced before assignment

其他语种的翻译

请问能否接入其他翻译,而不只是有道和彩云,对于小语种的支持有道和彩云都不太好,如果能接入google或者是deepl的翻译我认为更好,感谢

你好,想问一下能不能实现选中文本后不翻译,而是直接添加到anki中呢,当然也需提供模版

你好,想问一下能不能实现选中文本后不翻译,而是直接添加到anki中呢,当然也需提供模版,这个对于背英语单词来说很好用,但是如果是从pdf选中文本想直接在popclip中点击加入anki就做不到了,当然,我指的是类似法律,历史,医学等等这类的需求,而不是复制了英语翻译后加入anki,我联系了好久这个作者:https://xiaoyuyu.cn/post/Anki%E4%B8%8EPopClip%E5%B7%A5%E4%BD%9C%E6%B5%81%E5%BB%BA%E8%AE%BE.html

,但是没有回应,如果作者看到的话,能否想想办法实现,真的很需要。

突然不工作了

你好,
非常感谢您开发的这个工具,对我的学习生活非常有益。
今天突然发现这个工具又不work了。看起来是anki-connect的问题,但是尝试着重新安装anki-connect没有起作用,能帮忙检查一下吗?
非常感谢!

附:错误信息:
Error
An error occurred. Please start Anki while holding down the shift key, which will temporarily disable the add-ons you have installed.
If the issue only occurs when add-ons are enabled, please use the Tools > Add-ons menu item to disable some add-ons and restart Anki, repeating until you discover the add-on that is causing the problem.
When you've discovered the add-on that is causing the problem, please report the issue on the add-on support site.
Debug info:
Anki 2.1.49 (dc80804a) Python 3.8.6 Qt 5.14.2 PyQt 5.14.2
Platform: Mac 10.16
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2022-06-30 16:01:21
Add-ons possibly involved: ⁨AnkiConnect⁩

Caught exception:
Traceback (most recent call last):
File "/Users/ruitaowu/Library/Application Support/Anki2/addons21/2055492159/init.py", line 96, in advance
self.server.advance()
File "/Users/ruitaowu/Library/Application Support/Anki2/addons21/2055492159/web.py", line 135, in advance
self.advanceClients()
File "/Users/ruitaowu/Library/Application Support/Anki2/addons21/2055492159/web.py", line 150, in advanceClients
self.clients = list(filter(lambda c: c.advance(), self.clients))
File "/Users/ruitaowu/Library/Application Support/Anki2/addons21/2055492159/web.py", line 150, in
self.clients = list(filter(lambda c: c.advance(), self.clients))
File "/Users/ruitaowu/Library/Application Support/Anki2/addons21/2055492159/web.py", line 67, in advance
self.writeBuff += self.handler(req)
File "/Users/ruitaowu/Library/Application Support/Anki2/addons21/2055492159/web.py", line 190, in handlerWrapper
if params.get('action', '') == 'requestPermission':
UnboundLocalError: local variable 'params' referenced before assignment

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.