• Status Unconfirmed
  • Percent Complete
  • Task Type Patches
  • Category Plugins
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version
  • Due in Version Undecided
  • Due Date Undecided
  • Votes 5
  • Private
Attached to Project: Rockbox
Opened by x1jmp - 2007-02-25

FS#6697 - New dict plugin

This is an almost complete rewrite of the current dict plugin.

It is based on the stardict dictionary file format and acts as a viewer for .idx files.

Most important features are:
- fuzzy search by showing all articles that start with a certain word
- quite fast search (binary search, same as the current dict plugin)
- scrolling for long descriptions
- handles even huge dictionaries (e.g. Wikipedia)

When first opening a dictionary, an offset table is created to provide random access to the index file.

Stardict dictionaries can be used almost directly but all files have to be uncompressed.

I created another patch, which adds a “Dicionaries” entry to the root menu (FS# 6630). It shows all dictionaries placed in “/dicts”.

Some more information may be found in a thread about an older version on MisticRiver

Some dictionary ressources:
- Stardict Website: - Wikipedia dumps:

I keep getting the error "failed to open description file"
I patched the dict.patch but the other one doesn't work
I extracted a couple of star dics and it lets me select them and search but when I select an entry it says that msg above.
Great work though I'm prob doing something wrong!

x1jmp commented on 2007-02-27 12:57

The plugin looks for an uncompressed description file with a .dict extension. Most dictionaries are compressed by default and have the extension
So uncompress the description file e.g. with

gunzip -S .dz *

It's just that there must be a .dict file with the same name.

The second patch requires the root menu patch (FS# 6630) to be applied as well.

I hope it'll work for you.

x1jmp commented on 2007-03-02 23:23

New version that parses #redirects from MediaWiki.

shuffled some things around and added a workaround for gcc wanting to use memcpy in plugins

oops. fixed path to dict.c in patch

x1jmp commented on 2007-03-04 21:10

Fixed a bug, which caused the redirect parser to not find some articles.

I am afraid the bug that overwrites the font data happened again. This time it was a search for Napier in the german Wikipedia and again it happened when selecting the term.

Also I had the problem that after scrolling down to the bottom of the text the next press on up cleared the screen apart from a number of squares in the top row. Pressing the menu button got me out of the mess.

Unfortunately I haven't found a way to reproduce the problems reliably. :(

x1jmp commented on 2007-03-05 12:30

In the tests I did in the simulator I never had such a problem (I'm lacking a hdd for my DAP).
But I don't know how much different the memory management on the player and the sim is.

Furthermore, there was another bug. After exiting the menu, the first page of the article was drawn instead of the one you were viewing before going into the menu.

Just fyi, freqmod and I have done some work on a wikimedia-specific viewer here: 4755
I'm going to take a good hard look at your plugin to see if I can come away with anything interesting… Where do you get the wikipedia dump in the format that you have for download? A lot of work we've been doing has been on a converter from the XML dumps to an archive with each article gzipped and with control codes for things like links and formatting.

x1jmp commented on 2007-03-15 21:59

I knew about your wikimedia viewer, as I'm the one who initially opened that feature request.
However, at the beginning I didn't like it, because it was iPod only, though this has changed now and that it's limited to Wikipedia ATM.

My intention was to write a new search-only dict plugin and create a general document viewer for the articles.
I think working on a viewer is more attracting than working on a Wikipedia-only plugin.

The wikipedia dump was converted using the converter from stardict-tools. It doesn't support any kind of formatting.
Also the plugin doesn't support compression. I looked at the mww dumps and the size of the English Wikipedia with each article gzipped was around 800 MB less then uncompressed.
The Stardict (not the one for Rockbox) itself as well as the DICT project use special, but still standard-compliant, gzip files to allow random access to them. Compressing the whole dump should decrease the size much better, but I'm not sure, whether compression is needed at all.

I would very like to join the two wikimedia programs, on concentrate working on one. It's definitely a great feature for Rockbox and everyone who may want to switch to Rockbox.

In the last days I wrote such a viewer and added a basic formatting engine to Rockbox. It's now possible to pass formatting arguments to the lcd_puts_style function or to let it interpret some of the ANSI escape codes (the ones, that also control the style on your xterm, see
At least in the sim it works on all displays, even thar Player and the remotes. Some of them don't support all styles, of course. They just ignore styles and escape sequences, so that the API is the same on every device.

For example, the output, that finally comes out of the man command, should be direclty readable with the viewer function, as it's the same 'markup language'.

Patch Rockbox with dict_all.patch (it changes a lot, so I recommend to use a clean build) and have a look at the plugin test_styles (also for example code).
Then download the formatting_demo dictionary and search it for the article "Rockbox". It's a hand-formatted article, as I'm lacking a converter.

Please drop some feedback, because I still can only test with the sim.

Hate to say this but your patch just went out of sync. Been using your patch in my custom builds and it's great.

x1jmp commented on 2007-03-16 23:58

Damn, was just one day old. Synced.

Strange thing , I applied your patch fine and made a build fine for my h10 5gb but when I made it for the 20gb it failed. something with the screen stuff.
make[2]: * No rule to make target `rockboxlogo.160x128x16.bmp', needed by `/mnt/other/rockbox/build/h20/apps/bitmaps/native/rockboxlogo.160x128x16.c'. Stop. make[1]: * No rule to make target `/mnt/other/rockbox/build/h20/apps/dep-apps', needed by `/mnt/other/rockbox/build/h20/apps/rockbox.elf'. Stop.
make: *** [all] Error 2
Those come in that order. I then removed the patch and it built fine. then again patched it and it didn't work! sry for the news!

x1jmp commented on 2007-03-17 08:05

Someone asked me to create a build with a custom logo.
I forgot to take that out. This patch should be fine.

Hunk #2 FAILED at 18.
1 out of 2 hunks FAILED – saving rejects to file apps/plugins/dict.c.rej
LOL. some1 must be trying to put your patch out! lol

x1jmp commented on 2007-03-17 16:06

It went out of sync again, too bad… :)
The changes only made the patch program unhappy. Keeping your old dict.c would result in the same.


I think you got someother stuff mixed in there too becasue it won't apply clean. this time most of the hunks failed. sorry for the bad news. you must be doing somthing wrong!

x1jmp commented on 2007-03-17 16:55

I'm having no problems applying the patch on a recent svn.
Maybe you have other patches applied (e.g. a former dict patch) which conflict with it or your repository isn't up to date.

My bad!

Enmar commented on 2007-03-26 09:02

I believe it went out of sync :(
oh well I don't need a thesaurus or an encyclopedia for a while :(

I would have made a sync for you, but unfortunetly, They removed the last file in your patch. LOL. Really out of sync!

x1jmp commented on 2007-03-26 18:02

Synced and fixed a small bug.

Your patch doesn't compile for the H10 20gb again. I think you were working on your custom boot image again!

x1jmp commented on 2007-03-27 21:45

Oh damn, I took it out now. Sorry for the problem.

Thanks alot for all the effort you put in to this. Wikipedia on your mp3 player is just awesome! I've compiled rockbox for my iPod photo yesterday. It all works fine, but when I open a dictionary (English-Spanish for instance) it makes an index file and then I'm ready to type in a word. But after 1 or 2 letters rockbox crashes. After that it's not possible to reboot into Rockbox again. When I remove the nvram.bin file I'm able to get in again, but the same problem occurs, because the nvram.bin file is being created again.

Is it a bug, or is it just me :)

mr.pi commented on 2007-03-29 17:10

hello timo,

i use the mad cow build for my toshiba gigabeat. he included your dict patch. now i saw on installing that all headlines are with a shadow font and i can hardly read these headlines.

my question could you offer 2 version of your dict patch with your font style and with the old font style?

thank you

the pi

I really like the wiki plugin and the new styles. But I have a couple of problems:

- id doesn't seem to be rebuilding the indexes in .rockbox anymore but instead says: "failed to open index" when you try and search
- the scroll bug seems to be back (where the status line is not taken into account when scrolling.)

Also would it be possible to split the different bits of functionality into different patches? The all in one currently causes some confusion:

x1jmp commented on 2007-03-29 19:51

Poopje, the text input is a rockbox function not from the dict plugin. Do you experience the same problem when renaming a file for example?

The headline style's purpose was actually just to demonstrate the style feature. I changed this to bold only, but you may disable it in apps/gui/list.c.

The plugin does not create the index files, just an offset table (.oft files in /.rockbox/). Not to find the index therefor sounds quite strange.

A tried to split up the patch into its funtionalities, but IMHO it's not worth the effort, because the dict plugin depends on most of the other patches.

styles.patch and viewer.patch are necessary for the dict plugin.
Additionaly dict_all.patch consists of all other patch, just as usual.

Just to let you know it is working fine now.

x1jmp commented on 2007-03-31 22:18

Today I got a version of my new converter running. It's uses expat to process mediawiki dumps on converts the english Wikipedia in ~7 minutes.
A problem I discovered is that the current english Wikipedia (4.9GiB) is too big to be used as a stardict dictionary at all. It uses uses uint32_t for the article offsets in the description file.
The old dumps are working because the converter seems to have missed some articles :-)

Some ideas to address articles over 4 GiB? Using a 64 bit type would break compatibility with stardict.

The converter also doesn't format the articles, it just copies the raw source. Have a look at mediawiki_format.c and feel free to enhance it!

Robert: I made a new build from the 30th of march source and your dict_all patch. I can use it with the wikipedia dictionary without any problems. But after a reset I'm not able to get into Rockbox. It hangs on the boot screen. I don't think that has anything to do with your patch, just a general memory problem (I haven't looked into it yet). Keep up the good work!

Out of sync. I hope I did this right. Please tell me what I did wrong if it is wrong!

I didn't do it right! Needs a sync to SVN!

x1jmp commented on 2007-04-03 18:44

It looks like you just forgot to add the additional files created by the patch to your repository.
Use `svn add` to add these:

Synced and added support for .lidx (index file with 64 bit offsets) to be able to use huge dictionaries (>4 GiB), though this is more like a temporary solution.

Have a look at the README in stardict-mediawiki.tar.bz2 to learn how to make your own Wikipedia dumps.

I am still getting an error with ansi.c Actually, it has multiple errors! It patches fine but doesn't compile.

x1jmp commented on 2007-04-04 13:56

Remember that patch creates a new file it just adds content to it. So if the file is already existant, patch will add the content again. This results in a file with twice the content and breaks compiling.

You might run svn-clean ( patching to get rid of _all_ files that don't belong to the repository.

Needs a sync! I tried but some of the functions were the old patch went are gone now! Good Luck!

x1jmp commented on 2007-04-10 22:52

Finally synced and fixed some silly bugs :P
It's now fully usable with the H1x0 remote (at least).

Synced!!!!!!!!!!!!!!!!!!!!! Works too!

Oh man, you beat me. Everyone use Timo's patch, not mine!

Synced, some change in root_menu.c

The patch works on a clean svn but doesn't patch on top of the scrolling margins patch. Is there any way to fix this?

Loadable icons patch breaks this one as well.

Usually, any combining of patches is totally up to you! There is no efficent way of making them combinable except for someone to make a patch of all of the patches!

My build works with loadable icons, you just have to put the iconname in apps/gui/icon.h and put the icon in the right place in the bmp.
An other thing. With your new styles ther is an bug with the scrolling lines in the lists (Scrolling line one line above the line to scroll). Today I reseted my Database and after the clearing of the DB and befor I reinitialised it, it worked. So I don'T know is it because of the initialised database? mysic mysic, tomorow I try to reproduce.

Could reproduce it, deleted the database files and the scrollbug was gone.

x1jmp commented on 2007-04-15 00:28

It sounds like the scroll bug caused by FS 6747, which appeared only in older versions of the dict patch.
I have no clue how the database could cause it, it's working fine on my player with the database initialized.

Btw, synced.

right, I commented out the lines with the marginreset in tree.c and now it works. thanks

Needs sync with the loadable icons commit.

ups i saw that i said a false thing…i commented out in apps/gui/list.c

Enmar commented on 2007-04-18 03:31

out of sync
I would sync it if I knew how. :(
anyone know where I can learn?

I managed to sync it though it is not done properly, as some functions have been removed. It should work, but someone will have to do a proper job on it!

x1jmp commented on 2007-04-19 20:21

Do icons still work in your patch?
The external bitmap icons are less friendly to patches than the old system. I think I'll include them inleave them out in the next patches, as it requires to replace around 10 bitmaps to make it work on all targets.

No there are no icons, but it still functions correctly!

x1jmp commented on 2007-04-22 19:33

Synced and bugfixed a little bit :)
It doesn't include its own icons, but that's barely remarkable.

Would it be possible to create a wiki page, or just post here about how to get a wikipedia dump to work. I have lots of people asking and i'm not sure exactly how to do it myself. Alls I know is that you need to extract the stardictionaries. But what about wikipedia?

Enmar commented on 2007-05-08 01:34

Out of sync again. :(


resync'd (i think)

I take that back. Previous patch doesn't sync properly =/

Sync'd. Tested. It works this time =]

Eek. Sorry for giving your hopes up. The patch doesn't work.

I'm not sure why. When I manually make the changes to dict.c (adding in #include "oldmenuapi.h" and removing several rb–>) everything compiles correctly. However, a patch, the patch doesn't seem to want to compile. Boo.

Could somebody please make a stripped down version of this patch? All I need is the ability to read stardict files, I don't need any fancy font effects and ansi stuff. I'm sick of all those parts always getting out of sync and causing compile problems. I'm sure I'm not the only one who thinks this way.

x1jmp commented on 2007-05-17 18:22

I synced, adapted to the new menu-api and ripped out the font style feature, as it isn't really used at the moment.
The first patch will do no changes to Rockbox itself, only the plugins.

Thanks, but it's saying it need viewer.c and viewer.h. viewer.c is in the "plugins" dir, bot the "lib" dir, and viewer.h doesn't exist. I tried this on clean, unpatched source and it still didn't work.

x1jmp commented on 2007-05-17 20:12

Eh, right, I forgot to add the to SVN when I created the patch.

That works now. Thanks again.

Enmar commented on 2007-05-19 06:19

It says that "patch: Can't open patch file nary : No such file or directory"
what happened in under one day… They must really want your patch gone, which is crazy because I think it is wonderful

Enmar commented on 2007-05-19 06:42

wait this is happening with all my patches what is going on did the patch system change????

Enmar commented on 2007-05-23 04:24

sorry about the last two comments, the issue is resolved, but I believe there is a problem when patching the "dict.c" file hunk #2 fails… don't tell me anything over an amateur would not know… you know like I do not know virtually anything about C++, C or any other programming language.

probably unsynced… or it may work fine but I have spent most of the day with the nary problem and I ended up just re-downloading the source to Rockbox and I do not want to have to do it again.

Enmar commented on 2007-05-27 08:59

it is out of sync

Enmar commented on 2007-06-10 02:29

okay is anyone listening or is everyone deaf. It is out of sync, someone try to fix it or tell me how to…

x1jmp commented on 2007-06-10 14:26

Sorry for the lack of updates.
After some time I added some features to the viewer and rewrote some code.
Some new features:
- Search function to search within articles (case insensitive)
- Enhancement of the search algorithm (offset files will be recreated, but should be slightly faster)
- custom backlight setting
- REC button (iRiver, Sansa) as a configurable shortcut

Works with the current svn build.

If the patch doesn't work with dict.c, try to replace it with a previously patched dict.c.

Enmar commented on 2007-06-14 05:13

I was thinking about doing that but I did not have enough spare time to do so, (school finals and what not) thank you for the patch, very useful.

Just FYI, this patch is incompatible with the scrolling margins patch.

framo commented on 2007-06-21 20:27

"Data abort at 01F218C"
Entering and searching for a word works fine on my iPod Nano, I get a list as a result.
But as soon as I try to browse to an article in this list, I get the following errors:
"illegal redirect (string)" followed immediately by a "Data abort at 01F218C (or another address)"
I'm using r13681M-070621 and I try to open wikipedia (both enwiki-20061130 and dewiki).
I have this problem for several months already and hoped that it would go away with a newer version of rockbox or dict_all, but it doesn't.
Am I doing something wrong or do others also have this problem?

x1jmp commented on 2007-06-23 10:51

I never got an error like this on my device, so it's hard for me to figure it out.
The "Illegal redirect" should only occur when there's a redirect (#redirect somarticle) to a non-existing article.

If your a bit familiar with C, then please try to find out the line in the code, where it happens by putting some
rb→splash(HZ, "sometext");
into the plugin code.

As the scrolling margins patch does some changes to Rockbox, the plugin can only be compatible to either the original RB or RB with scrolling margins patch.
I don't use this patch, but this should be the only change to make it work with scrolling margins:
- rb→lcd_setmargins(VIEWER_SCROLLBAR_WIDTH, 0);
+ rb→lcd_setmargins(VIEWER_SCROLLBAR_WIDTH, 0, 0);

Enmar commented on 2007-06-23 23:31

To Frank

I get the same error as I am also using rockbox on an ipod nano
It is not just you…

Enmar commented on 2007-06-23 23:34

quick edit of my last post I only get the data abort part.

framo commented on 2007-06-24 15:59

The "illegal redirect" error only appears sometimes - most of the time I also get directly the "data abort" error.
Unfortunately I don't know C well so I'm not sure where to best insert the splash command, but I tried a few other things and noticed the folloing:
- I get the same "data abort" errors on an iPod Video G5 (60GB disk)
- When I compiled the patch for the Nano UISimulator, then the wikipedia files worked fine and I didn't get any "data abort" errors using the plugin.
- the problem does not seem to be with the .oft files as they look identical when built with the physical iPod or the UISimulator

Enmar commented on 2007-08-06 08:43

Needs resync..
debian:~/rockbox# patch –binary -p0 < Dict.patch
(Stripping trailing CRs from patch.)
patching file apps/lang/english.lang
Hunk #1 succeeded at 4939 (offset -6040 lines).
[b]Hunk #2 FAILED at 4980.[/b]
1 out of 2 hunks FAILED – saving rejects to file apps/lang/english.lang.rej
(Stripping trailing CRs from patch.)
patching file apps/plugins/viewers.config
(Stripping trailing CRs from patch.)
patching file apps/plugins/dict.c
Hunk #1 succeeded at 7 with fuzz 2.
[b]Hunk #2 FAILED at 18.[/b]
[b]1 out of 2 hunks FAILED – saving rejects to file apps/plugins/dict.c.rej[/b]
(Stripping trailing CRs from patch.)
patching file apps/plugins/lib/pluginlib_actions.h
Hunk #1 succeeded at 88 (offset 41 lines).
[b]Hunk #2 FAILED at 235.[/b]
[B]1 out of 2 hunks FAILED – saving rejects to file apps/plugins/lib/pluginlib_actions.h.rej[/b]
(Stripping trailing CRs from patch.)
patching file apps/plugins/lib/viewer.c
(Stripping trailing CRs from patch.)
patching file apps/plugins/lib/SOURCES
Hunk #1 succeeded at 30 (offset 1 line).
(Stripping trailing CRs from patch.)
patching file apps/plugins/lib/viewer.h
(Stripping trailing CRs from patch.)
patching file apps/settings.h
(Stripping trailing CRs from patch.)
patching file apps/filetree.c
Hunk #1 succeeded at 265 (offset -1 lines).
Hunk #2 succeeded at 572 (offset -1 lines).
(Stripping trailing CRs from patch.)
patching file apps/root_menu.c
Hunk #1 succeeded at 179 with fuzz 1 (offset 7 lines).
Hunk #2 succeeded at 294 (offset 8 lines).
Hunk #3 succeeded at 308 (offset 8 lines).
Hunk #4 succeeded at 361 (offset 8 lines).
(Stripping trailing CRs from patch.)
patching file apps/root_menu.h

x1jmp commented on 2007-08-13 21:53

Synced and renamed into the plugin into dict2.c to make the patch independent from the original dict plugin.

If you apply the ata_wakeup patch from  FS#7588  you can comment out the rb→ata_wakeup() on line 853 in dict2.c. This will save some seconds when doing a new search while viewing an article (disk already spins up while you type the new search).

Enmar commented on 2007-08-14 06:44

ok well it seems that the most resent patch patches cleanly but breaks the compiling

x1jmp commented on 2007-08-14 10:14

A small change brought it out of sync again.

But it compiles for me, did you patch the clean svn source?

Enmar commented on 2007-08-17 20:59

okay it compiles now but i STILL get the data abort error like this
Data abort

framo commented on 2007-08-17 21:12

Below the results of the tests I did so far with the dict plugin:
ipod nano simulator - works fine
ipod nano - data abort (I tried several versions over the last 3 months)
ipod video 5.5 30GB - data abort
sansa 280 - data abort
While the fuzzy search seems to works well on all these models, the data abort error appears when trying to open a topic.

I can second this report :

60 gig 5th generation ipod

source : synced from svn today (10 minutes ago)

dict2_all.patch applied, compiles fine and :

"data abort" at (hex address)

is all I get. This looks really really nice, and I am gagging for it. I just wish the input methods contended with the Ipod Linux stuff, which looked pretty funky

x1jmp commented on 2007-08-30 13:48

Bugfix update, but good news for Sansa/iPod users.
The data abort (due to an unaligned memory access) is fixed. Thanks to parafin :)

framo commented on 2007-08-30 21:48

Not sure why but I'm still getting data aborts (I am testing with dewiki.dict and .idx from 24/12/06).
Compilation is fine and fuzzy search too, the errors appear when trying to browse to an article.
It happens only for 1 out of 2 searches on my Nano, whereas it seems to happen on every search on my Sansa.

Hmm, i didn't test much new version before, but it appears that i have data aborts sometimes too. It's pretty rare - around 10% of time. I tried to change alignment step to 8, but still got data aborts… Strange.
Also, scrolling is reversed on my ipod video - scrolling forward scrolls up instead of down.

x1jmp commented on 2007-08-31 13:14

Next try, seems to work fine.

framo commented on 2007-09-02 06:48

Wiki is now working very well for both Nano and Sansa, thank you so much Timo :)

Enmar commented on 2007-11-28 07:50

Needs resync

Enmar commented on 2007-11-28 09:01

Nevermind I should probably have checked it before posting

Enmar commented on 2007-11-28 16:04

Actually there is a problem the data abort error is back.

Enmar commented on 2008-01-02 06:18

I found out that when listing 80+ articles at once you get the data abort error and a hex address followed undefined instruction and a hex address.
Listing less than 80 articles causes no errors and this occurs on the ipod nano as far as I know.

I can confirm this. If I search the word "sin" when using default config → Data Abort
If I change the topic limit to 15 and do it again → No Data Abort

Izzeh commented on 2008-02-02 22:22

Needs resync I believe.. anyone?

here you go

Izzeh commented on 2008-02-02 23:39

Thank you very much - works perfect!

RvX commented on 2008-02-18 13:24

Works fine. I would like to have links in Wikipedia articles active; for example, when I use » key, it highlights a link in article text and with select button I can move to that linked article. Hitting » button will highlight first link in actually viewed page i.e. in the middle of article.
Also, I would like to have Undo | Redo function. For example: I read one article from my search, and want to go back to search results and read next article from the list. I simply hit one button and go there. :)

Izzeh commented on 2008-02-18 20:58

Is that what you are looking for? lol…

RvX commented on 2008-02-18 21:40

Yes, I am looking for something like that but in this patch, because it's very easy to install new dictionaries, encyclopedias for it. I'll be happy when such enhancement is provided.

synced. I only changed 1 hunk, so no new patch file.

i think it needs to be synced
it brings up failed hunk while patching

I tried to sync it on my own and it patched and also compiled without errors.
Feel free to try it, and shout out if anything is not ok with it.
and thx to Kugel who had to have a lot of nerve with me^^

I tried to sync it on my own and it patched and also compiled without errors.
Feel free to try it, and shout out if anything is not ok with it.
and thx to Kugel who had to have a lot of nerve with me^^

Sync, also removed the DEBUGF stuff. No functional change.

I'd like to know if this patch has a chance for inclusion into SVN. I'm not very familiar witht he original dict plugin (i.e. I never used it) so I can't really give a comment on which is better.

This one is slightly better. Remove more DEBUGF and replace some tabs with spaces.

The DEBUGF's mostly caused warnings, that's why I removed them.

Forget the previous patch.

I'm not sure how that could happen, but I seem to have missed some struct plugin_api → const struct plugin_api conversions.

This should work, it compiles cleanly.

I just tried this plugin for the first time, really nice! I noticed that word-wrap doesn't always work correctly, but I haven't tried to find the problem in the code yet.

(look at 'white' and 'live' in the screendump)

Hmm, the converted wikipedia dumps seem to be down/unavailable. The stardict page says, that the most common wikis are too big to convert them into the stardict format. Is there a way now to get wikipedia running with this plugin?

Wikipedia was/is running on my player for months. I dont know how they converted the dump into dict format, but i'll try to bring the Dump online again, most likely on a One-Click Hoster

x1jmp commented on 2008-05-26 23:05

Hm… I tried to make converting wikipedia dumps as easy as I could achieve :)

Have a look at the last "stardict-mediawiki.tar.bz2" I uploaded, it allows you - once installed properly – to download convert wikipedia dumps with just one command, a URL to a pages-articles.xml.bz2 and enough disk space.

The archive has a README included that shows an example of how to use script (though the example URL is outdated and therefor doesn't work…)

Margins have been removed from the SVN.
I've removed the undefined function from the viewer.c and introduced a left_margin variable instead to use with putsxy().
Now it works fine on my recorder.
Somebody please check if my soulution is correct because this is my first patch ever. I hope it's ok.

This plugin is very useful! Thanks for it!


I investigated this issue too. Removing that line is also just fine.

In fact, any change will work just fine. I couldn't get the function in lib/viewer.c to be actually used! (Note that there's also a viewer.c in plugins/, a rename would probably nice).

On the other hand, I'm not too into this patch.

The simple removing of the function call not enough because the scrollbar overlaps with the main screen so and mess up the first column.
I agree with that the renaming of the viewer.c would be nice.

Well, I thought that too. But tests on my e200 didn't show any difference.

I would love 2 use this patch, as only seeing half the results on my small ipod nano 1st gen screen is very annoying.. It patches fine, with no HUNK errors or any visible problems, but when i "make" it says "viewer.c: In function 'viewer_menu_search':""viewer.c:447:error too many arguements to function 'rb→ splash'" then theres some other stuff that ill type if you need it..

x1jmp commented on 2008-08-26 17:59

I dont understand why you can only see half of the results… but to get it running replace all the splash() calls mentioned by the compiler with splashf() or use the attached patch :)

Thank you! I will try it now.. Well the ipod nano screen the original dict plugin in rockbox does not show all results since my screen is so small.. And in this dict patch upgrade it said scrolling for large definitions.. All the other resutls appeal 2 me 2 not just that… For example: for the seacrh of "A" it says 1."long defintion"2."long defintion"3. the basic unit of ?????.. So i can not see 3.. Thank you for this new patch !

hmmm… This patch is working, thank you.. But a message pops up when search results pop up.. I get "Data Abort at 0004E7D8 (0)".. This is very persistent.. I can see the results for 2 seconds then they dissappear.. Hmphh just when things looked good.. Sorry for giving you more bad news, I dont know if this happens 2 everyone or just me..

x1jmp commented on 2008-08-28 20:52

I found the simulator on my computer crashing as you described when listing more than 74 results (my irive doesn't). Though I'm unable to say what's causing this behaviour, I limited the search results to 50.
Give it a try!

Thanxs a LOT… I wouldnt of been able 2 digagnose the problem like that! I wonder y it doesnt do it on you iriver? Ill tell u right away how it does :)

While is building, Is there a way 2 get the dictionary that comes with rockbox in this? since on the last build that didnt work, it wouldnt show that there were dictionary files in /dicts except wen i used stardicts… but stardict's dicts are way 2 large for the 2 gig on mi ipod but the rockbox 1 fits nicely???

It works like a charm now, thank you!

I am hoping to use this in conjunction with the wikipedia reader ( FS#4755 : I patched up the source, but make stopped with this error:
LD dict.rock
make: *** No rule to make target `pluginlib_actions.h', needed by `/home/ehyer/rockbox_ipod55/rockbox_source/build_20081210/apps/plugins/dict2.o'. Stop.

Also, <NOOB>, unclear to me how to revert to daily build after I screw things up patching. Does 'svn co' give me a fresh source tree?</NOOB>

That can be fixed by add "lib/" to the #include's (except the plugin.h one), but I can't make a patch now.

Sync to SVN.

Thank you for this patch!

Sync to SVN (adopt to latest plugin and config API changes).
Removed memcpy from dict2.c (use memcpy in apps/plugins/lib/gcc-support.c now).

berti commented on 2009-03-11 18:42

sync to SVN (only minor changes)

i got a divide by zero on a gigabeat f 40 with r20293 and this patch. plus the device did not turn on normally, i had to move the battery switch to get it started.

i tried the link above for where to download a pre converted wikipedia dump, but when i go to the site the download never seems to start, are there any other mirrors that have an encyclopedia in start dict format that i can use? or maybe some sites with dictionaries as well?

@Seth: Why don't you try the StarDict homepage (google it). They have some good dicts there, and medium to small wikipedia dump. But not big dimps like english ones :(

ohh, i was looking for like a full wiki dump, i should have enough space for it on my iPod too!
because what i really want is a almost full wikipedia on my iPod

ohh and in english

sync to SVN
fixed warning in apps/lang/english.lang

needs a resync already

First off: Synced to work with 3.3

See my forumthread to get your copy of a precompiled 3.3 build containing lots of GPL dicts from
Please let me know which player you have, so i can make a version for you and don't have to compile for every possible target.

Second: i'll sync to latest revision soon.

here's the sync to 22304.
i forgot to update the revision numbers in the last patch, it doesn't change the fact that it's working, though.

Sorry for posting prematurely, here's the real "working copy" ;)

ok, you better disregard my last two posts. i can't get the plugin to open the index files now anymore. will investigate. help welcome.

GRaTT commented on 2009-08-16 21:14

Fixed opening idx and desc files
Fixed missing last character at end of line.
still some bugs with moving between screens.

x1jmp commented on 2009-08-16 22:51

Very nice to read, that there's still interest in the plugin!

But I want to know that the plugin is kind of obsolete at least to me, as there's the wikipedia plugin ( FS#4755 ) which has quite the same purpose and works quite well, or better.
Though it is primarily written for viewing wikipedia, you can find a converter for stardict dictionaries I posted on its flyspray task (

berti commented on 2009-09-24 20:47

I get a "failed to open index file" error with rockbox 3.4 and dict2_Aug12.patch
in the error message the last character of the index file before the extension is missing
and there's a double slash before the filename

e.g. /dicts//Oxfor.idx instead of /dicts/Oxford.idx

unfortunately I can't code… It might be an easy fix (hopefully)

berti commented on 2009-10-30 14:44

ok… this patch works for me on my e200v1 (against r23417)

The patch works but the root menu item just crashes my ipod.

This doesn't compile anymore

teru commented on 2010-06-18 15:10

synced to r26919. this works for me. this does not add "Dicionaries" to the root menu.

berti commented on 2010-06-19 14:44

thanks, it works for me, too

I think the "Dictionaries" root menu shouldn't be part of this patch anyway, because
(1) it works for the "new dict plugin" and the "wikipedia plugin".
(2) I think, that a patch should be split up into its funtionalities.

perhaps the root menu item should even have it's own task

St. commented on 2010-06-21 16:11

This patch applies cleanly, but doesn't compile due to recent changes in apps/plugins/libs/viewer.c
It is beyond my ability to resolve this issue.

If someone would be kind enough to sync this to current SVN I would be very appreciative.
I have been trying to push this for a commit on IRC with recent discussion, it is vastly superior to "dict.rock" which in my opinion shouldn't even be in SVN with the limitation is has currently (no search, no scroll).
Again, if this could be synced with current SVN I would be very appreciative.


teru commented on 2010-06-22 04:00

judging from the output, it looks like you didn't revert previous patch or something like.
make sure following files are removed and apply the patch again.
- apps/plugins/dict2.c
- apps/plugins/lib/viewer.c
- apps/plugins/lib/viewer.h

by the way, current dict plugin should scroll the text now.

St. commented on 2010-06-23 07:38

That was applied to clean SVN checkout, so not sure how that could be the case… :/


I have the same problem on the synced patch.

hope this helps, sync against svn r29706


Available keyboard shortcuts


Task Details

Task Editing