Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/krmanik/ankijs-api
Anki JavaScript API to get cards informations in reviewer window
https://github.com/krmanik/ankijs-api
anki anki-addon anki-api anki-js anki21
Last synced: 13 days ago
JSON representation
Anki JavaScript API to get cards informations in reviewer window
- Host: GitHub
- URL: https://github.com/krmanik/ankijs-api
- Owner: krmanik
- Created: 2020-12-15T10:00:07.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-03-22T03:30:13.000Z (8 months ago)
- Last Synced: 2024-10-08T12:59:34.548Z (28 days ago)
- Topics: anki, anki-addon, anki-api, anki-js, anki21
- Language: Python
- Homepage:
- Size: 193 KB
- Stars: 5
- Watchers: 2
- Forks: 4
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# AnkiJS-API
Anki JavaScript API to get cards information in reviewer windowThis addon is made to work with [AnkiDroid JS API](https://github.com/ankidroid/Anki-Android/wiki/AnkiDroid-Javascript-API).
# Install from AnkiWeb
https://ankiweb.net/shared/info/1490471827# Demo
![images](images/demo_1.png)# To get card info in reviewer for creating decks
To know more about the options view
[AnkiDroid JS API](https://github.com/ankidroid/Anki-Android/wiki/AnkiDroid-Javascript-API).
## New Count
```javascript
pycmd("AnkiJS.ankiGetNewCardCount()", (ret) => {
console.log(ret);
});
```## Learn Count
```javascript
pycmd("AnkiJS.ankiGetLrnCardCount()", (ret) => {
console.log(ret);
});
```## Review Count
```javascript
pycmd("AnkiJS.ankiGetRevCardCount()", (ret) => {
console.log(ret);
});
```## Mark
```javascript
pycmd("AnkiJS.ankiGetCardMark()", (ret) => {
console.log(ret);
});
```## Flag
```javascript
pycmd("AnkiJS.ankiGetCardFlag()", (ret) => {
console.log(ret);
});
```## Card Id
```javascript
pycmd("AnkiJS.ankiGetCardId()", (ret) => {
console.log(ret);
});
```## Note Id
```javascript
pycmd("AnkiJS.ankiGetCardNid()", (ret) => {
console.log(ret);
});
```## Deck Id
```javascript
pycmd("AnkiJS.ankiGetCardDid()", (ret) => {
console.log(ret);
});
```## Last modified time of card
```javascript
pycmd("AnkiJS.ankiGetCardMod()", (ret) => {
console.log(ret);
});
```## Type
```javascript
pycmd("AnkiJS.ankiGetCardType()", (ret) => {
console.log(ret);
});
```## Queue
```javascript
pycmd("AnkiJS.ankiGetCardQueue()", (ret) => {
console.log(ret);
});
```## Left
```javascript
pycmd("AnkiJS.ankiGetCardLeft()", (ret) => {
console.log(ret);
});
```## Due
```javascript
pycmd("AnkiJS.ankiGetCardDue()", (ret) => {
console.log(ret);
});
```## Interval
```javascript
pycmd("AnkiJS.ankiGetCardInterval()", (ret) => {
console.log(ret);
});
```## Factor
```javascript
pycmd("AnkiJS.ankiGetCardFactor()", (ret) => {
console.log(ret);
});
```## Reps
```javascript
pycmd("AnkiJS.ankiGetCardReps()", (ret) => {
console.log(ret);
});
```## Lapses
```javascript
pycmd("AnkiJS.ankiGetCardLapses()", (ret) => {
console.log(ret);
});
```## Original Due
```javascript
pycmd("AnkiJS.ankiGetCardODue()", (ret) => {
console.log(ret);
});
```## Deck ID of home deck if filtered
```javascript
pycmd("AnkiJS.ankiGetCardODid()", (ret) => {
console.log(ret);
});
```## Next Time 1
```javascript
pycmd("AnkiJS.ankiGetNextTime1()", (ret) => {
console.log(ret);
});
```## Next Time 2
```javascript
pycmd("AnkiJS.ankiGetNextTime2()", (ret) => {
console.log(ret);
});
```## Next Time 3
```javascript
pycmd("AnkiJS.ankiGetNextTime3()", (ret) => {
console.log(ret);
});
```## Next Time 4
```javascript
pycmd("AnkiJS.ankiGetNextTime4()", (ret) => {
console.log(ret);
});
```