From 6efe91533a7cd295f2a261ee16d0bd9c8050c165 Mon Sep 17 00:00:00 2001 From: Mark Gotham <19486660+MarkGotham@users.noreply.github.com> Date: Fri, 26 Sep 2025 09:43:53 +0100 Subject: [PATCH] Update README.md with shell example --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 20dc7841..961b675f 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,17 @@ Named arguments: ## API usage: Call converter21.register() to get music21 to use converter21's alternate Humdrum and MEI converters in your own code. +## Example corpus shell script + +Here's an exmaple shell script for showing how to use this resource to convert all files in one directory (repalce `` with your real directory name) from one format (here `.mxl`) to another (here `.krn`). +``` +#!/bin/bash +for f in /*.mxl; do + echo "Converting $f → ${f%.mxl}.krn" + python3 -m converter21 -f musicxml -t humdrum "$f" "${f%.mxl}.krn" +done +``` + ## License The MIT License (MIT) Copyright (c) 2021-2025 Greg Chapman