See it on AnkiWeb
You will need your lingq API key. You can get that here.
The language code for the lingq language you want to sync with. Example: "es"
A menu item to open the ui can be found under Tools > Import LingQs from LingQ.com.
Input your lingq api key and language code, then select the deck you want to sync lingqs to or that you want to sync lingq known status based on the card interval. (Currently you should create a new deck only used for lingq's and import into that new deck, and only sync from that deck).
Click the "import" button to import all of your lingqs for that language code into the selected anki deck.
Click the "sync to Lingq" button to update the "known status" on your lingqs based on the interval of the card in anki. (As a precaution this addon will not set a lower known status in lingq, it will only raise it).
Be Patient, either of these operations will take some time. Once the operation completes you will see this screen and it will tell you how many Lingqs were imported.
After importing your API key and language code should be preserved for the next time you want to import or sync!
As the name implies the goal is to sync between lingq and anki. This addon is currently in early development, but it has the following features:
Lingq is a great tool for reading in your target language, but I prefer to use anki as my SRS. Lingq has an option to export lingqs to anki, however it has some flaws which this addon attempts to address:
There is an API endpoint to retrieve your API key for lingq in their documentation. It's easiest to use this in dev at least.
Type: API Key
Key: Authorization
value: Token {apiKey}
add to: Header
Lingq object is refering to a single lingq (word).
{
"pk": primaryKey,
"url": url to get single card info,
"term": string,
"fragment": string,
"importance": int,
"status": int,
"extended_status": null,
"last_reviewed_correct": null,
"srs_due_date": date,
"notes": string,
"audio": null,
"words": string[],
"tags": string[],
"hints": hintObject[],
"transliteration": {},
"gTags": [],
"wordTags": [],
"readings": {}
}
{
"id": int,
"locale": string,
"text": string,
"term": string,
"popularity": int,
"is_google_translate": bool,
"flagged": bool
}
https://www.lingq.com/api/v3/{languageCode}/cards
Will return this json with the first 100 lingqs:
{
"count": int,
"next": string,
"previous": string,
"results": [
List of lingq objects
]
}
Add ?page={pageNumber} to return a specific page of cards
https://www.lingq.com/api/v3/{languageCode}/cards/{primaryKey}/
Will return a single lingq object that matches the primaryKey within the language code. If an invalid primaryKey is supplied the api will return a 404 Not found with a return body of
{
"detail": "Not Found."
}
https://www.lingq.com/api/v2/{languageCode}/cards/{primarykey}/
Body Json object of the items that will be changing in the lingq object. Example:
{
"status": 2
}
Note: Not all fields of the object can be updated here. I have tested the following:
https://www.lingq.com/api/v2/{languageCode}/cards/{primaryKey}/review/
Tells lingq that the card has been reviewed via srs on the date this is sent. Will update lingqs srs_due_date.
It seems like this needs to be called instead of changing the due date manually with the patch request.
Returns an object showing the new srs_due_date and status_changed_date:
{
"srs_due_date": date,
"status_changed_date": date
}