Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] Support add to Anki API #80

Open
kolya-ay opened this issue Jan 14, 2018 · 5 comments
Open

[Feature request] Support add to Anki API #80

kolya-ay opened this issue Jan 14, 2018 · 5 comments

Comments

@kolya-ay
Copy link

Here is the docs: https://github.com/ankidroid/Anki-Android/wiki/AnkiDroid-API

It might be killer-feature for language learners while seems to be relatively simple to implement.

@geo909
Copy link

geo909 commented Feb 3, 2018

Plus one to that!

@tim-hub
Copy link

tim-hub commented Mar 18, 2018

Sound a good idea.

@Davidbrcz
Copy link

I've been poking around for a day or two.
I've been able to integrate into Aard Anki's demo and registering some example data upon an user bookmarking a word.

After finding why my custom data crash the application I would like to add the word beeng bookmarked. This mean I need to retrieve from ArticleFragment.onOptionsItemSelected the current word and its possible meanings. It seems that the article fragment has only an URL that is used to display it.
What would be the easiest way to retrieve what I want from this?

Thnaks, hoping to do a PR a soon as possible =)

@Davidbrcz
Copy link

Davidbrcz commented Feb 17, 2019

I have a working prototype (branch anki-exporter) that cover my needs: upon bookmarking a word, a card is created in Anki with the word and its definition (check for duplicate).
It is partly based on Anki Api Sample APP (aka, I have copy/pasted some bits of cod and made some tweaks).

Right now, there is

  • no deletion of un-bookmarked words (the API seems unable to do it).
  • All cards are put within a single deck
  • I don't deal with permissions as shown in the sample App as 1/ it works 2/ I did not manage to get the code to compile
  • The export feature works only if in the article, the word is within a <h1></h1> tag. As all dictionaries do not have same page format, it won't work as it is with all dictionaries. I have only tested it with WordNet english.

From a personal point of view, I could call it a day but I think a PR based on my code would not be accepted. So I think I'll continue working on this relatively slow pace on it. Also; as the app is not well documented and I'm by no mean an Android dev, I would really appreciate having a chat with @itkach to ask some questions in order to speed things up.

@yue-dongchen
Copy link

yue-dongchen commented Sep 24, 2021

Four-year anniversary!

I'll give this a try. It's probably good to implement it as an option in the drop-down menu of an article, that can be toggled in the settings (i.e. "show Anki export option in menu"). I've so far added a toggle to settings - branch "add-anki".

Edit: the toggle now controls the visibility of the export option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants