GithubHelp home page GithubHelp logo

tvhong / incremental-reading Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jdlorimer/incremental-reading

28.0 28.0 7.0 2.19 MB

Anki add-on providing incremental reading features

Home Page: https://ankiweb.net/shared/info/935264945

License: ISC License

JavaScript 1.76% Python 96.97% CSS 0.78% Makefile 0.50%

incremental-reading's People

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

Watchers

 avatar  avatar  avatar  avatar

incremental-reading's Issues

Up and Down arrow keys scroll too far if the IR note is long

Describe the bug
If the IR note is long enough, the Up and Down arrow keys scroll too far and this makes the keys unusable for reading.

To Reproduce
Steps to reproduce the behavior:

  1. Import a very long note (e.g. https://super-memory.com/help/read.htm)
  2. Read it in Incremental Reading add-on
  3. Press "Down" key
  4. See that it scrolls much further than a single page

Expected behavior
Up and Down arrow keys should only scroll half a page to a full page.

[Anki 23.10 Beta 1] TypeError: _buttonTime() missing 1 required positional argument: 'v3_labels'

pass it along

    #return _old(self, i)
    return _old(self, i, v3_labels)

Error when involving just this addon:

Error 
Se ha producido un error. Por favor inicia la Anki manteniendo presionadas ples teclas Mayús y la flecha hacia abajo, lo que desactivará temporalmente los extensiones que tienes instaladas. 
Si este error persiste sólo cuando tienes las extensiones activadas, utiliza Herramientas > Menú de Extensiones para deshabilitar alguna extensión y reinicia el Anki, repitiendo este proceso hasta que descubras qué extensión en concreto es la que causa el problema 
Cuando hayas descubierto la extensión que causaba el problema, por favor informa de esto a [sitio de soporte de extensiones](https://forums.ankiweb.net/c/add-ons/11). 
Información de depuración:
Anki 23.10 (1f6938d7) Python 3.9.15 Qt 6.5.2 PyQt 6.5.2
Platform: Windows-10-10.0.19045
Flags: frz=True ao=True sv=3
Add-ons, last update check: 2023-09-24 12:03:27
Complementos posiblemente implicados: ⁨Incremental Reading v4118 unofficial clone⁩

Caught exception:
Traceback (most recent call last):
  File "aqt.webview", line 608, in handler
  File "aqt.reviewer", line 685, in _onTypedAnswer
  File "aqt.reviewer", line 432, in _showAnswer
  File "aqt.reviewer", line 743, in _showEaseButtons
  File "aqt.reviewer", line 825, in _answerButtons
  File "aqt.reviewer", line 806, in but
  File "decorator", line 232, in fun
  File "anki.hooks", line 89, in decorator_wrapper
  File "anki.hooks", line 86, in repl
  File "C:\Users\Khonkhortisan\AppData\Roaming\Anki2\addons21\999215520\main.py", line 212, in buttonTime
    return _old(self, i)
TypeError: _buttonTime() missing 1 required positional argument: 'v3_labels'

Error when involving 3 addons:

Error 
Se ha producido un error. Por favor inicia la Anki manteniendo presionadas ples teclas Mayús y la flecha hacia abajo, lo que desactivará temporalmente los extensiones que tienes instaladas. 
Si este error persiste sólo cuando tienes las extensiones activadas, utiliza Herramientas > Menú de Extensiones para deshabilitar alguna extensión y reinicia el Anki, repitiendo este proceso hasta que descubras qué extensión en concreto es la que causa el problema 
Cuando hayas descubierto la extensión que causaba el problema, por favor informa de esto a [sitio de soporte de extensiones](https://forums.ankiweb.net/c/add-ons/11). 
Información de depuración:
Anki 23.10 (1f6938d7) Python 3.9.15 Qt 6.5.2 PyQt 6.5.2
Platform: Windows-10-10.0.19045
Flags: frz=True ao=True sv=3
Add-ons, last update check: 2023-09-24 10:31:28
Complementos posiblemente implicados: ⁨Incremental Reading v4118 unofficial clone, Advanced Review Bottom Bar, Image Occlusion Enhanced⁩

Caught exception:
Traceback (most recent call last):
  File "aqt.webview", line 608, in handler
  File "aqt.reviewer", line 685, in _onTypedAnswer
  File "decorator", line 232, in fun
  File "anki.hooks", line 89, in decorator_wrapper
  File "anki.hooks", line 86, in repl
  File "C:\Users\Khonkhortisan\AppData\Roaming\Anki2\addons21\1374772155\main.py", line 278, in on_show_answer
    return _old(self)
  File "aqt.reviewer", line 432, in _showAnswer
  File "aqt.reviewer", line 743, in _showEaseButtons
  File "C:\Users\Khonkhortisan\AppData\Roaming\Anki2\addons21\1136455830\Button_Colors.py", line 231, in _answerButtons
    buf += but(ease, label)
  File "C:\Users\Khonkhortisan\AppData\Roaming\Anki2\addons21\1136455830\Button_Colors.py", line 153, in but
    due_plain = self._buttonTime(i, v3_labels=labels)
  File "decorator", line 232, in fun
  File "anki.hooks", line 89, in decorator_wrapper
  File "anki.hooks", line 86, in repl
  File "C:\Users\Khonkhortisan\AppData\Roaming\Anki2\addons21\999215520\main.py", line 212, in buttonTime
    return _old(self, i)
TypeError: _buttonTime() missing 1 required positional argument: 'v3_labels'

Describe the bug
unexpected error happens when flipping a card

To Reproduce
Steps to reproduce the behavior:

  1. start a review session
  2. press space
  3. card flips, error appears

Expected behavior
no error, I didn't expect this addon's code path to be used on a non-IR card

Screenshots
If applicable, add screenshots to help explain your problem.

Specs (please complete the following information):

  • OS: Windows 10
  • Anki Versión ⁨23.10 (1f6938d7)⁩ Python 3.9.15 Qt 6.5.2 PyQt 6.5.2
  • Incremental Reading v4118 unofficial clone⁩

Additional context
Add any other context about the problem here.

Support next review date in IR

Is your feature request related to a problem? Please describe.
Currently, the Priority Queue feature in IR add-on only supports a priority value for each card.

There are two main ways a user can use the priority queue:

  1. Assign priority number for each card and frequently "randomize" the priority queue.
  2. Does not use per-card priority number and use the priority queue as a first-in-first-out queue.

However, both these approaches have shortcomings when a user has many cards in the queue (hundreds). Approach (1) prevents the user from ever getting down to the lower priority cards. Approach (2) means the user spends too little time on the important cards and too much time on unimportant ones.

In SuperMemo, apart from a priority, each topic (equivalent to IR card) also has a next review date. Everyday, SuperMemo creates a list of outstanding repetitions for all topics whose "next review date" is on that day. Additionally, topics within the outstanding repetitions queue are ranked based on their priority. During the learning session, the user reviews the highest priority topic first. And if the user does not finish the outstanding repetition queue for that day, subsequent topics are rescheduled for a later day.

The algorithm for rescheduling leftover topics from the outstanding repetitions queue is described below:

the algorithm for determining inter-review intervals for topics is much simpler and is entirely under your control. Each article receives a specific priority. The priority determines which articles are reviewed first and which can be postponed in case you run out of time. Each article is also assigned a number called the A-Factor that determines how much intervals increase between subsequent reviews. For example, if A-Factor is 2, review intervals will double with each review. Priority and A-Factors are set automatically, but you can change them manually at any time. Priorities and A-Factors are determined and modified heuristically on the basis of the length of the text, the way it is processed, the way it is postponed or advanced, and by many other factors.

http://super-memory.com/help/il.htm

Describe the solution you'd like

  • Each IR card has "next review day".
  • Support daily "outstanding repetitions" queue where IR cards are ranked based on priority.
  • Users can view and edit next review day for IR cards.
  • Untouched IR cards from "outstanding repetitions" are re-scheduled for a later date.

Compatibility with Edit Field During Review Addon

I mostly use these two add-ons for incremental reading and writing.
The Edit Field During Review allows me to just write in the incremental reading card as I go along which is a huge boost to incremental writing (instead of having to open the Edit window), either by clicking control plus the text or simply clicking the text.
Either option has limitations with the current implementation of the incremental reading addon.
Specifically, by using direct click I no longer benefit from the IR shortcuts. I also found it occasionally doesn't save my edits.
And by using control-click I find it frequently not working. For some reason for some of the IR cards the the control-click will just not work, other it will work fine, others it will appear to work at first but not actually edit.

Is there any way to make these addons compatible or at least add the writing feature to the incremental-reading addon?

Error when Anki is opened with incremental-reading plugin: anki.errors.NotFoundError: Your database appears to be in an inconsistent state.

Describe the bug
Starting Anki with incremental reading add on causes errors, doesn't create new IR note type, and plugin functionality doesn't appear to be working at all.

To Reproduce
Steps to reproduce the behavior:

  1. Enable Incremental Reading v4116 unofficial clone add on
  2. Restart Anki

Expected behavior
Anki to start with IR add on working correctly, IR note type to be generated, and plugin functionality to work.

Logs / Screenshots

Debug info:
Anki 2.1.62 (77dd1dc1) Python 3.9.15 Qt 6.4.3 PyQt 6.4.0
Platform: Windows-10-10.0.22621
Flags: frz=True ao=True sv=3
Add-ons, last update check: 2023-05-01 11:22:22

Caught exception:
Traceback (most recent call last):
  File "aqt.progress", line 118, in handler
  File "aqt.main", line 217, in on_window_init
  File "aqt.main", line 264, in setupProfileAfterWebviewsLoaded
  File "aqt.main", line 316, in setupProfile
  File "aqt.main", line 496, in loadProfile
  File "_aqt.hooks", line 3809, in __call__
  File "C:\Users\matth\AppData\Roaming\Anki2\addons21\999215520\main.py", line 62, in onProfileLoaded
    self.addModel()
  File "C:\Users\matth\AppData\Roaming\Anki2\addons21\999215520\main.py", line 170, in addModel
    mw.col.models.update_dict(model)
  File "anki.models", line 223, in update_dict
  File "anki._backend_generated", line 862, in update_notetype_legacy
  File "anki._backend", line 156, in _run_command
anki.errors.NotFoundError: Your database appears to be in an inconsistent state. Please use the Check Database action.

image

Specs (please complete the following information):

  • OS: Windows 11 Home 22621.1635
  • Anki Version: Same issue on 2.1.61 and 2.1.62
  • Incremental Reading Version: 4.11.6 (latest)

Additional context

  • Issue occurs on a freshly created profile with ONLY this add on enabled.
  • There are other add ons installed on the system that have generated card types etc in this profile, here's a list of installed add ons:
    image
  • Check database and check media actions indicate no errors

I haven't had time to dig into source code yet / haven't dug in to anything Anki related before but I'm happy to help investigate and provide any information, just let me know!

An error when using a quick key combination

Describe the bug
In options -> Quick Keys my key combination is set to Alt+X. When I press it while reviewing my incremental reading cards (to create clozes) it gives me an error.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the deck where you have extracts from the web
  2. Press the quick key combination while reading your extracts to make clozes
  3. See error

Expected behavior
I should be able to make clozes without this error.

Specs (please complete the following information):

Additional context
Debug info:

Anki 2.1.48 (fb07bad3) Python 3.8.6 Qt 5.14.2 PyQt 5.14.2
Platform: Windows 10
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2022-08-15 21:06:13

Caught exception:
Traceback (most recent call last):
File "aqt\webview.py", line 541, in handler
File "C:\Users\user\AppData\Roaming\Anki2\addons21\999215520\text.py", line 72, in
'getHtmlText()', lambda text: self.create(text, settings)
File "C:\Users\user\AppData\Roaming\Anki2\addons21\999215520\text.py", line 106, in create
highlight = self._editExtract(newNote, did, settings)
File "C:\Users\user\AppData\Roaming\Anki2\addons21\999215520\text.py", line 160, in _editExtract
addCards.deckChooser.setDeckName(deckName)
AttributeError: 'DeckChooser' object has no attribute 'setDeckName'
image

Allow adding tags during import

Is your feature request related to a problem? Please describe.
I started using tags as a way to filter and bulk-update IR cards when I change priority. But the importing articles prompt doesn't allow adding a tag, which makes managing IR cards with tags inconvenient.

Describe the solution you'd like
Allow user to specify tags in the import prompt.

Describe alternatives you've considered
I could add the tag after importing by using the "Browser" window native to Anki. But that's inconvenient as I need to search for the card.

Named anchors don't work in imported page

To Reproduce
Steps to reproduce the behavior:

  1. Import a page with a table of content (e.g. https://en.wikipedia.org/wiki/Earth#Orbit_and_rotation)
  2. Click on any link from the table of content.

Notice how it tries to open a new browser tab instead of scrolling to the correct part of the page.

Expected behavior
Clicking an anchor link should scrolls within the page instead of opening a new browser tab.

Specs (please complete the following information):

  • OS: Pop OS
  • Anki Version 2.1.54 (b6a7760c)⁩ Python 3.9.10 Qt 6.3.1 PyQt 6.3.1
  • Incremental Reading Version 4.11.1

An error when using arrow keys to scroll

Describe the bug
I have absolutely no idea why, but for some reason this add-on breaks scrolling using arrow keys.

To Reproduce
Steps to reproduce the behavior:

  1. Review any card
  2. Press ↑ or ↓ on your keyboard
  3. See error

Specs (please complete the following information):

  • OS: Windows 10
  • Anki Version: 2.1.48

Additional context
Debug info:

Anki 2.1.48 (fb07bad3) Python 3.8.6 Qt 5.14.2 PyQt 5.14.2
Platform: Windows 10
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2022-08-15 21:06:13

Caught exception:
Traceback (most recent call last):
File "C:\Users\user\AppData\Roaming\Anki2\addons21\999215520\view.py", line 141, in lineUp
currentPos = self.settings['scroll'][str(mw.reviewer.card.id)]
KeyError: '1660390043852'

Investigate adding more automated tests

The automated tests available for this add-on is quite minimal. We want to add more automated tests to prevent regressions.

Let's use this issue to start the investigation.

Acceptance Criteria:

  • Have a good understanding of which part of the add-on could be tested, and how much effort it would take.
  • Document the findings here.

Highlights are hardly readable in darkmode

Describe the bug
If you use Anki with a dark theme, highlighted text is hardly readable (yellow highlight with white text).

To Reproduce

  • enable dark mode
  • open a card with a highlight

Expected behavior

  • text color should be adjusted according to dark / light mode.

Screenshots
grafik

Specs (please complete the following information):

  • OS: Ubuntu 22.04
  • Anki Version 23.12.1
  • Incremental Reading Version v4.11.9

Additional context

Images from Wikipedia aren't displayed properly

Describe the bug
Images from Wikipedia aren't displayed properly in Anki.

To Reproduce
Steps to reproduce the behavior:

  1. Press Alt+3 to import a Wikipedia article.
  2. Review it
  3. See that images aren't visible

Expected behavior
Images should be visible.

Screenshots
image
image

Specs (please complete the following information):

  • Windows 10
  • Anki ⁨2.1.48 (fb07bad3)⁩, Python 3.8.6 Qt 5.14.2 PyQt 5.14.2
  • Incremental Reading Version v4.11.2

Additional context
I tried non-Wikipedia articles and this issue is rather inconsistent - it seems to affect all images on Wikipedia, but images from other websites are sometimes displayed properly, and sometimes aren't.

cant extract text

Describe the bug
When I tried to extra some text

To Reproduce
Steps to reproduce the behavior:
select the text, hold and press X

Debug info:
Anki 2.1.54 (b6a7760c) Python 3.9.7 Qt 5.15.2 PyQt 5.15.5
Platform: Windows 10
Flags: frz=True ao=True sv=3
Add-ons, last update check: 2022-09-16 00:06:29

Caught exception:
Traceback (most recent call last):
File "aqt.webview", line 568, in handler
File "C:\Users\cindy\AppData\Roaming\Anki2\addons21\999215520\text.py", line 68, in
'getPlainText()', lambda text: self.create(text, settings)
File "C:\Users\cindy\AppData\Roaming\Anki2\addons21\999215520\text.py", line 131, in create
highlight = self._editExtract(newNote, did, settings)
File "C:\Users\cindy\AppData\Roaming\Anki2\addons21\999215520\text.py", line 156, in _editExtract
addCards.rejected.connect(self.undo)
AttributeError: 'AddCards' object has no attribute 'rejected'

Expected behavior

Screenshots

Specs (please complete the following information):

  • OS: [Windows10]
  • Anki Version [Version ⁨2.1.54 (b6a7760c)⁩]
  • Incremental Reading Version [v4111]

Additional context
Add any other context about the problem here.

Scroll position is not maintained between reviews

Describe the bug
The incremental-reading addon has a feature to store last read location of IR notes. However, this doesn't seem to be working.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new deck for testing.
  2. Import a long article as an "IR3" note.
  3. Open the note and scroll downward.
  4. Click "Show Answer".
  5. Click "Soon" (or "Later").
  6. Close Anki.
  7. Reopen Anki and go to the same note.
  8. Notice that the position is not restored.

Expected behavior
In step (8), the last-read position is restored.

Specs (please complete the following information):

  • OS: Windows 10
  • Anki Version ⁨2.1.54 (b6a7760c)⁩
  • Python 3.9.10 Qt 6.3.1 PyQt 6.3.1
  • Incremental Reading Version as of 2022-09-13

Priority scheduling is broken

Describe the bug

After activating priority scheduling, errors show up in multiple contexts.

To Reproduce

First Activating priority mode.
Then multiple things leads to an error window.

Opening the organizer. The organizer doesn't open after closing the error window

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 to the add-on author.
Debug info:
Anki 2.1.60 (76d88073) Python 3.10.9 Qt 6.4.2 PyQt 6.4.2
Platform: Linux-5.15.94-1-MANJARO-x86_64-with-glibc2.37
Flags: frz=False ao=True sv=3
Add-ons, last update check: 2023-02-23 22:27:55
Add-ons possibly involved: ⁨Incremental Reading v4115 unofficial clone⁩

Caught exception:
Traceback (most recent call last):
  File "/home/pierre/.var/app/net.ankiweb.Anki/data/Anki2/addons21/999215520/schedule.py", line 65, in showDialog
    if not self._getCardInfo(self._deckId):
  File "/home/pierre/.var/app/net.ankiweb.Anki/data/Anki2/addons21/999215520/schedule.py", line 298, in _getCardInfo
    prio = note[self._settings['prioField']]
  File "/usr/lib/python3.10/site-packages/anki/notes.py", line 159, in __getitem__
    return self.fields[self._field_index(key)]
TypeError: list indices must be integers or slices, not NoneType

Importing a webpage and setting a priority. No card is created after closing the error window

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 to the add-on author.
Debug info:
Anki 2.1.60 (76d88073) Python 3.10.9 Qt 6.4.2 PyQt 6.4.2
Platform: Linux-5.15.94-1-MANJARO-x86_64-with-glibc2.37
Flags: frz=False ao=True sv=3
Add-ons, last update check: 2023-02-23 22:27:55
Add-ons possibly involved: ⁨Incremental Reading v4115 unofficial clone⁩

Caught exception:
Traceback (most recent call last):
  File "/home/pierre/.var/app/net.ankiweb.Anki/data/Anki2/addons21/999215520/importer.py", line 140, in importWebpage
    deck = self._createNote(webpage.title.string, body, source, priority)
  File "/home/pierre/.var/app/net.ankiweb.Anki/data/Anki2/addons21/999215520/importer.py", line 99, in _createNote
    setField(note, self._settings['prioField'], priority)
  File "/home/pierre/.var/app/net.ankiweb.Anki/data/Anki2/addons21/999215520/util.py", line 105, in setField
    note.fields[index] = value
TypeError: list indices must be integers or slices, not NoneType

Trying to open Browse for an IR3 card that was already added. The card cannot be edited after closing the error window

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 to the add-on author.
Debug info:
Anki 2.1.60 (76d88073) Python 3.10.9 Qt 6.4.2 PyQt 6.4.2
Platform: Linux-5.15.94-1-MANJARO-x86_64-with-glibc2.37
Flags: frz=False ao=True sv=3
Add-ons, last update check: 2023-02-23 22:27:55

Caught exception:
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/aqt/progress.py", line 118, in handler
    func()
  File "/usr/lib/python3.10/site-packages/aqt/utils.py", line 1188, in <lambda>
    self.editor.call_after_note_saved(lambda: func(self, *args, **kwargs))
  File "/usr/lib/python3.10/site-packages/aqt/browser/browser.py", line 549, in on_all_or_selected_rows_changed
    self.editor.set_note(self.card.note(), focusTo=self.focusTo)
  File "/usr/lib/python3.10/site-packages/aqt/editor.py", line 487, in set_note
    self.loadNote(focusTo=focusTo)
  File "/usr/lib/python3.10/site-packages/aqt/editor.py", line 500, in loadNote
    for fld, val in self.note.items()
  File "/usr/lib/python3.10/site-packages/anki/notes.py", line 150, in items
    return [(f["name"], self.fields[ord]) for ord, f in sorted(self._fmap.values())]
TypeError: '<' not supported between instances of 'NoneType' and 'int'

Trying to extract a text when reviewing a card. No card is created after closing the error window

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 to the add-on author.
Debug info:
Anki 2.1.60 (76d88073) Python 3.10.9 Qt 6.4.2 PyQt 6.4.2
Platform: Linux-5.15.94-1-MANJARO-x86_64-with-glibc2.37
Flags: frz=False ao=True sv=3
Add-ons, last update check: 2023-02-23 22:27:55
Add-ons possibly involved: ⁨Incremental Reading v4115 unofficial clone⁩

Caught exception:
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/aqt/webview.py", line 604, in handler
    cb(val)
  File "/home/pierre/.var/app/net.ankiweb.Anki/data/Anki2/addons21/999215520/text.py", line 78, in <lambda>
    'getHtmlText()', lambda text: self.create(text, settings)
  File "/home/pierre/.var/app/net.ankiweb.Anki/data/Anki2/addons21/999215520/text.py", line 132, in create
    getField(currentNote, settings['prioField']),
  File "/home/pierre/.var/app/net.ankiweb.Anki/data/Anki2/addons21/999215520/util.py", line 98, in getField
    return note.fields[index]
TypeError: list indices must be integers or slices, not NoneType

Expected behavior

No error should show up and the card should be created.

Specs

  • OS: Manjaro Linux. Kernel 5.15
  • Anki Version : 2.1.60 (but also present in 2.1.58). Both from the AUR
  • Incremental Reading Version : v4.11.15

Anki debug info

    
    Anki 2.1.60 (76d88073) Python 3.10.9 Qt 6.4.2 PyQt 6.4.2
    Platform: Linux-5.15.94-1-MANJARO-x86_64-with-glibc2.37
    Flags: frz=False ao=True sv=3
    Add-ons, last update check: 2023-02-23 22:27:55
    
    
    ===Add-ons (active)===
    (add-on provided name [Add-on folder, installed at, version, is config changed])
    AnkiConnect ['2055492159', 2022-09-19T02:11, 'None', mod]
    Incremental Reading v4115 unofficial clone ['999215520', 2023-02-20T21:57, 'None', '']
    
    ===IDs of active AnkiWeb add-ons===
    2055492159 999215520

Allow splitting long articles during import

Is your feature request related to a problem? Please describe.
SuperMemo has a feature to split long articles into multiple notes. This speeds up the processing of these articles. We should have this feature in Anki IR add-on as well.

Describe the solution you'd like
During import, provide an option to split article into multiple notes, preferably with a preview of how the notes will be split up.

Closing Anki with plugin enabled error: AttributeError: 'AnkiQt' object has no attribute 'customMenus'

Describe the bug
Closing Anki with incremental reading plugin enabled gives an error message.

To Reproduce
Steps to reproduce the behavior:

  1. Enable Incremental Reading v4116 unofficial clone add on
  2. Restart Anki
  3. Close Anki or attempt to switch to a different profile

Expected behavior
Anki to close without errors

Logs / Screenshots

Debug info:
Anki 2.1.62 (77dd1dc1) Python 3.9.15 Qt 6.4.3 PyQt 6.4.0
Platform: Windows-10-10.0.22621
Flags: frz=True ao=True sv=3
Add-ons, last update check: 2023-05-01 11:22:22

Caught exception:
Traceback (most recent call last):
  File "aqt.main", line 1156, in closeEvent
  File "aqt.main", line 535, in unloadProfileAndExit
  File "aqt.main", line 510, in unloadProfile
  File "_aqt.hooks", line 3844, in __call__
  File "anki.hooks", line 34, in runHook
  File "C:\Users\matth\AppData\Roaming\Anki2\addons21\999215520\settings.py", line 201, in _unload
    for menu in mw.customMenus.values():
AttributeError: 'AnkiQt' object has no attribute 'customMenus'

image

Specs (please complete the following information):

  • OS: Windows 11 Home 22621.1635
  • Anki Version: Same issue on 2.1.61 and 2.1.62
  • Incremental Reading Version: 4.11.6 (latest)

Additional context

  • Issue occurs on a freshly created profile with ONLY this add on enabled.
  • There are other add ons installed on the system that have generated card types etc in this profile, here's a list of installed add ons:
    image
  • Check database and check media actions indicate no errors

I haven't had time to dig into source code yet / haven't dug in to anything Anki related before but I'm happy to help investigate and provide any information, just let me know!

Maybe related to #21 ?

The most recent version (v4113) doesn't work

Describe the bug
Anki won't launch with this add-on.

To Reproduce
Steps to reproduce the behavior:

  1. Turn Anki on with this add-on enabled
  2. See the error message

Screenshots
1

Specs (please complete the following information):

  • OS: Windows 10
  • Anki Version ⁨2.1.48 Python 3.8.6 Qt 5.14.2 PyQt 5.14.2
  • Incremental Reading Version v4113

The "General Zoom" setting doesn't zoom the article

To Reproduce
Steps to reproduce the behavior:

  1. Go to the add-on's config > Zoom / Scroll tab > Set "General Zoom" to 150%
  2. Open any cards
  3. Notice that the text doesn't zoom in

Expected behavior
The text is zoomed in according to the "General Zoom" level.

Specs (please complete the following information):

  • OS: PopOS
  • Anki Version: Version ⁨2.1.54 (b6a7760c)⁩ Python 3.9.10 Qt 6.3.1 PyQt 6.3.1
  • Incremental Reading Version 4.11.1

[Anki 23.10 beta 6] No module named 'sip', 'PyQt5'

Describe the bug

The Qt5 compatibility code is now off by default, which may break some add-ons that haven't been updated to support Qt6 in the last 2 years. If you find any have broken, please report the issues to the add-on author, and start Anki after setting the env var ENABLE_QT5_COMPAT to 1 to temporarily restore the compatibility code.

To Reproduce
Steps to reproduce the behavior:
. Go to '...'
. Click on '....'
. Scroll down to '....'
. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Specs (please complete the following information):

  • OS: Windows 10
    Anki Version ⁨23.10 beta 6 (72e57456)⁩ Python 3.9.15 Qt 6.5.2 PyQt 6.5.2
  • Incremental Reading v4118 unofficial clone

Additional context
Add any other context about the problem here.

Error
Un complemento que has instalado ha fallado al cargarse. Si los problemas persisten, por favor ve a Herramientas> Menú de complementos o deshabilita este complemento.

Mientras cargando '⁨Incremental Reading v4118 unofficial clone⁩':
⁨Traceback (most recent call last):
  File "aqt.addons", line 239, in loadAddons
  File "C:\Users\Khonkhortisan\AppData\Roaming\Anki2\addons21\999215520\__init__.py", line 17, in <module>
    from .main import ReadingManager
  File "C:\Users\Khonkhortisan\AppData\Roaming\Anki2\addons21\999215520\main.py", line 26, in <module>
    import sip
ModuleNotFoundError: No module named 'sip'

main.py

try:
    from PyQt6 import sip
except ImportError:
    import sip

about.py

#from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QLabel, QVBoxLayout
try:
    from PyQt6.QtWidgets import QDialog, QDialogButtonBox, QLabel, QVBoxLayout
except ImportError:
    from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QLabel, QVBoxLayout

gui.py

try:
    from PyQt6.QtCore import Qt
    from PyQt6.QtGui import QFont
    from PyQt6.QtWidgets import (
        QButtonGroup,
        QCheckBox,
        QComboBox,
        QDialog,
        QDialogButtonBox,
        QGroupBox,
        QHBoxLayout,
        QKeySequenceEdit,
        QLabel,
        QLineEdit,
        QPushButton,
        QRadioButton,
        QTabWidget,
        QVBoxLayout,
        QWidget,
    )
except ImportError:
    from PyQt5.QtCore import Qt
    from PyQt5.QtGui import QFont
    from PyQt5.QtWidgets import (
        QButtonGroup,
        QCheckBox,
        QComboBox,
        QDialog,
        QDialogButtonBox,
        QGroupBox,
        QHBoxLayout,
        QKeySequenceEdit,
        QLabel,
        QLineEdit,
        QPushButton,
        QRadioButton,
        QTabWidget,
        QVBoxLayout,
        QWidget,
    )

util.py

#from PyQt5.QtCore import Qt
#from PyQt5.QtGui import QKeySequence
#from PyQt5.QtWidgets import QAction, QMenu, QSpinBox
try:
    from PyQt6.QtCore import Qt
    from PyQt6.QtGui import QKeySequence
    from PyQt6.QtWidgets import QMenu, QSpinBox
    from PyQt6.QtGui import QAction
except ImportError:
    from PyQt5.QtCore import Qt
    from PyQt5.QtGui import QKeySequence
    from PyQt5.QtWidgets import QAction, QMenu, QSpinBox

importer.py

try:
    from PyQt6.QtCore import Qt
    from PyQt6.QtWidgets import (
        QAbstractItemView,
        QDialog,
        QDialogButtonBox,
        QListWidget,
        QListWidgetItem,
        QVBoxLayout,
    )
except ImportError:
    from PyQt5.QtCore import Qt
    from PyQt5.QtWidgets import (
        QAbstractItemView,
        QDialog,
        QDialogButtonBox,
        QListWidget,
        QListWidgetItem,
        QVBoxLayout,
    )

schedule.py

try:
    from PyQt6.QtCore import Qt
    from PyQt6.QtWidgets import (
        QAbstractItemView,
        QDialog,
        QDialogButtonBox,
        QHBoxLayout,
        QListWidget,
        QListWidgetItem,
        QPushButton,
        QVBoxLayout,
    )
except ImportError:
    from PyQt5.QtCore import Qt
    from PyQt5.QtWidgets import (
        QAbstractItemView,
        QDialog,
        QDialogButtonBox,
        QHBoxLayout,
        QListWidget,
        QListWidgetItem,
        QPushButton,
        QVBoxLayout,
    )

Scheduler continually puts card in first position no matter which button is pressed (Soon/Later)

Describe the bug
While using IR3, the scheduler will repeatedly put the card in the first position and not allow to view a new card regardless of choosing "Soon" or "Later". Additionally, this is occassionaly throwing this error:

image

To Reproduce

  1. Create blank deck
  2. Creat two new cards with card type IR3
  3. Click on the deck and select "study"
  4. Select "Show Answer"
  5. Select either "Later" or "Soon" from the "When do you want to see this card again?" prompt
  6. Same card appears as next in line. Repeat.

Expected behavior
I expect that after selecting "later", I should be presented with the next card in line in the organizer. However, instead I get a popup message that says "card moved to position 1" and it shows up again. With several cards in the deck it does the same thing.

Specs (please complete the following information):

PC

Edition Windows 11 Home
Version 22H2
Installed on ‎2022-‎09-‎24
OS build 22621.2361
Experience Windows Feature Experience Pack 1000.22674.1000.0

ANKI

  • Version ⁨2.1.65 (aa9a734f)⁩
  • V3 scheduler

ADD-ON

  • Incremental Reading Version 4.11.8

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.