|
From: | Mats Bengtsson |
Subject: | Re: Header title problem or convert-ly problem |
Date: | Sat, 27 Jun 2009 15:01:30 +0200 |
User-agent: | Thunderbird 2.0.0.21 (X11/20090318) |
Trevor Daniels wrote:
Yes, but it's also standard convention that it's possible to specify arguments with spaces in them, by enclosing them in quotes and the problem here is that this information is lost along the way within the script.Eluze wrote Friday, June 26, 2009 7:19 PMTrevor Daniels wrote:maybe it should be added in the docs:I'll do that. I'll also fix the documentation to avoid misleading people in the Jay was misled.i think the whole issue comes from the two lines 279 & 280 in convert-ly.py:opt_parser = get_option_parser() (options, args) = opt_parser.parse_args () which return the filename split at each blank if it is not enclosed in triple quotes. you can verify this by printing these arguments: print (options, args) these two lines also appear in the other converting routines (midi2ly, musicxml2ly, abc2ly, etf2ly) and i have verified that midi2ly also works when using triple double quotes! i don't know if anybody could change the behaviour of this routineā¦?!Probably not. Splitting at spaces is how the args are parsed.
Yes, but it uses a for ... in ... do syntax that only works in BASH, whereasfinally IMO it's worth to mention that calling these routines with awildcard is also working (as long as no blank is involved in your callingstatement): convert-ly -e *.ly convert-ly -e "myfiles*.ly"this will convert all corresponding .ly files, even if they have blanks intheir name!There already is an example in the manual showing the use of *. I think that is probably sufficient.
convert-ly -e *.ly works in all OS:s that I know of.The main reason to include the more complicated version in the manual is that convert-ly -e *.ly may fail in situations where you have a large number of files in the same directory, since then the expanded command line may get too long. However, this is such a rare case that I find it questionable to include in the manual (at least to have it as the only option for *.ly).
/Mats
[Prev in Thread] | Current Thread | [Next in Thread] |