Batch import media for language learning

From SuperMemopedia
Jump to navigation Jump to search


From: {{{From}}}
Country: {{{Country}}}
Sent: {{{Sent}}}
Subject: How do I mass import media (pictures and mp3) to elements for language acquisition?

Question:

I am currently learning a foreign language.

I have a vocab list in Q&A format:

Q: vocab_1
A: Translation

Q: vocab_2
A: Translation

Q: vocab_3
A: Translation

I also have the following materials in a folder:

vocab_1_pronunciation.mp3
vocab_2_pronunciation.mp3
vocab_3_pronunciation.mp3
...

vocab_1_image.jpeg
vocab_2_image.jpeg
vocab_3_image.jpeg
...

My question is, how do I mass import all of these materials into SuperMemo? With the end result like the following:

Front: vocab_1
Back: translation with the corresponding image (vocab_1_image.jpeg) and mp3( vocab_1_pronunciation.mp3) in registry.

Thank you!

Answer:

You need to create an XML import file in the following form, and import it into a newly created collection with File : Import : XML Import

<SuperMemoCollection>
    <SuperMemoElement>
        <Type>Item</Type>
        <Content>
            <Question>vocab_1</Question>
            <Answer>translation</Answer>
            <Image>
                <URL>
                absolute path to vocab_1_image.jpeg on your disk
                </URL>
                <Name>vocab_1_image</Name>
                <Answer>T</Answer>
            </Image>
            <Sound>
                <Text>vocab_1_pronunciation</Text>
                <URL>
                absolute path to vocab_1_pronunciation.mp3 on your disk
                </URL>
                <Name>vocab_1_pronunciation</Name>
                <Answer>T</Answer>
            </Sound>
        </Content>
    </SuperMemoElement>
    <SuperMemoElement>
    ...
    </SuperMemoElement>
</SuperMemoCollection>


Update from Original poster

Thank you very much! It works perfectly!

However, the import report shows "Element does not have an ID number". Should it be of concern? What negative effect it might have?

Besides, what should the input in <Answer>T</Answer> be? Do I have to change it or leave it be?

Additional info

If anyone is wondering how to mass generate XML, Excel could do it. Just google XML in Google. Cheers!