dper / kanjiforanki

Takes a list of kanji and generates Anki flash cards for each them.
MIT License
11 stars 0 forks source link

Look up Anki input specs #2

Closed dper closed 10 years ago

dper commented 10 years ago

Find out what Anki can input reasonably.

Later the output will need to look like this.

dper commented 10 years ago

After this is done, do https://github.com/dper/KanjiForAnki/issues/3.

dper commented 10 years ago

The manual is here: http://ankisrs.net/docs/manual.html#importing.

Text files can be imported, but apparently line breaks can be fiddly. Here we will have many line breaks.

dper commented 10 years ago

Here is some relevant information from http://ankisrs.net/docs/manual.html#importing.

Any plain text file that contains fields separated by commas, semicolons or tabs can be imported into Anki, provided some conditions are met.

  • The files must be plain text (myfile.txt). Other formats like myfile.xls, myfile.rtf, myfile.doc must be saved as a plain text file first.
  • The files must be in UTF-8 format (see below)
  • Anki determines the number of fields in the file by looking at the first (non-commented) line. Any other lines in the file which don’t match this number will be ignored.
  • The first line also defines the separating character - if Anki finds a ; on the first line it will use that - if it finds a comma it’ll use that, etc.
dper commented 10 years ago

XML can be imported but documentation on how to do that easily is not easy to find. Text will work. I'll want to use HTML for line breaks, but I wanted to do that anyway.

Internally in Anki, each card can have many fields, and I think we will use a vertical bar to delineate them. In our case, we will only have two fields: the single kanji on the front and everything else on the back. If the user is unhappy with the layout of the cards or the material contained in them, they can tweak this code as desired.

dper commented 10 years ago

I think the format will look something like this:

FRONT | BACK

Or a short fake example...

木 | TREE<br />き、もく