
As the previous entry attests, I finally got the Final Draft -> blog entry conversion worked out. Parsing the RTF file turned out to be much easier than anticipated thanks to a tip about a command-line utility called "textutil" from Michael Henley. The whole exercise may be kind of silly, but it did give me a chance to dig a little deeper into Applescript and the Unix Filters built into BBEdit. Allow me to geek out for a moment and describe how text in Final Draft gets onto the weblog.
First, I write whatever script snippet it is I want to put on the blog. I do this in Final Draft, because it lets me focus on the text without having to worry about formatting, and the auto-complete functions are especially nice for dialog. Once the script says what I want, I save it as an RTF file into a special directory I have set up with a folder action that executes any time a new file is saved into it.
The folder action fires up textutil to parse the file and sends the output to BBEdit. At this point I have a workable HTML file with proper stylesheet information, but it's not exactly the way I want it, so I need to translate the css styles from the generic 'p1,' 'p2,' etc. stylenames into the custom styles I've written for the blog. To do this, I run a perl script on the html output, which looks at the layout for each style and assigns each p# style to one that I've specified. This same script also strips out everything that's not within the <body> tag and slaps a div around the contents to identify it as a script in the blog.
Once the text transformations have been done, the Applescript copies the contents of the BBEdit window into a new MarsEdit post so that I can add any other comments and post the entry.
And now that I've posted way more about this than most people will care about, and too little information to be useful to a geek, I think it's time to watch a real movie.
See if you can tell where this veers from reality...
ExT. UGA School of education - dAY
JASON and CHANDRA are heading towards the building to water Chandra's office plants. The entire university is quiet, as it's Christmas break and even if people wanted to be on campus, the heat's turned off in all the buildings.
Before entering the building, Jason stops at a set of newspaper machines to pick up a copy of FLAGPOLE, a local weekly newspaper that focuses on arts & entertainment. There is only one copy left, and beneath that is a slightly battered copy of PLAYBOY magazine. He grabs both with delight and hurries to catch up to Chandra, who is already getting in the elevator.
Jason
(Giggling)
Hey Chandra! Lookee what I found!
Chandra
A Flagpole?
JASON
No, look at the other thing.
CHANDRA
Great. Are you going to re-gift that?
JASON
(Looks at the magazine, pondering what to do.)
I don't know-- where should I leave it?
CHANDRA
(Simultaneously horrified and amused)
You're going to keep it, aren't you?
JASON
(Thinking fast)
Well, you wouldn't want me to just leave it out here for someone else to find, would you? Something like this could give someone around here a heart attack!
CHANDRA
Oh, it could not.
JASON
Are you kidding? With all these ultra-conservative types? The mere thought of naked boobies sends people atwitter around here. Imagine what the triplets here would do to them.
CHANDRA
Oh, whatever. You just want to look at the boobies yourself.
JASON
Hey, I'm just doing my civic duty.
Apparently Specter and Leahy are going to question Alito on his views on Presidential powers. I'm glad to hear it, but we all know that in response Alito is more likely to dodge the question with the usual bunk about not commenting on matters that might come before the court. If the Senators are really and truly concerned about the balance of power between the three branches, they'll need to do more than the usual question/non-answer dance we've seen lately. If Alito refuses to answer or says he believes things that don't jibe with his past history, they need to refuse to let him out of committee.
It's not Shakespeare, but bear with me. I'm trying to wrap my head around Applescript a little better by hooking up a folder script that will take an rtf file from Final Draft and crank out a blog entry. Why? Well, just because I can. Or rather, because I might be able to. Turns out parsing rtf files is trickier than it initially appeared, and even this sad little entry took a fair amount of massaging. So, back to the drawing boards...
INT. dining room, night
It’s mostly quiet in the house, except for the sounds of MANDY chewing on pellets in the corner. JASON is sitting at the dining room table with a PowerBook on his lap.
Stuart
Meow?
Jason
Hey man-- whatcha doing?
STUART
Meow!
JASON
Ok, hang on. I'm working on an applescript.
STUART
Meow!
JASON
Yeah, I know. It'll just take a second.
Stuart begins frantically pawing at Jason’s leg. He looks like he’s trying to dogpaddle denim.
STUART
Meow!!!
JASON
Okay, okay! What do you need, little man?
I've been pondering the news about Bush personally authorizing the NSA to spy on Americans, and my own reaction to it. A lot of folks are rightfully outraged by this, and normally I would be, too. After all, who wouldn't be pissed off to hear that the President thinks he's above the law and that he sees no problem with spying on American citizens? That's the kind of thing that happened in the Soviet Union, but was only supposed to happen here on "X-Files." By all rights I should be joining in the fury and no doubt prompting concerned emails from my mother about the language on this blog.
So what's going on? It's not like I haven't risen to the occasion before, or that I don't think Bush and his cronies are trying to install themselves as permanent overlords with no oversight on anything from anyone.
Here's a theory. Going to war in Iraq was a shock. Learning that we're locking people up in secret prisons and making Christmas ornaments out of scorched testicles was a shock. When Katrina hit, finding out just how much Bush doesn't care about anything but killing Ay-rabs and stroking his friends was a shock. Watching the media suck up to Bush and talk about how popular he was even while his poll numbers dropped steadily from 9/12/2001 on was a kind of low-grade continual irritation. After all that, finding out that Bush also has his people spying on us is just icing on the cake.
So yeah, he's acting like he's Louis XIV. Yeah, he should be impeached. And yeah, Bush is the worst president in recent memory, if not ever. That's all true, and I can shout about it until I'm blue in the face, but I suspect that most people who come to this blog (all 8 hits a day of you) already know that. I doubt it does a damn bit of good for me to waste my energy on Dubya and his failings, and while it's apparently his job to be an asshole it's not my job to point it out. So for now I have no outrage, just exhaustion and disbelief that this horrible excuse for a human being is still in power.
It seems like just yesterday that free elections were new to Iraq and they didn't quite know what to do with them. How quickly things change.
Steve Gilliard has an interesting post that argues in the not-too-distant future we will all pay for radio. While I think he raises some good points, I find myself skeptical. I know some folks who have either XM or Sirius, and who really like it, so I don't doubt for a moment that there's a market out there for it. Steve compares what's happening in radio today to what happened to television some decades ago, noting one key difference:
Cable entered the broadcasting world when TV was at the height of it's influence and power and owning a station license was literally like owning a printing press for money. It was a long shot challenging a healthy industry, but did so by offering things which the broadcast networks wouldn't or couldn't, due to tradition and space.
Radio is in a far different position, corrupt, disdained, controlled by fewer and fewer companies, under increasing restrictions.
This is where I think the problem with his argument lies. Radio has become such a wasteland that I for one have gotten out of the habit of listening to it. I only listen to the radio three times a day: to wake up in the morning, on the way into work, and on the way home from work. Like most people, I suspect, most of my radio listening happens in the car and even there I quickly switch to a CD or iPod. The thought of spending twelve bucks a month to have something else to listen to during my commute strikes me as ludicrous. Avid radio listeners may switch to a pay service, but I am skeptical that XM or Sirius is going to get the kind of traction that cable television did back in the day.
American Scientist Online - Unwed Numbers:
The instructions that accompany Sudoku often reassure the number-shy solver that "No mathematics is required." What this really means is that no arithmetic is required. You don't have to add up columns of figures; you don't even have to count. As a matter of fact, the symbols in the grid need not be numbers at all; letters or colors or fruits would do as well. In this sense it's true that solving the puzzle is not a test of skill in arithmetic. On the other hand, if we look into Sudoku a little more deeply, we may well find some mathematical ideas lurking in the background.
Honestly, I haven't read this one. I merely link to it here as a way to share with schnookie-boogums without opening my email, which will undoubtedly contain things to deal with that I want to avoid for the moment.
This has been "one of those" weeks, so I haven't felt much like posting. However, there are still things that must be said and linked to, so now that I've downed my GoLean Crunch, it's time to get to it...
I was going to wait to post this, but I figure what the hell. This is going in our Christmas letter this year instead of the usual menagerie of cats + Mandy. These two might as well be part of the family, after all. We see them often enough.
