Create Anki import file?

aeriph
December 29, 2009, 12:17 PM posted in General Discussion

I think it'd be great if WLCP could generate a text file formatted for import into Anki. It'd just need to have [sentence],[pinyin],[english],[audio url] on each line, or something similarly formatted. This would save me a lot of time manually importing to Anki.

Profile picture
RJ
December 29, 2009, 06:18 PM

There is a function within cpod that will export vocab to anki. John describes it here:

http://blog.chinesepod.com/2009/03/18/new-export-functionality-for-chinesepod/

 Are you wanting to import entire sentences?

Profile picture
aeriph
December 29, 2009, 06:51 PM

Yeah the CPod anki export just exports vocab, I want to generate a file of lesson dialogue, extension and vocab with all the audio for importing into Anki. I'm sure WLCP could be made to parse a file like that

Profile picture
John
December 30, 2009, 01:59 AM

aeriph,

Request noted!  It wouldn't be hard to implement; the challenge would be to do it in such a way that the interface doesn't become overly clunky and confuse all the people that are never going to use it.

Please realize, though, that we're working on a lot of other tech projects already right now, including iPhone and Android apps, improved community section, testing, etc.

Profile picture
Tal
December 30, 2009, 03:35 AM

Well if it's that easy, maybe you could also get it to make a text file of dialogue, vocab, and expansion sentences which could be used in the Pleco document reader. I often make them manually but it's fiddly and takes up so much time. (The format would have to be UTF8).

I take it from your previous comment John that CPod is (partly?) responsible for maintaining this software? I didn't know that. It would be great if it could be improved, if the (very) longstanding imperfections could be ironed out, but I guess that's unlikely to happen if it has to compete with sexy Androids and iWhatevers.

Profile picture
andrew_c
December 30, 2009, 04:44 AM

Aeriph, This should be really straightforward to do by writing an xsl file to convert from wlcp-xml to this anki format.   I would be happy to implement this.  I know you gave the format above, but sometimes there can be slight nuances in the format, so could you please post a working example of such an Anki file (or email me, andrew.corrigan@gmail.com)?  

Tal, I don't know if it was you, but I remember someone posting about implementing Pleco document reader export.   I could do this too, Could you please post or email me  (andrew.corrigan@gmail.com) an example of such a file?

Profile picture
daniel70
December 30, 2009, 04:51 AM

Tal, I believe that John meant that he would consider adding audio to the CPod anki export, that rb referred to, rather than WLCP.

Profile picture
daniel70
December 30, 2009, 05:22 AM

Andrew, the anki input file is a tsv. On import, the user specifies how each column is to be interpreted. The file format that I use is:

intro-1-good-morning    早上    zǎoshang    morning    [sound:rec-1188871781625-0.mp3]

After this, I copy the mp3 files into the media folder, run the import, and then do an anki "check media database." I think anki can be set up to download the files from the server, but I just copy them from the wlcp folder. I don't know which columns aeriph wants, I mainly wanted to give you the format for the audio field.

Profile picture
Tal
December 30, 2009, 11:11 AM

Ah, OK Daniel, I see. File coming your way soon Andrew, (hope it helps!)

Profile picture
aeriph
January 03, 2010, 04:14 PM

yeah as daniel70 said, the formatting isn't too important as Anki can be quite versatile with the files it uses (e.g., any character can be recognised as a field divider).

Profile picture
andrew_c
January 03, 2010, 04:39 PM

hi guys,

I just want to add, I plan to do this, I'm just not sure when.