Bing Desktop Backround Picture Downloading

For Fun and (No) Profit

For a few years now, I've made the Important Life Choice about my computer's desktop backgrounds (aka "wallpaper"): downloaded photos of spectacular vistas, amazing animals, breathtaking architecture, … I'm not particular. Rotate them every so often to avoid boredom. This is often called a "slideshow".

This, even though my open windows usually obscure the background. I know it's there though, and it makes me happy. (And the Start-D key combo works to minimize all windows if I really want to peruse it.)

The OS environments I use (Windows 10, Fedora Linux/Cinnamon) make it easy to configure a slideshow: just find the configuration page, point it to a directory containing the pictures you like, choose a switching interval, and that's it. (If your environment doesn't let you do this easily, maybe you should find a better environment.)

That leaves only one issue: setting up the picture directory. My personal choice is to have my Windows "Pictures" directory shared via VirtualBox's shared folders feature to the Linux guest. (Detail: to allow me to write to this directory from Linux, my account must be added to the vboxsf group. It's on my "things to do" list when creating a new Linux guest.) I keep 400 pictures in this directory; when more new pictures are added, the same number—the oldest ones—are removed.

I used to download daily pictures from the National Geographic site, but they made that difficult awhile back; I don't remember the details, and I haven't checked recently to see if they relented. Instead I grab Bing's home page picture; there's a new one every day, and downloading, while not exactly a breeze, is not too difficult.

The Perl script I use to download is get_bingpics (script here, prettyprinted HTML here). Notes:

  • There's a magic URL at Bing that can be queried (with proper parameters) to divulge the recent Bing pictures and their names. Specifically, the page will contain (at most) the eight most recent. The query I use asks for 16.

  • For some reason, I request the JSON version of the picture data. This is decoded (naturally enough) into a Perl data structure with the decode_json function from the JSON::PP module.

  • For the available images, the script checks each to see if it has already been downloaded. For each image not previously downloaded, it uses the LWP::Simple function getstor to download to the shared directory.

    Although I typically run this script daily, this design allows me to skip up to eight days without missing any pictures. (For example, if I'm on vacation.)

  • I run this script out of anacron daily, details left as an exercise for the reader.

The other part of this equation is getting rid of older pictures. That's accomplished by the remove_old_pics script (script here, prettyprinted HTML here). Notes:

  • It's pretty simple.

  • Its claim to geekery is using the Schwartzian Transform to obtain a list of JPEG files in the picture directory in order by modification time. Sweet!

  • The code can be easily tweaked to change directories, the types of files examined, and how many "new" ones to keep.

  • This too is run daily via anacron.

OK, so how many of you out there are shaking your heads at this and saying: "Doesn't this boy realize he needs professional help?" Let's see a show of hands…


Last Modified 2017-11-16 5:38 AM EST

URLs du Jour

2017-11-13

EA4

■ Some Proverbs are insightful and wise, but Proverbs 19:26 is just belaboring the obvious:

26 Whoever robs their father and drives out their mother
    is a child who brings shame and disgrace.

Yeah, the kid should not have done that. Next?


@kevinNR reads a WaPo article and hits the ceiling about The Myth of the Idle Rich:

The Republican tax plan may be kind of dumb, but if it were three times as dumb as it is, it would only be half as dumb as the Washington Post’s analysis of it.

Catherine Rampell, the scrappy young self-described Princeton “legacy” who handles the class-war beat for the Post’s opinion pages, offers up a truly batty take on the Republican tax plan: that it too strongly favors “passive” income in the interests of those who spend their days — here comes the avalanche of banality — “yachting and charity-balling . . . popping bottles of champagne and hunting endangered wildlife.” All of the usual clichés make an appearance: “passive owners of capital” vs. “workers,” “those who work and those who don’t,” etc. The New York Times isn’t the only newspaper getting carried away with celebrating the centenary of the Bolshevik Revolution, it appears.

Ms Rampell's article is here, should you want to expose yourself to the dumbness.


■ Our Google LFOD alarm bell rang for a Concord Monitor opinion piece by "editor emeritus" Mike Pride: The ongoing perversion of the Second Amendment. Ooh, perversion!

But it's really bad, an argument that has all the logical coherence of a pachinko machine.

Pride starts by telling the story of Howard B. Unruh, who strolled the streets of his Camden, N. J. neighborhood with a Luger, killing 13 and wounding 3. This was in 1949.

Reporters of the day looked into the details of Unruh's life to try to find his motivation. And Pride notes that reporters find themselves doing the same thing today, nearly 70 years later. In fact, everything's the same! Including:

And one other certainty in the pattern: “Now is not the time to discuss gun control.”

And one more certainty: others taking advantage of cheap emotionalism, fear, and virtue-signalling to "discuss" gun control anyway. Pride doesn't mention that, in spite of the fact that he's doing exactly that.

But Pride finally, kind of, gets around to his point:

If the subject comes up, those who resist the idea of banning private ownership of military-style assault weapons are ever-ready with the bromides. Guns don’t kill people, etc. I’m sure that if any of them are reading this piece, they’re thinking: Aha, in your opening paragraphs Mr. Unruh packed only a Luger when he went on his shooting spree. Or hey, the New York mass murderer a few days ago drove a rented truck. What are we s’posed to do – ban trucks?

So Pride advocates "banning private ownership of military-style assault weapons". He doesn't argue for that, however. Instead he takes on the opponents of this idea, with their conveniently-imagined responses. (The "s'posed" is a nice touch: Pride imagines people who might object to a ban as being unable to pronounce words properly. Easy to dismiss those slack-jawed yokels.)

He does, however, brush up against a real argument. The targets of his proposed prohibition, "military-style assault weapons", despite recent headlines, are used in a vanishingly small percentage of homicides.

And there's another point that Pride ignores, and may not be aware of: There's nothing important that distinguishes "military-style assault weapons" from other semi-automatic weapons other than cosmetic features that seem scary to some: pistol grips, detachable magazines, flash supressors, etc. (The clue here is "military-style"; we're talking style over substance.)

Anyway, back to Pride:

But there is only one point to my writing this: It is time – way past time – for this country to stand up against the perversion of the Second Amendment by the Supreme Court and Congress and the moneyed power of the National Rifle Association.

Pride, of course, finds "perversion" in thinking the Second Amendment means what it says. He doesn't bother in making a legal argument. He doesn't have to, because to disagree is simple "perversion". So there.

But the LFOD? Ah, there it is, at the end:

Military veterans and responsible gun owners know this better than anyone. In the Live Free or Die state, they should be first to stand up for what is right. If they did, perhaps Democrats would regain their backbone on this life-and-death issue and sensible Republicans, a sadly shrinking lot, would also see the light.

No, the LFOD invocation makes absolutely no sense whatsoever in this paragraph.


■ We're coming up on the 60th anniversary of The Music Man, and Mark Steyn's song of the week is: "Till There Was You". I liked this:

Meanwhile, four thousand miles away from River City, in Liverpool, a young lad called Paul McCartney was just getting into rock'n'roll. But his cousin, Bett Robbins, was into Peggy Lee and, on her occasional babysitting nights with Paul and his brother, it was Bett who controlled the Dansette. Paul ended up developing quite a taste for Peggy Lee, as did John Lennon, who couldn't stand Sinatra but thought Peg was a different kettle of fish. In 1961, her single of "Till There Was You" was a modest hit on the British charts, and Paul thought it was just another great Peggy Lee record. I sat next to him once at a British songwriters' get-together and, in an effort to avoid more problematic conversational topics such as "Mull Of Kintyre" or "Wonderful Christmas Time", I asked him about "Till There Was You". He said he'd had no idea until years later that it was from The Music Man, but he liked the simplicity of the song and of Peg's arrangement. And so, when the Beatles auditioned for Decca Records a few months later, "Till There Was You" was one of the numbers they offered. They didn't get a contract, but they kept the song in the act at the Star Club in Hamburg.

My face hurts after watching some movies, simply because I'm smiling all the way through them. The Music Man is one of those movies. (Another is Singin' in the Rain.)

Although, as an Iowa native, I'm partial to "Iowa Stubborn":

So, what the heck, you're welcome,
Glad to have you with us.
Even though we may not ever mention it again.


■ And our tweet du jour:

The teacher has nice handwriting, but doesn't have a lot of room for complaint here.