dper / kanjiforanki

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

Use fields properly #10

Closed dper closed 10 years ago

dper commented 10 years ago

To use fields properly, the resultant Anki deck needs to have tab separated fields. Each of the following should be separated by a tab.

Each of those must not contain tabs, though they can use other spacing mechanisms. Though currently each of those is a div block, probably that should be changed to span, or removed entirely, because formatting should be done by the template.

dper commented 10 years ago

Prior to the import, I had to...

  1. Go to Tools / Manage Note Types....
  2. Create a new note type, "Kanji". Actually this is done using Add followed by Rename.
  3. Click on Fields and then make sure all of the needed fields are there.
dper commented 10 years ago

screenshot - 02082014 - 12 57 39 pm

dper commented 10 years ago

After that, I can import the data properly. The import screen should look like this. screenshot - 02082014 - 01 01 05 pm

dper commented 10 years ago

Where the word "Radical" was used, "Literal" should be used instead.

dper commented 10 years ago

We enter a bunch of style information. Here's a screenshot. screenshot - 02082014 - 01 10 56 pm

dper commented 10 years ago

In the Front Template box...

<span class="literal">{{Literal}}</span>
<span class="strokes">{{Strokes}}</span>
<span class="grade">{{Grade}}</span>

In the Styling box...

.card {
 font-family: arial;
 font-size: 20px;
 text-align: center;
 color: black;
 background-color: white;
}

.literal {
color: blue;
font-size: 150%;
}

.strokes {
float: left;
font-size: 50%;
color: #ff66ff;
}

.grade {
float: right;
font-size: 50%;
color: gray;
}

.meaning {
color: green;
}

.meanings {
color: #6699cc;
}

.onyomis {
color: orange;
font-size: 75%;
}

.kunyomis {
color: red;
font-size: 75%;
}

.examples {
font-size: 75%;
}

In the Back Template box...

{{FrontSide}}

<hr id=answer>

<div class="meaning">{{Meaning}}</div>
<div class="meanings">{{Meanings}}</div>
<div class="onyomis">{{Onyomis}}</div>
<div class="kunyomis">{{Kunyomis}}</div>
<div class="examples">{{Examples}}</div>
dper commented 10 years ago

Done.

(This is too tedious for your average user to handle. I don't yet know how to package this kind of stuff all in one file, but it would be nice to do, later. Anyway, it's not part of this issue.)