Incremental Reading Add-on (unofficial clone)

Please use this thread for discussions of the Incremental Reading unofficial clone (ID: 999215520)

6 Likes

Thanks for that. I also recently created a fork of this add-on (not uploaded to AnkiWeb) and applied some half-baked fixes and changes. Maybe will be helpful to you: Commits Ā· abdnh/incremental-reading Ā· GitHub

3 Likes

Hi! I donā€™t have much to contribute right now but hope to offer more as I get more experience using the add-on. How similar is the workflow to the now-defunct add-on?

@abdo Nice! Do you mind if I git cherry-pick some of your fixes?

@sax_d0ct0r I have cloned the original add-on and added a couple fixes. There is no changes to the feature set yet.

Go ahead!

Thanks for doing this!

1 Like

hi,

this post is in mid of 2022, quite recent.

may i ask what is the version of anki you suggest to use with it?

i plan to use a windows portable old version with IR,
and then export those cards to my main anki.

otherwise iā€™ll buy a SMā€¦

thanks

ps: i tested myself finally:
seems working /w 2.1.54, qt6, windows.

1 Like

Yeah, I started with Anki 2.1.54. It should still work in that version.

But I only intend to support the latest version of Anki because itā€™s very difficult to test with all versions.

1 Like

hi, how do you use it with PDF files?
some scanned jpg ā†’ pdf, these are troublesome and i give up.

but some are authenic from publishers, they got good graphics and texts.

in SM they got SM assistant which have PDF plugin.

for us anki users, any luck with PDF files? thanks

ps: the plugin is working well if using web source, i usually choose ā€œprintā€ then copy/paste that page as text.

There is no support for PDF in IR add-on in Anki.

My workflow is for studying PDF is:

  1. Set up shortcut for adding a new IR card in the IR (this is a feature of IR add-on).
  2. Add an IR card with the local URL of the PDF file (e.g. file:///Users/vhong/OneDrive/resources/somebook.pdf#page=1)
  3. When the card shows up, open the PDF file in Firefox, itā€™ll open at the right page.
  4. To extract content, I copy the content and press the shortcut in step (1) to add a new IR card. Iā€™ll also ā€œpinā€ the Title, Source, and Priority fields for convenience.
  5. When I finish, I update the page number in the original IR card.

This isnā€™t a great workflow, but it works reasonably well. If you want to break the content into smaller chunks, consider creating one IR card for each section/chapter (itā€™s all manual though).

Also, for step (4), I find this add-on useful: remove linebreaks / do word wrap - AnkiWeb

2 Likes

ok, for PDF, @NameLessGO recommended this addon for me.

" would recommend the use of Searching, PDF Reading & Note-Taking in Add Dialog - AnkiWeb for incremental reading, works in 2.1.56 (latest version)"

i tried, it works like SM+SMA PDF plugin for anki.

the UI is quite complex, worst is sometimes without a tooltip.
but when it works, it worked.

can have a look on akingā€™s intro at utube, quite good.

the workflow for PDF:

make a new entry using the PDF ā€œthe add on also call it ā€˜noteā€™, so easy confusedā€.

click ā€œaddā€, then the plugin will appear on Right hand side.

in the pluginā€™s part, choose the ā€˜noteā€™, click the ā€œbookā€ alike button.

PDF then show up, iā€™ll disable the ā€œsearch on selected textā€.

then select some text, and in the left sideā€™s add field, there is a button to add
those text into the field.

tune tags etc as you like.

click add, then anki note/card is made.

the workflow is better. worth to have a look, thanks all

ps: must say iā€™ll use the color mode of ā€œx2ā€, which is a very good color mode,
almost black background, for use at night.

I really donā€™t understand how to use this addon. Do I need a special note type or an extra program to use it? The original page says to import pages by pressing Alt +3, but nothing happens.

There was an issue for new user: Error when Anki is opened with incremental-reading plugin: anki.errors.NotFoundError: Your database appears to be in an inconsistent state. Ā· Issue #21 Ā· tvhong/incremental-reading Ā· GitHub).

Can you try downloading v4.11.7 and try again?

Thanks for the IR update, Iā€™ll post some small info.

[ PDF, Epub, etc ]

Use this add-on to open PDF, Epub, and Calibre directly from Anki.(Well, the setup process is quite complicatedā€¦but only once.) PDFs can be opened by page number and Calibre will auto open the previous page.

When opening PDFs using Foxit PDF, etc, you need to update the page numbers stored in the Anki card. Using add-ons ā€œEdit Field During Reviewā€ is an easy way to do this.

[ Title bar ]

When adding long sentences, I sometimes lose track of what Iā€™m reading.
With this HTML & CSS, you can always display a tiny title bar.

  • Front & Back
<div class="fixed_bottom hashtext">{{tex:Title}}</div>
  • Styling
.fixed_bottom {
    position: fixed;
    top: 0;
}
.hashtext {
    font-size: 10px;
    text-align: center;
    margin: 0px 0px;
    color: white;
    opacity: 1;
    background: #3b3b3d;
    line-height: 1.4em;
    white-space: nowrap;  
}

[ Scheduling ]

Scheduling didnā€™t work well with ā€œPercentā€, so I had to change it to ā€œPositionā€, not sure why (Maybe interference with the FSRS4 helper? ā€œPositionā€ doesnā€™t cause problems). When more cards are added, I think the numbers need to be adjusted.

  • IR Options > Scheduling > Soon, Later, Extract > Position[on] x 3

Two errors occurred in the pre-release Anki23.10(Beta), so I fixed them a bit.

If IR add-on is enabled, it is completely impossible to review(answer is not displayed). Maybe the introduction of FSRS in the default Anki may have affected this. The error occurs whether FSRS is set ON or OFF.

  • [ Error 1 ]
Debug info:
Anki 23.10 (1f6938d7) Python 3.9.15 Qt 6.5.2 PyQt 6.5.2
Platform: Windows-10-10.0.22621
Flags: frz=True ao=True sv=3
Add-ons, last update check: 2023-09-27 13:50:55
Add-ons possibly involved: <U+2068>Incremental Reading v4118 unofficial clone<U+2069>

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\shigg\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 2 ]
Traceback (most recent call last):
  File "aqt.webview", line 608, in handler
  File "C:\Users\shigg\AppData\Roaming\Anki2\addons21\999215520\view.py", line 122, in callback
    self._settings['scroll'][str(mw.reviewer.card.id)] = currentPos
AttributeError: 'NoneType' object has no attribute 'id'
  • [ Fix ]

I tried to fix the errors as these, then the errors stopped occurring. But I am not familiar with IR add-ons, so I am not sure if these fixes are correct.

  • [ main.py line 209 ] v3_labels
def buttonTime(self, i: int, v3_labels: Sequence[str], _old: Any) -> str:
    if isIrCard(mw.reviewer.card):
        return '<div class=spacer></div>'
    return _old(self, i, v3_labels)
  • [ view.py line 118 ] and mw.reviewer.card is not None
    def _saveScroll(self, event=None):
        if viewingIrText() and mw.reviewer.card is not None:

            def callback(currentPos):
                self._settings['scroll'][str(mw.reviewer.card.id)] = currentPos

            mw.web.evalWithCallback('window.pageYOffset;', callback)
  • [ FSRS ]

Strange, after making these two fixes, it looks like the issue with the known interference in FSRS4 is also resolved.

FSRS4 and IR with custom schedules were incompatible and button due dates were always broken. But the new default FSRS and IR have correct button due dates.

In short, FSRS4 with custom schedule is not compatible with IR, but is compatible with the default Anki FSRS. I have not checked FSRS4Helper yet.

2 Likes

@Shigeyuki this is great information. Thank you for reporting. Sorry I didnā€™t see it earlier.

There is another user reporting incompatibility issues with FSRS on the GitHub page: Can you please make it compatible with FSRS4Anki ? Ā· Issue #23 Ā· tvhong/incremental-reading Ā· GitHub .

Iā€™ll cross reference the 2 and see what needs to be fixed.

1 Like

Whatā€™s the plan for the future of this add-on?

I would like to contribute to your clone, if thereā€™s hope for some long-term perspectives.

Hey there,
I plan to maintain the add-on for the foreseeable future because I really love using IR in Anki. But I donā€™t have any plans for a major revamp at the moment.

That being said, PRs are welcomed. lujun9972@ recently added a new feature to import Epub files (add the ability to import epub file by lujun9972 Ā· Pull Request #25 Ā· tvhong/incremental-reading Ā· GitHub), which is really cool. We also need to add more automated tests, and improve the code quality.

4 Likes

I agree, the code style is is a bit inconsistent, Iā€™d say after a bit of skimmingā€¦
Iā€™ll gladly get some PRs ready! Iā€™ll want some proper IR in anki, tooā€¦ Canā€™t have it all monopolized by SM :slight_smile:

2 Likes

How different is this from Supermemos implementation? I mean are there things in Supermemo that are highly beneficial for the workflow that are not implemented in the available IR plugins for Anki or only too rudimentary implemented to give comparable use?

also posted the question here:
https://www.reddit.com/r/Anki/comments/192dugg/how_much_difference_is_there_between_supermemo/