beets-quicktag 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- beets_quicktag-0.1.0/PKG-INFO +54 -0
- beets_quicktag-0.1.0/README.md +44 -0
- beets_quicktag-0.1.0/beets_quicktag.egg-info/PKG-INFO +54 -0
- beets_quicktag-0.1.0/beets_quicktag.egg-info/SOURCES.txt +18 -0
- beets_quicktag-0.1.0/beets_quicktag.egg-info/dependency_links.txt +1 -0
- beets_quicktag-0.1.0/beets_quicktag.egg-info/requires.txt +3 -0
- beets_quicktag-0.1.0/beets_quicktag.egg-info/top_level.txt +1 -0
- beets_quicktag-0.1.0/beetsplug/quicktag/__init__.py +76 -0
- beets_quicktag-0.1.0/beetsplug/quicktag/app.py +439 -0
- beets_quicktag-0.1.0/beetsplug/quicktag/widgets/custom_selection_list.py +66 -0
- beets_quicktag-0.1.0/beetsplug/quicktag/widgets/input_with_label.py +38 -0
- beets_quicktag-0.1.0/beetsplug/quicktag/widgets/playback.py +182 -0
- beets_quicktag-0.1.0/beetsplug/quicktag/widgets/playback_progress.py +100 -0
- beets_quicktag-0.1.0/pyproject.toml +39 -0
- beets_quicktag-0.1.0/setup.cfg +4 -0
- beets_quicktag-0.1.0/tests/test_app.py +392 -0
- beets_quicktag-0.1.0/tests/test_config.py +107 -0
- beets_quicktag-0.1.0/tests/test_integration.py +295 -0
- beets_quicktag-0.1.0/tests/test_playback.py +300 -0
- beets_quicktag-0.1.0/tests/test_widgets.py +224 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: beets-quicktag
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A beets plugin for quickly tagging tracks with customizable attributes
|
|
5
|
+
Requires-Python: >=3.11
|
|
6
|
+
Description-Content-Type: text/markdown
|
|
7
|
+
Requires-Dist: beets>=2.3.0
|
|
8
|
+
Requires-Dist: just-playback>=0.1.8
|
|
9
|
+
Requires-Dist: textual>=3.2.0
|
|
10
|
+
|
|
11
|
+
# Beets QuickTag Plugin
|
|
12
|
+
|
|
13
|
+
This is a plugin for [beets](https://beets.io/) that scratches my own itch to categorize my music using custom tags, for DJing, as efficiently as possible. If it's not at a 1.0 release, it's probably not stable for use by others, though I'll still try and look at issues if for some reason you've found this (hi!).
|
|
14
|
+
|
|
15
|
+
It's a work in progress though much of the functionality is already there. I initially prototyped this using Claude 3.7 and Gemini 2.5 Pro Preview but ended up re-working quite a bit of it.
|
|
16
|
+
|
|
17
|
+
TODO:
|
|
18
|
+
- add tests
|
|
19
|
+
- add rating or energy level widget
|
|
20
|
+
- consider bundling libmpv
|
|
21
|
+
- automate releases
|
|
22
|
+
- test on Windows
|
|
23
|
+
- summarize changes after QuickTag finishes running
|
|
24
|
+
- consider bundling libmpv
|
|
25
|
+
|
|
26
|
+
## Requirements
|
|
27
|
+
|
|
28
|
+
You must have `libmpv` installed.
|
|
29
|
+
|
|
30
|
+
## Configuration
|
|
31
|
+
|
|
32
|
+
Add a `quicktag` section to your beets `config.yaml`. Here's an example:
|
|
33
|
+
|
|
34
|
+
```yaml
|
|
35
|
+
|
|
36
|
+
quicktag:
|
|
37
|
+
autoplay_at_launch: yes
|
|
38
|
+
autoplay_on_track_change: no
|
|
39
|
+
autosave_on_quit: yes
|
|
40
|
+
categories:
|
|
41
|
+
collection:
|
|
42
|
+
- DJ
|
|
43
|
+
- Sample
|
|
44
|
+
mood:
|
|
45
|
+
- happy
|
|
46
|
+
- sad
|
|
47
|
+
- bright
|
|
48
|
+
- dark
|
|
49
|
+
- angry
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Credits
|
|
53
|
+
|
|
54
|
+
This was inspired by the Quick Tag functionality in [One Tagger](https://onetagger.github.io/), which is an excellent application. One Tagger also has [a spreadsheet](https://docs.google.com/spreadsheets/d/1wYokScjoS5Xb1IvqFMXbSbknrXJ7bySLLihTucOS4qY/edit?gid=0#gid=0) that might provide inspiration from existing systems to categorize tracks in this way. I believe the One Tagger system, or at least the default categories it has, are inspired by [a reddit post by u/nonomomomo](https://www.reddit.com/r/DJs/comments/c3o2jk/my_ultimate_track_tagging_system_the_little_data/).
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Beets QuickTag Plugin
|
|
2
|
+
|
|
3
|
+
This is a plugin for [beets](https://beets.io/) that scratches my own itch to categorize my music using custom tags, for DJing, as efficiently as possible. If it's not at a 1.0 release, it's probably not stable for use by others, though I'll still try and look at issues if for some reason you've found this (hi!).
|
|
4
|
+
|
|
5
|
+
It's a work in progress though much of the functionality is already there. I initially prototyped this using Claude 3.7 and Gemini 2.5 Pro Preview but ended up re-working quite a bit of it.
|
|
6
|
+
|
|
7
|
+
TODO:
|
|
8
|
+
- add tests
|
|
9
|
+
- add rating or energy level widget
|
|
10
|
+
- consider bundling libmpv
|
|
11
|
+
- automate releases
|
|
12
|
+
- test on Windows
|
|
13
|
+
- summarize changes after QuickTag finishes running
|
|
14
|
+
- consider bundling libmpv
|
|
15
|
+
|
|
16
|
+
## Requirements
|
|
17
|
+
|
|
18
|
+
You must have `libmpv` installed.
|
|
19
|
+
|
|
20
|
+
## Configuration
|
|
21
|
+
|
|
22
|
+
Add a `quicktag` section to your beets `config.yaml`. Here's an example:
|
|
23
|
+
|
|
24
|
+
```yaml
|
|
25
|
+
|
|
26
|
+
quicktag:
|
|
27
|
+
autoplay_at_launch: yes
|
|
28
|
+
autoplay_on_track_change: no
|
|
29
|
+
autosave_on_quit: yes
|
|
30
|
+
categories:
|
|
31
|
+
collection:
|
|
32
|
+
- DJ
|
|
33
|
+
- Sample
|
|
34
|
+
mood:
|
|
35
|
+
- happy
|
|
36
|
+
- sad
|
|
37
|
+
- bright
|
|
38
|
+
- dark
|
|
39
|
+
- angry
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Credits
|
|
43
|
+
|
|
44
|
+
This was inspired by the Quick Tag functionality in [One Tagger](https://onetagger.github.io/), which is an excellent application. One Tagger also has [a spreadsheet](https://docs.google.com/spreadsheets/d/1wYokScjoS5Xb1IvqFMXbSbknrXJ7bySLLihTucOS4qY/edit?gid=0#gid=0) that might provide inspiration from existing systems to categorize tracks in this way. I believe the One Tagger system, or at least the default categories it has, are inspired by [a reddit post by u/nonomomomo](https://www.reddit.com/r/DJs/comments/c3o2jk/my_ultimate_track_tagging_system_the_little_data/).
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: beets-quicktag
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A beets plugin for quickly tagging tracks with customizable attributes
|
|
5
|
+
Requires-Python: >=3.11
|
|
6
|
+
Description-Content-Type: text/markdown
|
|
7
|
+
Requires-Dist: beets>=2.3.0
|
|
8
|
+
Requires-Dist: just-playback>=0.1.8
|
|
9
|
+
Requires-Dist: textual>=3.2.0
|
|
10
|
+
|
|
11
|
+
# Beets QuickTag Plugin
|
|
12
|
+
|
|
13
|
+
This is a plugin for [beets](https://beets.io/) that scratches my own itch to categorize my music using custom tags, for DJing, as efficiently as possible. If it's not at a 1.0 release, it's probably not stable for use by others, though I'll still try and look at issues if for some reason you've found this (hi!).
|
|
14
|
+
|
|
15
|
+
It's a work in progress though much of the functionality is already there. I initially prototyped this using Claude 3.7 and Gemini 2.5 Pro Preview but ended up re-working quite a bit of it.
|
|
16
|
+
|
|
17
|
+
TODO:
|
|
18
|
+
- add tests
|
|
19
|
+
- add rating or energy level widget
|
|
20
|
+
- consider bundling libmpv
|
|
21
|
+
- automate releases
|
|
22
|
+
- test on Windows
|
|
23
|
+
- summarize changes after QuickTag finishes running
|
|
24
|
+
- consider bundling libmpv
|
|
25
|
+
|
|
26
|
+
## Requirements
|
|
27
|
+
|
|
28
|
+
You must have `libmpv` installed.
|
|
29
|
+
|
|
30
|
+
## Configuration
|
|
31
|
+
|
|
32
|
+
Add a `quicktag` section to your beets `config.yaml`. Here's an example:
|
|
33
|
+
|
|
34
|
+
```yaml
|
|
35
|
+
|
|
36
|
+
quicktag:
|
|
37
|
+
autoplay_at_launch: yes
|
|
38
|
+
autoplay_on_track_change: no
|
|
39
|
+
autosave_on_quit: yes
|
|
40
|
+
categories:
|
|
41
|
+
collection:
|
|
42
|
+
- DJ
|
|
43
|
+
- Sample
|
|
44
|
+
mood:
|
|
45
|
+
- happy
|
|
46
|
+
- sad
|
|
47
|
+
- bright
|
|
48
|
+
- dark
|
|
49
|
+
- angry
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Credits
|
|
53
|
+
|
|
54
|
+
This was inspired by the Quick Tag functionality in [One Tagger](https://onetagger.github.io/), which is an excellent application. One Tagger also has [a spreadsheet](https://docs.google.com/spreadsheets/d/1wYokScjoS5Xb1IvqFMXbSbknrXJ7bySLLihTucOS4qY/edit?gid=0#gid=0) that might provide inspiration from existing systems to categorize tracks in this way. I believe the One Tagger system, or at least the default categories it has, are inspired by [a reddit post by u/nonomomomo](https://www.reddit.com/r/DJs/comments/c3o2jk/my_ultimate_track_tagging_system_the_little_data/).
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
README.md
|
|
2
|
+
pyproject.toml
|
|
3
|
+
beets_quicktag.egg-info/PKG-INFO
|
|
4
|
+
beets_quicktag.egg-info/SOURCES.txt
|
|
5
|
+
beets_quicktag.egg-info/dependency_links.txt
|
|
6
|
+
beets_quicktag.egg-info/requires.txt
|
|
7
|
+
beets_quicktag.egg-info/top_level.txt
|
|
8
|
+
beetsplug/quicktag/__init__.py
|
|
9
|
+
beetsplug/quicktag/app.py
|
|
10
|
+
beetsplug/quicktag/widgets/custom_selection_list.py
|
|
11
|
+
beetsplug/quicktag/widgets/input_with_label.py
|
|
12
|
+
beetsplug/quicktag/widgets/playback.py
|
|
13
|
+
beetsplug/quicktag/widgets/playback_progress.py
|
|
14
|
+
tests/test_app.py
|
|
15
|
+
tests/test_config.py
|
|
16
|
+
tests/test_integration.py
|
|
17
|
+
tests/test_playback.py
|
|
18
|
+
tests/test_widgets.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
beetsplug
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import optparse
|
|
2
|
+
|
|
3
|
+
from beets import ui
|
|
4
|
+
from beets.dbcore.db import Results as BeetsResults
|
|
5
|
+
from beets.library import Library as BeetsLibrary
|
|
6
|
+
from beets.plugins import BeetsPlugin
|
|
7
|
+
|
|
8
|
+
from .app import QuickTagApp
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class QuickTagPlugin(BeetsPlugin):
|
|
12
|
+
def __init__(self):
|
|
13
|
+
super(QuickTagPlugin, self).__init__()
|
|
14
|
+
self.config.add(
|
|
15
|
+
{
|
|
16
|
+
"categories": {},
|
|
17
|
+
"autoplay_on_track_change": False,
|
|
18
|
+
"autoplay_at_launch": False,
|
|
19
|
+
"autonext_at_track_end": False,
|
|
20
|
+
"autosave_on_quit": False,
|
|
21
|
+
"keep_playing_on_track_change_if_playing": True,
|
|
22
|
+
}
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
def commands(self):
|
|
26
|
+
cmd = ui.Subcommand(
|
|
27
|
+
"quicktag",
|
|
28
|
+
help="Quickly tag tracks with predefined options.",
|
|
29
|
+
aliases=["qt"],
|
|
30
|
+
)
|
|
31
|
+
cmd.func = self.run_quicktag
|
|
32
|
+
return [cmd]
|
|
33
|
+
|
|
34
|
+
def run_quicktag(self, lib: BeetsLibrary, opts: optparse.Values, args):
|
|
35
|
+
query = ui.decargs(args)
|
|
36
|
+
items: BeetsResults = lib.items(query)
|
|
37
|
+
|
|
38
|
+
if not items:
|
|
39
|
+
ui.print_("No tracks found to tag.")
|
|
40
|
+
return
|
|
41
|
+
|
|
42
|
+
categories_config = self.config["categories"].get(dict)
|
|
43
|
+
autoplay_on_track_change_enabled = self.config["autoplay_on_track_change"].get(
|
|
44
|
+
bool
|
|
45
|
+
)
|
|
46
|
+
autoplay_at_launch_enabled = self.config["autoplay_at_launch"].get(bool)
|
|
47
|
+
autonext_at_track_end_enabled = self.config["autonext_at_track_end"].get(bool)
|
|
48
|
+
autosave_on_quit_enabled = self.config["autosave_on_quit"].get(bool)
|
|
49
|
+
keep_playing_on_track_change_if_playing_enabled = self.config["keep_playing_on_track_change_if_playing"].get(bool)
|
|
50
|
+
|
|
51
|
+
if not categories_config:
|
|
52
|
+
ui.print_(
|
|
53
|
+
"No categories defined in the configuration. Please configure the quicktag plugin."
|
|
54
|
+
)
|
|
55
|
+
ui.print_("Example configuration:")
|
|
56
|
+
ui.print_("quicktag:")
|
|
57
|
+
ui.print_(" categories:")
|
|
58
|
+
ui.print_(" mood: [happy, sad, energetic, calm]")
|
|
59
|
+
ui.print_(
|
|
60
|
+
" genre_custom: [electronic, ambient, experimental, soundtrack]"
|
|
61
|
+
)
|
|
62
|
+
return
|
|
63
|
+
|
|
64
|
+
categories = list(categories_config.items())
|
|
65
|
+
|
|
66
|
+
app = QuickTagApp(
|
|
67
|
+
lib,
|
|
68
|
+
items,
|
|
69
|
+
categories,
|
|
70
|
+
autoplay_on_track_change_enabled,
|
|
71
|
+
autoplay_at_launch_enabled,
|
|
72
|
+
autonext_at_track_end_enabled,
|
|
73
|
+
autosave_on_quit_enabled,
|
|
74
|
+
keep_playing_on_track_change_if_playing_enabled,
|
|
75
|
+
)
|
|
76
|
+
app.run()
|