Questions tagged [anki]

Anki is an open source flashcard program which has the capability to use add-ons. Programming questions about writing add-ons for Anki or the Anki source code are on-topic for Stack Overflow. Questions about how to use Anki or Anki plug-ins are off-topic for Stack Overflow.

Anki is an open source flashcard program with the ability to use plug-ins.

More information can be found on Wikipedia: Aniki.

You can find the source code for the desktop version on GitHub. There are ports by other authors to various mobile platforms.

171 questions
3
votes
1 answer

Web scraping script for Anki

I'm very new to programming. Learning python to speed up my language learning with Anki. I Wanted to create web scraping script for Anki to create cards quicker. Here is my code: (It's not the final product, I enventually want to learn how to send…
3
votes
0 answers

Anki Javascript code works for Mac Desktop and AnkiDroid, but does not work for Anki (Ipad/Iphone version)

This code I got from online long time ago works on pre-made cards with more than one {{cloze}}. It works on Mac (desktop version) and AnkiDroid. But fails to work on the Anki (Ipad/Iphone) version. Tried everything but can't seem to make it work.…
3
votes
1 answer

Keyboard shortcut to select / switch between decks in anki

In anki you can do pretty much everything with shortcuts. But one thing I could not find a shortcut for is selecting a particular deck from multiple decks in the decks window. I tried pushing all the direction keys as well as the tab button and…
rasul
  • 1,009
  • 9
  • 14
3
votes
0 answers

How to implement reverse cloze in Anki 2.1.x

I wish to implement this unanswered idea of reverse cloze cards in Anki 2.1.x, i.e. (since I do not think that there is a builtin that does this) I want to write an add-on in Python 3.x and PyQt 5, which are the versions Anki 2.1.x uses. Basically,…
Yannick
  • 153
  • 8
3
votes
1 answer

Anki - What should I hook to add my own field descriptors?

Similarly to {{field}} and {{text:field}}, I am trying to create my own field descriptor. In order to do this, I need to know what function to hook. I do not know whether Anki pre-compiles cards into HTML or produces them on-the-fly during study, so…
wizzwizz4
  • 6,140
  • 2
  • 26
  • 62
3
votes
1 answer

Anki javascript only appearing in preview

In Anki, I have a note type where one card is effectively a cloze deletion, however I am using other cards at the same time, with the cloze deletion field in it. I've tried to use javascript to replace everything within two '\'s and it appears to…
user3231511
  • 31
  • 1
  • 5
3
votes
1 answer

In Anki, how to search for all cards scheduled for today?

I would like to use a filtered deck to study all different subjects I have in Anki at once, using other decks to mainly control review/new cards flow of a particular topic (via deck options). My problem is that search is:due only finds cards that…
julka
  • 1,172
  • 2
  • 13
  • 29
3
votes
2 answers

Regex for multiple different words, between white spaces

I am completely new to regex. I just want to know whether this is possible.(I'm sorry if the explanation is confusing or too complicated) Say, I just want to find and replace this particular heading in bold: "As discussed in chapter 1, the users of…
pagkly
  • 111
  • 1
  • 10
3
votes
1 answer

Replicating jQuery slideToggle without jQuery

Since Anki doesn't support jQuery, how would I go about converting the jQuery on this particular document so that the same effects are produced in vanilla JS, or purely in CSS3 (specifically of the + button, and when clicking on list…
James Harrison
  • 323
  • 4
  • 12
2
votes
1 answer

modify regex to capture Question and answer to include newlines

I have the following regex in the tool Obsidian-to-Anki Plugin I use, taken from their Wiki: ^Q: ((?:.+\n)*)\n*A: (.+(?:\n(?:^.{1,3}$|^.{4}(?
Siraj Samsudeen
  • 1,624
  • 7
  • 26
  • 35
2
votes
0 answers

How to load pandas package in an Anki addon?

I want to use a numpy function in an Anki addon that I am forking, but it returns an error when I run Anki (error below). I guess it is because I am using import numpy. So how I can use a numpy function when the package is not in the original code…
2
votes
1 answer

How to run Anki-Qt script without requiring a breakpoint?

If I run the toy script below as shown: import sys sys.path.append('/usr/share/anki') import aqt app = aqt._run(argv=['/usr/bin/anki', '--profile=test'], exec=False) # breakpoint() print(repr(aqt.mw.col)) aqt.mw.cleanupAndExit() ...I get the…
kjo
  • 33,683
  • 52
  • 148
  • 265
2
votes
1 answer

How to immunise my antiprocrastination script against logout and shutdown?

I'm trying to build a script in autohotkey which will make it annoying for myself and fellow users of the flashcard program Anki from quitting midway through a study session. So far I have written the following InputBox, TimeMin, ATTENTION, Enter…
John Salter
  • 182
  • 10
2
votes
3 answers

JavaScript works in 2.0 version of Anki but not in 2.1 version

I'm using Anki to help my 5th grade son study Math. My son has reached a point where he needs to review how to approach specific problems and not simply memorize facts. For example imagine you are trying to learn how to multiply fractions... .45 X…
codingguy3000
  • 2,695
  • 15
  • 46
  • 74
2
votes
1 answer

LATEX on Anki does not display properly; Ubuntu 18.10

Folks - I'm trying to display the basic command as below (one of many examples): Does the sum below converge? [latex]\begin{displaymath}\sum_{k = 1}^{\infty}\frac{1}{k}\end{displaymath}[/latex] However it produces the following error: Does the…
user5156958
1
2
3
11 12