All Projects → AnkiTools → AnkiSharp

AnkiTools / AnkiSharp

Licence: MIT license
Create anki decks and cards from your C# application

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to AnkiSharp

AnnA Anki neuronal Appendix
Using machine learning on your anki collection to enhance the scheduling via semantic clustering and semantic similarity
Stars: ✭ 39 (+0%)
Mutual labels:  flashcards, anki
2anki.net
Server to create Anki flashcards faster, easier and better today ⭐️
Stars: ✭ 190 (+387.18%)
Mutual labels:  flashcards, anki
speed-focus-mode
Speed Focus Mode add-on for Anki
Stars: ✭ 19 (-51.28%)
Mutual labels:  flashcards, anki
mpvacious
Adds mpv keybindings to create Anki cards from movies and TV shows.
Stars: ✭ 286 (+633.33%)
Mutual labels:  flashcards, anki
chinese-support-redux
Anki add-on providing support for Chinese study
Stars: ✭ 88 (+125.64%)
Mutual labels:  flashcards, anki
ScienceNotebooks
Collection of tools and stylesheet for scientific writting and learning (through Anki)
Stars: ✭ 43 (+10.26%)
Mutual labels:  flashcards, anki
ForgetMeNot
A flashcard app for Android.
Stars: ✭ 234 (+500%)
Mutual labels:  flashcards, anki
anki-md
A markdown to anki flash cards converter
Stars: ✭ 22 (-43.59%)
Mutual labels:  flashcards, anki
vocage
A minimalistic spaced-repetion vocabulary trainer (flashcards) for the terminal
Stars: ✭ 68 (+74.36%)
Mutual labels:  flashcards, anki
anki-mode
An Emacs major mode for creating anki cards
Stars: ✭ 47 (+20.51%)
Mutual labels:  flashcards, anki
files2flashcards
Keep your flashcards rooted in the context of your notes
Stars: ✭ 28 (-28.21%)
Mutual labels:  flashcards, anki
Polar Bookshelf
Polar is a personal knowledge repository for PDF and web content supporting incremental reading and document annotation.
Stars: ✭ 4,411 (+11210.26%)
Mutual labels:  flashcards, anki
anki-add-hooks-userscripts
Automate Anki card creation from popular translation websites
Stars: ✭ 17 (-56.41%)
Mutual labels:  flashcards, anki
Anki Android
AnkiDroid: Anki flashcards on Android. Your secret trick to achieve superhuman information retention.
Stars: ✭ 4,425 (+11246.15%)
Mutual labels:  flashcards, anki
mnemocards
In addition to helping you memorise, this code helps you do other things that I don't remember...
Stars: ✭ 34 (-12.82%)
Mutual labels:  flashcards, anki
gorest
Go RESTful API starter kit with Gin, JWT, GORM (MySQL, PostgreSQL, SQLite), Redis, Mongo, 2FA, email verification, password recovery
Stars: ✭ 135 (+246.15%)
Mutual labels:  sqlite3
sqlite3-compression-encryption-vfs
Compression and Encryption Virtual File System for SQLite 3.
Stars: ✭ 88 (+125.64%)
Mutual labels:  sqlite3
electron-RxDB
RxDB is a high-performance, observable object store built on top of SQLite & intended for database-driven Electron applications.
Stars: ✭ 68 (+74.36%)
Mutual labels:  sqlite3
apy
CLI script for interacting with local Anki collection
Stars: ✭ 135 (+246.15%)
Mutual labels:  anki
memanki-cli
CLI implementation of memanki
Stars: ✭ 21 (-46.15%)
Mutual labels:  anki

AnkiSharp

NuGet NuGet

🎉 It's finally here! You can create automatically anki cards from your C# application. 🎉

Contribute

Other languages

I'm looking for some developers to develop the Java, Javascript and Python version, If you are interested in it please contact me here : https://clement-jean.github.io/contact/

C#

You can find a to do list here : To do list

Youtube

Debug

AnkiSharp is using SourceLink (https://github.com/dotnet/sourcelink). It helps you debugging your program using this nuget.

If you encounter an exception coming from Ankisharp:

- Put a breakpoint on the function which as a problem
- Once on the breakpoint, click on the 'Step Into' button (F11)

Then you will be redirected in the AnkiSharp nuget code. Finally, please report the issue and start contributing.

Tutorial and documentation

This repo as a wiki : Wiki. You can look at any function individually or follow the guide tour by click on the next link at the end of each page.

Basic use

AnkiSharp.Anki test = new AnkiSharp.Anki(_NAME_OF_ANKI_PACKAGE_);

test.AddItem("Hello", "Bonjour");
test.AddItem("How are you ?", "Comment ca va ?");
test.AddItem("Flower", "fleur");
test.AddItem("House", "Maison");

test.CreateApkgFile(_PATH_FOR_ANKI_FILE_);

SetFields

AnkiSharp.Anki test = new AnkiSharp.Anki(_NAME_OF_ANKI_PACKAGE_);

//Permits to set more than two fields 
test.SetFields("English", "Spanish", "French");

test.AddItem("Hello", "Hola", "Bonjour");
test.AddItem("How are you ?", "Como estas?", "Comment ca va ?");
test.AddItem("Flower", "flor", "fleur");
test.AddItem("House", "Casa", "Maison");

test.CreateApkgFile(_PATH_FOR_ANKI_FILE_);

SetCss

AnkiSharp.Anki test = new AnkiSharp.Anki(_NAME_OF_ANKI_PACKAGE_);

//Permits to change the css of your cards by providing it a css string
test.SetCss(_CSS_CONTENT_);

test.AddItem("Hello", "Bonjour");
test.AddItem("How are you ?", "Comment ca va ?");
test.AddItem("Flower", "fleur");
test.AddItem("House", "Maison");

test.CreateApkgFile(_PATH_FOR_ANKI_FILE_);

SetFormat

AnkiSharp.Anki test = new AnkiSharp.Anki(_NAME_OF_ANKI_PACKAGE_);

test.SetFields("English", "Spanish", "French");

//Everything before '<hr id=answer>' is the front of the card, everything after is the behind
test.SetFormat("{0} - {1} \\n<hr id=answer>\\n {2}");

test.AddItem("Hello", "Hola", "Bonjour");
test.AddItem("How are you ?", "Como estas?",  "Comment ca va ?");
test.AddItem("Flower", "Flor", "fleur");
test.AddItem("House", "Casa", "Maison");

test.CreateApkgFile(_PATH_FOR_ANKI_FILE_);

Create deck from Apkg file

Anki test = new Anki(_NAME_OF_ANKI_PACKAGE_, new ApkgFile(_PATH_TO_APKG_FILE_)));

// Be careful, keep the same format !
test.AddItem("Fork", "El tenedor", "La fourchette");
test.AddItem("Knife", "El cuchillo", "Le couteau");
test.AddItem("Chopsticks", "Los palillos", "Les baguettes");

test.CreateApkgFile(_PATH_FOR_ANKI_FILE_);

ContainsItem

Anki test = new Anki(_NAME_OF_ANKI_PACKAGE_, new ApkgFile(_PATH_TO_APKG_FILE_));

// Be careful, keep the same fields !
var item = test.CreateAnkiItem(("Fork", "El tenedor", "La fourchette");

if (test.ContainsItem(ankiItem) == false) // will not add if the card is entirely the same (same fields' value)
    test.AddItem(ankiItem);

test.CreateApkgFile(_PATH_FOR_ANKI_FILE_);

ContainsItem with lambda

Anki test = new Anki(_NAME_OF_ANKI_PACKAGE_, new ApkgFile(_PATH_TO_APKG_FILE_));

var item = test.CreateAnkiItem("Hello", "Bonjour");

if (test.ContainsItem(x => { return Equals(item["FrontSide"], x["FrontSide"]); }) == false) // will not add if front of the card already exists
    test.AddItem(item);

test.CreateApkgFile(_PATH_FOR_ANKI_FILE_);

Generate Audio with MediaInfo

MediaInfo info = new MediaInfo()
{
    cultureInfo = new System.Globalization.CultureInfo(_CULTURE_INFO_STRING_),
    field = _FIELD_IN_WHICH_THE_AUDIO_WILL_BE_PLAYED_
};

Anki ankiObject = new Anki(_NAME_OF_ANKI_PACKAGE_, info);

...

Audio quality

The current audio has a samples per second of 8000, 16 bits per sample and is in mono channel. If you would like to change it you can do it like this (be aware that the quality quickly increase or decrease the size of your deck):

MediaInfo info = new MediaInfo()
{
    cultureInfo = new System.Globalization.CultureInfo(_CULTURE_INFO_STRING_),
    field = _FIELD_IN_WHICH_THE_AUDIO_WILL_BE_PLAYED_,
	audioFormat = new SpeechAudioFormatInfo(_SAMPLES_PER_SECOND_, _BITS_PER_SAMPLE_, _AUDIO_CHANNEL_)
};

Anki ankiObject = new Anki(_NAME_OF_ANKI_PACKAGE_, info);

...

Hint fields

Anki test = new Anki(_NAME_OF_ANKI_PACKAGE_);

test.SetFields("Front", "hint:Hint", "Back");
test.SetFormat("{0} - {1} \\n<hr id=answer(.*?)>\\n {2}");

test.AddItem("好的", "ok", "d'accord");

test.CreateApkgFile(_PATH_FOR_ANKI_FILE_);

Resources

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].