Added tune previews
This commit is contained in:
@@ -18,7 +18,7 @@ RenderResult = Result[Path, list[RenderError]]
|
||||
class RenderOutput(enum.Enum):
|
||||
PDF = "pdf"
|
||||
PNG_CROPPED = "png-cropped"
|
||||
PNG_PREVIEW = "png-preview"
|
||||
PREVIEW = "preview"
|
||||
|
||||
|
||||
async def render(
|
||||
@@ -61,16 +61,16 @@ async def render_file(
|
||||
]
|
||||
output_file = output_file.with_suffix(".cropped.png")
|
||||
# output_file = output_file.with_suffix(".png")
|
||||
case RenderOutput.PNG_PREVIEW:
|
||||
case RenderOutput.PREVIEW:
|
||||
command = [
|
||||
"lilypond",
|
||||
"-f", "png",
|
||||
"-f", "svg",
|
||||
"-dpreview=#t",
|
||||
"-dno-print-pages",
|
||||
"-o", str(output_file),
|
||||
str(input_file)
|
||||
]
|
||||
output_file = output_file.with_suffix(".preview.png")
|
||||
output_file = output_file.with_suffix(".preview.svg")
|
||||
|
||||
proc = await asyncio.create_subprocess_exec(
|
||||
*command,
|
||||
|
||||
Reference in New Issue
Block a user