<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<div><div>Hello,</div><div>I am throwing some thoughts as a reply to your mail before going to bed. I hope they make sense.</div><div><br></div><div>Unifying the command line arguments seems a good idea to me. For example the fact that we can specify the output directory for some of the compress tools (e.g. compress_kyra, compress_scumm_bun) but not others (e.g. compress_sword1, compress_sword2) seems strange and a potential source of errors.</div><div><br></div><div>As for the way to specify the outut file or directory, I am not sure the -o option is a good idea. Usually I expect it if it is optional, e.g. if the command by default output the result to std out. If the destination is compulsory then I usually expect to have it as the last argument without a flag (e.g. the cp command):</div><div> extract [extra params] [--tools tool-to-use] inputfiles... outputdir</div><div>But even if it is optional, it is sometime the last argument without a flag (e.g. the link name in the ln command). However I don't really like it. If there is a default (and the output file/dir is therefore optional) I think it would indeed be logical to use a flag (by the way I am not sure if I would expect the default to be ./ or same as input directory in the case of a output directory).</div><div><br></div><div>Using -o for output files is quite common, so it is the obvious candidate for output files, and then it should be possible to have it before the input files on the command line:</div><div> extract [extra params] [--tools tool-to-use] [-o outputfile] inputfiles...</div><div>I would be less incline to use -o to specify an output directory. It seems strange to me. The first flag that comes to my mind for that is -d but I am not too sure why (maybe because destination and directory both start with a d). unzip uses this flag, but right now I don't remember any other command that do.</div><div><br></div><div>Sorry. It seems I am asking more questions than giving answers ;-)</div><div><br></div><div>Thierry</div></div><br><div><div>Le 11 mai 09 à 23:30, Remere a écrit :</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hello, as you might recall, I'm one of the GSoC students. But I've been quite busy lately, but now I thought to gather input on how to actually realize it.</div><div>What I'm curious is the style of the CLI arguments to the program, as unifying them will mean cleaner code for the tools, and make it easier for the people who prefer the terminal to use.</div> <div></div><div>You can find how all the individual tools now work here (ie. CLI style): <a href="http://scummvm.svn.sourceforge.net/viewvc/scummvm/tools/trunk/README?revision=35144" target="_blank">http://scummvm.svn.sourceforge.net/viewvc/scummvm/tools/trunk/README?revision=35144</a> </div> <div></div><div>For the extraction tools, the format of input parameters is quite well defined, however, I propose that output should be controlled by a '-o' parameter, which is a directory (or filename, depending on the tool) to output to, which would default to './' (currernt directory, if the output is a single file, default name is based on the tool used). A special --tool parameter is supplied to select the correct format if it cannot be decided by heuristic (perhaps the tool should also ask for input then also?). So the format becomes:</div> <div></div><div> extract [extra params] [--tool tool-to-use] inputfiles.... [-o outputfile]</div><div></div><div>For the compression tools the format is slightly more complex, mainly because alot of tools expect specific parameters, also:</div> <div></div><div> compress [extra-params] [--tool tool-to-use] [tool-specific-params] inputfiles [-o outputfile/dir]</div><div></div><div>extra-params is generally compression specifics such as bitrate. Perhaps I'll also write better documentation of this.</div> <div></div><div></div><div>Opinions are most welcome, I probably haven't covered all angles here, and maybe another argument style is preferred?.</div><div></div> <div>Joakim</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">------------------------------------------------------------------------------</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">production scanning environment may not be a perfect world - but thanks to</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Series Scanner you'll get full speed at 300 dpi even with all image<span class="Apple-converted-space"> </span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">processing features enabled. <a href="http://p.sf.net/sfu/kodak-com_______________________________________________">http://p.sf.net/sfu/kodak-com_______________________________________________</a></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Scummvm-devel mailing list</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><a href="mailto:Scummvm-devel@lists.sourceforge.net">Scummvm-devel@lists.sourceforge.net</a></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><a href="https://lists.sourceforge.net/lists/listinfo/scummvm-devel">https://lists.sourceforge.net/lists/listinfo/scummvm-devel</a></div> </blockquote></div><br></body></html>