I just tried out the latest search feature from AnkiDroid about
looking up words in Aedict from an AnkiDroid card.
This is great work. Building on that, do you think it would be
possible to add a feature that makes it possible to add cards to my
Anki Japanese deck from within Aedict?
I've tried looking up this question in previous discussions but found
nothing related.
Any ideas if this sounds realistic?
Thanks a lot, keep up the great work guys!
Florian
intent based card addition is integrated into 1.0 which will be
released in the very near future. Until then you can use a beta
version of 1.0
Cheers!
Norbert
On 21 Nov., 13:01, Florian Le Bourdais
Hi Florian,
intent based card addition is integrated into 1.0 which will be
released in the very near future. Until then you can use a beta
version of 1.0
Cheers!
Nicolas Raoul
> --
> You received this message because you are subscribed to the Google Groups
> "AnkiDroid" group.
> To post to this group, send an email to anki-a...@googlegroups.com.
> To unsubscribe from this group, send email to
> anki-android...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/anki-android?hl=en-GB.
>
Diogo is right.
Trurlo recently investigated the topic:
http://groups.google.com/group/anki-android/browse_thread/thread/7d9cd99ca4eb1d2b/d5ee8ad5b90e716b
We could implement this "SEND" intent to be compatible with ColorDict and Fora.
Aedict is open source so anyone motivated enough could contribute the
feature (they would probably merge it if it is an option).
Cheers!
Nicolas Raoul
On 22 Nov., 09:38, Nicolas Raoul <nicolas.ra...@gmail.com> wrote:
> Please ignore my previous reply, I was mixed up.
>
> Diogo is right.
>
> Trurlo recently investigated the topic:http://groups.google.com/group/anki-android/browse_thread/thread/7d9c...
> We could implement this "SEND" intent to be compatible with ColorDict and Fora.
>
> Aedict is open source so anyone motivated enough could contribute the
> feature (they would probably merge it if it is an option).
>
> Cheers!
> Nicolas Raoul
>
>
>
>
>
>
>
> On Tue, Nov 22, 2011 at 10:24 AM, Nicolas Raoul <nicolas.ra...@gmail.com> wrote:
> > Not yet indeed.
> > It would be a great addition.
> > Surprisingly I could not find an issue for this so I created it:
> >http://code.google.com/p/ankidroid/issues/detail?id=873
>
> > Cheers!
> > Nicolas Raoul
>
> > On Tue, Nov 22, 2011 at 4:09 AM, Diogo V. kersting <k...@brlix.com> wrote:
>
On 23 Nov., 15:35, Florian Le Bourdais
To be more precise about the ColorDict case: it works OK if you use a
stardict format offline dictionary - then the pair <entry,
definition> gets mapped correctly into a <front, back> pair in
AnkiDroid. Most of the time at least (it can be awkward to edit the
fields if the definition is very long). The built-in online translate
engine was the one that did not map correctly when I tried to send an
entry from it to a deck.
So, using a bilingual dictionary or a monolingual one but with short
definitions works fine for that purpose.
Tomasz
Nicolas has created two sample skeleton apps to provide exactly that:
http://github.com/nicolas-raoul/Indiclash
See "DictionaryApp" for details - it contains actual code to dispatch
the CREATE_FLASHCARD intent.
As for SEND - it is already implemented in Aedict, I think. You can
invoke it from the notepad. However, it maps "Aedict Notepad" to
Front and the rest to Back. This is probably intended behavior (for
some other apps), so I think our way to go would be to add
CREATE_FLASHCARD rather than change SEND implementation.
Tomasz
Here's what I did:
1. Launched Aedict, opened Notepad (main activity menu). Cleared all
entries from the notepad.
2. Created three categories in the notepad: JPVocab, JPKanji,
JPSentence. Pressed BACK to exit the notepad.
3. Searched for 水族館. Clicked the "Add to notepad" button. A list
popped up prompting for the category. Chose "JPVocab".
4. Longclicked the example sentence below, selected "Add to notepad",
but chose "JPSentence" this time.
5. Analyzed the word 水族館 then longclicked each individual kanji on the
list to add them to the notepad (chose JPKanji this time, surprise,
surprise).
6. Just to make vocab and sentence lists longer, searched for 日本語,
added it to JPVocab as well as two more sentences to JPSentence.
Now we have three tabs in the notepad:
JPVocab - with two words,
JPKanji - with three kanjis,
JPSentences - with three sentences.
All neat and tidy. Now, here's the fun part. In the notepad menu I
chose "Send To", then selected "AnkiDroid Card". The result was as
follows:
Front (taken from Intent.EXTRA_SUBJECT):
"Aedict Notepad" (this is actually hardcoded in the Aedict app, so it
will always be the same)
Back (taken from Intent.EXTRA_TEXT):
[JPVocab]
水族館 [すいぞくかん]: (n) aquarium/(P)
日本語 [にほんご]: (n,adj-no) Japanese (language)/(P)
[JPKanji]
水 [スイ, みず, みず-, [うず, ずみ, つ, ど, み, みさ, みつ, みな, みん], [うず, ずみ, つ, ど, み, み
さ, みつ, みな, みん]]: water
族 [ゾク, [つぎ], [つぎ]]: tribe, family
館 [カン, やかた, たて, [たち], [たち]]: building, mansion, large building, palace
[JPSentence]
水族館へ行く道を教えてくれますか。 [すいぞくかん へ ゆく みち を おしえて くれます か。]: Can you show me the
way to the aquarium?
日本語が話せますか。 [にほんご が はなせます か。]: Do you speak Japanese?
日本語がお上手ですね。 [にほんご が おじょうず です ね。]: Your Japanese is good.
(long lines will probably get broken - no "code" tag works here - but
there should be just 11 lines in the above paragraph)
What I suggest is AnkiDroid could recognize this special case of SEND
by the EXTRA_SUBJECT. If it is "Aedict Notepad", it would parse the
EXTRA_TEXT, divide it between categories, check if there are decks
with corresponding names (here: JPVocab, JPKanji, JPSentence) and then
divide each line within each category/deck into:
a) two parts, splitting it by the semicolon, then map them to Front
and Back, or
b) three parts, parsing for: kanji [reading]: meaning, and map it to
three fields that we would have to make sure to have in the decks.
The whole process could be non-interactive (maybe with a toast note to
confirm addition) because the destination decks would be defined by
category names. True, it would require some initial care and setup,
but the results would be extrrrremely cool.
The notepad contents then could be optionally backed up (there is such
option in Aedict) and cleared to be ready for the next study session.
Tomasz
Front: meaning
Back: kanji [reading]
To be able to use it, make sure you have NO categories defined in your
Aedict Notepad or, among others, you have one named "default". When
you select "Send To" from the Notepad and choose "AnkiDroid Flashcard
as the destination", only the first item from the "default" category
will be sent to AnkiDroid (or just the first item on screen, if you
have no categories at all). To add subsequent items, delete the first
one or move it to another category (via context menu).
Though it works fine, this is just a temporary solution - if Martin
decides to add CREATE_FLASHCARD support to Aedict, it will probably be
more convenient to send words directly from search results list in
Aedict without the Notepad go-between.
The non-interactive method described in the previous post might not be
really useful - we would not be able to use tags or manipulate tags/
models/card models then.
Tomasz
Wonderful quick fix! I just tried it out and it works.
Some more thoughts:
-my Japanese deck has Expression, Reading, Meaning fields. When I add,
say "発「はつ」,departure", the definition gets mapped to Expression, and
the word with reading to Meaning. Luckily, the Swap button works well
in that case, and I'm able to put them as I like. However, I have to
manually separate the reading and the kanji. Does the ADD_FLASHCARD
intent permit specific options like what I'm describing, or is it
always a word and a translation?
-after successfully importing the dictionary data to AnkiDroid, I went
to home and reopened AnkiDroid. It crashed. No data loss, however.
I've uploaded the corresponding stacktrace as
ad-20111129143007.stacktrace
Thanks in the meantime, I'm watching the Aedict forum closely but no
answers there yet.
Florian
> -my Japanese deck has Expression, Reading, Meaning fields. When I add,
> say "発「はつ」,departure", the definition gets mapped to Expression, and
> the word with reading to Meaning. Luckily, the Swap button works well
> in that case, and I'm able to put them as I like.
Because there is no common standard for naming and order of fields, we
cannot guess which is which. The fields in my deck are Meaning, Kanji
and Reading - that's why it is the default :-). But you can change
the order of the fields in your model using desktop Anki to avoid the
necessity to swap fields. The order of fields will have no effect on
the display of your cards (it will however affect things like CSV
imports, though).
> However, I have to
> manually separate the reading and the kanji. Does the ADD_FLASHCARD
> intent permit specific options like what I'm describing, or is it
> always a word and a translation?
This part is a little bit more tricky. The Anki concept of facts and
fields as opposed to just two sides of a flashcard is quite unique and
most applications sending data via intents will not split information
into more than two fields. Therefore both the SEND and
CREATE_FLASHCARD intents assume there are just two fields.
However, my initial thought was also that we should split Kanji
[Reading] into two fields to make card models more flexible.
Fortunately, the data format Aedict uses is quite consistent, which
makes it possible to treat its messages in a special way and split
them on the go in AnkiDroid. Stay tuned.
> -after successfully importing the dictionary data to AnkiDroid, I went
> to home and reopened AnkiDroid. It crashed. No data loss, however.
> I've uploaded the corresponding stacktrace as
> ad-20111129143007.stacktrace
I couldn't reproduce this problem. Does it always happen after an
intent sending session?
Tomasz
For decks with two data fields, mappings are like before. If the
destination deck has exactly 3 fields, they will be split in this
order: Meaning, Kanji, Reading. As noted before, swapping will not
help much, so the order of fields in the deck should be the same for
smooth action.
I noticed that sometimes Aedict will supply the word "null" when there
is no corresponding value. This happens e.g. when a particle is sent
via intent - since it has no kanji value.
Tomasz
Just tried out alpha5 with your field order: works well! Easy
flashcard creation from now on, thanks!
I tried the swap fields method, which in my case kills the hiragana
reading (i.e. makes it disappear).
I didn't find any "reset" button, as you mentioned.
Concerning splitting of intent data, I guess this is a problem that
has to be handled in AnkiDroid.
I wonder how you manage to do that in a general case. Maybe a "per
dictionary format" setting for how to split a string (e.g. in Aedict,
the hiragana is in brackets)?
Concerning the crash I experience, I believe it's not related to
intent sending. To reproduce it in my case: open new AnkiDroid, do
some stuff, press home, open AnkiDroid from the home screen icon,
crash.
Anyways, love this improvement. Cheers
Florian
It's in the main menu of that window.
> Concerning splitting of intent data, I guess this is a problem that
> has to be handled in AnkiDroid.
> I wonder how you manage to do that in a general case. Maybe a "per
> dictionary format" setting for how to split a string (e.g. in Aedict,
> the hiragana is in brackets)?
Dictionaries could send specially prepared intents with more than two
fields (in Aedict case for example - three), or - which I think would
be a better idea - more information could be packed into one field via
XML or JSON. Field mappings, tags and other optional elements could
then be included. But all this assumes close cooperation between
dictionary and flashcard app devs.
> Concerning the crash I experience, I believe it's not related to
> intent sending. To reproduce it in my case: open new AnkiDroid, do
> some stuff, press home, open AnkiDroid from the home screen icon,
> crash.
Well, it seems it is intent related, but in a different way. The
intent that starts the StudyOptions screen is missing its extra
information. Can you reproduce this problem any time you try? I
think I managed to do it once but purely by chance and haven't been
successful since.
Tomasz
sorry for my late reply.
I am still able to replicate the crash:
Launch Aedict. Lookup word. Add to notepad. Send to AnkiDroid Japanese
deck. Press Add (screen changes back to Aedict). Press Home button.
Open AnkiDroid from Home screen. It crashes.
I updated to the latest alpha, but still get that crash.
Cheers
Florian