Automatically Post Images to Tumblr Using Automator

For the past few months I have been drawing everyday on 2.5 x 3.5 inch pieces of Bristol board as part of my most recent ‘kooBtrA‘ project. kooBtrA = ArtBook in reverse, as I plan to self publish a full-color book containing all the images sometime after one year passes.

As you might imagine, finding the time to draw every day can be challenging. Not to mention the fact that I’ve also been posting these images to my Tumbleog; which includes scanning, resizing, and logging into Tumblr to post the image along with a description and tag. This became mundane after the first few days of posting, so I decided to set time aside to automate this process, as doing so would surely save me time in the long run.

I did a bit of research and discovered that Tumblr offers the ability to send posts via email. This immediately gave me the idea of using Automator to streamline this process, as Automator offers a very straightforward ‘New Mail Message’ Action. This would allow me to create an Image Capture Plugin that grabs the image that was scanned and include it in the email message, right? Well, yes, but with one caveat. With Snow Leopard’s introduction came a few changes, one of which removes the ability to scan to a specified folder while using an Image Capture Plugin, (the image is saved to the ~/Pictures folder, then the Workflow runs). The workaround in my case was to use a Folder Action, which would result in the Workflow running any time a new file is added to the specified folder.

What I had been doing until this point was scanning the image to a subfolder of my ~/Documents folder; scaling the image to 300px max on either side depending on orientation; then uploading the image to Tumblr.com along with a description and tag. The Folder Action Workflow I ended up producing cuts the time this took in half.

The first thing I did was create two variables. One for the name of the post and one for the number of the post. You can achieve this by right or control clicking in the variables window at the bottom of the application window and choosing ‘New variable.’ I left the value blank, as this will vary with each post. The next step was to start dragging actions over to the right of the application window. The first is an ‘Ask for Text’ Action, which asks for the name of the post, then sets the value of the variable. The same goes for the number of post. The Workflow then asks for the Finder items to act on, then copies them to a new location and scales them to 300px. Finally, the ‘New Mail Message’ Action is added, which utilizes the name and number variables that were set previously, as well as receives the resized image from the previous Action. The last Action that was added was ‘Send Outgoing Messages,’ which is fairly self explanatory.

Below is the printed Workflow for your reference should you wish to accomplish something similar. If you have any suggestions as to improving this Automator Workflow please leave a comment. For more information regarding Tumblr’s post via email option please visit http://www.tumblr.com/docs/en/email_publishing.

Post to Tumblr

Restore MySQL Database from ibdata and .frm Files

Last week I was presented with a problem that involved restoring a MySQL database for a client using only the /data folder from an original MySQL installation. The solution turned out to be rather simple, but that didn’t stop me from racking my brain for a few hours. Thus, I thought I’d share my experience in hopes of helping others that may run into this.

*NOTE* The MySQL database I was tasked with restoring was associated with a WordPress installation. My guess is that this is irrelevant, though.

*ALSO NOTE* This article assumes you are comfortable with software solutions such as MAMP and/or XAMPP, as well as phpMyAdmin.

I made the decision early on to solve this problem locally, (I find that working directly from a web server usually just gets me into trouble).  I use MAMP on a regular basis and as such have quite a few MySQL databases associated with that installation. Rather than fooling with this at all I opted to use XAMPP on a Windows XP SP2 machine. Either one of these solutions will work, as they essentially provide the same services. I chose to avoid using MAMP on my machine because of everything I have invested into that application, but that doesn’t mean you have to.

The first thing you’ll want to do is install a fresh copy of either MAMP, (Mac only), or XAMPP. Then create an empty database using phpMyAdmin with the same name as your original database, (the one you’re trying to restore). For example, if your previous database was called ‘wordpress,’ in phpMyAdmin, (under the ‘Create new database’ text field), you would enter ‘wordpress.’ This will create a folder named wordpress in /Applications/MAMP/db/mysql if you’re using MAMP, or C:\xampp\mysql if you’re using XAMPP. At this point you’ll want to turn off the MySQL service. Now, copy the contents of, (not the entire folder), your mysql database folder that contains the .frm files to the new location. The next step is to copy the ibdata1 file to the MySQL folder in either XAMPP or MAMP, then start the MySQL service again. Now you should be able to locate your database tables in phpMyAdmin.

At this point, (assuming you don’t want to keep the data locally on your machine), you’ll want to export the database using phpMyAdmin. Be sure to check Add DROP TABLE, choose SQL as the export type, and check the ‘Save as file’ checkbox. The .sql file that will be generated can easily be imported into another instance of phpMyAdmin. The new database doesn’t need to have the same name as the previous database, either. I was unable to use my previous database name because the site I was working on had been moved to a shared hosting server, (where someone had already chosen the name of my previous database), and everything worked fine.

Also keep in mind that this can be accomplished whether or not your server is running phpMyAdmin. There are plenty of alternatives available that will allow you to accomplish the same tasks, and there’s always the command line. The most important step is to simply copy the contents of the /data folder and the ibdata1 file. Hope this helps!

Leave a comment if you have any questions!

In-Store Signing at Pages Bookstore

The kind folks at Pages Bookstore have invited me to do a book signing and give a short talk on comics production on May 8, 2010. The event will be taking place from 1-3 pm in downtown Flint, MI. If you’re in the area stop by to pick up one of my short comics and chat with me for a bit. The promotional poster I did for the event can be found in the portfolio section of this site.

MSU Comics Forum

Thanks to my mentor and friend Ryan Claytor I’ll be tabling at the MSU Comics Forum on March 27, 2010. The event is held annually at, you guessed it, Michigan State University. There I’ll be showcasing my latest comic, “Here For Now,” (which I’ll soon have examples of in the portfolio section of this site), as well as my first comic, “Stars Beneath Stars.” For more info please visit http://www.comicsforum.msu.edu/.

Configure Archive Utility in Mac OS X

Having recently purchased a new MacBook Pro and electing to skip the option of running Migration Assistant to transfer my data and settings, I noticed that a few applications were behaving differently. Over the years I’ve configured quite a few things on my Mac, and eventually I became accustomed to said customizations. One of the first things I noticed was that when I would unarchive a zip file, the compressed file would stay put. I remembered that a few years ago I learned of a cool way to configure Mac OS X’s built-in Archive Utility, (using a System Preference pane), so I immediately went digging. To do this, simply navigate to therootofyourharddrive/System/Library/CoreServices. From there right or control click on Archive Utility.app, and select “Show Package Contents.” A new window will open containing a folder named Contents, within which you’ll find Resources, and finally Archives.prefPane. Opening this preference pane will result in System Preferences.app asking if you’d like to install for all users or for this user only. Voila! Now you can tell Archive Utility to delete the archive after expanding it.

10 Inspiring Websites

Lately I’ve been spending quite a bit of time designing websites, whether it’s WordPress theme development or Joomla! template design. A huge part of this process, (for me), is finding inspiration. Below are 10 carefully crafted examples of good web design that I’ve been inspired by as of late.

31THREE

31THREE

Kyle Florence

Kyle Florence

A List Apart

A List Apart

Buffalo

Buffalo

Design by Silnt

Design by Silnt

FullAhead

FullAhead

Viget

Viget

thinkdesign

thinkdesign

Ed Merritt

Ed Merritt

ThemeShaper

ThemeShaper

Webcomics

I have a confession to make: I love webcomics. I’m quite the comics nerd in general, to be honest. It’s possible that recently completing the first sequential drawing class offered at my university rekindled this fascination, but who’s keeping track? If you’re interested in finding out who’s responsible for teaching me everything I know about the production of comics, visit my professor’s site elephanteater.com. I’ll have a few more samples from my comic posted in the portfolio section here shortly. Now back to webcomics, here are a few of my favorites…

xkcd
American Elf
Least I Could Do
Looking For Group
Toothpaste for Dinner
NatalieDee
Questionable Content
AppleGeeks
OGLAF *Not safe for work*

Check if your Mac is 64 bit

Here’s an easy way to determine whether or not your Mac is 64 bit capable. Open Terminal.app, which is located in /Applications/Utilities and type in

sysctl hw |grep 64bit.

If your machine is 64 bit capable, the result will be

hw.cpu64bit_capable: 1

If your machine is not 64 bit capable, the result will be

hw.cpu64bit_capable: 0

Tip source: OSXDaily.com

Life on Mars?

So it turns out life on Mars might actually be possible, thanks to an adorable little robot called Le Petit Prince. The robot, (which looks an awful lot like EVE from WALL-E), was designed to care for plants while searching for an environment with ample nutrients. The idea is to eventually produce enough oxygen on Mars to make it suitable for humans, but don’t plan on moving anytime soon, it’s just a concept.

iDeals iPhone app

So I had the pleasure of meeting the gentleman that develops the iDeals iPhone application a few days ago. iDeals was designed to provide an easy to use interface for tracking deals from Amazon, EB Games, Buy.com, Woot!, etc. The iDeals app pulls its information from DODTracker.com servers, but is far more enjoyable than visiting the site itself. Best of all it’s free, go download it.