Replies: 9 comments 17 replies
-
SoCo-CLI 0.3.0 adds an API mode, allowing the use of SoCo-CLI as a very high level Sonos control library. This makes it more suitable for use as an extension to utilities like SonosKeyController. The docs are at: https://github.com/avantrec/soco-cli#using-soco-cli-as-a-python-library. |
Beta Was this translation helpful? Give feedback.
-
@naxels wrote:
Quite a bit of this is implemented now in SoCo-CLI 0.3.4. I like it, actually, and I've started using it myself :) I'm going to add some form of tab command-completion, and shortcuts that can be saved in a separate file. v0.3.5 will also allow setting the active speaker just by typing its number. You're right that the command documentation could do with a better framework from which multiple types of document could be generated. The code needs substantial tidying up, too. Project started small and grew bigger than I expected! |
Beta Was this translation helpful? Give feedback.
-
I just had another idea for adding shortcuts to Interactive mode, based on what we discussed in SonosKeyController. Since you are using the .soco-cli folder to store history, maybe in the same folder you can store what I call Alias commands. When in Interactive mode, you can quickly setup an alias to a keyboard shortcut and this is saved to a file for future use Here was my reasoning for this idea:
Of course the issue to figure out is whether or not you should allow someone to repurpose the build in commands, for example And when in the future I decide to have This way we get very close to SonosKeyController, only needing an additional Enter keyboard command. Ps: The ability to switch between speakers by just typing the number and hit enter is such a wonderful shortcut :) |
Beta Was this translation helpful? Give feedback.
-
In v0.3.11, aliases can include other aliases, with loop detection. Also, a new 'single keystroke' mode enables functionality equivalent to SonosKeyController for Unix-y systems. |
Beta Was this translation helpful? Give feedback.
-
I wanted to reach out with another idea along a similar usage pattern to what @naxels mentioned above. My general pattern is: It would be cool if there was a "persistent mode" for the Apologies if this is already implemented and I happily take an RTFM redirect! :) |
Beta Was this translation helpful? Give feedback.
-
This is great, pwt. Thanks for all the work on it. I will use it this week
and revert with any issues/bugs I find.
…On Mon, Jun 7, 2021 at 5:12 AM pwt ***@***.***> wrote:
In *v0.3.47*, I've evolved track_follow so that it automatically runs in
a subprocess in interactive mode.
This provides the desired behaviour of track_follow continuing to run
when playback is stopped or paused, while CTRL-C returns control to the
interactive shell.
(The advice above to use exec still works, but is now redundant.)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#10 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAXHV2ZZBWCCEGS2PWE7E33TRSEP3ANCNFSM4WIXZFNA>
.
--
***@***.*** | w:617-512-2509 | c:908-873-8195
|
Beta Was this translation helpful? Give feedback.
-
Nice! Great addition.
…Sent from my iPhone
On Jul 30, 2021, at 12:01 PM, pwt ***@***.***> wrote:
Just to note that v0.4.6 adds a track_follow_compact (or tfc) action, which works like track_follow but prints information for each successive track on a single line, e.g.:
1: [16:40] Artist: King Crimson | Album: In The Court Of The Crimson King | Title: Epitaph
2: [16:45] Artist: Julie Miller | Album: Broken Things | Title: All My Tears
3: [16:49] Artist: Nahko & Medicine for the People | Album: Take Your Power Back | Title: Lifeguard
4: [16:53] Artist: Chuck Berry | Album: The Great 28 | Title: Nadine
5: [16:55] Artist: Bob Marley | Album: Exodus | Title: Waiting in Vain
...
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Beta Was this translation helpful? Give feedback.
-
Oh fantastic. Thanks for the reprex on using that from the command line. I
like the `tee` example!
I'll play around and if anything useful comes of it, I'll post.
Thanks again!
…On Thu, Aug 12, 2021 at 11:27 AM pwt ***@***.***> wrote:
Redirection of the output to a file works fine if you do it directly from
the command line, but not in the interactive shell. So:
% sonos <speaker> tfc > tracks.txt works, or % sonos <speaker> tfc >>
tracks.txt to append.
On Unix, if you want to see the output as well as redirect to a file, then
use tee:
% sonos <speaker> tfc | tee tracks.txt or % sonos <speaker> tfc | tee -a
tracks.txt to append.
Note that it's quite possible to run multiple instances of tfc on the
same host, e.g., one via an interactive shell and one directly via the
command line.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#10 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAXHV25C6CZP4TBWAOLV3HTT4PR7RANCNFSM4WIXZFNA>
.
--
***@***.*** | w:617-513-2509 | c:908-873-8195
|
Beta Was this translation helpful? Give feedback.
-
Thanks so much! These are excellent feature enhancements.
…-adam
Sent from my iPhone
On Aug 14, 2021, at 11:34 AM, pwt ***@***.***> wrote:
In v0.4.13 I've generalised the subprocess approach in the shell so it's used to run all long-lived commands that might require a CTRL-C to exit (wait_start, etc.), and these no longer exit the SoCo-CLI shell when terminated (same as for track_follow, etc.)
I've also switched each subprocess to run in an OS shell of its own, meaning that shell expansions like redirects (>) will now work. This is a long-winded way of saying that statements such as tfc > tracks.txt or tfc | tee -a tracks.txt will now work from within the SoCo-CLI interactive shell as well as from the command line.
As always, let me know of any problems or suggestions for improvement.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Beta Was this translation helpful? Give feedback.
-
This follows on from a discussion started over at the https://github.com/pwt/SonosKeyController repository, initiated by @naxels, regarding less onerous ways of using SoCo-CLI as a command line client -- i.e., interactive use rather than use in scripts, etc.
The initial discussion is captured over at: pwt/SonosKeyController#2.
Beta Was this translation helpful? Give feedback.
All reactions