mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 15:32:23 -04:00
Anki is a smart spaced repetition flashcard program
![]() Extends the AddonManager API with two new methods, setWebExports and getWebExports. setWebExports expects an add-on module name and a valid RegEx pattern to match subpaths in the add-on folder against. Any matching subpaths will be accessible in Anki's web views by referencing them with /_addons/{addon_id}/{subpath}. For instance, to allow access to .css and .png files in your add-on's user_files directory you would call: > mw.addonManager.setWebExports(__name__, r"user_files/.+(\.png|\.css)") You could then reference these files in web views as such: > <img src="/_addons/{addon_id}/user_files/test.png"> Please note that this bypasses the default security policies used in Anki webviews. You should take care to construct your RegEx patterns specific enough so that they do not match any sensitive files of our add-on. |
||
---|---|---|
anki | ||
aqt | ||
designer | ||
tests | ||
tools | ||
web | ||
.gitignore | ||
.travis.yml | ||
anki.1 | ||
anki.desktop | ||
anki.png | ||
anki.xml | ||
anki.xpm | ||
LICENSE | ||
LICENSE.logo | ||
Makefile | ||
pkgkey.asc | ||
README.contributing | ||
README.development | ||
README.md | ||
requirements.txt | ||
runanki |
Anki
This is the development branch of Anki.
For stable builds, please see https://apps.ankiweb.net.
For non-developers who want to try this development code, the easiest way is to use a binary package - please see https://anki.tenderapp.com/discussions/beta-testing
To run from source, please see README.development.