-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
61 lines (46 loc) · 1.28 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Music Toolbox Makefile
# Config
.DEFAULT_GOAL := help
BEETSDIR = ./config/beets
BEETSDIR_MUSIC_SOURCE = ./music
export
BEETS_BASE_PATH := $(shell pwd)/music
NAVIDROME_BASE_PATH := /music/library
NAVIDROME_LIB := ./config/navidrome/navidrome.db
NAVIDROME_INPUT_DUPLICATES := ./output/beets-duplicates.json
# App targets
help::
@echo
@echo --[ $(shell poetry version) ]--
@echo
@echo "- init : init app"
@echo "- shell : start app shell"
@echo "- beet.import : import music to beets library"
@echo "- beet.duplicatez : list duplicates with beets and export JSON"
@echo "- beet.reset : delete beets music library"
@echo "- nd.list : "
@echo "- version : app version"
@echo
init::
init::
$(shell cp -n config/beets/sample-config.yaml config/beets/config.yaml)
$(shell mkdir -p music)
poetry install
shell::
poetry shell
beet.import::
beet import -A $(BEETSDIR_MUSIC_SOURCE)
beet.duplicatez::
beet duplicatez
beet.reset::
rm config/beets/library.db
rm config/beets/state.pickle
nd.list::
python src/ndtools/list.py $(NAVIDROME_LIB) $(NAVIDROME_INPUT_DUPLICATES) $(BEETS_BASE_PATH) $(NAVIDROME_BASE_PATH)
version::
@echo $(shell poetry version)
# Dev targets
spell::
poetry run codespell
ruff::
poetry run ruff check ./**