maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   Anki for N900? (https://talk.maemo.org/showthread.php?t=35547)

Koeus 2009-12-01 11:04

Anki for N900?
 
I've been using Anki to learn Japanese for a little over a year now, but I'm getting rather tired of being bound to my heavy laptop just for the sake of doing my repetitions. I recently pre-ordered a N900 partly for the reason of being able to run Anki on the road, but I see that there doesn't seem to be any release of it for the Maemo 5 and Nokia N900. Does anyone know if this is being worked on or if it will come in the near future? It's a great piece of software that would be a great benefit to the N900's (currently rather meager) repository.

privjet 2009-12-01 17:09

Re: Anki for N900?
 
Quote:

Originally Posted by Koeus (Post 402469)
I've been using Anki to learn Japanese for a little over a year now, but I'm getting rather tired of being bound to my heavy laptop just for the sake of doing my repetitions. I recently pre-ordered a N900 partly for the reason of being able to run Anki on the road, but I see that there doesn't seem to be any release of it for the Maemo 5 and Nokia N900. Does anyone know if this is being worked on or if it will come in the near future? It's a great piece of software that would be a great benefit to the N900's (currently rather meager) repository.

I've used Anki for Japanese too. My solution: rdp/vnc to my home server. Probably not an ideal solution, but easy if you have a home server. Besides, running Anki from the same source makes it possible to continue on a set i've already started but not finished. Perfect for 40 minute public transport rides to/from campus.

baksiidaa 2009-12-01 18:48

Re: Anki for N900?
 
There's a port of Anki for the N800/N810 (http://ichi2.net/anki/wiki/Anki%20on%20Maemo). Why don't you ask them if they'd do a version for the N900. You can run it directly from the source (it must be Python), so you could also try downloading the source and running it--it might work.

Koeus 2009-12-02 00:06

Re: Anki for N900?
 
Quote:

Originally Posted by privjet (Post 403119)
I've used Anki for Japanese too. My solution: rdp/vnc to my home server. Probably not an ideal solution, but easy if you have a home server. Besides, running Anki from the same source makes it possible to continue on a set i've already started but not finished. Perfect for 40 minute public transport rides to/from campus.

Unfortunately I don't have a home server, so that's gonna be a bit tricky until I do. Good idea though. Hopefully there'll be an Anki release not too soon though ^^

Quote:

Originally Posted by baksiidaa (Post 403270)
There's a port of Anki for the N800/N810 (http://ichi2.net/anki/wiki/Anki%20on%20Maemo). Why don't you ask them if they'd do a version for the N900. You can run it directly from the source (it must be Python), so you could also try downloading the source and running it--it might work.

Yeah, I saw that there's a release for the OS2008, but there hasn't been any work on that since January this year, so it seems a bit dead. Writing this post here was my way of asking them, since I couldn't find a way to get in contact with the people behind the project; though perhaps I just didn't look well enough. I'm still really new in this business (that is, the engaged side of open source, I've been on the using side for very long), so I'm not sure how to go about it. Nevermind, found the forum XD

And yes, it is using Python, so simply running the source might work. I'll have to give it a try, though to be honest I have no idea how to do it. I'm an avid Windows user (though I don't really want to), and while I've got Ubuntu on dual boot, unfortunately I haven't come around to learning Linux properly (or at all) - I'm hoping the N900 will give me the proper kick in the butt that I need to get started with that. I'm sure there's plenty of guides out there on how to compile and run source, but nonetheless, any tips and pointers are very welcome to get me on my way. Still have to wait for the phone to arrive though, which will probably take a month since Sweden is never prioritised when it comes to new releases >.<

arono 2009-12-02 00:19

Re: Anki for N900?
 
How about mnemosyne? It's also a spaced repetition program based on supermemo. And best of all it's ported to maemo :D


http://tabletui.wordpress.com/2009/0...yne-for-maemo/

http://www.mnemosyne-proj.org/

Koeus 2009-12-02 00:31

Re: Anki for N900?
 
Quote:

Originally Posted by arono (Post 403831)
How about mnemosyne? It's also a spaced repetition program based on supermemo. And best of all it's ported to maemo :D

The Maemo version looks great, only one (rather major) drawback for us long term Anki users: You can't import and use Anki decks with mnemosyne. When you have a deck of 2000+ cards, you're not that keen on making an entirely new one from scratch >.<

Ads 2009-12-02 00:45

Re: Anki for N900?
 
I agree that Anki would be a very welcome addition to the repository.
I personally have used a few different SRS's and have really come to love Anki over time - I now prefer it to Mnemosyne - but it is probably just personal preference.

I did have a quick go at downloading and running the source. It was a random choice late one night, so I didn't follow it through too well. Basically I think we also need to install some pyqt4 bindings, and possibly some other packages before it'll do much.

I would have another look, but unfortunately I've packaged the N900 up for it's trip to the carrousel - err.. I mean to get repaired. I'm also very much a beginner when it comes to Linux development and Python, so I might be talking rubbish.

arono 2009-12-02 06:19

Re: Anki for N900?
 
Quote:

Originally Posted by Koeus (Post 403842)
The Maemo version looks great, only one (rather major) drawback for us long term Anki users: You can't import and use Anki decks with mnemosyne. When you have a deck of 2000+ cards, you're not that keen on making an entirely new one from scratch >.<

Ooops forgot about that. Anki seems to have much more features, definitely testing that.

edit:
wow I think you converted me to anki :)

aspidites 2009-12-02 06:42

Re: Anki for N900?
 
Are there enough similarities in the two deck formats to write a converter? Assuming neither is in a binary format, I might be able to hack something together if I could get my hands on a sample deck from each program.

Koeus 2009-12-02 09:21

Re: Anki for N900?
 
Quote:

Originally Posted by Ads (Post 403860)
I did have a quick go at downloading and running the source. It was a random choice late one night, so I didn't follow it through too well. Basically I think we also need to install some pyqt4 bindings, and possibly some other packages before it'll do much.

I checked out the official Anki forum (well, Google discussion group to be precise), and found the following short thread: http://groups.google.com/group/ankis...ed6e4e2c95a7d6. It says "it will most probably be able to run anki out of the box from the
command line, if you install python2.5-qt-* and download/unpack the
anki source, but new packages for maemo 5 will need to be made for
easy installation from the application manager."

So yes, installing Python first would be required, but apparently it ought to work after that. It'd be great if you could try it ;)

Quote:

Originally Posted by arono (Post 404189)
Ooops forgot about that. Anki seems to have much more features, definitely testing that.

edit:
wow I think you converted me to anki :)

Glad to be of service ^^

Quote:

Originally Posted by aspidites (Post 404197)
Are there enough similarities in the two deck formats to write a converter? Assuming neither is in a binary format, I might be able to hack something together if I could get my hands on a sample deck from each program.

I googled around for the possibility of converting an Anki deck to Mnemosyne, but couldn't really find any info on it. I remember I did read somewhere that Anki was supposed to be able to import Mnemosyne files though, which should mean that it's convertable either way - perhaps just that no one has implemented it yet. I'm uploading my Kanji deck Apparently my deck is too big to be uploaded as an attachment, but if you send me your email then I'll send it that way (it's 2Mb as a zip) so that you'll have it at your disposal if you feel like having a go, maybe arono could upload his Mnemosyne deck to see if anything could be done :)

aspidites 2009-12-02 16:46

Re: Anki for N900?
 
Sure. I can't seem to PM, but my email is aspidites at inbox dot com.

All I need is a sample deck from each program and I can look into writing a converter.

Koeus 2009-12-02 17:00

Re: Anki for N900?
 
Quote:

Originally Posted by aspidites (Post 405264)
Sure. I can't seem to PM, but my email is aspidites at inbox dot com.

All I need is a sample deck from each program and I can look into writing a converter.

I've sent an email with an anki deck attached. Now, I ask any Mnemosyne user to send one as well =)

aspidites 2009-12-02 17:18

Re: Anki for N900?
 
hmm... sqlite file. Not going to be as easy as converting plain text, but still more than doable. :-) Thank goodness for python's native sqlite support!

Edit:
I'll try and google again for a mnemosyne file in the mean time.

Edit 2:
I'v found an example file, but I'm not yet sure what kind of file it is. It appears to be a database file, but not in sqlite format. It appears to be a pickled binary, which pythhon can handle. Now I just need to find out which fields I need from anki file and convnert.

Also, the anki database seems to be more complicated than I though. As such, I will have to take a minute to study its structure.

BTW: I tried running anki in scratchbox and get errors about not being able to import QtWebkit, even though the deb packages is clearly installed. Anyone else?

Edit 3:
The file I downloaded seems to be corrupted so i still need a valid mnemosyn file in order to try and work this.

It does seem that mnemosyn saves less data than anki, so converting to anki might not be so bad.

Koeus 2009-12-02 23:14

Re: Anki for N900?
 
1 Attachment(s)
Quote:

Originally Posted by aspidites (Post 405368)
hmm... sqlite file. Not going to be as easy as converting plain text, but still more than doable. :-) Thank goodness for python's native sqlite support!

Edit:
I'll try and google again for a mnemosyne file in the mean time.

Edit 2:
I'v found an example file, but I'm not yet sure what kind of file it is. It appears to be a database file, but not in sqlite format. It appears to be a pickled binary, which pythhon can handle. Now I just need to find out which fields I need from anki file and convnert.

Also, the anki database seems to be more complicated than I though. As such, I will have to take a minute to study its structure.

BTW: I tried running anki in scratchbox and get errors about not being able to import QtWebkit, even though the deb packages is clearly installed. Anyone else?

Edit 3:
The file I downloaded seems to be corrupted so i still need a valid mnemosyn file in order to try and work this.

It does seem that mnemosyn saves less data than anki, so converting to anki might not be so bad.

I found some Mnemosyne decks from the official web page that seem to be working; one of them is attached to this post and at your disposal.

As for running Anki in scratchbox I can't say, since I don't have a phone to try it on yet ;) Dying to get it though T_T

I had a brief look at the Mnemosyne program as well and the possible settings for a deck, and I can understand why Anki would be more advanced. In Anki for example you can have more than just two fields on a card, whilst this is not possible in Mnemosyne. This most likely means that while a conversion from Anki to Mnemosyne might be possible, you might lose quite a bit of data from the Anki deck in the process. Converting Mnemosyne to Anki should work better and without losses, though I'm only speculating. If I'm right, then too bad it's the Anki->Mnemosyne conversion we want to do =P Might be better off trying to get Anki to run properly. Damn I want that N900 and start playing around with stuff like this!

arono 2009-12-02 23:31

Re: Anki for N900?
 
I tested anki and it had a import from mnemosyne function which seemed to work, although I probably will use anki when adding new material next time.

What I found good about Anki was the buttons for bold, italics etc., online sync, copy-paste images directly. Apparently with AnkiOnline you could review them in the browser. I will try this when I get the device.

aspidites 2009-12-03 00:48

Re: Anki for N900?
 
You are right Koeus. It's getting late, but I'll definately give those files a looking over and figure out what data in anki correlates to mnemosyne.

I wish I had an n900 as well ;-(

Anyways, I'll try to bang out something after work tomorrow and report my successes/failures, unless someone beats me to it.

arono, unfortunately we are trying to go the other way around > import anki file into mnemosyne.

Edit:
I played around a bit just to see how much work I had ahead of me tomorrow. Turns out the data in mnemosyne is picked (using cPickle module) and when trying to unpickle the data mnemosyne-specific data is imported, which I of course don't have access to from a regular python script.

In short, I'll have to track down all the modules from the mnemosyne source before I can extract the data, unless there is some easier method to getting to the data?

Edit 2:
I just realized that both programs can export/import from tab separated text files.

Koeus, is it sufficient to open up anki, export file as tab separated text file, then open up mnemosyne and import from tab separated text file?

I tried it on your file and it seemed to work, but I'm not familiar with either program so don't know how much info was lost...

Koeus 2009-12-03 11:28

Re: Anki for N900?
 
Quote:

Originally Posted by aspidites (Post 406351)
Edit:
I played around a bit just to see how much work I had ahead of me tomorrow. Turns out the data in mnemosyne is picked (using cPickle module) and when trying to unpickle the data mnemosyne-specific data is imported, which I of course don't have access to from a regular python script.

In short, I'll have to track down all the modules from the mnemosyne source before I can extract the data, unless there is some easier method to getting to the data?

I unfortunately have no idea what picked/pickled data is och means, nor what cPickle module is, so I can't really help you there =/ (You're welcome to explain it though ^^)

Quote:

Originally Posted by aspidites (Post 406351)
Edit 2:
I just realized that both programs can export/import from tab separated text files.

Koeus, is it sufficient to open up anki, export file as tab separated text file, then open up mnemosyne and import from tab separated text file?

I tried it on your file and it seemed to work, but I'm not familiar with either program so don't know how much info was lost...

I just looked into it, and you're quite right, it is indeed possible! While the fact that Anki utilises more than two fields to a card turned out to be no problem (it exports both fields on the backside of the card so that when Mnemosyne imports it, all backside data is shown in a single field), the most serious thing that was lost was all the scheduling data; i.e. all cards are imported as if they were brand new and have never been reviewed. This means that for us avid Anki users it's pretty much pointless to import it since it's the scheduling data that's the important part. Rereviewing 2000+ cards from scratch is not something that's done in the wink of an eye, and I personally would never do it if I didn't absolutely have to.

In other words, we have a way of importing decks from Anki to Mnemosyne, but if this is going to be of any use to Anki users that want to use Mnemosyne on the N900, then we still need to solve the issue of exporting/importing the scheduling data.

Edit:
Also, Mnemosyne seems to lack the feature of displaying furigana, which Anki does very nicely. A minor aesthetical drawback which just further convinces me that Anki is the better piece of software among the two of them ^^ The best solution would still probably be to just get Anki functioning properly on the N900 ;) (Although digging around in the possibilities of exporting/importing files inbetween the two of them is quite interesting.)

aspidites 2009-12-03 12:35

Re: Anki for N900?
 
Agreed Koeus! Really, I was thinking Anki looks much more polished (not to mention easier to spell) than mnemosyne. Perhaps I'll look into trying to get an initial port of Anki started today (no promises). Of course, Even if I did get it ported, i'm not so sure about making it finger friendly :-( -- may be a task for someone else.

Koeus 2009-12-03 13:12

Re: Anki for N900?
 
Quote:

Originally Posted by aspidites (Post 407373)
Agreed Koeus! Really, I was thinking Anki looks much more polished (not to mention easier to spell) than mnemosyne. Perhaps I'll look into trying to get an initial port of Anki started today (no promises). Of course, Even if I did get it ported, i'm not so sure about making it finger friendly :-( -- may be a task for someone else.

*laughs* I've been cursing to myself every time I've had to write "Mnemosyne", so I totally agree with you on that XD

If you feel like looking into porting Anki, then by all means, feel free (and encouraged ^^)! I'll help with whatever I can, but I suspect my mediocre Java skills won't do much good in this case. Nonetheless, I might be able to be of some use (I'm seriously considering looking into C++ and/or Python in the near future). And I dare say, what we need the most is probably just someone getting the project started, and then people can pick up on the way. Hopefully someone else might pick up on the finger touchy part ;) (And now, back to my Java examination (yet again); somehow this discussion is a lot more appealing =P)

aspidites 2009-12-04 02:08

Re: Anki for N900?
 
Well in it's current state, we wouldn't be able to port it because PyQt and PySide are both lacking QtWebKit modules in fremantle. I guess that leaves us with the option of either a) waiting until it becomes available or b) gutting QtWebkit portions out and replacing with something functionally equivalent (assuming it was only used for formatting).

Again, I don't really use Anki, so I'm not familiar with its interface. Does it load any external web pages, or would it be save to say that webkit is just for formatting?

Koeus 2009-12-04 08:35

Re: Anki for N900?
 
Ah, I wasn't aware that PyQT and PySide lack QTWebKit modules in Maemo 5. Hopefully, the support for that won't take very long, but then again, you never know.

As for gutting Anki, to be honest, I have no idea if it'd be possible to do (within a reasonable amount of time). I don't really know how it's built up either (I've never delved into the code), but it doesn't load any external web pages (it only syns with a web server which is text based), so I'm assuming that the webkit is just for formatting. But I honestly don't know. I'll try looking into it a bit closer next week, I really gotta finish my exam first >.<

aspidites 2009-12-05 05:11

Re: Anki for N900?
 
Right. I am only off on Tues. and Wed myself. If we did decide gutting the webkit stuff was feasible, i'd want to contact the anki guys first, if not purely out of respect.

Correction. Someone has already ported the application.Don't know why copying the old code and trying to run it gave QtWebkit errors....

Still not running yet, but i'm testing right now.

EDIT:
Ankiqt doesn't want to load, but ankimaemi seems to work. Can't import yet, but this may be a scratchbox limitation...

Kudos to who ever worked on that port. Looks good even.

Koeus 2009-12-07 13:53

Re: Anki for N900?
 
Really? Wow, cool. All that debating for nothing? =P Anyhow, this may sound like a stupid question, but what is Scratchbox? I've only heard it mentioned in a couple of places around the forum, but I haven't really grasped what it is in practice. It sounds like some sort of Maemo emulation used for development, but I could be wrong. If so, how do I fix it? =) I tried searching maemo.org, but couldn't really find any good info on it.

aspidites 2009-12-08 08:56

Re: Anki for N900?
 
1 Attachment(s)
Scratchbox is a development environment that allows to you cross-compile programs for armel-based processors (in this case, the one for n900) on x86 based platforms.

Using it and Xephyr, you can test (with varying degress of success) programs for your NIT. While it's not an emulator per se, it does allow you to see how your program would look. I've attached an images showing it running under KDE 4.3 in Linux. My desktop is rather large for a screenshot, so I only captured the window itself.

You can find more [accurate] information my clicking on the Development link above and selecting "Download the Maemo 5 SDK".

Anyways, my N900 comes today, so I'll be able to see what's going on.

Koeus 2009-12-08 09:43

Re: Anki for N900?
 
Thanks! I'll definitely check it out. Might I ask where you found the port of Anki? I checked their garage page, but that still hasn't been updated since the beginning of this year.

dgeros 2009-12-08 11:41

Re: Anki for N900?
 
Been using Ankionline. It's not the real deal, but its ok. Waiting for a port as I am completely lost as to how Linux/Meomo and everything else you are talking about works.

The only problem I have with Ankionline is that it renders some kanji incorrectly like Firefox on Vista. Fortunately, I can recognize them, although it is annoying.

Koeus 2009-12-08 12:07

Re: Anki for N900?
 
Using Ankionline is only an option when you're in the country where your flatrate is valid though (or on a wifi-network). I intend to use the N900 on my travels for reviewing, in which case Ankionline is not really an alternative since the roaming rates will be ridiculous =P

aspidites 2009-12-08 16:21

Re: Anki for N900?
 
Did some research and found this page: http://ichi2.net/anki/wiki/Anki%20on%20Maemo

Apparently the reason ankimaemi isn't working properly is in part due to the fact that it requires python gtkhtml, which is only available for OS2008(Diablo).

I'm going to try again to get ankiqt working and wil report back.

Koeus 2009-12-08 16:58

Re: Anki for N900?
 
Quote:

Originally Posted by aspidites (Post 416791)
Did some research and found this page: http://ichi2.net/anki/wiki/Anki%20on%20Maemo

Apparently the reason ankimaemi isn't working properly is in part due to the fact that it requires python gtkhtml, which is only available for OS2008(Diablo).

I'm going to try again to get ankiqt working and wil report back.

Aah, that page. I've read it, but apparently not well enough. Good luck getting ankiqt working! I'll be looking forward to hearing how it goes.

...Damn I want that N900 so I can start testing things myself >.<

jebba 2009-12-08 17:29

Re: Anki for N900?
 
I see a few ankis in the extras-devel repository:

Code:

$ dpkg -l | grep anki
ii  anki                                                0.9.9.7.9-1                                Anki is a spaced repetition system (SRS). It
ii  ankimaemi                                          0.0.7-2                                    Anki is a spaced repetition system (SRS). It
ii  ankiqt                                              0.9.9.7.9-3                                Anki is a spaced repetition system (SRS). It

anki-0.9.9.7.9-1
ankimaemi-0.0.7-2
ankiqt-0.9.9.7.9-3

I haven't checked to see the differences between them yet though.

http://wiki.maemo.org/Extras-devel

-Jeff
http://wiki.maemo.org/User:Jebba

aspidites 2009-12-10 10:34

Re: Anki for N900?
 
Quote:

Originally Posted by jebba (Post 416922)
I see a few ankis in the extras-devel repository:

Code:

$ dpkg -l | grep anki
ii  anki                                                0.9.9.7.9-1                                Anki is a spaced repetition system (SRS). It
ii  ankimaemi                                          0.0.7-2                                    Anki is a spaced repetition system (SRS). It
ii  ankiqt                                              0.9.9.7.9-3                                Anki is a spaced repetition system (SRS). It

anki-0.9.9.7.9-1
ankimaemi-0.0.7-2
ankiqt-0.9.9.7.9-3

I haven't checked to see the differences between them yet though.

http://wiki.maemo.org/Extras-devel

-Jeff
http://wiki.maemo.org/User:Jebba

Tried all 3, and the only one that runs is ankimaemi. After examining more thoroughly it appears that libanki is a requirement. I tried installing libanki in scratchbox but received errors. I'm reluctant to try on my actual n900, lol

Koeus 2009-12-10 10:56

Re: Anki for N900?
 
Sucks to hear that they don't work. =/

Blahah 2009-12-16 13:00

Re: Anki for N900?
 
Libanki can just be run from source. I'm pretty sure it will run on the n900 if you satisfy the python library dependencies. These should all be available. Just read the errors in console to find them all.

pelagius 2010-01-02 21:11

Re: Anki for N900?
 
Indeed, ankimaemi from extras-devel seems to work well enough to be usable. However, I had to install python-gtkhtml2 on the command line to make it work.

pelagius 2010-01-03 18:58

Re: Anki for N900?
 
Quote:

Originally Posted by pelagius (Post 450328)
Indeed, ankimaemi from extras-devel seems to work well enough to be usable. However, I had to install python-gtkhtml2 on the command line to make it work.

Oh, and this was on an n900.

Koeus 2010-01-04 18:44

Re: Anki for N900?
 
Sounds like good news! I look forward to trying it once I get mine =D

sanchi 2010-01-11 23:38

Re: Anki for N900?
 
Hi,

latest released anki version 0.9.9.8.5 is now in extras-devel. Can you check whether ankiqt now also works for you? And how does that look on N900?

Thanks!

tentpole 2010-01-15 19:04

Re: Anki for N900?
 
So did anyone try this?
The only reason I bought my n800 was to run anki (which it does like a champ), so I am very interested if it runs on the n900.

Koeus 2010-01-16 00:39

Re: Anki for N900?
 
I still haven't gotten my N900, but as soon as I do, I will most definitely try it. Unfortunately, it's looking as if I most likely won't be getting it until February, so it's gonna take a while :/

pelagius 2010-01-24 15:39

Re: Anki for N900?
 
The latest ankiqt that I see in extras-devel is .9.9.7.9-3. What happened to 0.9.9.8.5?


All times are GMT. The time now is 19:55.

vBulletin® Version 3.8.8