<commit_before>import subprocess
from music21 import *
from pyPdf import PdfFileReader, PdfFileWriter
from reportlab.pdfgen import canvas
from reportlab.lib import pagesizes
from reportlab.lib.units import inch
from reportlab.pdfbase import pdfmetrics
from reportlab.pdfbase.ttfonts import TTFont

# some important constants
MUSIC_XML_DIR	= "C:\\wamp\\www\\syntaxblitz.github.io\\portfolio\\music-xml\\"
MUSIC_LY_DIR	= "C:\\wamp\\www\\syntaxblitz.github.io\\portfolio\\music-ly\\"
MUSIC_PDF_DIR	= "C:\\wamp\\www\\syntaxblitz.github.io\\portfolio\\music-pdf\\"
PAGENUM_PDF_DIR	= "C:\\wamp\\www\\syntaxblitz.github.io\\portfolio\\pagenum-pdf\\"
PAGE_PDF_DIR	= "C:\\wamp\\www\\syntaxblitz.github.io\\portfolio\\page-pdf\\"
OUTPUT_DIR	= "C:\\wamp\\www\\syntaxblitz.github.io\\portfolio\\pdf-output\\"

PATH_TO_CAMBRIA	= "C:\\Windows\\Fonts\\CAMBRIA.TTC"

LILYPOND_EXE_LOCATION = r"c:\Program Files (x86)\lilypond\usr\bin\lilypond.exe"

for i in range(-1, 43 + 1):
	pageNum = i
	pageNumber = str(pageNum)

	numOfParts = 1

	# generate .ly file in music21
	music = converter.parse(MUSIC_XML_DIR + pageNumber + ".xml")
	numOfParts = len(music.getElementsByClass(stream.Part))
	music.write("lily", MUSIC_LY_DIR + pageNumber + ".ly")

	# add styling information to .ly file
	outFile = open(MUSIC_LY_DIR + pageNumber + ".ly", "a")	# 'a' opens for appending
	if numOfParts == 1:
		outFile.write(file("ly-one-line.txt","r").read())	# 'r' opens for just reading
	else:<commit_msg>Use spaces for inline spacing<commit_after>import subprocess
from music21 import *
from pyPdf import PdfFileReader, PdfFileWriter
from reportlab.pdfgen import canvas
from reportlab.lib import pagesizes
from reportlab.lib.units import inch
from reportlab.pdfbase import pdfmetrics
from reportlab.pdfbase.ttfonts import TTFont

# some important constants
MUSIC_XML_DIR   = "C:\\wamp\\www\\syntaxblitz.github.io\\portfolio\\music-xml\\"
MUSIC_LY_DIR    = "C:\\wamp\\www\\syntaxblitz.github.io\\portfolio\\music-ly\\"
MUSIC_PDF_DIR   = "C:\\wamp\\www\\syntaxblitz.github.io\\portfolio\\music-pdf\\"
PAGENUM_PDF_DIR = "C:\\wamp\\www\\syntaxblitz.github.io\\portfolio\\pagenum-pdf\\"
PAGE_PDF_DIR    = "C:\\wamp\\www\\syntaxblitz.github.io\\portfolio\\page-pdf\\"
OUTPUT_DIR      = "C:\\wamp\\www\\syntaxblitz.github.io\\portfolio\\pdf-output\\"

PATH_TO_CAMBRIA = "C:\\Windows\\Fonts\\CAMBRIA.TTC"

LILYPOND_EXE_LOCATION = r"c:\Program Files (x86)\lilypond\usr\bin\lilypond.exe"

for i in range(-1, 43 + 1):
	pageNum = i
	pageNumber = str(pageNum)

	numOfParts = 1

	# generate .ly file in music21
	music = converter.parse(MUSIC_XML_DIR + pageNumber + ".xml")
	numOfParts = len(music.getElementsByClass(stream.Part))
	music.write("lily", MUSIC_LY_DIR + pageNumber + ".ly")

	# add styling information to .ly file
	outFile = open(MUSIC_LY_DIR + pageNumber + ".ly", "a")	# 'a' opens for appending
	if numOfParts == 1:
		outFile.write(file("ly-one-line.txt","r").read())	# 'r' opens for just reading
	else:
{'fraction_non_alphanumeric': 0.15446880269814503, 'fraction_numerical': 0.008094435075885328, 'mean_word_length': 4.203508771929824, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 12, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2753915', 'n_tokens_mistral': 1174, 'n_tokens_neox': 1122, 'n_words': 209}