Anki Tutorial 1 - Create First Deck


This is the first tutorial. It will show you how to create your first Anki cards Deck dedicated to the study of Middle Egyptian although the instructions are generic and may be applied to any target.
You will learn how to create personalized layouts with multiple templates by the means of importing all data from external files so that, once you have learned, you can automate your process and quickly produce a large amount of cards with a minimum effort.
If you encounter any problem during the tutorial, you can download the file needed directly from this page, and therefore examine what the result of each step should be. Eventually you will want to download the final Anki deck and compare it to your outcome.
This tutorial was tested on a Linux Ubuntu pc but the steps are the same for a Windows pc thus you shouldn't find any difference.
I tried to be as accurate as possible but let me know if you find any mistake and I will be happy to correct them.
I hope someone will find this tutorial useful, therefore, please, let me know.
My email is in the footer at the end of the page.

 

Task


Before starting the job, you must have clear which task you want to achieve: my task is to create an Anki deck with a set of cards to practice with monoliteral signs and particularly I want to:
* Recognize each sign and learn his phonetical values and MdC code
* Learn (conventional) alphabetical order of signs (with the help of Karen's mnemonics)


1st step - Identify necessary information


First step you should identify the information needed in each card. For my task I need these data:
* the sign,
* the transliteration,
* the mdc code of sign,
* the mnemonics phrase take from Karen's filastrocca,
* previuos sign
* next sign

2nd step - Plan Card Layout


You have to take a sheet of paper and a pen and imagine the layout of your cards. I want more than one layout since sometimes I want to start from sign and other times I want to start from transliteration. For each template you have to define the layout of front and back side of cards. Template A and Template B will be my cards layouts.

Cards Layout


3rd step - Produce Anki Inport File



By observing the templates above, you may see that I need some text data, which I can collect from books, but I also need an image of the sign.
In this step I assume I already have the set of images I need. Each image is a file whose name is the mdc code of the sign followed by the .png extension (we'll see in step n. 4 how to produce this set of images). This procedure can be generalized for any kind of media you need in your card (supported in Anki as image or sound) in this phase all you need is the name of the files containing the media. Now I have to produce a text file with a .csv extension (Comma Separeted Value) containing all the data. Therefore I opened OpenOffice Spreasheet and fill information in a sheet as you can see in the picture below. As you can see, the content of text data is typed directly in the cells of the sheet, but for media data (images or sound) I have typed only the name of the file containing the image or sound. Note that the content of column C is the same of the one in column D, they differ by the font: in column C I used the transliteration font. Also note that I have seven columns but I said that only six data are needed. There is, in fact, an extra column (column B), used for producing column E which contains the name of the image files, just adding “.png” suffix.
Don't worry about this or any other extra column: you can discard them when importing in Anki.
Here you can download the spreasheet in OpenOffice file format or Microsoft Excel file format.

spreadsheet

Now save your file with a .csv extension. From menu File->Save as and choose type of file .CSV

save csv

In the following dialog window choose: semicolon (;) as field delimiter and nothing as text delimiter.

csv parameters

Here you can download tutorial1.csv file.

4th step - Generate Image Files


Now we have to create the image files. This is an easy task if we can use the mdc2png utility. We only need a text file with the mdc syntax of the hieroglyphic inscriptions. Write the code of any sign in a new paragraph. Each row will produce an image. For this purpose, we just have to copy column B of the spreadsheet in a text editor and save the file, for example as tutorial1.txt.
Here you can download tutorial1.txt file.

txt file

Then you can use this command (read mdc2png instructions to learn more about mdc2png):

java mdc2png 30 -f monoliterals.txt

Now that you have all image files ready,  we can start Anki and begin to produce our first Anki Desk.
Here you can download a zipped file containing all the images.

5th step - Create Anki Desk Set and  Define Layouts


Now we have all the necessary ingredients and we can start to work in Anki. Open Anki and create a new file. Choose:

File->New  ( CTRL+N )

When I use this syntax I mean that you have to select the voice "File" in the application's menu and then select the voice "New”.
The content in round brackets shows the shortcut for the very same action: in this case, if you want to create a new file, once you have opend Anki, you can press simultaneously the key Control (CTRL) with the key N. Modify the features of the new file. Choose:

Edit->Add Items ( CTRL+D )

Now you have the "add item" window opened. Click the button with an English Key near the Model combo (the one with the red border, in the image below).

add item

English Key button opens the "models window" where we'll find one only model available "Basic" one. Since we want to create a new Model, click the "Add" button.

Models

The "Add models" window will be opened. When you add a model you don't have to start from the scratch, since every new model is the copy of an existing one which will be modified later. You simply have to choose the model from which you want to start. The list of the available models may vary from one instance to another since it depends on the models you have installed or already created.
For our tutorial you have to choose the Basic model and click the button "OK".

add model

Now you have the copy of the Basic Model and you can start to modify it until it meets your needs. Press the button “Edit”

edit model

In the tab "General & fields", you can now edit all the details of your new model. Let's start with Name and Tag, give it a name corresponding to your contents and a similar tag, then edit the fields of the model. You have to add a field for each information you want to see in the card, the same information you prepared in your csv file. Start adding your fields and then delete predefined fields (front and back).

general

This may be your final result, a new name and tag and new six Fields (sign, transliteration, mdc, memo, previous and next). For each field you can set the following options: if the fields may be empty and if duplicates are allowed, this means that two or more cards can have the same values in this field. Anyway, everything have to be set according to the content you want to show in your cards.
For this tutorial the options should be set on prevent duplicates and empty entries.

Model properties

Now you are ready to move on the second tab "Card Templates". In order to define the layouts of your cards, remember what you have decided in step 2 of this tutorial,
Each template you want to create it's a row in the "Card Templates" box. For each template below you have to define which fields are shown in the front (Question) and which in the back (Answer).
In every box you can type freely what you want, but everything you'll type there, will be shown exactly as you typed it. Therefore in order to let the card display the content of a field, you'll have to use a specific syntax:

%(name_of_field)s

where name_of_field is one of the fields you defined before.

This is true for all text fields but when in a field you want to display a media, like in our example where we have an image file for the sign, the field "sign" should contain the name of the image file and we have to use a different syntax, the one showed below:

For an Image: <img src="%(text:name_of_field)s">
For a sound: [sound:%(text:name_of_field)s]

This will instruct Anki not to show the file name but to read and show the content of external file.

Cards Templates


You have now defined "Forward" Template, your Template A, so rename it accordingly, and do the same for "Reverse", your Template B", which is similar to Template A with the only difference that the Question box should display a transliteration while the image of the sign should be displayed in the Answer box. The second template by default it's Disabled remember to enable it clicking on the proper button.

Template_b

Now we can close the "Model Properties" window, "Deck Properties" windows and also "Add Items" window. The templates are ready and you can start to import data from your csv file.
Now from the Anki application's menu choose:

File->Import

and choose the .csv file you saved at step number 3.

Import

Let's examine the import window starting from top: you can see the name of the .csv file you are importing, the Model used for importing, the one you created (monoliterals) and the Templates that will be used (Template A and B). Then we have the Field mapping section, where for each field of the .csv file (column of your spreadsheet) you decide which field of the Model will contain the several values. In some cases like Field 2 you can decide that the value will be discarded/ignored and not imported. When all the mapping are done correctly you can press the button "Import".
The import will start and you will see a windows with the result or some error message if something goes wrong. Note the number of facts imported must correspond to the rows of your .csv file.

Import Ok

Now that you imported the data, look at "New Total" you should see a number that is the double of your facts (that is csv rows) since you have two templates of card enabled and each fact imported produces one card for each template, 25 x 2 = 50. Your values must match your data. It's time for saving our job. Choose:

File->Save as

and give a name to the Desk, for example "tutorial1", the name on the disk will be tutorial1.anki

To Save


Now if we start reviewing the cards we can see that something isn't working properly, but it's only because we didn't completed your job.
As we can see, there are two issues: the transliteration isn't showed using the right font and no image is showed for the signs.

Card 1

Let's fix the first problem, the font of transliteration, from the Anki application's menu choose:

Settings -> Fonts and Colours ....

From this window you can associate a specific font or size for each field of model.
You must change the current font for the transliteration field. Notice than on the right in preview panel you can see an example of your setting, applied to the name of the field, just to have an idea of how it will work. Close the window. From this window you can associate a specific font or size for each field of model, you really have to change this for transliteration field but you can do what you prefer, notice than on the right in preview panel you see an exmple of your setting, applied to name of field, just to have an idea of how it will result. Close the window.

fonts

Let's fix the problem with the images. Close Anki application and go where you saved your anki file. Assuming that the file was named tutorial1.anki, you have to create a folder named tutorial1.media, the folder must have exactly the same name of your anki file with a ".media" suffix. Move in this folder all the images you created at step number 4.

media


Eventually we are done! Start again Anki and everything should be OK. Now practice and enjoy your new desk.

end

Here you can download a zipped file containg the final Anki Deck.