So I just finished what I wanted to do quite some time ago. I created a PHP script aiding you in the fantastic task of inserting Oolite's entire solar system information (planetinfo.plist) into a MySQL database of your choosing.
I'm sure this opens the door to quite some interesting 3rd party web-based tool creation possibilities.
Here it is:
https://github.com/thepleiadian/convert_planetinfo
The repo contains the current planetinfo.plist as well as a .sql file of the finished result.
Obviously open-sourced. Enjoy!
// EDIT:
I know the script is not perfect, but probably a good starting point. The defaults are - database: oolite_data, table: oolite_maps
Entire system data to MySQL database
Moderators: winston, another_commander
Re: Entire system data to MySQL database
Updated the script so that each solar system now has a unique ID. This might be useful for other tools such as trade, or item databases. GitHub includes updated script and new version of the SQL-file.
-
- Quite Grand Sub-Admiral
- Posts: 6683
- Joined: Wed Feb 28, 2007 7:54 am
Re: Entire system data to MySQL database
I think that what might be useful here could be the ability to re-export the SQL file as a planetinfo.plist, after changes have been applied. This could help with changing large chunks of the plist or per-system-specific changes. One could use database software to make queries and maybe changes, then export back the result to a format understandable by Oolite. An example could be the relatively recent change where we reduced the default ambient light in all systems to 0.25. I had to write a quick'n'dirty little program to do it, but that could have been handled maybe as described above.
Possible?
Possible?
Re: Entire system data to MySQL database
That shouldn't present too much of a problem. Simply perform the changes in the SQL DB, and then hit the button... I think I can manage that
Re: Entire system data to MySQL database
I have added a script that does what you asked for. It pumps out a valid planetinfo.plist file inside your browser... just save it as that file and you're good to go.
https://github.com/thepleiadian/convert ... _plist.php
https://github.com/thepleiadian/convert ... _plist.php
-
- Quite Grand Sub-Admiral
- Posts: 6683
- Joined: Wed Feb 28, 2007 7:54 am
Re: Entire system data to MySQL database
Can't test it right now, but thanks for doing that. It should hopefully make editing of the tricky planetinfo datafile much easier.