This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import click | |
from pathlib import Path | |
from subprocess import call, check_output | |
from tqdm import tqdm | |
@click.command() | |
@click.argument('directory', type=click.Path(exists=True)) | |
@click.option('--recursive', is_flag=True, help='Recursive') | |
@click.option('--file-ext', help='File format to process') | |
def main(directory, file_ext='mp4', recursive=False): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e # exit script of control-c is used | |
USAGE="Usage: convert_music.sh source_dir destination_dir" | |
# --- Options processing ------------------------------------------- | |
if [ $# == 0 ] ; then | |
echo $USAGE | |
exit 1; | |
fi | |
# Convert relative path to absolute. Also remove trailing slash | |
SOURCE_DIR="$(cd "$(dirname "$1")"; pwd)/$(basename "$1")" |