9 votes

How do I convert a dictionary in sqlite3, and I want to convert it to something usable by StarDict. Is that possible?

I don't know if my question makes any sense, and it's okay to say "No, sorry, it doesn't work like that".

I have a (pirated) dictionary that has the words and definitions in an sqlite3 database format.

I want to convert this into something that can be used by either Fora, GoldenDict, or StarDict.

Fora can use StarDict, DSL, XDXF, Dictd, and TSV/Plain dictionaries

GoldenDict can use Babylon .BGL, StarDict .ifo/.dict./.idx/.syn, Dictd .index/.dict(.dz), and ABBYY Lingvo .dsl source files.

I've found lots of software that goes the other way - it'll take a dictionary and dump it into an sqlite database. But it doesn't go the otherway.

Is what I'm asking for coherent, does it make any sense?

(I'd prefer Windows, or FreeBSD, but at this point I'd install Linux to get it done).

2 comments

  1. Bauke
    Link
    Would this program work? In the readme's formats table they have CSV available as read and StarDict available as write. Could you export the database as a CSV and then convert that way?

    Would this program work? In the readme's formats table they have CSV available as read and StarDict available as write. Could you export the database as a CSV and then convert that way?

    3 votes
  2. tibpoe
    Link
    sqlite files can have any contents, they're a general-purpose database. They're not a dedicated dictionary file format. So it's really not possible to say anything without more details. Are you a...

    sqlite files can have any contents, they're a general-purpose database. They're not a dedicated dictionary file format. So it's really not possible to say anything without more details.

    Are you a little bit familiar with the command-line? Can you install sqlite and use it to open the dictionary file, using a command like sqlite3 dictionary.db?

    At that point, .schema and enter will give some details about the schema, and one of the lines of output will be something like CREATE TABLE "abc". Take that line and run SELECT * FROM abc LIMIT 5.

    If you upload the output of those commands here it would be possible to determine what's going on and if this is feasible (I'm confident that it is).

    2 votes