Git Product home page Git Product logo

dict2anki's People

Contributors

qianbinbin 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

Watchers

 avatar  avatar

dict2anki's Issues

卡片排序

排序方式:

  1. 按添加顺序(默认)#15
  2. 按字母表排序 用处不大
  3. 随机打乱 shuffle Anki 本身支持
  4. 默认(多线程不保证顺序) 可以保证输出顺序与输入一致 #15

安装失败及生成anki失败

环境一 : window10, python3.8(conda)
使用命令pip3 install dict2anki安装失败

ERROR: Command errored out with exit status 1:
     command: 'D:\4.Software\anaconda3\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\timeC\\AppData\\Local\\Temp\\pip-install-55halzdz\\dict2anki\\setup.py'"'"'; __file__='"'"'C:\\Users\\timeC\\AppData\\Local\\Temp\\pip-install-55halzdz\\dict2anki\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\timeC\AppData\Local\Temp\pip-pip-egg-info-rekeia70'
         cwd: C:\Users\timeC\AppData\Local\Temp\pip-install-55halzdz\dict2anki\
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\timeC\AppData\Local\Temp\pip-install-55halzdz\dict2anki\setup.py", line 4, in <module>
        long_description = f.read()
    UnicodeDecodeError: 'gbk' codec can't decode byte 0x80 in position 4: illegal multibyte sequence
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

网站能够访问
通过clone下载后, 使用python -m dict2anki -i /path/to/vocabulary.txt得到 :

I/cli       : no extractor specified, using default: cambridge
I/extractor : generating front template
I/extractor : generated front template to: .\cambridge\front_template.txt
I/extractor : generating back template
I/extractor : generated back template to: .\cambridge\back_template.txt
I/cambridge : retrieving styling
W/net       : urlopen error: Remote end closed connection without response
W/net       : urlopen error: Remote end closed connection without response
W/net       : urlopen error: Remote end closed connection without response
W/net       : urlopen error: Remote end closed connection without response
W/net       : urlopen error: Remote end closed connection without response
Traceback (most recent call last):
  File "D:\4.Software\anaconda3\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "D:\4.Software\anaconda3\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "D:\6.Code\Python\CLONE_FROM_GITHUB\dict2anki\dict2anki\__main__.py", line 4, in <module>
    main()
  File "D:\6.Code\Python\CLONE_FROM_GITHUB\dict2anki\dict2anki\cli.py", line 88, in main
    e.generate_styling()
  File "D:\6.Code\Python\CLONE_FROM_GITHUB\dict2anki\dict2anki\extractors\cambridge.py", line 54, in generate_styling
    self._styling = self._retrieve_styling()
  File "D:\6.Code\Python\CLONE_FROM_GITHUB\dict2anki\dict2anki\extractors\cambridge.py", line 59, in _retrieve_styling
    style = url_get_content(URL_STYLE)
  File "D:\6.Code\Python\CLONE_FROM_GITHUB\dict2anki\dict2anki\net.py", line 59, in url_get_content
    response = url if isinstance(url, HTTPResponse) else urlopen_with_retry(url, headers, retry, **kwargs)
  File "D:\6.Code\Python\CLONE_FROM_GITHUB\dict2anki\dict2anki\net.py", line 51, in urlopen_with_retry
    raise e
  File "D:\6.Code\Python\CLONE_FROM_GITHUB\dict2anki\dict2anki\net.py", line 43, in urlopen_with_retry
    return urlopen(url, **kwargs)
  File "D:\4.Software\anaconda3\lib\urllib\request.py", line 222, in urlopen
    return opener.open(url, data, timeout)
  File "D:\4.Software\anaconda3\lib\urllib\request.py", line 525, in open
    response = self._open(req, data)
  File "D:\4.Software\anaconda3\lib\urllib\request.py", line 542, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
  File "D:\4.Software\anaconda3\lib\urllib\request.py", line 502, in _call_chain
    result = func(*args)
  File "D:\4.Software\anaconda3\lib\urllib\request.py", line 1393, in https_open
    return self.do_open(http.client.HTTPSConnection, req,
  File "D:\4.Software\anaconda3\lib\urllib\request.py", line 1354, in do_open
    r = h.getresponse()
  File "D:\4.Software\anaconda3\lib\http\client.py", line 1332, in getresponse
    response.begin()
  File "D:\4.Software\anaconda3\lib\http\client.py", line 303, in begin
    version, status, reason = self._read_status()
  File "D:\4.Software\anaconda3\lib\http\client.py", line 272, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response



环境二 : Centos7.6 安装成功
使用命令dict2anki -i /path/to/vocabulary.txt , 失败日志同上

望解惑, 谢谢

协程支持

为避免占用内存,应尽快写入文件,不能一下子把所有任务全丢进协程。
考虑协程方案:

  1. 简单协程,处理一个任务后立即写入文件。优点是效率高,缺点是输出乱序。
  2. 分段协程,段内并行,段间串行。优点是可以保证输出顺序与输入一致,缺点是段之间不会无缝衔接,有等待时间。

卡片移动端显示问题

hello
想问一下导入到手机的卡片在交互上是有问题吗请问?
1633707567(1)
类似与这种的都不能展开。:upside_down_face:

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.