jdlorimer / incremental-reading

Anki add-on providing incremental reading features
https://ankiweb.net/shared/info/935264945
ISC License
216 stars 38 forks source link

Need option to mark Pocket articles on import #33

Closed JulyMorning closed 5 years ago

JulyMorning commented 6 years ago
Anki 2.1.0beta20 Python 3.6.1 Qt 5.9.2 PyQt 5.9
Platform: Windows 10
Flags: frz=True ao=True

Caught exception:
  File "D:\system\documents\Anki\addons21\1081195335\importer.py", line 142, in importPocket
    for i, article in enumerate(response.json()['list'].values(), start=1):
<class 'AttributeError'>: 'list' object has no attribute 'values'

It pops up when I'm trying to load the articles (the auth is ready). Also I wasn't able to open organizer – it said I should select IR deck. Extraction of some webpage eventually happened to work and it fixed the problem, but the pocket issue still persists. Am I doing something wrong?

jdlorimer commented 6 years ago

It looks like there's an issue with the AnkiWeb version of the add-on, which is annoying because I'm pretty sure I tested it before uploading. The development version shouldn't have that problem. You can download it here. Extract all of the files from the ir folder into the 1081195335 folder. Let me know how you go.

JulyMorning commented 6 years ago

Yep, it works now. Is it necessary to ask a user to auth the app every time? And does it mark the articles in some way to be archived on the service? I ask because if it doesn't the same articles will be sent to e-readers, phones etc.

jdlorimer commented 6 years ago

Unfortunately, that's the way the Pocket API works. As far as I know, it isn't possible to log in directly with the API - there needs to be this whole back-and-forth with access tokens. If I discover a simpler way, I'll be happy to use that instead.

At the moment, it doesn't mark the articles, but I was planning to add that as an option. It won't happen for a few weeks, though.

JulyMorning commented 5 years ago

hi there :3 still find this addon great and very underrated. however, I haven't used it a lot since we found that it cannot mark pocket articles as read and/or archive them. is it possible to implement the feature?

jdlorimer commented 5 years ago

It's been a long time since I looked. From memory, I think it was just a matter of setting up a less restrictive API key and adding some lines to the import code. I'll try to find time for this in the next few days.

JulyMorning commented 5 years ago

It would be really, really nice to have it. currently, reading articles from Pocket means that user should manually mark them as read in other devices that could be a lot of borning taping and clicking. having this solved, anki and your addon would support a great way to read favorite newsflow and remember important things at the same time. thank you for the efforts!

jdlorimer commented 5 years ago

Well this is frustrating. The section of the Pocket website where I am supposed to be able to create or modify API keys is broken. Remind me to check again later if I forget.

JulyMorning commented 5 years ago

If the problem on the pocket's side, maybe we should send them a brief email to repair their API? If so, they should appreciate it.

jdlorimer commented 5 years ago

Indeed. I'll see what I can do.

jdlorimer commented 5 years ago

Good things come to those who wait (for a year): b3feb293862cda7d690a7a890338369a74f9d319

Let me know if there are any issues.

jdlorimer commented 5 years ago

Also, you only need to authorise once every time you open Anki now.

JulyMorning commented 5 years ago

Thank you! Will definitely check it out this evening!