Update targets to make it easier to change directories

This commit is contained in:
IamTheFij 2018-05-18 14:52:00 -07:00
parent f73ecfcf0f
commit 33ff9b9766
3 changed files with 18 additions and 5 deletions

4
.gitignore vendored
View File

@ -1,2 +1,4 @@
beets_env/
tags
import.log
library.db
state.pickle

View File

@ -1,17 +1,27 @@
BEET_CMD := ./beets_env/bin/beet -c ./config.yaml
SOURCE_DIR := ~/Music/Music_Raw
TARGET_DIR := ~/Music/Music
BEET_CMD := BEETSDIR=. ./beets_env/bin/beet -d $(TARGET_DIR)
default: beets_env
# Creates virtualenv with beets
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
reimport: beets_env
$(BEET_CMD) import ~/Music/Music
$(BEET_CMD) import $(TARGET_DIR)
# Incrementally imports and copies from from source into target directory
import: beets_env
$(BEET_CMD) import -c ~/Music/Music_Raw
$(BEET_CMD) import -i -c $(SOURCE_DIR)
# Launch beets web interface
web: beets_env
$(BEET_CMD) web
# Cleans environment and beets config
clean:
rm -fr ./beets_env ./import.log ./library.db ./state.pickle

View File

@ -1,4 +1,5 @@
directory: ~/Music/Music
# Currently specified on the commandline
# directory: ~/Music/Music
# musicbrainz:
# host: localhost:5000