Dear Monks:
We have a bunch of internal tools, written by different people and in different languages (mostly in Perl although some are in Tcl, bash, C++, etc.), and most of them are located in a single directory. I would like to create some kind of a wrapper script for all these tools. Although I already have some pretty good idea what I would like this wrapper script to have, there are still some issues that I am not sure what's the best way to handle them. BTW, I was not asked by my manager to do this. I just saw a need for something like this and hoping to just do it myself for extra points :-)
Here are some of the requirements for my wrapper script:
- The script would scan a known directory for the tools and present a menu to the user of all the available tools. I was thinking maybe to use Perl/Tk for this.
- When the user selects a paricular tool, he/she will be presented with some description about what the script does, and the arguments it takes. Since I don't want to impose that the tools be written in a certain way or in what language, I was thinking that maybe there will be a separate metadata file describing all of these. I'm not sure yet whether each script will have its own metadata file or there'll be one metadafile for all the scripts.
- If the user invokes a selected tool, it will ask for the arguments if it needs any, and then go on and execute the script.
- The script's output will either go into another window or in some subframe within the same window. But in any case, I would like to be able to capture this window or be able to save this to a text file when I'm done. So, maybe I would run several tools in sequence, then save the output screen when I'm done.
That's pretty much what I have so far. The thing that I am not sure how to handle yet, is how to ask the user for the arguments needed by the tool. The ugly way would be to just have the user type in some text field the exact command to execute the tool passing in all the command line arguments. A better way I guess, is if the arguments are described in some metadata file as well, then render them in some kind of input screen or dialog window, then form the command line needed to invoke the tool.
What do you monks think? Thanks in advance for all the feedback.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.