Re: [Ankidroid] APKG Specification

742 views
Skip to first unread message

Nicolas Raoul

unread,
Apr 27, 2013, 7:39:09 AM4/27/13
to anki-android, mail.t...@gmail.com
Hello Martin,

Great to hear that you want to integrate with AnkiDroid!

As far as I know there is not much documentation about apkg apart from
the source code. If anyone knows any documentation I'd be happy to be
proven wrong.

The easiest is probably to create an APKG of a simple deck in Anki
Desktop, and then analyze it.

By the way, what is your application?
Looking forward to the integration!
Nicolas Raoul

On Sat, Apr 27, 2013 at 5:07 PM, <mail.t...@gmail.com> wrote:
> I'm developing an android app, and would like to export lists items into
> ankidroid as a deck. Is there a spec for the apkg format? Is the a way to
> tell anki you have a file you want to import?
>
> --
> You received this message because you are subscribed to the Google Groups
> "AnkiDroid" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to anki-android...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Nicolas Raoul

unread,
Apr 27, 2013, 8:26:03 AM4/27/13
to Thomas Martin, anki-android
If your app is a dictionary, you might also want to see how we
integrate with other dictionaries, and use the same intents :-)
Cheers!
Nicolas Raoul

On Sat, Apr 27, 2013 at 9:17 PM, Thomas Martin <mail.t...@gmail.com> wrote:
> Hi Nicolas,
>
> Thanks for help, that's what i'm doing atm. I think i get the gist of how it
> works, but i'm not sure how some columns are generated and what parts are
> significant.
>
> My app is a japanese dictionary.
>
> Thomas

Tim

unread,
Apr 27, 2013, 10:42:08 AM4/27/13
to anki-a...@googlegroups.com, mail.t...@gmail.com
it's just a zip file with the collection and media

Tim

unread,
Apr 27, 2013, 9:49:34 PM4/27/13
to anki-a...@googlegroups.com, mail.t...@gmail.com
Ah OK so you want documentation for the .anki2 database rather than the apkg file?
If so then there's some documentation here:
https://github.com/bibstha/Anki-Android/wiki/Anki2-database-documentation

Good Luck!

On Sunday, April 28, 2013 10:34:48 AM UTC+9, mail.t...@gmail.com wrote:
Thanks Tim,

I'm aware of that, i'm trying to figure out how the collection file works. There is 5 tables, of which only cards, col and notes look important. All of the ids seem to be some variation on 13671. 
I'm not sure what the mod, csum, crt, scm columns signify
.

Tim

unread,
Apr 27, 2013, 10:41:13 PM4/27/13
to anki-a...@googlegroups.com, mail.t...@gmail.com
Ah you're right, for some reason I thought it had more detail about the fields you were asking about.

Yes I imagine it may be "easier" to extend AnkiDroid to import txt files since you could use various libanki methods rather than writing everything from scratch. You could then have some kind of IMPORT_TXT intent similar to CREATE_FLASHCARD. It also makes more sense to me logically to have that code in AnkiDroid rather than 3rd party apps.

Here is a link that you probably already have with the basic info for developing in AnkiDroid:


On Sunday, April 28, 2013 11:19:31 AM UTC+9, mail.t...@gmail.com wrote:

That's a nice start, but its pretty incomplete. It doesn't tell me much I haven't already figured out from looking at an .anki2 database. I'm wondering if it might be easier for ankidroid to have the ability to import from a text file, as that seems to be a commonly requested feature.
Reply all
Reply to author
Forward
0 new messages