From 15c325bb8d3b23354fc6e6d64251e9c87279b872 Mon Sep 17 00:00:00 2001 From: Adam Spiers Date: Sat, 20 May 2023 15:22:59 +0100 Subject: [PATCH] attempt to fix parsing of LilyPond output on Windows Issue #112 reported a failure of parsing of the temporary sanitised.ly.out file on Windows due to semi-colons in file paths, and also possibly CR LF line-endings. So attempt to fix both these problems. --- ly2video/cli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ly2video/cli.py b/ly2video/cli.py index 71d3401..a418fa9 100755 --- a/ly2video/cli.py +++ b/ly2video/cli.py @@ -203,8 +203,8 @@ def getLeftmostGrobsByMoment(output, dpi, leftPaperMarginPx): # delimiter '\\s+from\\s+' # file:line:char - '([^:]+): *(\d+):(\d+)' - '$', line) + '(.+): *(\d+):(\d+)' + '\\r?$', line) if not m: bug("Failed to parse ly2video line:\n%s" % line) left, right, octave, notename, alteration, moment, filename, line, column = m.groups()