Converting imports between databases

Post new mods and scenarios here.

Moderator: MOD_Command

Post Reply
subroc2
Posts: 8
Joined: Sun Apr 06, 2014 12:59 pm

Converting imports between databases

Post by subroc2 »

Im just putting my thought here if someone more skilled in coding would say "This is easy, give me a couple of days and ill fix it for you..." [:D]

I have been thinking about how a conversiontools for .inst files could be done at least for Facilities. Right now i manually edit the files to change between databases but this should from a logical perspective be easy to automate. The problem is dont code (except from peek and poke on a C64 a couple of hundred years ago.

The pseudocode for the operation would be:

Code: Select all

 read .inst
 check which "DB_ID" it uses
 analyze what "Member_DBID" is present in the file
 match "Member_DBID" to a "MemberName"
 present the found "Member_DBID", "MemberName" and occurrences for all in a "left column"
 present a drop-down list of which database it should be converted to (db3k/cwdb)
 present a drop-down list in the right column for each instance 
 The drop-down list would include all facilites for the selected "convert-to database"
 Then some sort och search and replace to edit the .inst
 A Convert button to Save as a new .inst
 

I will try to achieve this, but as house, wife, kids, work take a lot of my time and i need to learn to code again my project plan expand in to 2030 :) Will update this post when (or rather if) any progress is made
mikmykWS
Posts: 7185
Joined: Tue Mar 22, 2005 4:34 pm

RE: Converting imports between databases

Post by mikmykWS »

Yeah it's definitely a project. You'd use regular expressions to convert a couple fields from one ID to the other. The issue is modern structures that didn't exist in the really early years. I ran across this when doing Cuban CWDB.

Mike
Zaslon
Posts: 299
Joined: Sun Jun 14, 2015 8:52 am

RE: Converting imports between databases

Post by Zaslon »

Great idea.
It's a pain in the a** create infrastructures in CWDB that already exist in DB3K.
Image
Kids think about Iran and Amateurs think about Russia, but professionals think about China
subroc2
Posts: 8
Joined: Sun Apr 06, 2014 12:59 pm

RE: Converting imports between databases

Post by subroc2 »

As the import file seems to be some sort of JSÓN format, i think i will need to learn Java. The coding seems pretty straightforward but i think the gui side of this will take some time to master.
Post Reply

Return to “Mods and Scenarios”