{V4Rb2] Console apps
Charles Yeomans
yeomans at desuetude.com
Sun Aug 21 10:54:44 CDT 2005
I have been having considerable problems getting version 1 databases
converted to version 2 format. One cause appears to be that I have
field names like "text" that are reserved words in V4Rb 2. And I
wanted to make some other changes to the db format. So I decided to do
the conversion myself by exporting the v1 database to text files and
importing the data into a fresh, new v2 database. The problem was how
to read the v1 data, since V4Rb 2 cannot read v1 databases except to
convert to v2, thus bringing me back to the original problem.
My solution was to build a console app using Rb 5.5 and V4Rb1 that
dumps the database to text. I include the app in the bundle of the
main app and call it from a Shell object. Since the v1 dump is running
as a separate process, the UI of the main app remains responsive --
another bonus. By using an interactive shell I can write progress
messages to stdout and thus communicate back to the main app.
The point here is to alert those who might not have thought, as I had
not, to use Valentina in a console app. Perhaps other people can find
more cunning uses for this.
--------------
Charles Yeomans
More information about the Valentina
mailing list