i shot an arrow into the air
My bookmarks file has 4539 entries, most of which I intend to look at “someday”. So I’ve written a little utility (two lines of code, plus scaffolding) that other Unix users may find useful, provided that your favorite browser keeps bookmarks in a textfile (as the Mozilla family does). Once an hour it picks a bookmark at random and opens it in my default browser. My crontab contains this entry:
01 * * * * sh ~anton/bin/bookcron
meaning: at :01 of every hour, run the following shell script:
cd ~anton
cat Library/App*/Firefox/Profiles/*/bookmarks.html | grep -o “http[^\”]*” | python bcp
which extracts any links from any bookmarks files and feeds them to this Python program:
import os
import sys
import random
os.system(“open %s” % random.choice(sys.stdin.readlines()).replace(‘&’,’\\&’) )
The function random.choice picks a random entry from the list. The command open does the right thing on MacOS X, but for other Unices you’ll probably need to replace it with the browser name. The replace() prevents silly things that would otherwise happen when a shell command contains an ampersand.
marks on paper
Time to buy a printer, preferably cheap; most likely an Epson or HP all-in-one. Any advice is welcome.
Wednesday: I popped out to Circuit City and bought the cheapest printer-scanner, which happened to be HP’s PSC1400. I had acquired a bit of a bias against Epson anyway because their website seems not to know that Macs exist.
Salivili hipput tupput täppyt äppyt tipput hilijalleen
An unexpected effect of listening to music through my computer’s speakers is a better stereo image than I’m used to. That’s how I noticed for the first time that Loituma’s joyously goofy song Ievan polkka has four vocal parts, not three: the female lead and the male accompaniment are in the center, with two female voices, singing almost but not quite the same part, in the wings. (Maybe it’s one woman singing the same part twice but adlibbing.)
If any of you understand Finnish, by the way, I’d love to have a transcription and a translation.
with friends like these
Argh. I just tried to back up my home directory folder to a DVD. When the burn was nearing completion, it aborted because Finder “cannot find data fork of file <unable to locate file path>”. Got that? Four gigabytes of files can’t be archived because one of them — which may not really exist, for all I can tell — is corrupt. And why didn’t this error message show up during the “Preparing data” phase, to save me from wasting a blank?
Later: It occurred to me that this could have happened because a temporary file was deleted between the preparation and the burn. So I closed all applications and tried again; no luck. Then I noticed on the packaging that these Memorex 8X blanks apparently cannot be burned properly by my 2X drive. (sigh)
my tiger ate my penguin!
Gratitude to Perry Metzger for a twenty-minute phone call: my Linux box is now transferring /home/anton to the new Mac Mini with scp.
Later: Apparently /home/anton/.Trash contained a recursive link; the copy of my home directory ended up nine times as big as the original. And I can’t delete the lump, because its owner is wheel, an account which I did not create and whose password I therefore do not know. Does MacBSD as preinstalled have a superuser account with a standard password?
Later still: Perry to the rescue again (he saw this post!). I needed to say sudo bash rather than su. Twenty-seven gigabytes of color glossy emptiness have appeared.
new toy
I bought a Mac Mini today. What’s recommended reading for someone coming back to the Mac universe after a long absence? (My other computers run Red Hat 9 and MacOS 8.1.)
Monday: I bought David Pogue’s Missing Manual. It appears to be about twice as dense as its competitors.
file transfer
I hope soon to buy a Macintosh, and copy my files (4.4 GB) from the present Linux box. Is it easy to do that with an Ethernet line?