…and I'm all out of bubble gum.
Posts tagged Mac OS X
WordPress µ Testing Setup
May 18th
A few days ago (well, maybe a couple weeks ago), I was chatting with one of my colleagues about how I go about testing out new plugins and themes for WordPress µ before loading them on our school blog server. It seems like documenting my process might be generally helpful, so…
To start with, I decided (after ten years of mucking out Apache config files and PHP extensions and custom MySQL installs — thank you so, so much Marc Liyange for your timely and helpful installers!), that I was a grown-up and could spend $60 on a tool that makes my life easier: I run MAMP Pro on my MacBook. This means that I have a generic Apache/PHP/MySQL stack that supports commonly-used PHP extensions, Apache configurations, etc. I have redirected the document root of my install to my regular user’s Sites directory in OS X (~/Sites) so that I have ready access to the backend files of for my test installs. The net result: WordPress’ famous “Five Minute Install” is now true of almost any LAMP-based web application — I had a five-minute install of Drupal, Moodle, Joomla… you name it.
I’ve also settled into using Coda ($99) to edit HTML/PHP source code, since I particularly like the built-in terminal and publishing management features.
With WordPress µ installed (which, I guess, is now calling itself WPMU or WordPress MU or even WordPress 3 in betas), I now do the following:
- I install create a new blog for each new theme or plugin that I want to test out. I follow a pretty intuitive naming scheme: the URL for the blog is the URL for the plugin or theme, and the name of the blog is the name of the plugin or theme (so WordPress Hashcash is at …/wp-hashcash and named WordPress Hashcash).
- As I create each new blog, I create a new user to be that blog’s administrator. I almost never use this login, but it means that I have one user who is matched to each blog. In doing this, I make heavy use of Gmail’s + modifiers, so new user emails look like mygmailaddress+talyn+wpmu+blogurl@gmail.com — this lets me catch and filter relevant emails easily on the other end. (I developed this system when I was testing plugins that sent email notifications). For the curious, Talyn is the name of my laptop (so I know which server is sending me email) and WPMU is the keyword to distinguish these emails from, say, Drupal notifications.
- I also have six generic users that I add to most (not all — I add them as needed) blogs, each with their own standard privileges:
- Anna “Annie” Administrator
- Edward “Eddie” Editor
- Allison “Allie” Author
- Christine “Chrissy” Contributor
- Samuel “Sammy” Subscriber
- Nathan “Nate” No Privileges
I actually included nicknames so that I could control for how different themes displayed usernames (since I’m thinking about FERPA and how it may apply to our students on our school blogserver).
- I have one blog on which I never activate themes or plugins, which I lyrically call “Is this blog in the blast radius?” This is based on my experience installing Digress.it on WordPress µ at the start of the year (it hosed every blog on the server, rather than just the one where it was activated). I check this before I deem any test complete.
- One tricky thing that I did was that I set up MAMP to run Apache and MySQL as my local user account on my MacBook, and I have set permissions on my Sites directory so that my local user has all privileges, as does the www group, and other users have read/execute privileges (
chown -R seth ~/Sites; chgrp -R www ~/Sites; chmod -R 775 ~/Sites). This means that I usually don’t run into problems with web apps that want to move or create files. This is also, of course, totally insecure. Que sera, sera. - I have an extra blog set up on my WordPress µ install that runs Feed WordPress, and it republishes the feeds for all of the other blogs on the server tagged Note. This means that I can post something tagged Note to any blog that I’m working on and then have all my notes together in one place. Adding the subscriptions to the Feed WordPress blog is a manual step, but not prohibitively difficult. And it really does mean that I have one place for all of my notes on how things went (or didn’t went) in my WordPress µ testing. I have the feeds categorized as Plugins, Themes, Configuration and Hacks, since those are generally what I’m testing (and mostly Plugins, at that).
- One hitch in my system is that I have opted to keep my system entirely up-to-date (I’m running WordPress µ 2.9.2 with the most recent versions of all my plugins), while our school blog server is still at 2.8.4a. Generally speaking, this hasn’t been much of a problem, but when I’m particularly concerned, I will sometimes check things out on a lingering 2.8.4a install before loading it.
A Beginner’s Guide to Video Editing in iMovie ’09
Feb 6th
In preparation for a class that I’ll be visiting on Monday morning, and because I have found myself explaining these things a bunch of times this year, I have put together a quick series of screencasts that give an introduction to basic video editing in iMovie. I do this not because I think that my students can learn to work in iMovie by following me stuttering and mumbling through a screencast, but because having a visual guide to refer back to after class is helpful.
A quick link to this (and anything else I may have to say about iMovie ’09) is: http://battis.net/link/imovie09
You may also be interested in more specific tutorials, and Apple has a bunch posted online. (And you can search for more on YouTube).
The basic sequence of these videos is (and here I’ll link directly to the original Screencast-O-Matic videos, which are slightly higher quality than the YouTube playlist above):
- 5 Minute Introduction to iMovie ’09 – This is a lightning fast orientation to very basic video editing in iMovie ’09.
- Using Still Images in iMovie ’09 – Importing and editing still images instead of video clips in iMovie ’09.
- Adding a Video Transition in iMovie ’09 – How to add transitions between video clips to make our project look more professional.
- Adding Titles to a Video in iMovie ’09 – How to add explanatory text (a.k.a. titles) to a video in iMovie ’09.
- Adding Audio Track(s) to a Video in iMovie ’09 – How to add music, effect and voiceover soundtracks to a video in iMovie ’09.
- Sharing Your iMovie ’09 Masterpiece with Other People – A brief rant about how to export your iMovie ’09 project as a video file that other people can watch.
Convert Word Processing Files to PDF
Nov 22nd
![]()
This post is part of a series that are components of my “Expert Plan” at my school, looking to create a shared resource for my colleagues as the school moves towards greater adoption of laptops and technology in our pedagogy.
This AppleScript application converts any word processing files that Pages can open into PDFs. This application will only work on Macs.
Use
To use this application, drag a icon(s) of a file or group of files on to the icon for the application. When asked, pick which folder you would like to save the PDFs into. As the application runs, if Pages cannnot open a particular file, you will see a message warning you of this. When the application completes, it will display a list of all the files that could not be converted (or simply quit if all of the files were converted).
Install
To install this application, click the link below to download it as a ZIP archive. Double-click the “Convert Word Processing Files to PDFs.zip” icon to expand the ZIP archive and drag the application icon to where you want to use it.
Download
Fixing PowerPoint 2008 Web Exports
Sep 24th
So, I’ve spent the last few days wrestling with a curriculum unit that an outside consultant built. In PowerPoint. On Windows. And which we have been trying to set up in such a way that we can share the interactive document with students. Who are using Macs. And, perhaps, without asking each student to download a ~200MB file to use it.
I have learned and grown much in the process. And have discovered that Microsoft PowerPoint 2008 does an execrable job of exporting PowerPoints as web pages (it does an execrable job of doing a lot of other things too, but we can talk about that at another time). Here are the key fixes that I made to the exported web page and supporting files so that the presentation would fundamentally work (all of this was done using regular expressions in TextMate):
- I stripped out all of the fancy Javascript calls that PowerPoint inserted as links to navigate from one slide to another. It turns out that a simple HREF to the actual page’s HTML file works (and the JavaScript Does Not.)
Find:(href=")[^"]*(slide\d{4,4}.htm)[^"]*(")Replace with:
$1$2$3
- The export to web page takes all of the already URL-encoded links in the PowerPoint and reencodes them, rendering them useless. I stripped off the second encoding.
Find:(%)25([a-fA-F0-9]{2,2})Replace with:
$1$2
- Finally, because the links were built in Windows and then URL-encoded, all of the Windows-style paths needed to be turned into POSIX paths for use on the web.
Find:%5[cC]
Replace with:
/
At this point, in an average PowerPoint, most of the damage has been fixed and things more or less work. However, the curriculum unit that we were working with also linked to external Word documents (hence some of the Windows-style path issues above). This meant I had a few more fixes along the way that are worthy of note:
- I replaced the links to Word documents with links to the corresponding PDF files (and script I used generated PDF files with .doc.pdf extensions and I didn’t bother to fix that).
Find:(href="[^"]*docx?)(")Replace with:
$1.pdf$2
- These links to external documents open in the same frame as the slideshow. Which defeats the purpose of the slideshow being a navigational tool. So I redirected all of the new PDF links to a new window in the browser. As the hyperlinks are broken across two lines in the HTML source code, this took two steps.
- Find (changing {{name of Links & Sources folder}} to the, well, actual name of the Links & Sources folder):
(href="((http://)|({{name of Links & Sources folder}}))[^"]*")\nReplace with:
$1
- Find (modifying as noted above):
(href="((http://)|({{name of Links & Sources folder}}))[^"]*"\starget=")_top(")Replace with:
$1_blank$5
- Find (changing {{name of Links & Sources folder}} to the, well, actual name of the Links & Sources folder):