tag:blogger.com,1999:blog-69505382024-03-13T15:35:32.776-04:00bjimba's bjimblogbjimba: aka Jim Russell. Veteran programmer, amateur
actor, itinerant musician, writer, philosopher, sage.
Portraits a specialty.Jim Russellhttp://www.blogger.com/profile/07840228636027306303noreply@blogger.comBlogger117125tag:blogger.com,1999:blog-6950538.post-85055054888847616992023-01-09T23:23:00.001-05:002023-01-09T23:29:18.420-05:00How to ask VLC what's currently playing<p>
(Target audience: command-line fans on something Unixy, who have or will be able to find bash, vlc, curl and xmllint.)
</p>
<p>
My preferred method of music consumption is a collection-wide shuffle. My local media drive has, well, let's see...
</p>
<pre>
dad@arlo:/media/dad/brick/media/music$ find . -name "*.mp3" | wc -l
65458
</pre>
<p>
over 65 thousand tracks. (I've been collecting for a long time, all my vinyl is digitized, yada yada yada.) I have a script that creates a playlist of random selections from the collection, and then I open that playlist in VLC.
</p>
<p>
Quite often, an underappreciated track catches my ear, and I would like to add it to a favorites playlist. So I would flip over to the VLC window, right-click my way into the current selection's Information window, follow that with a mouse-select of the URI of the currently-playing mp3 and a paste into vim, where the favorites playlist is open.
</p>
<p>
This is why I hate GUIs.
</p>
<p>
Now, seriously, how un-Unix is that? What I need is a command-line utility that will just give me the currently-playing file, so that I can just append-pipe the filename into the favorites playlist.
</p>
<p>
So, how can I ask VLC to give me that?
</p>
<p>
Turns out, it's not too bad. VLC can be started with multiple live interfaces, one of which is HTTP. This gives us a web-based interface that can be opened in a browser, but more importantly for the task at hand, it gives us a REST API into the running VLC. And that REST API will give us an XML document describing the current playlist, including which track is currently playing.
</p>
<p>
One weird bit to note - the HTTP interface won't work unless you set a password to access it. Okay, that's not so weird, except that you don't (you cannot) set a user name, so the user name is (must be) the empty string.
</p>
<p>
The good news is that cURL handles empty-string user names just fine, by passing just a colon and password to the -u argument. Like so:
</p>
<pre>
# /bin/bash
# get current playing by file name
curl -u :myterriblepassword http://127.0.0.1:8080/requests/playlist.xml 2>/dev/null \
| xmllint --xpath 'string(//leaf[@current="current"]/@uri)' - \
>>favorites.m3u
</pre>
<p>
That's it. Feel free to improve on this in the comments.
</p>
Jim Russellhttp://www.blogger.com/profile/07840228636027306303noreply@blogger.com0tag:blogger.com,1999:blog-6950538.post-21890222677562294762022-12-04T20:03:00.004-05:002022-12-04T20:03:45.452-05:00Testing 28, 29, 30I think I've found the issue. If you're seeing this on fosstodon.org, yay!
@davew@mastodon.social #feedToMasto
Jim Russellhttp://www.blogger.com/profile/07840228636027306303noreply@blogger.com0tag:blogger.com,1999:blog-6950538.post-9973427783310358522022-12-04T19:54:00.001-05:002022-12-04T19:54:11.032-05:00Testing 25, 26, 27Typo in my config.json.
@davew@mastodon.social #feedToMasto
Jim Russellhttp://www.blogger.com/profile/07840228636027306303noreply@blogger.com0tag:blogger.com,1999:blog-6950538.post-72695311833573155042022-12-04T19:51:00.001-05:002022-12-04T19:51:33.904-05:00Testing 22, 23, 24I've switched to my other mastodon instance. Let's see. @davew@mastodon.social #feedToMasto
Jim Russellhttp://www.blogger.com/profile/07840228636027306303noreply@blogger.com0tag:blogger.com,1999:blog-6950538.post-33141317077507487652022-12-04T12:35:00.001-05:002022-12-04T12:35:07.477-05:00Testing 19, 20, 21Dave has made a change, we're at 0.4.4. @davew@mastodon.social #feedToMasto
Jim Russellhttp://www.blogger.com/profile/07840228636027306303noreply@blogger.com0tag:blogger.com,1999:blog-6950538.post-61407333989261893752022-12-03T17:26:00.003-05:002022-12-03T17:26:57.882-05:00Testing 16, 17, 18Again. @davew@mastodon.social #feedToMasto
Jim Russellhttp://www.blogger.com/profile/07840228636027306303noreply@blogger.com0tag:blogger.com,1999:blog-6950538.post-86927557103781923172022-12-03T16:43:00.001-05:002022-12-03T16:43:25.351-05:00Testing 13, 14, 15Somewhere, we're not getting JSON. @davew@mastodon.social @feedToMasto
Jim Russellhttp://www.blogger.com/profile/07840228636027306303noreply@blogger.com0tag:blogger.com,1999:blog-6950538.post-37554414173368325452022-12-03T16:35:00.003-05:002022-12-03T16:35:29.746-05:00Testing 10, 11, 12Once more @davew@mastodon.social #feedToMasto
Jim Russellhttp://www.blogger.com/profile/07840228636027306303noreply@blogger.com0tag:blogger.com,1999:blog-6950538.post-79711259195482877462022-12-03T13:19:00.002-05:002022-12-03T13:19:30.700-05:00Testing 7, 8, 9More testing of #feedToMasto
@davew@mastodon.social added redirect following, so we try again.
Jim Russellhttp://www.blogger.com/profile/07840228636027306303noreply@blogger.com0tag:blogger.com,1999:blog-6950538.post-66497853547582637352022-12-02T22:05:00.003-05:002022-12-02T22:05:24.927-05:00Testin 4, 5, 6This may get repetitive.
Jim Russellhttp://www.blogger.com/profile/07840228636027306303noreply@blogger.com0tag:blogger.com,1999:blog-6950538.post-621222698823994632022-12-02T21:16:00.000-05:002022-12-02T21:16:08.796-05:00Testing 1, 2, 3This post is starting in bjimba.blogspot.com, which is currently being watched by DaveW's feedToMasto.
@davew@mastodon.social #feedToMasto
Let's see where it ends up.
Jim Russellhttp://www.blogger.com/profile/07840228636027306303noreply@blogger.com0tag:blogger.com,1999:blog-6950538.post-77849677859613758032022-11-30T23:48:00.000-05:002022-11-30T23:48:03.586-05:00Photo o' the day, pt 4<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7a1JFtBDpk9n_nbAbDT4Gmb4troiJldFGrji8kcmdKjHpBPQA0G-qH3f7YAE3I_gl5o1ivi7JmpOGguZRbb-kfEK3a4NE3k2-G1GmInpq7ISZGxL9jgogLFqgdiSGCdUbhfpjVluwlG8rq1pKecGu3g9UXuqEEgEP7kuQPAuRO6i0N_jRnA/s6000/potd-0004-park_road.jpg" style="display: block; padding: 1em 0; text-align: center; "><img alt="" border="0" width="320" data-original-height="4000" data-original-width="6000" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7a1JFtBDpk9n_nbAbDT4Gmb4troiJldFGrji8kcmdKjHpBPQA0G-qH3f7YAE3I_gl5o1ivi7JmpOGguZRbb-kfEK3a4NE3k2-G1GmInpq7ISZGxL9jgogLFqgdiSGCdUbhfpjVluwlG8rq1pKecGu3g9UXuqEEgEP7kuQPAuRO6i0N_jRnA/s320/potd-0004-park_road.jpg"/></a></div>Hacklebarney park road, Chester NJJim Russellhttp://www.blogger.com/profile/07840228636027306303noreply@blogger.com0tag:blogger.com,1999:blog-6950538.post-52839892261993159332022-11-17T21:20:00.001-05:002022-11-17T21:20:39.942-05:00Photo o' the day, episode 3Still using Google as photo transport. Why not?
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifv3X0xYtWaKNgCcJr7SCu4NsburZneyKiiDfPPzsD6rC-wBgi5WPOClK1h00v-Lin3n3Q-mwcrxeUiDQYJmSezbr3ETyp-102xgqagrsjF0xNQOQWZfZa35J5WhoHNZTTHD7xAXk-rIdx7pgUE2KtxJOy-SolEIy0R1UDs6st7snEWNoJrA/s5344/IMG_20170822_164931722.jpg" style="display: block; padding: 1em 0; text-align: center; "><img alt="" border="0" width="320" data-original-height="3006" data-original-width="5344" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifv3X0xYtWaKNgCcJr7SCu4NsburZneyKiiDfPPzsD6rC-wBgi5WPOClK1h00v-Lin3n3Q-mwcrxeUiDQYJmSezbr3ETyp-102xgqagrsjF0xNQOQWZfZa35J5WhoHNZTTHD7xAXk-rIdx7pgUE2KtxJOy-SolEIy0R1UDs6st7snEWNoJrA/s320/IMG_20170822_164931722.jpg"/></a></div>Jim Russellhttp://www.blogger.com/profile/07840228636027306303noreply@blogger.com0tag:blogger.com,1999:blog-6950538.post-85814600266426157202022-11-17T11:00:00.001-05:002022-11-17T11:00:13.894-05:00Debugging bloggerSomething wrong here. I recently posted a couple of photos, and they don't show up in my feed readers. This post is purely to see if my feed readers are getting *any* updates.
Jim Russellhttp://www.blogger.com/profile/07840228636027306303noreply@blogger.com0tag:blogger.com,1999:blog-6950538.post-20175069254206427762022-11-16T23:49:00.001-05:002022-11-16T23:49:30.384-05:00Today's photo pick<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkHcoVAZWgJkzoy3b0nowhusuEy3aWjd5A4TbXpKtyf-PFwKcQjq-Oe6qJ_E6NsuImsJjlNvjfjz4t802jn_0iFZ00FKYel-KygI9NhryMbAHZop4q4i5-KDtbnd5Jd3qmvMzMovoUNYqcOKpoVdE4zdYFzLvcQmDQBGmUUysYjFSSI1iTww/s6000/DSC_0571.JPG" style="display: block; padding: 1em 0; text-align: center; "><img alt="" border="0" width="320" data-original-height="4000" data-original-width="6000" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkHcoVAZWgJkzoy3b0nowhusuEy3aWjd5A4TbXpKtyf-PFwKcQjq-Oe6qJ_E6NsuImsJjlNvjfjz4t802jn_0iFZ00FKYel-KygI9NhryMbAHZop4q4i5-KDtbnd5Jd3qmvMzMovoUNYqcOKpoVdE4zdYFzLvcQmDQBGmUUysYjFSSI1iTww/s320/DSC_0571.JPG"/></a></div>Jim Russellhttp://www.blogger.com/profile/07840228636027306303noreply@blogger.com0tag:blogger.com,1999:blog-6950538.post-80350150524987429612022-11-15T22:17:00.000-05:002022-11-15T22:17:05.526-05:00Photography blogging<p>Once my workday ends, and the MacBook relinquishes control of the starboard monitor, the ambient Chromecast slide show takes over and begins pulling from my ever-expanding online photo cache, of my own creation. A dedicated camera. A Nikon. Occasionally, one catches my eye as I hack away on the Ubuntu box on the port monitor, and I toss it into the "to be published" folder.</p>
<p>I should start publishing them.</p>
<p>Hey, this is my blog, isn't it?</p>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyJPbWppMX_RnpWgY9piTmIvzeg7MQanW1jGo5xmLRbHuyjCnMe46V9KKRoXaKOoSTkLjKTVts1wS9TvKUdAisVd2Joa8gCVUvH2RFVt_YwN_qghBI_F2SbiETLkJDyE9T8EVsWIe4Elt_E7kF3Jw_9oF274B1W1gtElUco50-QbPL6cTiqw/s1280/2004.07.16-11.05.07.jpg" style="display: block; padding: 1em 0; text-align: center; "><img alt="" border="0" width="320" data-original-height="960" data-original-width="1280" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyJPbWppMX_RnpWgY9piTmIvzeg7MQanW1jGo5xmLRbHuyjCnMe46V9KKRoXaKOoSTkLjKTVts1wS9TvKUdAisVd2Joa8gCVUvH2RFVt_YwN_qghBI_F2SbiETLkJDyE9T8EVsWIe4Elt_E7kF3Jw_9oF274B1W1gtElUco50-QbPL6cTiqw/s320/2004.07.16-11.05.07.jpg"/></a></div>Jim Russellhttp://www.blogger.com/profile/07840228636027306303noreply@blogger.com0tag:blogger.com,1999:blog-6950538.post-16581646152606817182022-11-04T22:15:00.002-04:002022-11-05T12:44:01.173-04:00Hey! This blog has RSS!<p>Elon Musk has started an interesting chain reaction.</p>
<p>The Flight from Twittr (ah, remember those days, when the missing vowel was endearing) has led directly to the "alternatives-to" sections of websites filling to the brims with recommended replacements.</p>
<p>Early betting gives the Mastodon collective a decided edge, as it gives us a moment to step back and reconsider what a social network should be, could be, will be.</p>
<p>I just posted to Facebook and tweeted my Tweet with my latest nom-de-cyberverse: <b>@jimrussell@mastodon.online</b>
<p>Mastodon reminds me of ILink, which was a collective of BBS's sending each other QWK packets. No one BBS owned the whole lot, but everybody had the whole lot.</p>
<p>Let's do this with Mastodon. This could work.</p>
Jim Russellhttp://www.blogger.com/profile/07840228636027306303noreply@blogger.com0tag:blogger.com,1999:blog-6950538.post-84968661733694544762022-04-19T22:43:00.004-04:002022-04-19T22:43:45.095-04:00First post of the TwentiesEvery couple of years, I remember that I have this blog. Usually, it's when I'm working on my frivolous websites and I notice the link to here. This inspires me to add a post lamenting the fact that I never blog.
Jim Russellhttp://www.blogger.com/profile/07840228636027306303noreply@blogger.com0tag:blogger.com,1999:blog-6950538.post-24259571508150559742017-09-13T03:01:00.001-04:002017-09-13T03:01:36.804-04:00Coming back to an abandoned blogI really should be using this site. But for years, I haven't. More immediate methods of communication have take precedence. Facebook, mostly. But that's not a good fit for sharing things like a good Python hack. So I'm going to make an attempt to rouse this blog from its slumber. We'll see how that goes.<br />
Jim Russellhttp://www.blogger.com/profile/07840228636027306303noreply@blogger.com0tag:blogger.com,1999:blog-6950538.post-51269575418294325802010-02-10T01:23:00.002-05:002010-02-10T01:27:42.735-05:00How long is it? That's a very personal question.Good Lord, it's been over a <i>year</i> since my last post here! I mean, not that anyone was waiting for me to post anything. This here ain't a news site, that's for sure. However, I guess that more immediate modes of communication, notably Facebook, have superseded most of my blogging activity.
I really should write a nice article on some of my latest experiences with online genealogy. No promises, though.Jim Russellhttp://www.blogger.com/profile/07840228636027306303noreply@blogger.com0tag:blogger.com,1999:blog-6950538.post-65178709266025947172009-01-14T01:02:00.003-05:002009-01-14T01:13:28.813-05:00Theatre: "Not My Daughter" at Rutgers Newark<p>My latest acting adventure is a really invigorating one. I'm performing in the world premiere of a play by Ann Mary Mullane, called <i>Not My Daughter</i>. This is the sort of play that I didn't think was being written anymore -- an intelligent comedy along the lines of Sam Spewack, George S. Kaufman, or Neil Simon. (There is, in fact, a lot of gentle poking at Simon's <i>Barefoot in the Park</i> in the script.) We're only doing two performances this time, but it may lead to more in another venue.</p>
<p>Details at <a href="http://noapologytheatre.com">the No Apology Theatre</a> website.</p>Jim Russellhttp://www.blogger.com/profile/07840228636027306303noreply@blogger.com0tag:blogger.com,1999:blog-6950538.post-34774036614944502562009-01-14T00:43:00.004-05:002009-01-14T00:52:34.545-05:00TiltShiftMaker.com - online tilt-shifting!<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_IOu1W54js-0/SW19cVFAykI/AAAAAAAAADU/SIPM2_PP0Ls/s1600-h/tiltshift-sydney_harbor.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 298px;" src="http://1.bp.blogspot.com/_IOu1W54js-0/SW19cVFAykI/AAAAAAAAADU/SIPM2_PP0Ls/s400/tiltshift-sydney_harbor.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5291023062878177858" /></a>
<p>Okay, this is pretty cool.</p>
<p>I don't know if you've ever seen photos manipulated by a process known as tilt-shifting. Basically, it makes a real-world photograph look like it's a photograph of a miniature model. Well, now you can create your own tilt-shifted photos, <i>really easily</i>, via a website called <a href="http://tiltshiftmaker.com">TiltShiftMaker</a>.</p>
<p>Here's a sample. This is a photo I took during our trip to Australia, of some boats in Sydney Harbor.</p>Jim Russellhttp://www.blogger.com/profile/07840228636027306303noreply@blogger.com1tag:blogger.com,1999:blog-6950538.post-13387614785859388582008-09-16T00:08:00.002-04:002008-09-16T00:23:32.408-04:00Richard Wright 1943-2008<p>
In the early 1970s, I was in high school, and attended my fair share of high school dances. When the time came for the cover band (yes, we used to have bands at dances, not DJs) to play the slow-dance-with-your-main-squeeze song, there was really only one choice. <i>Us and Them</i>, from Pink Floyd's <i>The Dark Side of the Moon</i>. To this day, I cannot hear that song without thinking fondly of those dances so long ago.
</p>
<p>
<b>Richard Wright</b> wrote the music for that song, and played the haunting, swirling keyboards on that track and countless other Floyd tracks. He was a brilliant musician who was treated rather shabbily later on in the Floyd saga, but he lives forever on that album (and quite a few others).
</p>
<p>
Richard died of cancer yesterday. David Gilmour had this to say: "He was gentle, unassuming and private but his soulful voice and playing were vital, magical components of our most recognized Pink Floyd sound, I have never played with anyone quite like him."
</p>
<p>
Thanks for the slow dances, Richard.
</p>
<p>
<a href="http://www.nytimes.com/aponline/arts/AP-EU-Britain-Pink-Floyd.html">New York Times obituary</a>
</p>Jim Russellhttp://www.blogger.com/profile/07840228636027306303noreply@blogger.com2tag:blogger.com,1999:blog-6950538.post-48460989735931159462008-08-27T02:16:00.004-04:002008-08-27T22:15:38.851-04:00Open letter to Randall<p>
<b>Update: <i>Some time after I wrote this rant, Randall went back and fixed the comic. A small victory for the Society for Spelling "Russell" Correctly. Yay!</i></b>
</p>
<p>
The <a href="http://xkcd.com/468/">latest xkcd</a> pushed one of my flame buttons:
</p>
<p>
<img src="http://imgs.xkcd.com/comics/fetishes.png">
</p>
<p>
Here's my responding post on the xkcd forum:
</p>
<p>
<pre>
Re: "Fetishes" discussion
Post by bjimba on Wed Aug 27, 2008 1:01 am UTC
Et tu, Randall? Or should I say Randal?
95% of the people named Russell spell it with two L's, yet the rest of the world blindly goes on spelling it with one. What's up with that?
Leon Russell.
Bill Russell.
Rosalind Russell.
BERTRAND RUSSELL.
Gail Russell.
Kimberly Russell.
Jane Russell.
Ken Russell.
Kurt Russell.
Brian Russell. (He was my uncle. He was Potlatch the cook in "Charlie and the Lonesome Cougar".)
Lillian Russell.
Nipsey Russell.
http://en.wikipedia.org/wiki/Russell
http://en.wikipedia.org/wiki/Russel
I've been fighting this battle for 51 years. Can you tell?
Sincerely,
Jim "bjimba" Russell. With two L's.
http://bjimba.blogspot.com
</pre>
<p>
Of course, aside from that, I love the concept of this comic. After all, I am a B.S. in Math.
</p>Jim Russellhttp://www.blogger.com/profile/07840228636027306303noreply@blogger.com0tag:blogger.com,1999:blog-6950538.post-68347557585747815352008-08-22T00:26:00.001-04:002008-08-22T00:28:51.493-04:00Latest "In Contempt"<p>
Kevin Moore's web comic, <a href="http://www.webcomicsnation.com/kevinmoore/incontempt/series.php">In Contempt</a>, is frequently brilliant, but every once in a while, he really hits it out of the park.
</p>
<p>
<script language="javascript" src="http://www.webcomicsnation.com/tooncast.php?series=incontempt"></script>
</p>Jim Russellhttp://www.blogger.com/profile/07840228636027306303noreply@blogger.com2