Jump to content

WPI Config Mgr?


Recommended Posts

All

I've been using WPI for a few months now and love it.

But.....I've been frustrated when managing the config.js file. I might be missing something here, but either you edit it in WPI or through a text editor? With the former, there's no option to cut&paste etc, with the latter there's no drop downs or simple record entry.

Plus, with either option it's difficult to see all your apps in one simple screen and identify (and modify) the install order etc.

So I've been playing and came up with the following proof of concept Excel application.

Please review this entirely at your own risk and note the following:

  1. It doesn't yet implement all the config.js variables, just the ones I use currently
  2. It makes some assumptions about whether WPI will work without some of the variables being defined (eg picture height width)!!
  3. I've done minimal error checking or data validation in the code
  4. There's a few bits hard-coded so don't mess around with the column or row positions unless you want to amend the code!!
  5. I have a few more ideas yet to implement, but will take on board any suggestions

I'm really looking to you (the professional WPI user community!) to give me some direction on this - is this a good idea, or is there something better already available. I'm sure there's a better implementation than Excel, but it kinda works okay.

I can develop this further, but I'm no Excel expert - if someone else is stimulated by this idea then feel free to take it further.

Hoping this gives something back...(and I hope I've managed to upload the file!!!)

Thanks, Nick

PLEASE test this on a copy of your config.js!!!

UPDATE 9/Jan - v0.3a fixed import issue for ORDR column

UPDATE 8/Jan - v0.3 release with lots of changes

WPI_ConfigMgr.7z

Edited by nwarren
Link to comment
Share on other sites


Forgive me asking, but have you changed the path to your config.js in cell B3? To test this app, I'd suggest copying your config.js to another folder and testing on the copy - just set the value of B3 to the folder name where the copy is.

Config.js is the hardcoded filename at present in case you've changed it?

Also, you do need to enable macros in Excel - yeah?

Let me know how you get on - in the meantime, I'll add some error checking to the import routine, then at least you might get a message!!

Thanks, Nick

Link to comment
Share on other sites

Thanks - initially I was doing this for myself, so only included the fields that I'm currently using (which doesn't include the reg before/after fields and several others).

As you think it's a worthwhile approach, I'll update it with the extra fields - my main concern was that it was a stupid idea and a waste of my time, but if it's not, then I'll play a little more :)

My other concern about adding all the fields is that it will make the Excel table quite wide and more difficult to view - I kinda think there must be a better approach than Excel, but I'm not imaginative enough to see what it is...in the meantime I'll work with Excel :blink:

A couple of other enhancements I'm thinking of doing:

  • Add a backup option so when the current config is exported, the original config is renamed instead of just over-written
  • Modify the code, so people can change the order of the columns to suit their needs without it screwing up the code
  • Adding in drop downs on some of the cells using ranges defined on the Ranges worksheet

I'm happy for any other suggestions to come as well?

Thanks, Nick

Link to comment
Share on other sites

I found out that when exporting the file something goes wrong when there are items which contains '

Like it's, you need to put a \ in front of the ' to get it to work the right way.

Modified : attached config file

Thanx

config.rar

Edited by andreasfc
Link to comment
Share on other sites

Can you give me an example of what you have in the Excel cell and how it should be listed in config.js?

I'll have a look at it - I've done nothing with processing the CMD lines, but was looking at automatically replacing '\' with '\\' -perhaps I also need to do something with quotes?

Link to comment
Share on other sites

Just uploaded v0.3 to my intial post. This includes masses of changes, including adding in all the fields that are currently listed in config.js.

I've also written a routine for formatting the header content of the spreadsheet, so you should be able to change the column order without it permanently affecting the header layout (it updates next time you press any buttons or change to another sheet.

I've also added several sort options.

My next major plan is to see if I can add in a form to the bottom of the header which displays all the variables in a selected row in a view that's more easy to edit...this is rapidly becoming soemhting that would be better written in VB or something, but it's proving useful and could be considered a prototype for a proper application!!

Looking forward to your evaluation comments :)

Nick

Edited by nwarren
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...