Use HTML to edit flash cards

Type: 
Plugin
Compatibility: 
Mnemosyne 1.x +
Status: 
Testing
Author: 
tyfj
Source: 

None

Description: 

HTML for flash card
===================

Use HTML as file format to edit flash cards. Then use a Python
script to convert it to "tab separated Q&A for each line, that MNEMOSYNE can
import". For the file MNEMOSYNE can import, see:
http://mnemosyne-proj.org/help/importing.php

File Format
-----------

The following is a frame for one flash card. Of course an HTML file can
contain more than one flash card.

>DIV CLASS="flashcard">
<DIV CLASS="front">
The question is ... made up of lot html tags in any html file format
</DIV>
<DIV CLASS="back">
The answers is ... this html contents, it has many html tags ...
</DIV>
</DIV>

Put the contents of "Question" into the "DIV" with ``CLASS="front"``.
Put the contents of "Answer" into the "DIV" with ``CLASS="back"``. One "DIV"
with CLASS="flashcard" will contains only one flash card.

Note, beside and inside the above structure, you can use any HTML tag as
MNEMOSYNE accepts it.

You can edit it as a real HTML file, as long as you put each card inside:

Usage
-----

After you create the HTML file, use the following command to convert it to what
MNEMOSYNE can import:

./html2cvs html_flash_card.html

Read/Edit HTML will be easy, comparing to edit "plain text files where each
line contains a question/answer pair separated by a tab". Because lot's tools
help we do HTML editing.

Example from a real file
------------------------


<!-- This is an example HTML flash card file : -->
<DIV CLASS="flashcard">
<DIV CLASS="front">
Mnemosyn Importing cards <br />
Plain text and Microsoft Office (Word and Excel)
</DIV>

<DIV CLASS="back">
Mnemosyne can import plain text files where each line contains a
question/answer pair separated by a tab. So e.g. if you have such a list
in Word, save it as plain text (*.txt), choose 'other encoding - Unicode
(UTF-8)' if your data contains foreign characters, and then you get a file
which you can import in Mnemosyne if you choose the 'Text with tab
separated Q/A' format.
<p> The same goes for Excel using 'save as', 'tab delimited (txt)'. However,
Excel's unicode text format is not the standard UTF-8, so this only works
for latin characters.
</p>
</DIV>
</DIV>

<DIV CLASS="flashcard">
<DIV CLASS="front">
Mnemosyn Importing cards <br />
OpenOffice Calc
</DIV>
<DIV CLASS="back">
Choose File-> Save as and select csv as the format. Then click on the box
that says edit filter options and choose utf-8 as the character set, tab
as the field delimiter, and clear as the text delimiter. It works
perfectly with unicode (a major advantage over Excel!).
</DIV>
</DIV>

Install
-------

To use it, make a directory, put the zip file in, unzip it,
the following cmd is for linux (ubuntu) as example:

mkdir /path/to/my_working_dir
cd /path/to/my_working_dir
mv /path/to/html2cvs.zip .
unzip html2cvs.zip

Then you can edit you HTML flash card file (for example: html_flash_card.html)
in the /path/to/my_working_dir/, after that, use this:

./html2cvs html_flash_card.html

You can then import the file: html_flash_card.html.tab.txt
It's all, hope it can help.

AttachmentSize
html2cvs.zip70.7 KB