Format for imports

paulmcl

Member
I'm sure this must already be here somewhere, but I can't find it. What format files (e.g. csv, tsv, pdf...) can be used for importing flashcards, in particular for importing them from flashcardexchange?

Paul
 

mikelove

皇帝
Staff member
paulmcl said:
I'm sure this must already be here somewhere, but I can't find it. What format files (e.g. csv, tsv, pdf...) can be used for importing flashcards, in particular for importing them from flashcardexchange?

Tab-separated values - format is:

headword<tab>pinyin<tab>definition

If you can get them in an excel spreadsheet, it should be pretty easy to rearrange it into that format and export it as a tab-delimited text file.
 

Azimuth

秀才
My main vocab list is in Numbers on OSX, which only exports files as comma separated values, not tab separated. It seems like I should be able to run a find-and-replace on the commas and turn them into tabs (as long as I haven't used any commas in the vocab list itself) but it would be much easier if pleco supported .csv files. Any chance of this in an update (or a better workaround)?
 

mikelove

皇帝
Staff member
Azimuth said:
My main vocab list is in Numbers on OSX, which only exports files as comma separated values, not tab separated. It seems like I should be able to run a find-and-replace on the commas and turn them into tabs (as long as I haven't used any commas in the vocab list itself) but it would be much easier if pleco supported .csv files. Any chance of this in an update (or a better workaround)?

Not in our current plans, I suppose we could consider it but in general I'm very wary of fragmenting our file formats - .csv is also dangerous because then we need to deal with the weird quotation mark policies / number conversions of Excel and such. (jun1 being interpreted as a date, e.g.)

If you download the free TextWrangler text editor app, the Grep find-and-replace option in that should make it easy to replace just the commas you want to and no others; assuming there aren't any headwords in your character or pinyin sections, you'd run this find-and-replace twice to insert your two tabs:

^([^\r\n,]*),
to
\1\t

You could strip out any added quotation marks with:

^"
to
(blank)

"$
to
(blank)

"\t
to
\t

\t"
to
\t

(these could probably be collapsed into a single find-and-replace but I'm a bit rusty on my regular expressions)
 

Azimuth

秀才
Fair enough, and thanks for the pointer to TextWrangler.

I've also found that if you copy-paste a Numbers spreadsheet into Pages, and then export as plain text, pleco can use the resulting file.

Am I right in thinking that at the moment there's no way to add custom information (hints, mnemonics) to flashcards either as extra custom fields or as additions to existing fields other than Definition?
 

mikelove

皇帝
Staff member
Azimuth said:
Am I right in thinking that at the moment there's no way to add custom information (hints, mnemonics) to flashcards either as extra custom fields or as additions to existing fields other than Definition?

Correct, but it's a top priority for our next big flashcard redesign.
 
Top