diff --git a/.gitignore b/.gitignore index e04bf04..c16f594 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ beets_env/ -tags +import.log +library.db +state.pickle diff --git a/Makefile b/Makefile index 51a1234..0597f89 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/config.yaml b/config.yaml index de97f1c..0335bbf 100644 --- a/config.yaml +++ b/config.yaml @@ -1,4 +1,5 @@ -directory: ~/Music/Music +# Currently specified on the commandline +# directory: ~/Music/Music # musicbrainz: # host: localhost:5000