Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/whatphilipcodes/fromregs
in-depth configurable version of the stock fromfilename plugin
https://github.com/whatphilipcodes/fromregs
beets-plugin music-library
Last synced: 13 days ago
JSON representation
in-depth configurable version of the stock fromfilename plugin
- Host: GitHub
- URL: https://github.com/whatphilipcodes/fromregs
- Owner: whatphilipcodes
- License: mit
- Created: 2024-09-22T15:42:21.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-10-24T13:29:41.000Z (2 months ago)
- Last Synced: 2024-10-25T16:05:47.105Z (2 months ago)
- Topics: beets-plugin, music-library
- Language: Python
- Homepage: https://beets.io/
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fromregs
Analogous to [fromfilename](https://github.com/beetbox/beets/blob/master/beetsplug/fromfilename.py) but adding the option to configure regex patterns to filter results more precisely.
## Installation
Directly inject from this repository:
```shell
pipx inject beets git+https://github.com/whatphilipcodes/fromregs
```Then add the plugin to your config:
```yaml
plugins: fromregs [...]
```## Configuration
The following config replicates the default settings:
```yaml
fromregs:
custom_matchlist:
[
'^(?P.+)[\-_](?P.+)[\-_](?P.*)$',
'^(?P\d+)[\s.\-_]+(?P.+)[\-_](?P.+)[\-_](?P.*)$',
'^(?P.+)[\-_](?P.+)$',
'^(?P\d+)[\s.\-_]+(?P.+)[\-_](?P.+)$',
'^(?P\d+)[\s.\-_]+(?P.+)$',
'^(?P\d+)\s+(?P.+)$',
"^(?P.+) by (?P.+)$",
'^(?P\d+).*$',
"^(?P.+)$",
]
bad_title_matchlist: ["^$"]
artist_post_sub: ['\s{2,}']
title_post_sub: ['\[.*?\]', '\s{2,}']
final_strip: yes
fill_album_from_title: no,
limit_tracknumber: 25,
```If you are trying to come up with your own regex patterns this plugin delivers more detailed logs when running verbose at level 2:
```bash
beet -vv import path/to/track(s)
```## Reference
`custom matchlist`
Works via the capture groups `` (album or track artist), `` (track number) and `` (album or track title). The `` capture group is only used when importing more than one track as an album. This field cannot be an emtpy list!`bad_title_matchlist`
Used to determine if a track is processed (matches the list) or is skipped entirely. This field cannot be an emtpy list!`artist_post_sub`
Removes parts of the artist result that match with this list as a post-processing step.`title_post_sub`
Removes parts of the title result that match with this list as a post-processing step.`final_strip`
If true, removes excess white space on all results individually as the last step before applying the results.`fill_album_from_title`
Uses the title as album, if that matches your search strategy.`limit_tracknumber`
Threshold to decide wether a number should be treated as a track or only used for album, artist and title names.