Discussion:
How to generate a new XML file for Mnemosyne
Huafei Zhao
2013-11-13 03:33:19 UTC
Permalink
*Hello !I really like this software ,so i want to give up my last
one(YoudaoDict from China),I am now learning Japanese and need to remember
a lot of words,I hope this software can help me.To understand how the XML
file is constructed .I added two words to cards with two tags by hand.Then
exported them with a XML file,like this :*
<xml>
<openSM2sync number_of_entries="9"><log type="10"
o_id="RNO2Ddjb1QcwoBJC4wV6bZ"><name>äž­æ–‡</name></log>
<log type="10" o_id="VrjgHsDPXtYiSKf1wtId3x"><name>英文</name></log>
<log type="10" o_id="bOtypsl1W1MtC0T3x8O3At"><name>日本語</name></log>
<log type="16"
o_id="pYmC8R1KuxdF2Uiax0IMYF"><f>LAOZHAO</f><n>我的名字</n><m_1>老趙</m_1><p_1>zhf</p_1></log>
<log type="16"
o_id="JMbVJH4Eth040EMMW5MrAb"><f>日本語</f><n>名詞</n><m_1>日語</m_1><p_1>nihongo</p_1></log>
<log card_t="3" fact_v="3.1" e="2.5" gr="-1"
tags="RNO2Ddjb1QcwoBJC4wV6bZ,VrjgHsDPXtYiSKf1wtId3x" rt_rp_l="0" lps="0"
l_rp="-1" n_rp="-1" ac_rp_l="0" rt_rp="0" ac_rp="0" type="6"
o_id="RngaUJlR31s0OJZ4b7Uz2u" fact="pYmC8R1KuxdF2Uiax0IMYF"></log>
<log card_t="3" fact_v="3.2" e="2.5" gr="-1"
tags="RNO2Ddjb1QcwoBJC4wV6bZ,VrjgHsDPXtYiSKf1wtId3x" rt_rp_l="0" lps="0"
l_rp="-1" n_rp="-1" ac_rp_l="0" rt_rp="0" ac_rp="0" type="6"
o_id="aGeEVoFKPR1ayrEqPFrJvb" fact="pYmC8R1KuxdF2Uiax0IMYF"></log>
<log card_t="3" fact_v="3.1" e="2.5" gr="-1" tags="bOtypsl1W1MtC0T3x8O3At"
rt_rp_l="0" lps="0" l_rp="-1" n_rp="-1" ac_rp_l="0" rt_rp="0" ac_rp="0"
type="6" o_id="5lhOCMBJNYganauXwY7wCz" fact="JMbVJH4Eth040EMMW5MrAb"></log>
<log card_t="3" fact_v="3.2" e="2.5" gr="-1" tags="bOtypsl1W1MtC0T3x8O3At"
rt_rp_l="0" lps="0" l_rp="-1" n_rp="-1" ac_rp_l="0" rt_rp="0" ac_rp="0"
type="6" o_id="AP5ER7purjA77DaeDydkZS" fact="JMbVJH4Eth040EMMW5MrAb"></log>
</openSM2sync>
</code>
*but i cann't understand what the <log card_t="" ...>...</log> means.now I
want to generate a XML file with my own XML file by java or other language
.*
*Below is my XML file,and i think this type of file may more userful and
need less space,*
<xml>
<?xml version="1.0" encoding="utf-8"?>

<wordbook>
<item>
<word>日本人</word>
<trans>日本人 [词性名词]</trans>
<phonetic>にほんじん |(声调)</phonetic>
<tags>标日初级</tags>
<progress>6</progress>
</item>
<item>
<word>韓囜人</word>
<trans>韩囜人 [词性名词]</trans>
<phonetic>かんこくじん |(声调)</phonetic>
<tags>标日初级</tags>
<progress>6</progress>
</item>
</wordbook>

<xml>
</code>

*If you know what the above means ,please tell me or help me transfer
it.The attachment file is what i want to transfer. Thanks a lot!*
--
You received this message because you are subscribed to the Google Groups "mnemosyne-proj-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mnemosyne-proj-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To post to this group, send email to mnemosyne-proj-users-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/mnemosyne-proj-users/c102039f-bfa3-4426-b164-83bbf3a6d091%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Peter Bienstman
2013-11-13 07:43:19 UTC
Permalink
X-Received: by 10.180.83.168 with SMTP id r8mr261011wiy.19.1384328605591;
Tue, 12 Nov 2013 23:43:25 -0800 (PST)
X-BeenThere: mnemosyne-proj-users-/***@public.gmane.org
Received: by 10.180.91.135 with SMTP id ce7ls497969wib.17.canary; Tue, 12 Nov
2013 23:43:23 -0800 (PST)
X-Received: by 10.14.105.8 with SMTP id j8mr7147125eeg.2.1384328603604;
Tue, 12 Nov 2013 23:43:23 -0800 (PST)
Received: from smtp2.ugent.be (smtp2.ugent.be. [157.193.49.126])
by gmr-mx.google.com with ESMTP id p14si395347wiw.3.2013.11.12.23.43.23
for <mnemosyne-proj-users-/***@public.gmane.org>;
Tue, 12 Nov 2013 23:43:23 -0800 (PST)
Received-SPF: pass (google.com: best guess record for domain of Peter.Bienstman-***@public.gmane.org designates 157.193.49.126 as permitted sender) client-ip7.193.49.126;
Received: from localhost (mcheck3.ugent.be [157.193.71.89])
by smtp2.ugent.be (Postfix) with ESMTP id 6A1E112C37A
for <mnemosyne-proj-users-/***@public.gmane.org>; Wed, 13 Nov 2013 08:43:23 +0100 (CET)
X-Virus-Scanned: by UGent DICT
Received: from smtp2.ugent.be ([IPv6:::ffff:157.193.49.126])
by localhost (mcheck3.UGent.be [::ffff:157.193.43.11]) (amavisd-new, port 10024)
with ESMTP id QWH-1-74KFQ2
for <mnemosyne-proj-users-/***@public.gmane.org>;
Wed, 13 Nov 2013 08:43:19 +0100 (CET)
Received: from lionel.ugent.be (lionel.ugent.be [157.193.47.118])
by smtp2.ugent.be (Postfix) with ESMTP id 919B412C160
for <mnemosyne-proj-users-/***@public.gmane.org>; Wed, 13 Nov 2013 08:43:19 +0100 (CET)
Received: from localhost (localhost [127.0.0.1])
by lionel.ugent.be (Postfix) with ESMTP id 7A0B795823
for <mnemosyne-proj-users-/***@public.gmane.org>; Wed, 13 Nov 2013 08:43:19 +0100 (CET)
Received: from pcshulgi.intec.ugent.be (pcshulgi.intec.ugent.be
[157.193.172.205]) by webmail.ugent.be (Horde Framework) with HTTP; Wed, 13
Nov 2013 08:43:19 +0100
In-Reply-To: <c102039f-bfa3-4426-b164-83bbf3a6d091-/***@public.gmane.org>
User-Agent: Internet Messaging Program (IMP) H4 (5.0.23)
X-Miltered: at jchkm1 with ID 52832D97.001 by Joe's j-chkmail (http://helpdesk.ugent.be/email/)!
X-j-chkmail-Enveloppe: 52832D97.001 from lionel.ugent.be/lionel.ugent.be/157.193.47.118/lionel.ugent.be/<Peter.Bienstman-Uy3+***@public.gmane.org>
X-j-chkmail-Score: MSGID : 52832D97.001 on smtp2.ugent.be : j-chkmail score : . : R=. U=. O=. B=0.000 -> S=0.000
X-j-chkmail-Status: Ham
X-Original-Sender: peter.bienstman-***@public.gmane.org
X-Original-Authentication-Results: gmr-mx.google.com; spf=pass
(google.com: best guess record for domain of Peter.Bienstman-***@public.gmane.org
designates 157.193.49.126 as permitted sender) smtp.mail=Peter.Bienstman-***@public.gmane.org
Precedence: list
Mailing-list: list mnemosyne-proj-users-/***@public.gmane.org; contact mnemosyne-proj-users+owners-/***@public.gmane.org
List-ID: <mnemosyne-proj-users.googlegroups.com>
X-Google-Group-Id: 264471257882
List-Post: <http://groups.google.com/group/mnemosyne-proj-users/post>, <mailto:mnemosyne-proj-users-/***@public.gmane.org>
List-Help: <http://groups.google.com/support/>, <mailto:mnemosyne-proj-users+help-/***@public.gmane.org>
List-Archive: <http://groups.google.com/group/mnemosyne-proj-users>
Sender: mnemosyne-proj-users-/***@public.gmane.org
List-Subscribe: <http://groups.google.com/group/mnemosyne-proj-users/subscribe>,
<mailto:mnemosyne-proj-users+subscribe-/***@public.gmane.org>
List-Unsubscribe: <http://groups.google.com/group/mnemosyne-proj-users/subscribe>,
<mailto:googlegroups-manage+264471257882+unsubscribe-/***@public.gmane.org>
Content-Disposition: inline
Archived-At: <http://permalink.gmane.org/gmane.comp.tools.mnemosyne.user/7487>

Hi,

I really recommend against creating xml manually, otherwise you risk
of missing stuff.

It's better and simpler to use the libmnemosyne API to add a card. See e.g.

http://bazaar.launchpad.net/~peter-bienstman/mnemosyne-proj/trunk/view/head:/mnemosyne/mnemosyne/example_scripts/add_card.py

Alternatively, you can write an importer for YoudaoDict. See as
inspiration here:

http://bazaar.launchpad.net/~peter-bienstman/mnemosyne-proj/trunk/view/head:/mnemosyne/mnemosyne/libmnemosyne/file_formats/cuecard_wcu.py

Good luck!

Peter
Post by Huafei Zhao
*Hello !I really like this software ,so i want to give up my last
one(YoudaoDict from China),I am now learning Japanese and need to remember
a lot of words,I hope this software can help me.To understand how the XML
file is constructed .I added two words to cards with two tags by hand.Then
exported them with a XML file,like this :*
<xml>
<openSM2sync number_of_entries="9"><log type="10"
o_id="RNO2Ddjb1QcwoBJC4wV6bZ"><name>中文</name></log>
<log type="10" o_id="VrjgHsDPXtYiSKf1wtId3x"><name>英文</name></log>
<log type="10" o_id="bOtypsl1W1MtC0T3x8O3At"><name>日本語</name></log>
<log type="16"
o_id="pYmC8R1KuxdF2Uiax0IMYF"><f>LAOZHAO</f><n>我的名字</n><m_1>老趙</m_1><p_1>zhf</p_1></log>
<log type="16"
o_id="JMbVJH4Eth040EMMW5MrAb"><f>日本語</f><n>名詞</n><m_1>日語</m_1><p_1>nihongo</p_1></log>
<log card_t="3" fact_v="3.1" e="2.5" gr="-1"
tags="RNO2Ddjb1QcwoBJC4wV6bZ,VrjgHsDPXtYiSKf1wtId3x" rt_rp_l="0" lps="0"
l_rp="-1" n_rp="-1" ac_rp_l="0" rt_rp="0" ac_rp="0" type="6"
o_id="RngaUJlR31s0OJZ4b7Uz2u" fact="pYmC8R1KuxdF2Uiax0IMYF"></log>
<log card_t="3" fact_v="3.2" e="2.5" gr="-1"
tags="RNO2Ddjb1QcwoBJC4wV6bZ,VrjgHsDPXtYiSKf1wtId3x" rt_rp_l="0" lps="0"
l_rp="-1" n_rp="-1" ac_rp_l="0" rt_rp="0" ac_rp="0" type="6"
o_id="aGeEVoFKPR1ayrEqPFrJvb" fact="pYmC8R1KuxdF2Uiax0IMYF"></log>
<log card_t="3" fact_v="3.1" e="2.5" gr="-1" tags="bOtypsl1W1MtC0T3x8O3At"
rt_rp_l="0" lps="0" l_rp="-1" n_rp="-1" ac_rp_l="0" rt_rp="0" ac_rp="0"
type="6" o_id="5lhOCMBJNYganauXwY7wCz" fact="JMbVJH4Eth040EMMW5MrAb"></log>
<log card_t="3" fact_v="3.2" e="2.5" gr="-1" tags="bOtypsl1W1MtC0T3x8O3At"
rt_rp_l="0" lps="0" l_rp="-1" n_rp="-1" ac_rp_l="0" rt_rp="0" ac_rp="0"
type="6" o_id="AP5ER7purjA77DaeDydkZS" fact="JMbVJH4Eth040EMMW5MrAb"></log>
</openSM2sync>
</code>
*but i cann't understand what the <log card_t="" ...>...</log> means.now I
want to generate a XML file with my own XML file by java or other language
.*
*Below is my XML file,and i think this type of file may more userful and
need less space,*
<xml>
<?xml version="1.0" encoding="utf-8"?>
<wordbook>
<item>
<word>日本人</word>
<trans>日本人 [词性:名词]</trans>
<phonetic>にほんじん |(声调:)</phonetic>
<tags>标日初级</tags>
<progress>6</progress>
</item>
<item>
<word>韓国人</word>
<trans>韩国人 [词性:名词]</trans>
<phonetic>かんこくじん |(声调:)</phonetic>
<tags>标日初级</tags>
<progress>6</progress>
</item>
</wordbook>
<xml>
</code>
*If you know what the above means ,please tell me or help me transfer
it.The attachment file is what i want to transfer. Thanks a lot!*
--
You received this message because you are subscribed to the Google
Groups "mnemosyne-proj-users" group.
To unsubscribe from this group and stop receiving emails from it,
To view this discussion on the web visit
https://groups.google.com/d/msgid/mnemosyne-proj-users/c102039f-bfa3-4426-b164-83bbf3a6d091%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "mnemosyne-proj-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mnemosyne-proj-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To post to this group, send email to mnemosyne-proj-users-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/mnemosyne-proj-users/20131113084319.Horde.9EMkH1DIVCdSgy2XRLyHPOA%40webmail.ugent.be.
For more options, visit https://groups.google.com/groups/opt_out.
Huafei Zhao
2013-11-13 11:06:20 UTC
Permalink
Hi ,Peter!
Thanks a lot for your solution.I will try to transfer it with python.

Zhao Huafei

圚 2013幎11月13日星期䞉UTC+8䞋午3时43分19秒Peter Bienstman写道
Post by Peter Bienstman
Hi,
I really recommend against creating xml manually, otherwise you risk
of missing stuff.
It's better and simpler to use the libmnemosyne API to add a card. See e.g.
http://bazaar.launchpad.net/~peter-bienstman/mnemosyne-proj/trunk/view/head:/mnemosyne/mnemosyne/example_scripts/add_card.py
Alternatively, you can write an importer for YoudaoDict. See as
http://bazaar.launchpad.net/~peter-bienstman/mnemosyne-proj/trunk/view/head:/mnemosyne/mnemosyne/libmnemosyne/file_formats/cuecard_wcu.py
Good luck!
Peter
Post by Huafei Zhao
*Hello !I really like this software ,so i want to give up my last
one(YoudaoDict from China),I am now learning Japanese and need to
remember
Post by Huafei Zhao
a lot of words,I hope this software can help me.To understand how the
XML
Post by Huafei Zhao
file is constructed .I added two words to cards with two tags by
hand.Then
Post by Huafei Zhao
exported them with a XML file,like this :*
<xml>
<openSM2sync number_of_entries="9"><log type="10"
o_id="RNO2Ddjb1QcwoBJC4wV6bZ"><name>äž­æ–‡</name></log>
<log type="10" o_id="VrjgHsDPXtYiSKf1wtId3x"><name>英文</name></log>
<log type="10" o_id="bOtypsl1W1MtC0T3x8O3At"><name>日本語</name></log>
<log type="16"
o_id="pYmC8R1KuxdF2Uiax0IMYF"><f>LAOZHAO</f><n>我的名字</n><m_1>老趙</m_1><p_1>zhf</p_1></log>
Post by Huafei Zhao
<log type="16"
o_id="JMbVJH4Eth040EMMW5MrAb"><f>日本語</f><n>名詞</n><m_1>日語</m_1><p_1>nihongo</p_1></log>
Post by Huafei Zhao
<log card_t="3" fact_v="3.1" e="2.5" gr="-1"
tags="RNO2Ddjb1QcwoBJC4wV6bZ,VrjgHsDPXtYiSKf1wtId3x" rt_rp_l="0" lps="0"
l_rp="-1" n_rp="-1" ac_rp_l="0" rt_rp="0" ac_rp="0" type="6"
o_id="RngaUJlR31s0OJZ4b7Uz2u" fact="pYmC8R1KuxdF2Uiax0IMYF"></log>
<log card_t="3" fact_v="3.2" e="2.5" gr="-1"
tags="RNO2Ddjb1QcwoBJC4wV6bZ,VrjgHsDPXtYiSKf1wtId3x" rt_rp_l="0" lps="0"
l_rp="-1" n_rp="-1" ac_rp_l="0" rt_rp="0" ac_rp="0" type="6"
o_id="aGeEVoFKPR1ayrEqPFrJvb" fact="pYmC8R1KuxdF2Uiax0IMYF"></log>
<log card_t="3" fact_v="3.1" e="2.5" gr="-1"
tags="bOtypsl1W1MtC0T3x8O3At"
Post by Huafei Zhao
rt_rp_l="0" lps="0" l_rp="-1" n_rp="-1" ac_rp_l="0" rt_rp="0" ac_rp="0"
type="6" o_id="5lhOCMBJNYganauXwY7wCz"
fact="JMbVJH4Eth040EMMW5MrAb"></log>
Post by Huafei Zhao
<log card_t="3" fact_v="3.2" e="2.5" gr="-1"
tags="bOtypsl1W1MtC0T3x8O3At"
Post by Huafei Zhao
rt_rp_l="0" lps="0" l_rp="-1" n_rp="-1" ac_rp_l="0" rt_rp="0" ac_rp="0"
type="6" o_id="AP5ER7purjA77DaeDydkZS"
fact="JMbVJH4Eth040EMMW5MrAb"></log>
Post by Huafei Zhao
</openSM2sync>
</code>
*but i cann't understand what the <log card_t="" ...>...</log> means.now
I
Post by Huafei Zhao
want to generate a XML file with my own XML file by java or other
language
Post by Huafei Zhao
.*
*Below is my XML file,and i think this type of file may more userful and
need less space,*
<xml>
<?xml version="1.0" encoding="utf-8"?>
<wordbook>
<item>
<word>日本人</word>
<trans>日本人 [词性名词]</trans>
<phonetic>にほんじん |(声调)</phonetic>
<tags>标日初级</tags>
<progress>6</progress>
</item>
<item>
<word>韓囜人</word>
<trans>韩囜人 [词性名词]</trans>
<phonetic>かんこくじん |(声调)</phonetic>
<tags>标日初级</tags>
<progress>6</progress>
</item>
</wordbook>
<xml>
</code>
*If you know what the above means ,please tell me or help me transfer
it.The attachment file is what i want to transfer. Thanks a lot!*
--
You received this message because you are subscribed to the Google
Groups "mnemosyne-proj-users" group.
To unsubscribe from this group and stop receiving emails from it,
To view this discussion on the web visit
https://groups.google.com/d/msgid/mnemosyne-proj-users/c102039f-bfa3-4426-b164-83bbf3a6d091%40googlegroups.com.
Post by Huafei Zhao
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "mnemosyne-proj-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mnemosyne-proj-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To post to this group, send email to mnemosyne-proj-users-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/mnemosyne-proj-users/92e71052-51a7-410e-a87e-fcef6b9ab1b2%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Loading...