TadaridaTools/Snakefile

29 lines
502 B
Plaintext

"""
Tadam!
Snakemake workflow for Vigie-Chiro audio preprocessing.
"""
import glob
import os
configfile: "config.yaml"
PREFIX = config["prefix"]
rule all:
input:
"output.zip.{archive_number}"
rule rename:
input:
"raw/{filename}.wav
output:
"raw/{prefix}{filename}.wav"
shell:
"if [[ {filename} = {PREFIX}* ]]; then echo 'Prefix already present'; else rename 's/^/{PREFIX}/' '{input}'; fi"
# rule time_expansion:
# input:
# "raw/*.wav"