Converting sdltb files to CSV?

39 views
Skip to first unread message

Jean-Christophe Helary

unread,
Nov 11, 2024, 8:12:06 PM11/11/24
to okapi...@googlegroups.com
Is there a tool in Okapi that allows for the conversion of sdltb files to CSV (or a similar format)?


--
Jean-Christophe Helary
@jche...@emacs.ch
https://sr.ht/~brandelune/



danielhug

unread,
Nov 12, 2024, 5:21:46 AM11/12/24
to okapi-users
Hi Jean-Christophe,
While I can't answer your question regarding Okapi (at least I never came across this function), there is the Fusion App, based on the DB Browser for SQLite: https://appstore.rws.com/Plugin/241
It reads SDLTMs and can export them as CSVs (and many other things). I don't think it can be run from the command line, in case you want an automated workflow. It's a stand-alone app.
Daniel

Oliver Steinert-Lieschied

unread,
Nov 12, 2024, 5:28:09 AM11/12/24
to okapi-users
Hi,

have a look at Glossary Converter:


Oli

Jean-Christophe Helary

unread,
Nov 12, 2024, 6:37:49 PM11/12/24
to Wei Jiang, okapi...@googlegroups.com
Thank you Wei,

I work on macOS and I just installed the "multiplatform" version of mdbtools

https://github.com/mdbtools/mdbtools

But I was wondering if there was not a more trivial way to just dump the contents of the relevant parts into a CSV file or equivalent.

Jean-Christophe

> On Nov 12, 2024, at 11:18, Wei Jiang <polytr...@hotmail.com> wrote:
>
> Actually, a sdltb file is just a Standard Jet DB file, which usually has an extension of .mdb. You can open it use Microsoft Access, or mdbtools to do various things about it:
>
> https://github.com/lsgunth/mdbtools-win
>
>
>
> GitHub - lsgunth/mdbtools-win: MDBTools built for 32bit windows using MSYS2
> MDBTools built for 32bit windows using MSYS2. Contribute to lsgunth/mdbtools-win development by creating an account on GitHub.
> github.com
>
> mdb-tables -1 C:\Users\xxxx\Downloads\sample.mdb
> I_English
> I_French
> I_German
> I_Italian (Italy)
> I_Japanese
> I_Spanish
> mtBlobs
> mtCatalog
> mtCatalogObjects
> mtConcepts
> mtFields
> mtFieldsValues
> mtIndexes
> mtLocks
> mtSearchStats
> mtSystem
> mtTermbaseProps
> UniqueIDs
>
> mdb-export C:\Users\xxxx\Downloads\sample.mdb "I_English"
> sortterm,origterm,termid,conceptid,topterm
> "~!HH2p%
> ,!
> 6!","spelling checker",84,1,1
> " ","tab",87,2,1
> "␦2H|% |","dialog box",93,3,1
> "||H","Tools",96,4,1
> "~!HH2p%%%QQ","Spelling & Grammar",99,5,1
> "%|~ |","group box",101,6,1
> "~!HH2p%","Spelling",104,7,1
> "
> ,!
> 6~!HH2p%|~!","Check Spelling as you type",107,8,1
> "%%!#|QQ2p␦2
> 2|p|pH","Suggest from main dictionary only",110,9,1
> "2%p|!|␦2p~~!
> !","Ignore words in UPPERCASE",113,10,1
> "2%p|!|␦2,pQ !","Ignore words with numbers",116,11,1
> "2%p|!2p!p!p␦#2H!␦␦!!","Ignore Internet and file addresses",119,12,1
> "
> |Q␦2
> 2|p2!","Custom Dictionaries",122,13,1
> "␦␦","Add",125,14,1
> " |p","button",128,15,1
> "
> ,!
> 6 |","check box",131,16,1
> "!␦2","Edit",134,17,1
> "!Q|!","Remove",137,18,1
> "
> |QQp␦","command",143,19,1
> "
> |","cursor",146,20,1
> "
> |~|22|p","cursor position",149,21,1
> "||H ","toolbar",152,22,1
> "p!","New",155,23,1
> "H%%!
> |!
> 2|p","Always suggest corrections",158,24,1
> "Q2~!HH2p%","misspelling",161,25,1
>
> Good luck!
> From: 'Jean-Christophe Helary' via okapi-users <okapi...@googlegroups.com>
> Sent: Tuesday, November 12, 2024 9:11 AM
> To: okapi...@googlegroups.com <okapi...@googlegroups.com>
> Subject: [okapi-users] Converting sdltb files to CSV?
>
> Is there a tool in Okapi that allows for the conversion of sdltb files to CSV (or a similar format)?
>
>
> --
> Jean-Christophe Helary
> @jche...@emacs.ch
> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsr.ht%2F~brandelune%2F&data=05%7C02%7C%7C032df8b867b243bbf4b508dd02b707a7%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638669707303507572%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=ysLjeyHwcH%2Fr0PcRPCUn8LQzBAvwXCBjM4coCFElXqg%3D&reserved=0
>
>
>
> --
> You received this message because you are subscribed to the Google Groups "okapi-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to okapi-users...@googlegroups.com.
> To view this discussion visit https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fokapi-users%2F3C4C5587-4669-4395-9E18-9D7228C56EA9%2540traductaire-libre.org&data=05%7C02%7C%7C032df8b867b243bbf4b508dd02b707a7%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638669707303528973%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=2%2FkCXKq38hzK3EjnkUD9iMxh1DGk%2Br1pWEYUDMZlQos%3D&reserved=0.

Chase Tingley

unread,
Nov 12, 2024, 6:41:55 PM11/12/24
to Jean-Christophe Helary, Wei Jiang, okapi...@googlegroups.com
I think what Wei is proposing is probably the easiest.  The SDL resource formats are all portable databases (in addition to this, SDLTM is a SQLite database), so you can find tooling for them, but we've never added support for them to Okapi. 

Jean-Christophe Helary

unread,
Nov 12, 2024, 11:22:37 PM11/12/24
to Wei Jiang, okapi...@googlegroups.com
That could be what I need. I’ll try.

Thank you.

JC

> On Nov 12, 2024, at 11:42, Wei Jiang <polytr...@hotmail.com> wrote:
>
> Like this?
>
> echo SELECT origterm FROM I_English; | mdb-sql -d ',' -H C:\Users\xxx\Downloads\sample.mdb > C:\Users\xxxx\Downloads\origterm.csv
>
>
> From: Jean-Christophe Helary <jean.christ...@traductaire-libre.org>
> Sent: Tuesday, November 12, 2024 10:24 AM
> To: Wei Jiang <polytr...@hotmail.com>
> Cc: okapi...@googlegroups.com <okapi...@googlegroups.com>
> Subject: Re: [okapi-users] Converting sdltb files to CSV?
>
> Thank you Wei,
>
> I work on macOS and I just installed the "multiplatform" version of mdbtools
>
> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmdbtools%2Fmdbtools&data=05%7C02%7C%7Cb19cdce65b1345f3464008dd02c11b6a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638669750596290040%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=IPZePeXGGtvfLI%2BQt68Q9SPJrqdk6iPz6qg648zKXJU%3D&reserved=0
>
> But I was wondering if there was not a more trivial way to just dump the contents of the relevant parts into a CSV file or equivalent.
>
> Jean-Christophe
>
> > On Nov 12, 2024, at 11:18, Wei Jiang <polytr...@hotmail.com> wrote:
> >
> > Actually, a sdltb file is just a Standard Jet DB file, which usually has an extension of .mdb. You can open it use Microsoft Access, or mdbtools to do various things about it:
> >
> > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Flsgunth%2Fmdbtools-win&data=05%7C02%7C%7Cb19cdce65b1345f3464008dd02c11b6a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638669750596313315%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=rwmXPhI43Rbm4MUxDGpyEVXWEo7XnGjK4wpAW%2BPYeWs%3D&reserved=0
> > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsr.ht%2F~brandelune%2F&data=05%7C02%7C%7Cb19cdce65b1345f3464008dd02c11b6a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638669750596332677%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=mgAOEfaLfDq3cIqzhR1jePY2OwlwegmgqHVGD81E9jg%3D&reserved=0
> >
> >
> >
> > --
> > You received this message because you are subscribed to the Google Groups "okapi-users" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to okapi-users...@googlegroups.com.
> > To view this discussion visit https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fokapi-users%2F3C4C5587-4669-4395-9E18-9D7228C56EA9%2540traductaire-libre.org&data=05%7C02%7C%7Cb19cdce65b1345f3464008dd02c11b6a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638669750596350970%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=h5yiWKwaLCkTcoIfCfBz6ErvDRVi7BCdF0EZNJ3ev6Y%3D&reserved=0.
>
> --
> Jean-Christophe Helary
> @jche...@emacs.ch
> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsr.ht%2F~brandelune%2F&data=05%7C02%7C%7Cb19cdce65b1345f3464008dd02c11b6a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638669750596369816%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=zqFNQCY40XJkoIjmu8cae2tiMULhuQWnK4er1P1HWmU%3D&reserved=0

Jean-Christophe Helary

unread,
Nov 12, 2024, 11:22:37 PM11/12/24
to Chase Tingley, Wei Jiang, okapi...@googlegroups.com
Thank you chase for the reply (and Oliver / Daniel too, but I’m looking for a multiplatform solution since I’m on macOS).

I’m not asking whether that would be difficult to add to Okapi :) But it would be a great conversion feature, a bit like what Rodolfo’s tools do.

The ideal would be : get a SDLPPX project, convert it to XLIFF/TMX/TBX (CSV), have it translated, convert it back to a return package, something like you do for the OmegaT project conversion utility.

JC

Jean-Christophe Helary

unread,
Nov 14, 2024, 11:37:57 PM11/14/24
to Wei Jiang, okapi...@googlegroups.com
I found that

echo SELECT text FROM mtConcepts; | mdb-sql -d ',' -H path/to/sample.mdb > path/to/pseudo/xml/concepts.xml

provides me with more multilingual information.

The XML parts that are found in the mtConcepts table, once dumped into that concepts.xml, do not form a valid XML file, but are enough to be massaged into something useable with a few regex.

If someone has a better trick, I’m a taker.

Jean-Christophe

> On Nov 12, 2024, at 11:42, Wei Jiang <polytr...@hotmail.com> wrote:
>
> Like this?
>
> echo SELECT origterm FROM I_English; | mdb-sql -d ',' -H C:\Users\xxx\Downloads\sample.mdb > C:\Users\xxxx\Downloads\origterm.csv
>
>
> From: Jean-Christophe Helary <jean.christ...@traductaire-libre.org>
> Sent: Tuesday, November 12, 2024 10:24 AM
> To: Wei Jiang <polytr...@hotmail.com>
> Cc: okapi...@googlegroups.com <okapi...@googlegroups.com>
> Subject: Re: [okapi-users] Converting sdltb files to CSV?
>
> Thank you Wei,
>
> I work on macOS and I just installed the "multiplatform" version of mdbtools
>
> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmdbtools%2Fmdbtools&data=05%7C02%7C%7Cb19cdce65b1345f3464008dd02c11b6a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638669750596290040%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=IPZePeXGGtvfLI%2BQt68Q9SPJrqdk6iPz6qg648zKXJU%3D&reserved=0
>
> But I was wondering if there was not a more trivial way to just dump the contents of the relevant parts into a CSV file or equivalent.
>
> Jean-Christophe
>
> > On Nov 12, 2024, at 11:18, Wei Jiang <polytr...@hotmail.com> wrote:
> >
> > Actually, a sdltb file is just a Standard Jet DB file, which usually has an extension of .mdb. You can open it use Microsoft Access, or mdbtools to do various things about it:
> >
> > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Flsgunth%2Fmdbtools-win&data=05%7C02%7C%7Cb19cdce65b1345f3464008dd02c11b6a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638669750596313315%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=rwmXPhI43Rbm4MUxDGpyEVXWEo7XnGjK4wpAW%2BPYeWs%3D&reserved=0
> > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsr.ht%2F~brandelune%2F&data=05%7C02%7C%7Cb19cdce65b1345f3464008dd02c11b6a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638669750596332677%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=mgAOEfaLfDq3cIqzhR1jePY2OwlwegmgqHVGD81E9jg%3D&reserved=0
> >
> >
> >
> > --
> > You received this message because you are subscribed to the Google Groups "okapi-users" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to okapi-users...@googlegroups.com.
> > To view this discussion visit https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fokapi-users%2F3C4C5587-4669-4395-9E18-9D7228C56EA9%2540traductaire-libre.org&data=05%7C02%7C%7Cb19cdce65b1345f3464008dd02c11b6a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638669750596350970%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=h5yiWKwaLCkTcoIfCfBz6ErvDRVi7BCdF0EZNJ3ev6Y%3D&reserved=0.
>
> --
> Jean-Christophe Helary
> @jche...@emacs.ch
> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsr.ht%2F~brandelune%2F&data=05%7C02%7C%7Cb19cdce65b1345f3464008dd02c11b6a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638669750596369816%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=zqFNQCY40XJkoIjmu8cae2tiMULhuQWnK4er1P1HWmU%3D&reserved=0
Reply all
Reply to author
Forward
0 new messages