my-beets/Makefile

28 lines
700 B
Makefile
Raw Normal View History

SOURCE_DIR := ~/Music/Music_Raw
TARGET_DIR := ~/Music/Music
BEET_CMD := BEETSDIR=. ./beets_env/bin/beet -d $(TARGET_DIR)
2018-04-24 16:46:45 +00:00
default: beets_env
# Creates virtualenv with beets
2018-04-24 16:46:45 +00:00
beets_env:
python3 -m venv beets_env
./beets_env/bin/pip install -U pip
./beets_env/bin/pip install -r ./requirements.txt
# Re-runs an import on the existing library
2018-04-24 16:46:45 +00:00
reimport: beets_env
$(BEET_CMD) import $(TARGET_DIR)
2018-04-24 16:46:45 +00:00
# Incrementally imports and copies from from source into target directory
2018-05-18 21:35:50 +00:00
import: beets_env
$(BEET_CMD) import -i -c $(SOURCE_DIR)
2018-05-18 21:35:50 +00:00
# Launch beets web interface
2018-04-24 16:46:45 +00:00
web: beets_env
$(BEET_CMD) web
# Cleans environment and beets config
clean:
rm -fr ./beets_env ./import.log ./library.db ./state.pickle