New plugin announcement: scribe #5899
sermore
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
beets-scribe
A plugin for beets to improve the quality of information related to western classical music.
The plugin works in two different ways:
-s / --searchThe information collected from IMSLP page is put in the following fields:
sc_work_style: contains the music period as per Classical Music, i.e. Baroque, Classical, ...sc_first_publication: contains informations about first publication of the worksc_genre_categories: contains a list of detailed music genres such as Symphonies, Opera, Sonatas, ....genre: this standard field is overwritten as a two element list composed bysc_work_stylevalue and first element fromsc_genre_categorieslist, i.e.Romantic; SymphoniesThe default behaviour is to skip all items having field
sc_work_stylealready filled. The-f / --forceoption extends the beets search to all items and eventually overwrites already present values.The option
-i / --interactivesubstitutes the automated execution of google search queries with a manual step for each pair (composer, work), expecting to receive the correct url for the IMSLP page to be scraped. This mode permits the execution of a refined query in case the standard search fails to find a correct result, and can be used as a workaround to avoid getting stuck with the google service free tier limit of 100 queries/day.The option
-l / --listproduce the list of the distinct pairs (composer, work) identified from the collected items.Installation
Install the plugin using
pip:Then, configure the plugin in your
config.yamlfile.Google Custom Search API service setup
The automated google search queries are executed using google service Custom Search JSON API. In order to use it it's therefore required to setup at least one of these services, using Google Cloud Console.
At the end of the process, the service is identified by 2 keys,
api-keyandcse-id, to be put in the plugin`s configuration.Quick procedure for google custom search api service creation:
Custom Search APIapi_keyinside configimslp.org/*Search engine IDfrom detail page, to be used ascse_idinside configIf you are interested in using free resources, check that the project you have just created is not linked to a billing account
otherwise you may encounter unpleasant surprises.
Here an example of a REST call to verify that the service is working:
Configuration
Add
scribeto your list of enabled plugins.Next, you can apply plugin configuration inside
scribeconfig item.A configuration item exists for nearly each options available in the command line.
Plugin development
Setup local environment
python -m venv /path/to/new/virtual/environmentseesource <venv path>/bin/activatebeetcommandsPYTHONPATHto include the path to the localsrcdirectory containing source codeBeta Was this translation helpful? Give feedback.
All reactions