lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: update all files with convert.ly (Vol 118, Issue 26)


From: eluze
Subject: Re: update all files with convert.ly (Vol 118, Issue 26)
Date: Fri, 7 Sep 2012 03:55:02 -0700 (PDT)

pabuhr wrote
> 
> 
> 
>    One way to cope with that, if the OS is sufficiently unix-like, is:
> 
>    for f in `find . -name \*.ly -print`
>    do
>      echo Converting $f
>      convert-ly -ed $f
>    done
> 
>    Then any files which had problems could be identified and addressed
> individually.
> 
> 
> 

in windows a command like 

for /F "usebackq delims=;" %Y IN (`dir /B/S *.*ly`) DO  convert-ly
-ednf2.15.0 """%~Y"""2>>"__convert.log"

works for nearly all files

- /usebackq/ and /delims=;/ are necessary to include files (and directories)
with spacers when listed by the command /dir /
- /"""%~Y"""/ is the input for convert-ly - three apostrophes here for names
with spacers
- /f2.15.0/ is needed if there are files with no version
- /*.*ly/ also converts .ily files


files with special characters produce 

convert-ly.py (GNU LilyPond) 2.17.1

Traceback (most recent call last):
  File "C:\Program Files (x86)\LilyPond\usr\bin\convert-ly.py", line 374, in
?
    main ()
  File "C:\Program Files (x86)\LilyPond\usr\bin\convert-ly.py", line 362, in
main
    do_one_file (f)
  File "C:\Program Files (x86)\LilyPond\usr\bin\convert-ly.py", line 250, in
do_one_file
    ly.progress (_ ("Processing `%s\'... ") % infile_name, True)
  File "out/lilylib.py", line 137, in progress
  File "out/lilylib.py", line 121, in print_logmessage
  File "out/lilylib.py", line 116, in stderr_write
  File "out/lilylib.py", line 58, in encoded_write
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 55-57:
invalid data

the name itself does not appear - you can determine it as the one just after
the last successful conversion

is there an easier code? should we raise an issue for that?

Eluze



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Re-update-all-files-with-convert-ly-Vol-118-Issue-26-tp132412p132497.html
Sent from the User mailing list archive at Nabble.com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]