Well, whaddayaknow...
Moderators: winston, another_commander
Well, whaddayaknow...
I actually managed to produce a tool that checks integrity (basic check) of plist files in XML format, and cuts all the unneeded "garbage" out of it...
(still testing it before it meets the world).
(still testing it before it meets the world).
- DaddyHoggy
- Intergalactic Spam Assassin
- Posts: 8515
- Joined: Tue Dec 05, 2006 9:43 pm
- Location: Newbury, UK
- Contact:
Oolite Life is now revealed hereSelezen wrote:Apparently I was having a DaddyHoggy moment.
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
For Mac OS it's called PlistEdit Pro (and I'm running its free trial version for over 750 days now; the only thing I have to endure since the expiry of the trial period is a 45 second countdown after I started the program; okay, perhaps after having made half a dozen OXPs or so and having fiddled with countless others I should consider spending $24,95 for it ).
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
Y’know, Apple’s Property List Editor is free with your operating system – it’s part of the optional developer tools. (There are also two command line tools, plutil and PlistBuddy. plutil --lint will point out syntax errors in the property list – but then, so will Oolite’s log.)Commander McLane wrote:For Mac OS it's called PlistEdit Pro (and I'm running its free trial version for over 750 days now; the only thing I have to endure since the expiry of the trial period is a 45 second countdown after I started the program; okay, perhaps after having made half a dozen OXPs or so and having fiddled with countless others I should consider spending $24,95 for it :oops: ).
E-mail: [email protected]
Here's little update on the thing:
I've done so far:
- size reduction: as in removing all the trailing empty spaces, tabs, comments, etc, newlines.. all modular.
- formatting: I call it beautification. What it does is track the <dict> and <array> and adds tabs infront of them, making the structure obvious.
- crude error checking: not too precise, but indicative, and if it says "error found" then it is most definitely there.
- pretty much everything that handles and catalogs files.
- awareness of multiple oolite installs
- (I know this sounds minute, but I'm proud of it) tracking down where oolite is installed. For the kicks of it, I made it look for oolite shortcuts and use the links in them to locate oolite path.
I'm doing right now:
- dialog boxes. Damn buttons, and drop down thingies...
... and what I haven't done 'coz I did the above first:
- find a way to make updates online and seamless (long shot, but I'm looking into it)
- file checks: for missing texture files from both plists and dat files and missing meshes, sounds, js files, images...
- player ship checks: to determine if ships from shipyard.plist exist in shipdata.plist (an make the checks cross-oxp)
- find a sucker that will port the script to C or something and make it cross-platform, 'coz I'm making this in winbatch.
I've done so far:
- size reduction: as in removing all the trailing empty spaces, tabs, comments, etc, newlines.. all modular.
- formatting: I call it beautification. What it does is track the <dict> and <array> and adds tabs infront of them, making the structure obvious.
- crude error checking: not too precise, but indicative, and if it says "error found" then it is most definitely there.
- pretty much everything that handles and catalogs files.
- awareness of multiple oolite installs
- (I know this sounds minute, but I'm proud of it) tracking down where oolite is installed. For the kicks of it, I made it look for oolite shortcuts and use the links in them to locate oolite path.
I'm doing right now:
- dialog boxes. Damn buttons, and drop down thingies...
... and what I haven't done 'coz I did the above first:
- find a way to make updates online and seamless (long shot, but I'm looking into it)
- find a sucker that will port the script to C or something and make it cross-platform, 'coz I'm making this in winbatch.
Last edited by Chaky on Thu Sep 17, 2009 9:41 am, edited 2 times in total.
Without wishing to ask a silly question, you do know of the -verify-oxp flag you can use with the executable to check the functionality (or not) of an OXP don't you?
It only partially overlaps what you've got above, but may be worth considering to possibly save some workload and duplication.
It only partially overlaps what you've got above, but may be worth considering to possibly save some workload and duplication.
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
Ah, I see.
For 1.73.x, and from the command line (in Windows, not sure about Mac/Linux) and from the oolite.app directory, you type "oolite -verify-oxp ../AddOns/<insert your OXP name here>.oxp" and it goes away and runs the OXP verifier on the given OXP (whose name can't have a space in it, for semi-obvious reasons).
It then generates a log file in the logs directory detailing what it's checked and any warnings or errors it has found. Try it on a few of your OXPs and see if it covers any of the mileage you want to do.
I'm sure I've seen documentation or more details on this either on here or the wiki, but can't find it quickly. I'm sure some else can point you at it if I'm not imagining it, and also perhaps comment on how you run it on Mac/Linux (although I would guess Linux will be similar, possibly with an extra - before -verify-oxp).
For 1.73.x, and from the command line (in Windows, not sure about Mac/Linux) and from the oolite.app directory, you type "oolite -verify-oxp ../AddOns/<insert your OXP name here>.oxp" and it goes away and runs the OXP verifier on the given OXP (whose name can't have a space in it, for semi-obvious reasons).
It then generates a log file in the logs directory detailing what it's checked and any warnings or errors it has found. Try it on a few of your OXPs and see if it covers any of the mileage you want to do.
I'm sure I've seen documentation or more details on this either on here or the wiki, but can't find it quickly. I'm sure some else can point you at it if I'm not imagining it, and also perhaps comment on how you run it on Mac/Linux (although I would guess Linux will be similar, possibly with an extra - before -verify-oxp).
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
Tell you what...
I'll look into using that feature directly from the script. If I could run Oolite to do the checking and logging only, it would be perfect.
.. right now I'm making ridiculously powerful subroutine that can strip 200000000 plists off their comments... (I'm not joking.. would probably take months to complete the stripping, but it can do that).
I'll look into using that feature directly from the script. If I could run Oolite to do the checking and logging only, it would be perfect.
.. right now I'm making ridiculously powerful subroutine that can strip 200000000 plists off their comments... (I'm not joking.. would probably take months to complete the stripping, but it can do that).
Fairy snuff, just trying to make sure you aren't reinventing the (dark) wheel...
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
In order to use it under Mac OS X:Thargoid wrote:I'm not imagining it, and also perhaps comment on how you run it on Mac/Linux (although I would guess Linux will be similar, possibly with an extra - before -verify-oxp).
• Open Terminal (in Utilities in the Applications folder)
• Drag Oolite to the terminal window. The path to it should appear, followed by a space.
• Delete the trailing space, then type “Contents/MacOS/Oolite -verify-oxp ”
• Drag your OXP to the terminal window.
• Click in the terminal window, and press return.
(Note the space behind verify-oxp )
UPS-Courier & DeepSpacePirates & others at the box and some older versions
OK, here's little update on the thing:
I've included the OXP verify feature. It turns out to be extremely usable by the script I'm making.
Now one can simply select the oxp to verify and the log will pop out. (instead of typing the path and all that...)
I might just as well write a code to pharse the log and open the problematic file... (that will be added later on)
Right now I'm almost done with the "lite" version. I must say that it is growing really fast from simple trimming the tabs and stuff tool...
And it is ugly, but it delivers.
Expect the early beta within a day or two. (Edit: unless I get more ideas)
Edit:
Feel free to post suggestions on features... I just thought of few (Running Oolite temporarly with one selected OXP, editing settings, editing saves...nah.. I'm not pro-cheating)
I've included the OXP verify feature. It turns out to be extremely usable by the script I'm making.
Now one can simply select the oxp to verify and the log will pop out. (instead of typing the path and all that...)
I might just as well write a code to pharse the log and open the problematic file... (that will be added later on)
Right now I'm almost done with the "lite" version. I must say that it is growing really fast from simple trimming the tabs and stuff tool...
And it is ugly, but it delivers.
Expect the early beta within a day or two. (Edit: unless I get more ideas)
Edit:
Feel free to post suggestions on features... I just thought of few (Running Oolite temporarly with one selected OXP, editing settings, editing saves...nah.. I'm not pro-cheating)
Oops, I just made a minor change to -verify-oxp in trunk: nothing internal, but now when it's finished it pops a dos terminal in windows saying "Verify complete. Please see 'Logs\oxpname.log',Press any key...". Once you press any key, it closes that popup.
It shouldn't interfere with your parser, though...
It shouldn't interfere with your parser, though...
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)