Hi all,
Sorry for the delayed response. It sounds to me like most of what Ken
wants might be covered by a future solution some of us discussed in
some brainstorm sessions at the recent conference in Thailand.
Anki has good support for custom "models", so any number of custom
fields should be doable in theory, but these models are non-
hierarchical and probably don't support repeating fields either.
Anyway, I'm hoping to build a simple prototype in Python that would
pull data into Anki from a LIFT file, including any relevant guids so
that one-way sync could hopefully update specific flashcard data later
on. (Collaboration from other programmers would be welcome.) So, the
user would either use WeSay or periodically export from FLEx to a LIFT
file (probably filtering down to a subset of entries prior to export),
and then run the one-way sync operation, which would pull in just the
relevant data, squashing it flat in the process (e.g. it would
probably concatenate the glosses from all senses into a single
"Glosses" field).
Ken, does this sound roughly like what you're wanting? I'm glad you
listed out the fields you need, because for practical reasons we'll
probably want some constraints as to what all can be imported into
Anki from LIFT. Otherwise, we wouldn't be able to provide very
meaningful pre-baked flashcard templates for the data. What you've
listed looks reasonable to me, although I'm not sure yet how feasible
the tags idea will be. (That is, your suggestion that fields such as
SemDom or GrammaticalCategory could be mapped into Anki's Tags field
is intriguing. But a few possible issues come to my mind, esp. if
doing a sync/update.)
Do any of you think we would ever need one-flashcard-per-sense, rather
than the one-flashcard-per-entry I described above? I'm hoping the
answer is No, especially since it would lead to ambiguous cards. (E.g.
"When I see or hear 'bank', which sense of 'bank' is it asking me
for?") But I do suspect it would be helpful in some future version to
support one-flashcard-per-example-sentence, probably using a second
custom model in Anki, essentially creating a second parallel set of
records within the same Anki deck. I wonder how useful this feature
would be... without it we'd be limited to only including one example
sentence bundle per entry (the first one, presumably). Maybe that's
enough?
Anyway, this is still early days. Maybe the Anki developer will give
us some input as well. I'm hoping to contact him now that we know more
about what we want.
BTW, regarding Anki's file format for storing the flashcard data, it
seems to be a SQLite database, from what I've read. So it's not XML,
and certainly not HTML (although the flashcard templates which display
the data are indeed designed using HTML). So, Python seems more
promising than XSLT in that regard, especially since Anki is written
in Python and supports plugins, though I need to learn more about what
those plugins can and can't do.
Jon
On Mar 5, 8:29 pm, Griz <
grizzly.ken...@gmail.com> wrote:
> Greg,
>
> What I would like is:
>
> Lexeme/Headword
> Gloss/Definition
> Tags: Semantic Domain or other, e.g., Grammatical POS or a combination
> of fields, separated by a semicolon.
> Graphics file
> Sound file
>
> A python to html script would result in an importable file. According to
> Jon Coombs, anki stores it's info as a SQL file.
>
> Thanks again,
>
> Ken
>
> On 3/5/2012 2:46 PM, Greg Trihus wrote:
>
>
>
>
>
>
>
>
>
> > Yes, it should be fairly straightforward as a Python script... Is it
> > true that all you want is basically for form, and the gloss? I think
> > the full content of most
>
> > LIFT files would overwhelm ANKI. It looks pretty simplistic.
>
> > Greg Trihus
>
> > *From:*Griz [mailto:
grizzly.ken...@gmail.com]
> > *Sent:* Monday, March 05, 2012 3:08 PM
> > *To:* Greg Trihus
> > *Cc:*
flex...@googlegroups.com; Beth (work) Bryson
> > *Subject:* LIFT > anki HTML was LIFT>anki XLST transform...was( import
> > from .csv (was Re : [FLEx] Export to xls, xlsx))
>
> > Greg,
>
> > Thank you for responding! I think probably, the title of my e-mail was
> > misleading. At first, I thought that anki was XML, but it is not. It
> > is more like HTML.
>
> > The following FAQ provides the syntax and tags for anki:
>
> >
http://ankisrs.net/docs/FileImport.html
> >
http://ankisrs.net/docs/FileImport.html#_importing_media
>
> > From what I've seen, most people are using python scripts to transform
> > XML to anki HTML.
>
> > Thanks, and Blessings,
>
> > Ken
>
> > On 3/5/2012 2:19 AM, Greg Trihus wrote:
>
> > Ken
>
> > I would start by creating a "Publication" in Flex that included just
> > the fields you wanted in the ANKI card. Then you can use the XHTML
> > export to export these fields (form, gloss or definition, sound file
> > and picture). Sound files are handled as a writing system in the
> > latest version of flex so you can actually attach sound files to any
> > field. Then it should be fairly easy to convert the xhtml file using
> > xslt to the ANKI import format. You will probably end up having a
> > separate line on the import for each sense of each form.
>
> > Greg Trihus
>
> > *From:*Griz [mailto:
grizzly.ken...@gmail.com]
> > *Sent:* Friday, March 02, 2012 2:54 PM
> > *To:*
flex...@googlegroups.com <mailto:
flex...@googlegroups.com>
> > *Cc:* Beth (work) Bryson; Greg Trihus
> > *Subject:* LIFT>anki XLST transform...was( import from .csv (was Re :
> > <mailto:
flex...@googlegroups.com>
> > <mailto:
flex-list+...@googlegroups.com>