Anki on a PDA/Handheld

Index » Learning resources

Reply #101 - 2008 March 19, 6:46 am
ctopp Member
From: Kyoto Registered: 2008-01-07 Posts: 17

Misha,

Now I am trying to sync with the server from my Z.  Whenever I try, I get the message "Connecting.." and then after a few moments, it says: "Check you password/username".  At this point, all the buttons and the menu items "close", "save" and "save and sync" are all grayed out so basically I have to quit the program and relaunch to continue.  And yes, I  did the check of password/username, it is exactly the same I use for online study and for syncing from my main machine.
Is there anything I can do to track down this issue?

Ctopp

Reply #102 - 2008 March 19, 8:16 am
misha Member
From: Sydney Registered: 2007-04-05 Posts: 99

Hi ctopp,

That's a bit strange.  Syncing works fine for me.  I only tested with my account (don't have any others) on a number of decks.  Other than double-checking your username and password, I don't know what else I can suggest.

Perhaps one thing would be to make sure you're not entering them as Japanese full-width or half-width characters.

The username and password are stored in plain text in file called ~/.ankiqt-lite

Perhaps they aren't being saved correctly to that file?

The menu staying greyed out is definitely a bug though.  I'll fix that in the next release.  Let me know how you go.

Cheers,
Misha

Reply #103 - 2008 March 21, 8:18 am
ctopp Member
From: Kyoto Registered: 2008-01-07 Posts: 17

Misha,

Don't know what went wrong the other day, I now tried it again and it works -- kind off.

After it says "Syncing.." nothing happens on the screen.  First I thought it takes that long, next I thought maybe it freezes, but then I found out that the message gets updated when I tap on the screen.   I tried it several times over a couple of days, the message always goes like this:


Connecting..
Fetching summary from server..
Determining differences..
Sending payload (local +10/-0, remote +0/-0 cards)..
Applying reply..
S

There is nothing after the S, but the menus stay greyed out and I have to quit and restart Anki to continue to use it.   I would be glad if you could look into this issue.  Please tell me if you need more information.

Cheers,

Ctop

Advertising (register and sign in to hide this)
JapanesePod101 Sponsor
 
Reply #104 - 2008 March 23, 3:51 am
misha Member
From: Sydney Registered: 2007-04-05 Posts: 99

ctopp,

I'll look into it.  Having to tap the screen to refresh it seems to be a Zaurus GUI bug, as it doesn't happen on a PC.  It doesn't seem to happen all the time either, which is somewhat strange.  I may have to find some sort of work-around for it.

The `S' on the last line should read something like `Syncing complete, sent x cards'.  I'm not sure why it gets truncated like that.

Are you sure all the menus stay greyed out when syncing is complete?  After syncing, there is no deck open so most of the deck-related menus should be greyed out.  However, the `Open Recent' and 'Exit' menu items should be available...  You should be able to open the deck you were working on to continue reviewing.  This is all in theory, of course. 

I'll make the client re-open the deck automatically after syncing in a later release.

It may take a while for me to do anything about this, as this weekend I'm busy doing other things, and next weekend I'm in Japan for a little while.

For now, feel free to use the command-line sync option -- I've kept it as a fall-back in cases like this.

Reply #105 - 2008 April 11, 5:03 am
rtkrtk Member
From: Japan Registered: 2007-10-16 Posts: 27

Hi there,

First, I wanted to say thanks for getting Anki working on the Zaurus. I installed it and just got it working recently. I wanted to make some comments about the install process. First of all, the Sourceforge page says Anki doesn't work on the stock Sharp ROM, which was almost enough to make me give up, but reading this thread indicated that Anki does work on the stock Sharp ROM. The Sourceforge page should be updated. Also, the binary utility sqlite3 for the Zaurus is needed to convert decks from the PC to the Z, but this utility is not (anymore?) available for download from Sourceforge. I had to download it from a different website. I installed everything to my SD card with ipkg -d /mnt/card install xxx.ipk, then after some fiddling with LD_LIBRARY_PATH and PYTHONPATH to allow Python to find the installed modules/libs on the SD card, I was able to start Anki.

I assume the plugins for desktop Anki have little chance of working on the Z? For instance there's a nice little plugin that displays example sentences from the Tanaka corpus for vocabulary words. Can I use such plugins directly on the Z as well, or would a rewrite of the plugin be needed?

Reply #106 - 2008 April 11, 5:43 am
misha Member
From: Sydney Registered: 2007-04-05 Posts: 99

rtkrtk,

Glad you got it working.  You're the first person to confirm that it works from an SD card.  Please feel free to talk about the steps you performed in greater detail -- perhaps even on the project wiki.  Alternatively, write back to me and I'll put instructions up there.

I'm not sure what gave you the idea it won't work on the stock ROM...   Oh, I see it. 

"Non-functional" refers to "non-functional requirements" (http://en.wikipedia.org/wiki/Non-functi … quirements), not features of the program that don't work smile

I'll put up the ARM binary for sqlite3 so people can use it on the Z side.  It's of definite relevance to the project.

The default Anki plugins won't work with ankiqt-lite the way it is now.  The main reason for this is that there is no plugin interface in ankiqt-lite.  If I remember correctly, Anki's plugin interface is provided by ankiqt, the component that sits over libanki and provides a GUI among other things.  In theory, it would be possible to write such a plugin interface (based on ankiqt), but it's not a priority at this time.  The cost vs. benefit ratio seems a bit too high, and there is other stuff I should look at first.

That plugin you speak of sounds useful, though.  I'll add plugins as a low-priority item on my TODO list.

Cheers,
Misha

Reply #107 - 2008 April 11, 6:01 am
rtkrtk Member
From: Japan Registered: 2007-10-16 Posts: 27

Heh, you're right: the term "non functional" made me think that the bullet point "works on Sharp ROM" was "non functional", i.e., a different ROM was needed. A possible alternative wording: "Non functional requirements.... you must use the Sharp ROM" might make it clearer for people who read it the way I did.

About installation, as far as I recall it was just this (Zaurus C860, stock Sharp ROM):

1. Download all ipks from Sourceforge.
2. For each ipk, execute "ipkg -d /mnt/card install xxx.ipk"
3. Install sqlite3 ipk (downloaded separately from a different website)
4. Run anki with the following script:

#!/bin/bash
LD_LIBRARY_PATH=/mnt/card/usr/lib/:/mnt/card/opt/QtPalmtop/lib PYTHONPATH=/mnt/card/opt/QtPalmtop/lib/python2.5/:/mnt/card/opt/QtPalmtop/anki/ankiqt-lite/:/mnt/card/opt/QtPalmtop/lib/python2.5/site-packages/pysqlite2/ python /mnt/card/opt/QtPalmtop/bin/anki_qpe_launcher.py  $*

Note that the above command starting with LD_LIBRARY_PATH and ending with $* is all one line.

Also, /opt/QtPalmtop/bin and /mnt/card/opt/QtPalmtop/bin are in my PATH. This is done in my .bashrc with:

export PATH=$PATH:/opt/QtPalmtop/bin:/mnt/card/opt/QtPalmtop/bin

Two more notes:
1. I tried installing the first ipk with the GUI Z software installer, but it complained about the package possibly not being installable to SD card and didn't complete the installation, so I gave up on the GUI ipkg install and just went straight with the command-line ipkg install method.
2. Anki copies a backup deck file into /home/zaurus/.anki/backups. In my case I didn't have enough space in /home for a backup deck copy so Anki refused to start until I made enough space for creation of the /home/zaurus/.anki/backups files.

I'm glad to hear that plugins may be a possiblity in the future.

Thanks again for your great work. I have no excuse for not studying now!

Last edited by rtkrtk (2008 April 11, 6:11 am)

Reply #108 - 2008 April 12, 12:14 am
rtkrtk Member
From: Japan Registered: 2007-10-16 Posts: 27

More notes on installing Anki to the SD card on the Zaurus. The instructions in my last post allowed Anki to start, but without an icon in the task bar, meaning that if you changed focus to another window, there was no way of coming back to the Anki window.

To properly allow the Anki taskbar icon to appear, while keeping the majority of the application files on the SD card, I had to do the following:

1. Install all the ipk files manually as described in my previous post.
2. cp /mnt/card/opt/QtPalmtop/pics/anki.png /opt/QtPalmtop/pics/anki.png
This puts the application icon file on the main flash memory.

3. Create /opt/QtPalmtop/apps/Applications/anki.desktop as follows. This creates a desktop file on the main flash memory, needed for appearance of the taskbar icon. Note the Exec line specifies the file anki.sh, given in the next step.
[Desktop Entry]
Comment=Spaced Repetition Software
Exec=anki.sh
Categories=
Icon=anki.png
Type=Application
Name=Anki
Display=640x480/144dpi,480x640/144dpi   

4. Create /opt/QtPalmtop/bin/anki.sh as follows. This creates the application launcher file in the main flash memory, needed for appearance of the taskbar icon. We need to use a custom launcher shell script to point Python to the libraries/modules installed on the SD card. Edit the --deck parameter as appropriate.
#!/bin/bash

export PATH=$PATH:/opt/QtPalmtop/bin:/mnt/card/opt/QtPalmtop/bin:/usr/local/bin

LD_LIBRARY_PATH=/mnt/card/usr/lib/:/mnt/card/opt/QtPalmtop/lib PYTHONPATH=/mnt/card/opt/QtPalmtop/lib/python2.5/:/mnt/card/opt/QtPalmtop/anki/ankiqt-lite/:/mnt/card/opt/QtPalmtop/lib/python2.5/site-packages/pysqlite2/ /mnt/card/opt/QtPalmtop/bin/anki_qpe_launcher.py --deck=/mnt/card/anki/decks/jlpt-vocab.anki

5. Edit the installed /mnt/card/opt/QtPalmtop/bin/anki_qpe_launcher.py and insert the following line after "import sys". This is needed to make the executing anki application argv[0] match the program executed in the .desktop file created earlier; without this, the application icon will not show up.

sys.argv[0]="anki.sh"

6. In the Zaurus home screen, select the "setup" tab (with a picture of a wrench) and click the icon to edit the home page icons. Add a new application and choose anki.sh as the program to execute (it shows up because you put it into the main flash memory). Select an icon. Close the setup and say "Yes" to update the home screen.

7. Click on the new anki icon to start anki. It takes a while to load the deck, but eventually the Anki icon should appear in the taskbar, and if you click it, you will be in Anki and you can switch back and forth between other applications with no problem.

This was a bit more complicated than I expected (getting the icon to show up); perhaps there's an easier way.

Reply #109 - 2008 April 12, 10:01 pm
misha Member
From: Sydney Registered: 2007-04-05 Posts: 99

rtkrtk,

Thank you for the detailed instructions.

I'll look into creating a separate launcher package for SD and CF card users of AnkiQT lite.  This launcher package will contain the icon and script to get everything going, so that people won't have to go through the same gruelling ordeal that you did.

It won't be hard to do, so I'll try and sneak it into the next release.

Cheers and regards,
Misha

Reply #110 - 2008 April 25, 6:24 am
misha Member
From: Sydney Registered: 2007-04-05 Posts: 99

rtkrtk wrote:

2. Anki copies a backup deck file into /home/zaurus/.anki/backups. In my case I didn't have enough space in /home for a backup deck copy so Anki refused to start until I made enough space for creation of the /home/zaurus/.anki/backups files.

You may be able to avoid writing backup decks to your home directory and save a bit of space by symlinking /home/zaurus/.anki/backups to a location on your SD card.

I haven't tried this myself yet -- if you feel like it, let me know if it works.

Cheers,
Misha

Reply #111 - 2008 April 25, 7:58 am
misha Member
From: Sydney Registered: 2007-04-05 Posts: 99

I've uploaded Alpha 6.  Here's a screen:

http://sourceforge.net/dbimage.php?id=169707

The SD/CF launchers should be ready tomorrow, hopefully.

Reply #112 - 2008 May 17, 9:21 pm
raseru Member
From: california Registered: 2007-05-23 Posts: 159

I'm considering buying a PDA like Zaurus or a electronic dictionary like casio. Casio looks really great, and does a superb job at what it's aiming for, but how does a PDA like Zaurus handle a J&E dictionary? Like let's say I look up a word, and it uses a word to explain that I didn't understand, can I click on that new word and jump to its explanation real easily? Is the font real small and pixelated?

Would be awesome to have Anki on a handheld, but I don't really want to sacrifice the dicitionary and get something really mediocre.

Reply #113 - 2008 May 18, 12:33 am
misha Member
From: Sydney Registered: 2007-04-05 Posts: 99

raseru,

There are some Japanese dictionaries on the Zaurus as well, but I don't use them all that much.  From what it seems, you can't just click on a word to navigate to it's meaning (as you describe).  Instead, you can highlight the word with the stylus and push the `OK' hard-key to search for the selected text in the dictionary.  The dictionaries that came with my Zaurus were Kojien (広辞苑第五版) and GENIUS (ジーニアス英和第3版/第2版辞典).  They're fairly complete and come with multimedia content for some of the entries (maps, sounds, images).

You can easily install other dictionaries as well.  I personally prefer Kangoroo (it's simple, English, based on EDICT).

The display on the Zaurus is actually quite good, in my opinion.  Normal text is easy to read if you rest the Zaurus on the desk in front of you.  Check out the screenshot in my previous post for an example.  Keep in mind that because the pixels on the Zaurus are likely to be physically smaller than those on your current display, the image you see is larger than what you would see if you looked at a Zaurus screen.

You can magnify the screen using key press combinations if it's required.  Doesn't work with all apps though (I haven't built that into the Zaurus Anki port yet, either).

Hope I've answered your questions.

Cheers,
Misha

Reply #114 - 2008 May 18, 12:57 am
misha Member
From: Sydney Registered: 2007-04-05 Posts: 99

As a follow up, some thoughts on getting a Zaurus vs getting an electronic Japanese dictionary.  Keep in mind I'm a Zaurus owner, and I've never owned an electronic dictionary myself.  Most of my Japanese class-mates have one though, so I have a tiny bit of exposure to using them.

First, the battery life.  The dictionaries I've seen tend to last a really long time.  A Zaurus will keep going for a couple of hours of non-stop dictionary use (I've never timed this, but I estimate it to be around 7-8 hours) before needing a recharge.

Next, while I like the screen on the Zaurus, it isn't particularly good in bright sunlight.  If you plan to use it when you're outdoors, you may have a problem.  The other dictionaries may or may not suffer from the same fate, depending on the type of the screen.

Versatility is really the main reason to get a Zaurus instead of a dedicated Japanese dictionary.  You can use the Zaurus to listen to music, browse the net (you need a separate wireless card), etc.  Using new software is also another strong point.  With a normal dictionary, you're stuck with whatever program the vendor put on the dictionary, and nothing else.  With the Zaurus, you can use the provided dictionary program alongside other tools, like Anki, for example.  All this may or may not be a huge bonus for you depending on what you expect of your dictionary and what other gadgets you own.

The main reason not to get a Zaurus, in my opinion, would be that they've been discontinued for a while.  And while they're still relatively popular in the community, you'll likely have a tough time getting support from Sharp for a discontinued product.  So if you're having issues with installing a particular package or getting something to work on your own, relying on the Zaurus community is pretty much your only option.  Whether or not this is a horrible thing depends on how used you are to using web forums etc. for finding solutions to problems.

Misha

Reply #115 - 2008 May 18, 3:22 am
raseru Member
From: california Registered: 2007-05-23 Posts: 159

Thanks a lot for the in-depth response.

Reply #116 - 2008 May 27, 8:36 am
misha Member
From: Sydney Registered: 2007-04-05 Posts: 99

For Zaurus users:

I've finally gotten round to playing around with building a newer libsqlite3 for the Zaurus.  This was in order to address the sqlite3 representation of floating point numbers on the Zaurus being inconsistent with the representation used on other systems.

The updated libsqlite3 package is now available.  I've added a section about upgrading to the Wiki:  http://ankiqpe.wiki.sourceforge.net/

The good news is that you can now transfer your decks between the PC and the Zaurus without having to modify them.

Misha

Reply #117 - 2008 June 19, 7:09 pm
raseru Member
From: california Registered: 2007-05-23 Posts: 159

I think I've finally decided to get a Zaurus. Anki is just too much of a good tool to pass up. Is there any particular version I should get? Also it doesn't need to be hacked or anything does it? I'm guessing ebay is my best bet too, huh

edit:There isn't an actual hand held that can run the real anki version is there? Like one that can fit in my pocket

Last edited by raseru (2008 June 19, 7:14 pm)

Reply #118 - 2008 June 21, 1:07 am
ctopp Member
From: Kyoto Registered: 2008-01-07 Posts: 17

@ raseru

The models SL-C1000 and SL-C3200 are still on sale in (some) electronic stores here in Japan.  I have owned so far a SL-B500, SL-C700, SL-C860 and now the SL-C1000, which is by far the best model IMHO -- the best combination of RAM, CPU and Keyboard.  The SL-C3200 is similar, but has a built in harddisk, which makes it *much* more expensive and it also uses a lot more power.  To run Ankiqpe, you will need however a SD-Card, since the built-in memory is not enough.  Out of the box, the Zauri support only up to 1GB, but with an extra driver available somewhere on the net, you can use up to 4 GB.  Beware though that you need to stick to the older SD cards as opposed to the HD-SD cards now available.  I have been using a no-name SD card with 4GB for more than a year now without any trouble.

Ctopp

Reply #119 - 2008 June 21, 1:22 am
ctopp Member
From: Kyoto Registered: 2008-01-07 Posts: 17

@Misha

I just upgraded my anki-qpe installation from alpha5.  What I did was the following:

uninstalled
libanki.9.5.4
anki_alpha5
libsqlite3.0

and then installed
libsqlite3-0_3.5.6-r0_arm.ipk
libanki_0.9.5.7_arm.ipk
anki_alpha6_arm.ipk

After this, I started the application and noted that it would open my deck, but would not show anything.  I then remembered to copy over the deck from the PC again and opened it again.  This time I could use the deck as usual.
However when trying to sync, I get the following error:

Traceback (most recent call last):
  File "/home/QtPalmtop/bin/anki_qpe_launcher.py", line 38, in <module>
    ankiqt_lite_main.main()
  File "/opt/QtPalmtop/anki/ankiqt-lite/ankiqt_lite_main.py", line 76, in main
    sync = Sync(parent, opts.sync_user, opts.sync_pass, False, False, False)
TypeError: __init__() takes exactly 6 arguments (7 given)

This is when I started the syncing from the commandline with the --action=sync option as follows:
anki_qpe_launcher.py --deck=mydeck.anki --action=sync

When starting the sync from the GUI, it seems to work just fine. 
However, I would prefer to be able to initiate the sync from a shell script, to save time in the morning rush.  I guess there is just a parameter missing in the call, but have no idea what should go there....

All the best,

Ctopp

Reply #120 - 2008 June 21, 1:22 am
lazar Member
From: Canada Registered: 2007-12-06 Posts: 103

Although I made my own thread regarding Supermemo, I ran into a new problem with my Palm.... how do I install the Japanese font ? I did for Anki, but it doesnt seem to be helping me with other programs like Supermemo

Reply #121 - 2008 June 21, 3:23 am
raseru Member
From: california Registered: 2007-05-23 Posts: 159

thanks ctopp

Reply #122 - 2008 June 21, 6:12 pm
misha Member
From: Sydney Registered: 2007-04-05 Posts: 99

@ctopp:

Thanks for writing about this.  This is already fixed in the source repository, so will be available with the next release (alpha7).  I'll try and push that out soon (next couple of days, probably before the next weekend).

If you're extremely anxious to get command-line sync going, the file that contains the fix is:

http://ankiqpe.svn.sourceforge.net/view … y?view=log

If you download the revision with the fix and overwrite the existing ankiqt_lite_main.py, it may work.

Cheers,
Misha

Reply #123 - 2008 June 22, 9:38 am
misha Member
From: Sydney Registered: 2007-04-05 Posts: 99

raseru wrote:

I think I've finally decided to get a Zaurus. Anki is just too much of a good tool to pass up. Is there any particular version I should get? Also it doesn't need to be hacked or anything does it? I'm guessing ebay is my best bet too, huh

I own a SL-C3200.  I got it as a present so I didn't really have an option of what model to get.  The microdrive is good for storing large files (like dictionaries and music) but by default it's formatted as FAT, meaning that you won't be able to use it for some things (case sensitivity matters in things like building Unix sources, for example).  It's a nice-to-have but not a must, in my opinion.

You don't need to "hack" your Zaurus in any way to get Anki going on it.  There is a number of software packages you need to install (like Python).  In addition, there may be a couple of steps that require use of the command-line but it's all detailed on the project wiki.

raseru wrote:

edit:There isn't an actual hand held that can run the real anki version is there? Like one that can fit in my pocket

I don't know of any current pocket-sized device that can run the desktop Anki without modifications.

I guess it all depends on the size of your pockets, in the end smile  Personally, I don't consider the Zaurus a pocket-sized device.

Misha

Reply #124 - 2008 June 24, 5:49 am
misha Member
From: Sydney Registered: 2007-04-05 Posts: 99

alpha7 now available for testing from http://sourceforge.net/project/showfile … _id=609083

Reply #125 - 2008 June 26, 7:09 am
ctopp Member
From: Kyoto Registered: 2008-01-07 Posts: 17

@Misha

Thanks, I installed your updated file from the SVN repository and can now sync again from the commandline.  Wonderful, thanks a lot!

Ctopp