Page 1 of 1

Tree Style units.csv & master_part_list.csv viewer / edi

Posted: Sat Mar 24, 2007 6:35 am
by wowsher
I was looking for something a little different that what others had created.

Right now it is a viewer but as I continue I will add the ability to edit and save the file as well.

As you will see I have parsed the file into a nice tree format. This is built using python and wxpython and should work on any platform that they work on. If you are interested in running it I have attached the file. You can even browse the code as it is the py file.

Any thoughts comments groans etc? Constructive feedback is welcome.

thanks
wowsher

Posted: Sat Mar 24, 2007 11:34 am
by Oblivion
hmm. the navigation is certainly easier in your app, easier to see what you've changed and what needs changing too. :D

can you post an exe too?

Posted: Sat Mar 24, 2007 4:02 pm
by loki1950
looking good wowsher looking forward to open/save functionality how is it with master_parts_list.csv our other csv beastie which works together with units.csv.

Enjoy the Choice :)

Posted: Sat Mar 24, 2007 4:08 pm
by wowsher
I have not tackled the master_parts_list.csv yet but if the viewer portion is handy in its own then I could do that prior to adding the open/save/update code... Just let me know if that would be more important than I could switch the two around.

to get the exe version you will have to go over to www.ordner.us, downloads, vegastrike. I tried to upload here but it kept erroring out... maybe too big of file?

The exe has three files. The unit-editor.exe and .dll are required and the other exe is some kind of win9x compatibility deal and not needed on WinXP (my platform). I included it just in case.

wowsher

Posted: Sat Mar 24, 2007 4:53 pm
by loki1950
I tried to upload here but it kept erroring out... maybe too big of file?
change the extension to zip :wink: and the size limit is 5 mb


Enjoy the Choice :)
Edit: your link to the exec gives me a 404 :(

Posted: Sat Mar 24, 2007 5:03 pm
by wowsher
It appears to have included the comma in the link... funny.

www.ordner.us

try that link or type it in.

I tried 7z first then zip and got a message about uploading an empty file... the size is 4728757 so that should be less then 5 mb I think... but i did not do the math..

thanks
wowsher

Posted: Fri Mar 30, 2007 3:17 am
by wowsher
I have added the master_part_list.csv to the tree. No save yet but it is a pretty decent viewer anyhow. It now must reside in the same directory as the master_part_list.csv file and it will look for the units.csv in \units

Again I just get the empty file upload error so you can find the exe (in a zip file) over at www.ordner.us in the download section.

wowsher

Posted: Fri Mar 30, 2007 1:52 pm
by GoldenGnu
This might not be important, but, it doesn't work with version 0.4.3 of units.csv

allegedly because there is less columns in the 0.4.3 units.csv file...
that aside, it's awesome!

The Cargo_Import value is rather long, so you might consider visual word wrapping for the "edit value field".

Posted: Sun Apr 01, 2007 4:34 am
by wowsher
There is a blank line in the 0.4.3 release units.csv file right after redeemer (line 553 is blank). If you delete it then it works fine. I wrote this to be flexable for number of fields but if they move the key or object type field then it may get a little strange. I am guessing this is why they want the empty rows to have commas in the newest units.csv files. I need to add some more logging, error checking and such at some point.

fyi all of the units.csv objects appear under FIXME in the 0.4.3 file

By the way the code should work on Linux and possibly Mac since it is written in python 2.5 / wxpython 2.8. If anyone needs the source to try it on those platforms let me know and I will post it.

thanks
wowsher

Posted: Sun Apr 01, 2007 6:29 pm
by wowsher
I have added some enhancements to the parsing... check out the screenshot...

I also added word wrapping to the text box.

I still have not fixed the blank line crash on version 0.4.3 but I may add code to fix it later.

The updated exe will be up over at www.ordner.us shortly.

thanks
wowsher

Posted: Sun Apr 01, 2007 7:38 pm
by ismeagain
hey wowsher, in my program, I just tell it to edit out the blank lines. That saves a guy lots of problems, especially since blank lines contains no data, it's useless anyways.
if linelen>1:
self.data.append(line)
else:
self.control.AppendText("Blank line skipped\n")
The alternative is insert a placeholder for the blank line, then when you save the file, just insert a blank line there. Since it's a CSV viewer, then blank lines are redundant anyways.

Posted: Sun Apr 01, 2007 7:48 pm
by wowsher
ismeagain,

Thanks for the ideas. I currently like to preserve the lines (like your placeholder idea) so I can place them back into the file identically. In the newer csv files there are commas so all of the fields are there even in a "blank" line whereas in the 0.4.3 version it was a completely blank line with no commas so I will probably have to use a check like your line length check and force an entry for a blank line like I do with the newer csv (Blank# line#) so I can reconstruct the file. I appreciate your feedback!

thanks!
wowsher

a little update

Posted: Mon Apr 16, 2007 10:17 pm
by wowsher
I have now added the code to allow you to select the directory which contains master_part_list.csv and then assume that units.csv is in the units directory directly under the master_part_list.csv file. You will notice that I have split the window to allow both files to be browsed at the same time -- right now it allows browsing but I need to fix the display line at the bottom. Once I get that finished I will start looking at the save functionality. Here is a screenshot of the current build. FYI I am not releasing any functional update at this time.. once I get the bottom display fields working again I will post that update.

wowsher

Update to v0.4.0

Posted: Sat Apr 28, 2007 3:05 pm
by wowsher
I have posted the update to http://www.ordner.us go to the downloads section. I now has split trees one for units and one for the master part list you can browse both at the same time independently. Still no save ability but the open code is working so you can place the files anywhere and browse to the master part list file.

enjoy
wowsher

Source Code Updated Site Info

Posted: Fri Sep 14, 2007 10:30 pm
by wowsher
Ok I have been busy for so long I do not know if I will ever actually finish this. I think it is somewhat helpful even just as a viewer. I have not gotten too much feedback so maybe no one else likes this format? Or maybe they were holding their breath waiting for save capability? Either way I have going to post the python code here for anyone to play with etc. I may or may not ever finish. It runs on Python 2.5 (there is no reason I know of it will not run on 2.4 but I have not tried it) and wxpython (www.wxpython.org) needs to be installed to compile. I have dropped ferryside.net in favor of http://www.ordner.us which I plan to keep around for awhile. the exe version is now hosted there (nothing has changed with it).

wowsher

ps maybe posting this will give me the kick in the pants to complete this... you just never know with me...

Posted: Fri Sep 14, 2007 10:39 pm
by loki1950
Thx wowsher will try it out later.

Enjoy the Choice :)

It's back VSEditor v0.5.0 released

Posted: Tue Mar 25, 2008 9:11 pm
by wowsher
I have finally gotten some time to play with this again. I have enabled you to make changes and actually SAVE them to units.csv.out. The output format matches at the row level and I am going to test it with the engine tonight but the order of the rows within the file does NOT yet match the input. Maybe if everyone likes this we could get rid of the empty rows and such ... The master_part_list.csv is NOT yet enabled for saving. I have posted both the source and exe over at http://www.ordner.us in the downloads section. Check it out and let me know what you think. If things go well I will enable the master_part_list save then worry about the order of the rows.

oh and just to be clear there are probably a few bugs I missed so feel free to mention them in case I do not know about them.

Enjoy
wowsher aka tony

Posted: Tue Mar 25, 2008 9:23 pm
by loki1950
Thx wowsher will grab your new version and put it through the proverbial winger :D


Enjoy the Choice :)

Posted: Wed Mar 26, 2008 12:04 am
by bgaskey
Busy w/ real life now (bummer :? ) but I'll give it a spin over the weekend. Even loading mpl.csv in text editor takes forever and is impossible to use :? Hope this works well 8)

Posted: Wed Mar 26, 2008 12:14 am
by loki1950
It not bad takes a bit of getting used to like any app but it works .

Enjoy the Choice :)

output not quite correct

Posted: Wed Mar 26, 2008 1:52 am
by wowsher
Well I got home and tried to run the output (units.csv.out renamed to units.csv) and it caused Vegastrike to crash. I see the file size is a couple clicks different so I must have missed one of the tricky fields. I also found out that I needed to include another dll with the exe version and have updated the files on my site with it. Funny I did not have any trouble on my other computer... It was msvcp71.dll for any that are interested no idea why. Anyhow I will have a closer look at that output when I get a chance. One other thing I found was that the refresh after saving was failing so right now you should reopen the file after you save it to ensure you are seeing what is really there. Here is the fixed / updated source to turn off that problem for now.

Thanks for taking a look!
wowsher

version 0.5.1 Released

Posted: Wed May 07, 2008 3:14 am
by wowsher
I have now gotten the file saved (units.csv.final) to successfully load into Vegastrike. Unfortunately it will not reload the saved file for further editing due to some extra double quotes. However it is closer. For this release double quotes are also causing trouble with the master parts list so I have disabled that for now. The exe and source are up on www.ordner.us in the download section. I have started to integrate sqlite into the application and currently use it in the save process in a very inefficient manner (read in two csv files, join them in sqlite, reorder them, then output them to another csv).
I have posted the current source here as well.

enjoy
wowsher aka tony