Prev: ANN: Seed7 Release 2009-10-04
Next: weird environ
From: Giorgos Keramidas on 4 Oct 2009 19:34 On Sun, 4 Oct 2009 14:49:39 -0700 (PDT), Jaseem <jasevv(a)gmail.com> wrote: >>>Another example: >>>Suppose the windows telnet thing. >> >> Suppose it what? �If the command-line utility you wish to >> wrap is a Windows/DOS program, asking comp.*unix*.programmer >> about it is silly. > > Thats just an example to make my question clear. I want to built a > gui for the whois command in unix. How to map to shell commands. Any > tutorials on that. Googling doesn't give me the answers. Thanks Asking a question about 'generic' GUI options for all possible commands is probably a weak and confusing starting point. If all you are going to create is a GUI for whois(1) things are much simpler. You can start by reading the manpage of your whois(1) utility. Seeing all the options in one place may make it slightly easier to: * Try to understand what each option does * Check if there is some way to 'group' the various options in larger sets * Get an idea about useful and helpful candidate names for options groups For example, my local whois(1) manpage describes options that seem mutually exclusive: -a Use the American Registry for Internet Numbers (ARIN) database. It contains network numbers used in those parts of the world covered neither by APNIC, AfriNIC, LACNIC, nor by RIPE. -f Use the African Network Information Centre (AfriNIC) database. It contains network numbers used in Africa and the islands of the western Indian Ocean. Seeing these options and reading more about the various whois databases available online, hints at a GUI element like a combo/drop-down box with the names of all the available databases. The description of the -h option provides even more hints about possible GUI elements or behavior that would be `nice to have': -h host Use the specified host instead of the default variant. Either a host name or an IP address may be specified. By default whois constructs the name of a whois server to use from the top-level domain (TLD) of the supplied (single) argument, and appending ".whois-servers.net". This effectively allows a suitable whois server to be selected automatically for a large number of TLDs. So if you are designing a GUI for _whois_ it may be nice to have something that permits: * Auto-detection of the appropriate whois database * Manual selection from a list of whois databases * Auto-detection of the whois query host * Manual specification of a query host name or IPv4/IPv6 address * Support for whois queries using IPv4-only, IPv6-only or both * etc. Think for a few minutes now. Before worrying about how you can GUI things ``map to shell commands'', you have to define what these GUI `things' will be, how the user will be able to `see' them, how the user will be able to interact with them, and many other things. *Then* you can start worrying about what to do with the GUI `things' your interface will display to the user. |