bgr / mingus

Automatically exported from code.google.com/p/mingus
GNU General Public License v3.0
1 stars 1 forks source link

Change programs in mingus_examples to take cli arguments #96

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I noticed some searches in the spirit of: 

   fluidsynth: error: failed to load soundfont "soundfont.sf2" 

leading to this page. These are people trying the fluidsynth example
programs, without changing the soundfont parameter in the source (this can
also happen when the programs get installed in the base system by
packagers). This can be changed with some simple command line arguments and
--help switches.

  * when the program is called without arguments it prints out the help
information and describes why you need a soundfont and how to set it.
  * set location of the soundfont with -s and --soundfont switches.
  * add -h and --help switch

Original issue reported on code.google.com by Rhijnauwen@gmail.com on 27 Nov 2009 at 11:30

GoogleCodeExporter commented 9 years ago
Hey,
   I highly recommend the optparse library (comes by default I think) for the
argument parsing.

Cheers,
Arun.

Original comment by arunchag...@gmail.com on 27 Nov 2009 at 12:39

GoogleCodeExporter commented 9 years ago
Yes optparse is great for this and should only take a couple of lines of code.

Original comment by Rhijnauwen@gmail.com on 27 Nov 2009 at 12:49