def chart_page(ctx, dots, color=(0,0,0,1)): fb = ReportlabFB(ctx, inch) fb.base_color = color x = inch * 0.75 y = HEIGHT - (inch * (fb.u_height + 0.75)) for i in range(len(dots)): fb.draw(x, y + (fb.v * i * (2 * inch)), dots[i]) ctx.showPage()
rightPadding=0, leftPadding=0, ) frames.append(column) template = PageTemplate(frames=frames) doc.addPageTemplates(template) fbfc = ReportlabFB(None, inch) fbfc.u_height = 1 fbfc.u_width = (frameWidth / inch) * 0.98 fbfc.do_fret_markers = True fbfc.numbered_frets = [] g = 0 fbfc.base_color = (g, g, g, 1) def add_string(l, s): return [(x[0], s + " String", x[1], x[2]) for x in l] sharp = u"\u266F" flat = u"\u266D" def add_accidental(n): n = unicode(n) notes = u"ABCDEFGA" start = n[0] next = notes[notes.index(start) + 1]