Re: [beets] Query beets library through external python script

2017-04-08 Thread Steve Johnson
The most useful thing would probably be for someone to write a plugin
that accepts a query on stdin and puts JSON on stdout.


>From what I can tell, the 'canonical' way to get access to the beets
library from a Python script is to implement the script as a plugin.
The plugins in the beets source tree should provide enough examples to
get started.




On Sat, Apr 8, 2017, at 01:00 PM, Alessio Elmi wrote:

> Hi,

> I would like to query an existing beets library through a Python
> script. Given the query (eg. "artist:muse") I want it to return a list
> of beets 'items' with all the attributes with it.
> However, I couldn't find any example to start with. I very ugly way
> would be parsing the output of a system call and then split any
> substring to populate a list of custom objects.
> I suppose there is a proper way of using API to retrieve a list given
> the query but I couldn't take a step in that direction.
> Could you point me to some similar examples?

> Thank you!

> 



> --

>  You received this message because you are subscribed to the Google
>  Groups "beets" group.
>  To unsubscribe from this group and stop receiving emails from it,
>  send an email to beets-users+unsubscr...@googlegroups.com.
>  For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
"beets" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beets-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beets] I fixed my first beets issue

2017-03-26 Thread Steve Johnson
Submit a pull request on GitHub.



https://help.github.com/articles/creatin…





On Sun, Mar 26, 2017, at 03:50 AM, Spiros C wrote:

> Greetings,

> I tryied to fix this issue:
> https://github.com/beetbox/beets/issues/2366 and I think I made it. I
> forked beets and added my changes here:
> https://github.com/SpirosChadoulos/beets/commit/2fbc7f0e70ed458708c8c5b5425d1f35ddf4ee9b
> . What should I do now so that my changes get accepted to the main
> beets code as a pull request?
> Thanks a lot,

> Spiros

> 



> --

>  You received this message because you are subscribed to the Google
>  Groups "beets" group.
>  To unsubscribe from this group and stop receiving emails from it,
>  send an email to beets-users+unsubscr...@googlegroups.com.
>  For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
"beets" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beets-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beets] I fixed my first beets issue

2017-03-26 Thread Steve Johnson
Sorry for the bad paste.
https://help.github.com/articles/creating-a-pull-request/






On Sun, Mar 26, 2017, at 10:48 AM, Steve Johnson wrote:

> Submit a pull request on GitHub.

> 

> https://help.github.com/articles/creatin…

> 

> 

> On Sun, Mar 26, 2017, at 03:50 AM, Spiros C wrote:

>> Greetings,

>> I tryied to fix this issue:
>> https://github.com/beetbox/beets/issues/2366 and I think I made it. I
>> forked beets and added my changes here:
>> https://github.com/SpirosChadoulos/beets/commit/2fbc7f0e70ed458708c8c5b5425d1f35ddf4ee9b
>> . What should I do now so that my changes get accepted to the main
>> beets code as a pull request?
>> Thanks a lot,

>> Spiros

>> 



>> --

>> You received this message because you are subscribed to the Google
>> Groups "beets" group.
>> To unsubscribe from this group and stop receiving emails from it,
>> send an email to beets-users+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.

> 


-- 
You received this message because you are subscribed to the Google Groups 
"beets" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beets-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beets] How to list an exact string in queries

2017-01-31 Thread Steve Johnson
Although the given solution works, it's much slower than the raw
substring query. Would be nice to get that optimized in the future. (My
library is large.)




On Tue, Jan 31, 2017, at 08:33 AM, Arnaud Castaner wrote:

> That worked, thanks!

> 

> On Tuesday, January 31, 2017 at 3:55:51 PM UTC+1, Mike wrote:

>> Hey,

>> 

>> Try: beet ls -a albumartist::^Queen$

>> 

>> What you're looking for is a regex query. You can read more about
>> them here:
>> http://beets.readthedocs.io/en/v1.4.3/reference/query.html#regular-expressions
>> 

>> On Tue, Jan 31, 2017 at 9:42 AM, Arnaud Castaner
>>  wrote:
>>> Hi,

>>> 

>>> I'm trying to do something that seems simple but I can't find a way
>>> to do it right. I want a query to look for *exactly* album artist
>>> value I specify. When I do "beet ls -a albumartist:Queen" I'd like
>>> to see only the albums from Queen, and only Queen. Instead, it gives
>>> me this:
>>> 

>>> beet list -a albumartist:Queen

>>> 

>>> Queen - A Day at the Races

>>> Queen - A Kind of Magic

>>> Queen - Flash Gordon

>>> Queen - Greatest Hits

>>> Queen - Greatest Hits II

>>> Queen - Greatest Hits III

>>> Queen - Hot Space

>>> Queen - Innuendo

>>> Queen - Jazz

>>> Queen - Made in Heaven

>>> Queen - News of the World

>>> Queen - Queen

>>> Queen - Queen II

>>> Queen - Sheer Heart Attack

>>> Queen - The Game

>>> Queen - The Miracle

>>> Queen - The Works

>>> Queens of the Stone Age - R

>>> Queens of the Stone Age - Songs for the Deaf

>>> Queens of the Stone Age - ?Like Clockwork

>>> Queensrÿche - Operation: Mindcrime

>>> 

>>> I tried using albumartist:"Queen" (added quotes) but it does the
>>> same. How can I get beets to search literally for the specified
>>> value?
>>> 

>>> 



>>> --
>>>  You received this message because you are subscribed to the Google
>>>  Groups "beets" group. To unsubscribe from this group and stop
>>>  receiving emails from it, send an email to beets-
>>>  users...@googlegroups.com. For more options, visit
>>>  https://groups.google.com/d/optout.
>> 

> 



> --

>  You received this message because you are subscribed to the Google
>  Groups "beets" group.
>  To unsubscribe from this group and stop receiving emails from it,
>  send an email to beets-users+unsubscr...@googlegroups.com.
>  For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
"beets" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beets-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.