|
From: Donald E. C. <don...@ui...> - 2006-12-14 18:03:28
|
I have a couple suggestion that would fix this and i have run into the same problem. So with 'babel -isdf -ofpt myfile.sdf' it is very bad that it wipes his input file. Easily; if this happens and the user pushes Ctrl-C while OB is waiting for stdin input, then OB should not have opened the output file and thus there should be no wipe. I am unsure how this works currently. Now, my suggestion would be to have the correct input from stdin to be '-' so that the correct usage from stdin and the previous example would be 'babel -isdf - -ofpt myfile.sdf'. Easily the parameter parser could "check" the special case where whatever follows -i is '- ' and if it is some parameter '-xx' then it returns an invalid syntax error. Using '-' is pretty standard for most programs to tell them to get their input from stdin. Getting input from stdin is a very special case and i don't think it'd take much work to fix this up. If i get a few "aye" from the community saying they like this change i'll go ahead and do the implementation. -Donald (Thu, Dec 14, 2006 at 05:47:16PM +0000) Chris Morley <c.m...@ga...>: > Noel O'Boyle wrote: > > Every time I use the babel executable, I like to carry out a little > > usability study. I don't read the documentation, and I just try to > > convert my input file into a different format. > > > > Every time, I end up with no molecules converted and my input file wiped. > > > > Here's how it goes: > > "babel -isdf -ofpt myfile.sdf" > > > > Then it seems to hang, so I press Enter and then it tells me: > > "0 molecules converted" > > > > And to add insult to injury, my input file has been wiped clean. > > > > Is this a problem for other people? If so, perhaps some changes could > > be considered for Babel 3.0. > > > It's a struggle to design an infallable user interface, and it's > hindered by people not volunteering their negative experiences. Thanks > for helping here (as you did with the GUI). > > The OB command line is really quite flexible and versatile. There are > just a few rules... > > - Input files come before the output file. > - If the -o option is present, it comes after any input files and > before any output files. > - If there is no input file specified you can input data after > pressing Enter. > - If there is no output file the output is displayed. > - You don't have to use the -i and -o options if the extensions on the > filename are appropriate. > > The second one is the least intuitive but if it's remembered it is > difficult to go wrong. Don't forget the last one - specifying the input > and the output only once makes things much clearer. > > or > "Specify the input and then the output, adding other options whenever > you like." > > So what you wanted was: > babel myfile.sdf -oftp > > Can you suggest how to improve the interface? I feel that explicitly > identifying the input and output files (perhaps making them part of an > option), or preventing accidental erasure of input files (perhaps by an > are you sure message?) would be too cumbersome. The GUI (currently > Windows only) queries you if your output file name has an extension > which belongs to a format different from the one you are outputting. > Maybe we could do the same for the command line. > > Keyboard interfaces are good for regular users; making them too verbose > will put them off. A GUI is better for less regular use and for the 95% > of users who use nothing else. > > Chris > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > OpenBabel-Devel mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openbabel-devel |