VoodooPad Pro Blogging

It’s time to package up all my VoodooPad Pro blogging scripts and assorted web export plugins so that I can

  1. Remember what the heck I was thinking.
  2. Remember what all these pieces were supposed to accomplish as a whole.
  3. Provide some sort of reference to others interested in this stuff.

Concept: To use VoodooPad Pro as a CMS for a web site, allowing for static sites and inclusion of blog-style concatenated page. The blog-style page was originally intended as a “News” page of a static business site. SEO optimization necessitating the addition of a page with re-newing content. Google likes it more.

Disclaimer: I like Markdown and built these scripts around the fact that the VPP document is essentially always formatted in plain text. Images need to be added using links.

I will include a sample package that contains a VPP document, a web export plugin and several script plugins. The site the sample is based upon is at http://losrobleshoa.org.

VoodooPad Pro is a requirement as the meta data and triggers are necessary in the creation of the files. My workflow is as follows.

  1. Create new page/post.
  2. Run script plugin Blog > Meta Markup - HomepageMeta on new page.
  3. Run script plugin Blog > Make Homepage and Feed
  4. Run web export.
  5. FTP files up to site. I use Transmit. It’s also a great app.

The script will move all the created files into a folder structure so that the file structure on the computer will match the web site structure.

VoodooPad Pro document Item meta data is contained in the HomepageMeta page of the document. This is where most of the personalized info on the site is contained.

In the VPP document tags are used to create a pseudo-folder structure. This means that a page may only have one tag. Some pages are not exported but are used as reference, ie. links in the sidebar or the HomepageMeta page. Static pages that are to be rendered at the root level of the site are tagged main.

Triggers can be used to include certain information into specific pages or info on every page. I use this for things like Google Analytics which needs to be on every page or the analytics confirmation that is only on the index.html page.

The Web Export Plugin Some customization of these files will be necessary for your specific site.

  • preflight.sh - creates the actual folder hierarchy, the folders are created in the preflight.sh script. The preflight.sh script also copies files like images to the export folder. These images are kept in the web export plugin. File like robots.txt that need to be at the root level are kept in a root folder inside the web export plugin.

  • postflight.sh - can be used to rename pages that may be PHP based from .html to .php

  • deleteVPExtra.sh - deletes the extra pages that VoodooPad creates during a web export. No changes to this file are needed.

  • fixRelativePaths.sh - fixes the relative URLs that occur inside of nested pages. No changes to this file are needed.

  • parseMetaXml.rb - Parses the meta.xml file that VoodooPad creates and uses that infomation to move files into their correct folder structure on the disk and to create a valid sitemap.xml file for use with Google Sitemaps.

  • Info.plist - This file was edited to call these scripts during the web export process.

Script Plugins These are placed in the ~/Library/Application Support/VoodooPad/Script PlugIns/ folder. No changes should be required in these scripts. They will be viewable from the Plugin > Blog menu in VoodooPad.

  • meta_markup_HomepageMeta.lua - Takes the data from the page HomepageMeta in the VPP doc and adds specific item meta data to the frontmost page.

  • meta_markup_update.lua - Propagates changes made to the HomepageMeta page to all the item meta data of all pages that require them. This is only just the pages used for the blog-style page.

  • blog_home_atom.lua - Creates the blog-style page now called home in the VPP document and also creates a valid atom.xml feed in the output directory.

Comments and questions are welcome. If some enterprising person wants to wrap this all up in the new plugin architecture that would be cool. I’m happy to help if I can.

Posted in code, mac-osx | Tagged , , | 1 Comment

Amavisd settings

I run my own mail server on OS X Server. For the most part I have my SpamAssassin settings tweaked pretty well. Unfortunately, there is some spam that seems to have malformed or incomplete MIME boundaries and these messages don’t seem to be getting passed off from Amavisd to SpamAssassin. As such, they seem to be getting through to the recipient with a null value for the spam score.

After a little Googling I found Amavisd critical settings and I think the $final_bad_header_destiny is the key. The default setting is set to D_PASS. I’ve changed mine to D_REJECT now I’ll see what the logs say and see how much non-spam gets caught. Obviously, if enough good stuff doesn’t get through then I’ll have to think of something else.

But the obvoious question remains, Why doesn’t SpamAssassin score these messages?

Posted in computer, osx-server | Tagged , , | Leave a comment

Backblaze Backup

I have an invite or two to distribute for the Backblaze online backup service for OS X. Price is $5 a month per machine for unlimited data. Attached disks are recognized, but not yet network attached storage. My opinion is once they allow for NAS backup it’ll be great.

Leave a comment if you want a link to the beta.

Posted in computer, mac-osx | Tagged , | Leave a comment

Nationalized Healthcare and the Free Market

Nationalized/Universal healthcare will happen. Obama ran on it and he intends to deliver. What’s more, I can see a manner in which the country will flock to it under the current free market insurance system.

First, the federal government will expand Medicaid to cover the unemployed and uninsured. Second, the Congress will pass some law that mandates employers to provide health insurance for not only full-time employees, but part-time employees too.

Oh, by the way, the federal government will also make available a government-sponsored insurance plan to compete with the other available HMO and PPO choices. Of course the government plan will cost you (the employer) 40-50% less than the next most expensive plan.

You (the employer) will offer your employees the government plan as per the terms of the new law and they (the employees) will have the option of spending almost twice as much for a different commercial plan. I don’t really expect many employees to avail themselves of the opportunity to spend more money for little perceived increase in services.

Soon 80-90% of the country will be on the government plan and physicians and hospitals will effectively have a single payor.

Welcome to nationalized/universal healthcare.

Posted in medicine | Tagged , | 2 Comments

iPhone Stand

While looking for an iPhone stand I came across the simplest solution. A binder clip.

Tagged | 2 Comments

Appendiceal Duplication

I had a very interesting case the other evening. First, for the uninitiated, it’s usually a bad sign when the surgeon says it was a very interesting case. Generally routine is best.

Anyway, nice 50ish year old female with few days of diffuse abdominal pain now localizing to RLQ. Nausea and vomiting. Anorexia. Acute peritoneal finding in RLQ with percussion. Outside CT reportedly showing acute appendicitis.

I look at the patient. Story is great. Almost sounds like she’s read Cope. I take her to the OR. I feel a mass on exam after induction. Sorry guys I do open appys. 3 cm McBurney incison and mobile the cecum. There’s a 5cm mass but seems to be mobilizing from the superior aspect of ascending colon not inferiorly. Anyway, I deliver what appears to be an appendiceal phlegmon into the wound and fire a GIA-55 across its base. The base is along a tinea adjacent to the ileocecal valve. Doesn’t look like there’s any free perforation so I irrigate and start to close.

I’ve got a couple of clamps on the peritoneum and then I see a relatively normal looking appendix starting at me. Naturally it comes out.

Patient home in less than 24 hours.

Path report shows:

  • appendix - acute appendicitis
  • pericecal diverticulum and phlegmon - appendiceal duplication with acute perforating and gangrenous appendicitis

Comment on path report is duplication based upon the presence of circular muscle around the diverticulum, its location and gross appearance.

I’ve never seen that one before. All I can say is I’m glad I saw what I considered to be a relatively normal appearing appendix prior to closure.

Posted in medicine | Tagged | Leave a comment

iCal - Exchange Time Zone Fix - Chapter 3

I’ve updated the iCal-Invite-Fix script again. This time to allow for adding multiple Exchange servers to the script so that you should only need a single script. The set-up is slightly more complex.

ical-fix-properties3.jpg

As the image above shows there are now only 2 properties, both of which are lists. These lists work together as an array; which means the order of the list items is crucial.

  • exchange_fragment contains unique fragments of the TZID that the Exchange server sends.
  • ical_tzid contains the tzid info that iCal expects to see.

If you have any problems setting it up let me know. This post has all the info for the script.

Download the iCal-Invite-Fix script.

Posted in AppleScript, code, mac-osx | Tagged , , | 4 Comments

Subscribing to Delegated Calendars

OK, I’m fortunate or crazy enough to run my own server using Apple’s OS X Leopard Server software. It has been, at times, very simple and very complex to set everything up. One of the options that I use is the iCal Server so that I can have shared calendars. Once I got it up and running with all the permissions worked out it’s been terrific. By terrific I mean that I haven’t had to do a single thing to keep it up and running.

Here’s the problem. My wife and I both have iPhone’s. I’d like to see one of her calendar’s on my iPhone and I want here to see one of mine on her iPhone. On our respective computers these calendars show up in iCal as Delegates. That’s how there’re suppose to show up. The problem is that only local calendars and subscribed calendars are listed in iTunes for syncing to the iPhone.

After a bit of googling, the answer appeared in the Apple Discussions Board. If I do a get info on the Delegate calendar and copy the CalDAV URL I can then subscribe to this URL, the calendar will show up in my Subscriptions list. I can then sync it to the iPhone. It is perhaps the simplest workaround that I’ve found. Your user must log out and log back in for iTunes to see the newly subscribed calendar.

However, it’s still a kludge and I await the day Apple fixes iTunes to allow for syncing any viewable calendar iCal to your iPhone.

Posted in mac-osx, osx-server | Tagged , , , | Leave a comment

General Surgery in NY

So here I am in NYC at the American Society of General Surgeons clinical meeting. The program is correctly termed controversies as I’m quite certain many of the described treatment paths would cause you to fail your oral boards.

Of note is that it seems that most of the attendees have been in practice for over 10 years. The lecturers are mostly all teaching faculty at the local ivory tower and they seem to use less invasive treatment and laparoscopy far more than I would.

For example, laparoscopic closure of diverticular perforation with irrigation and drainage but no resection. Not sure I would ever do this open so I can’t see why it’s an acceptable treatment plan laparoscopically. Maybe I’m just old fashioned.

Posted in medicine | Tagged | Leave a comment

Importing Mail Message Attachments into Aperture

So I’ve just gotten my new Unibody MacBook and Aperture. Immediately I find myself wanting for a Quick Look > Add to Aperture just like there is for iPhoto. Unfortunately it’s nowhere to be found. Fortunately Aperture is scriptable.

Version 1.0 of SaveAttachments2Aperture is now available. It’s currently very simple with little error checking. It works multiple attachments per message and imports all attachments of a selected message into a new Aperture project.

It could be used in a Mail rule though I prefer to select it manually from the Script menu. I have it saved in ~/Library/Scripts/Applications/Mail/.

A thanks goes out to Automating Aperture where I got some of the Aperture scripting.

Comments welcome.

Update Now at version 1.1. I added some simple logic to only import certain file types. You might need to add to this list. If I’m missing some let me know, especially with Raw images.

v1.2 - add a bunch of the usual camera raw file types

Posted in AppleScript, code, mac-osx | Tagged , , | Leave a comment