mirror of
https://github.com/stronk-dev/Guitar-Sheet-Parser.git
synced 2025-07-05 08:25:09 +02:00
Fix trailing whiteline added after metadata
This commit is contained in:
parent
a69606ee4c
commit
72b8a1ab3d
@ -47,13 +47,12 @@ def outputToTxt(folderLocation, printRaw, songObj):
|
|||||||
|
|
||||||
lineCounter = 0
|
lineCounter = 0
|
||||||
# Write metadata
|
# Write metadata
|
||||||
for line in songObj.metadata.split('\n'):
|
for line in songObj.metadata.splitlines(True):
|
||||||
# remove any unwanted characters from metadata
|
# remove any unwanted characters from metadata
|
||||||
line = line.rstrip()
|
|
||||||
if not songObj.keepEmptyLines and not line:
|
if not songObj.keepEmptyLines and not line:
|
||||||
continue
|
continue
|
||||||
#print("meta line '{}'".format(line))
|
#print("meta line '{}'".format(line))
|
||||||
output += line + '\r\n'
|
output += line
|
||||||
metadataLines.append(lineCounter)
|
metadataLines.append(lineCounter)
|
||||||
lineCounter += 1
|
lineCounter += 1
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user