Refactor
All checks were successful
CI / Typos (push) Successful in 8s
CI / Clippy (push) Successful in 54s
CI / Build and test (push) Successful in 52s

This commit is contained in:
2025-05-03 16:42:33 -07:00
parent b8302d3381
commit 64f45a443c
17 changed files with 1229 additions and 996 deletions

View File

@ -1,59 +0,0 @@
# All paths are relative to workdir.
# Workdir is this file's parent by default.
# If workdir is relative, it is relative to this file's parent.
[config]
work_dir = "./music"
# follow_links: if true, follow symlinks (default false)
# dirs: if true, act on directories (default false)
# files: if true, act on regular files (default true)
# links: if true, act on symlinks (default false. throw an error if this is provided with follow_links)
[tool.bash]
script.test = """
mkdir -p "$(dirname "../out/${PICK_RELATIVE}")"
filename="${PICK_RELATIVE%.*}"
ffmpeg \
-i "${PICK_FILE}" \
-map_metadata 0 \
-id3v2_version 3 \
-b:a 192k \
-loglevel error \
-hide_banner -n \
"../out/${filename}.mp3"
"""
script.ogg = """
mkdir -p "$(dirname "../out/${PICK_RELATIVE}")"
filename="${PICK_RELATIVE%.*}"
ffmpeg \
-i "${PICK_FILE}" \
-c:v libtheora \
-q:v 10 \
-c:a libopus \
-b:a 192k \
-loglevel error \
-hide_banner -n \
"../out/${filename}.ogg"
"""
# The first rule to match a path is run.
# Paths are checked relative to source.
# "/source/path/to/file.gz" becomes "path/to/file.gz"
#
# a "path segment" is a single file or directory.
#
# * matches exactly one path segment. In regex, this is [^/]+
# ** matches zero or more path segments. In regex, this is ([^/]+)*
#
# All rules are matched against the FULL PATH of files.
# Directories are ignored.
[[rules]]
"**.flac" = "test"
[[rules]]
"**" = ""