RapidWeaver Add-ons Version Identifier
One thing RapidWeaver does poorly — at this current moment — is help the end user determine the product version they are using on any given 3rd party add-on. Knowing your add-ons (theme or plugin) version number is critical when asking for support and is often one of the first things the developer will ask you for.
If you know where the add-ons are kept (`~/Library/Application Support/RapidWeaver/`) then you might be able to determine a plugin or themes version number with the Finder, or if you have RapidWeaver open you can find out a plugin’s version by opening the plugin browser, or if you show a themes package contents and…
Well, I like to have these sorts of things at my fingertips and do as little thinking as possible, so I wrote an AppleScript to gather this information for me no matter where I am or what I am doing[*][a_091103113228]:
– file types to choose from
set rwTypeArray to {“Theme”, “Plugin”}
– choose from those file types
set rwTypeLong to {choose from list rwTypeArray ¬
with prompt ”Which RapidWeaver product type ¬
you like to find the version of?” ¬
with title “Theme or Plugin”} as string
– logic from result
if rwTypeLong is “Theme” then
set rwType to “rwtheme”
else
set rwType to “rwplugin”
end if
– get name of hard drive
tell application “System Events”
set diskName to (get name of startup disk) as string
end tell
– get name of user
set userName to (do shell script “whoami”) as string
– select file from RW directory
tell application “Finder”
set rwFile to (choose file with prompt ¬
“Please select your RapidWeaver ” & rwTypeLong & “:” ¬
default location (diskName & “:Users:” & userName & ¬
“:Library:Application Support:RapidWeaver” as alias) ¬
of type rwType without invisibles)
– read version number
tell application “System Events”
set rwInfo to (get version of the file (rwFile as string))
end tell
– and display it
if rwInfo = “” then
display dialog ¬
“It seems that your ” & rwTypeLong & ¬
” doesn’t have a version number that I can read. ¬
Sorry.\n\n¬
Would you like me to reveal it’s ¬
package contents for you?” ¬
buttons {“Cancel”, “Yes”} default button (2)
set rwPath to rwFile & “Contents” as text
open rwPath
else
display dialog “The version information:\n\n” & rwInfo & ¬
“\n\n …has been copied to your clipboard.” ¬
buttons {“OK”} default button (1)
– copy to clipboard
set the clipboard to rwInfo
end if
end tell
### Notes ###
* If a theme is to have it’s version number read, it must have an Info.plist in it’s package contents. Some theme developers do not include this file. For those that don’t, the script will reveal the theme’s package contents so that you can inspect the version number at the bottom of the Theme.plist file
### Download ###
Get your fresh copy of [RapidWeaver\_Addons\_version.scpt][a_091103112457] from CodeCollector.net
[a_091103112457]: http://www.codecollector.net/view/BB433BE1-0BD0-43C6-AE7A-CFEE8E623AB8 “RapidWeaver_Addons_Version.scpt”
[a_091103113228]: http://seydoggy.com/2009/11/03/rapidweaver-add-ons-version-identifier/#a_091103113228
Is social media really free?
[
](http://www.plusbranding.com/ “Plus Branding”)I met today with a local Kitchener-Waterloo Graphic Designer, Umberto Micheli of [Plus Branding](http://www.plusbranding.com/ “Plus Branding”) to exchange ideas and experiences and stories about being self employed as a designer in today’s tough economy. It doesn’t seem to matter what sector you are referring to, the bottom line always looks the same; you have to spend money if you stand a chance of coming out the other end smelling like roses.
Of course our perspectives differed a little. I take online presence and social media for granted and Umberto knows the ins-n-outs or drop mailers and print advertising. The later comes at a real cost, like cold hard cash kind of cost while the former is free… or is it?
It got me thinking when I got home, what’s the real cost of social media and online marketing? What is the mental tax and real cost of labour involved. I bet when it really comes down to it, dollar for dollar, the physical path become a lot cheaper then the metaphysical path.
###Real World vs Online
Consider this; a graphic artist may put anywhere from 2 to 6 hours into a flyer, that flyer gets printed for a couple hundred dollars, that flyer gets handed out home to home for a couple hundred more. Regardless of internet connectivity or technical know-how, the information on that flyer has now reached thousands of homes guaranteed, and may very well remain there anywhere from a few days to a few weeks. Heck if your flyer is a Pizza or Chinese food menu, that flyer might remain stuck on the fridge for years to come. Total cost for such longevity? Anywhere from $500 to $5000.
Now let’s look at the flip side, social media and the “free” online presence. You want to maximize your impact, so you invest your “free” time in a blog, [Twitter](http://twitter.com/ “Twitter: What are you doing?”), [FaceBook](http://www.facebook.com/ “Incompatible Browser | Facebook”), [LinkedIn](http://www.linkedin.com/ “LinkedIn: Relationships Matter”) and maybe a pinch of [Tumblr](http://www.tumblr.com/ “Tumblr”) if you’re really in the game. But what kind of investment are we talking about here? Do you want your blog to be really noticed? Then you have to post to it more than once a week. What’s that take? A post like this might take a couple of hours once you’ve collected your thoughts, images, proof read (*cough*) and publish.
###Twitter
[
](http://twitter.com/ “Twitter: What are your doing?”)How about Twitter then? To be honest, if you’re not a moderately attractive woman with a few geeky words to say about tech gear, your chances of building up an instant following are slim to none. I have been on [Twitter](http://twitter.com/seyDoggy “Twitter: What is seyDoggy doing?”) for nearly two years and only have [300+ followers](http://twitterholic.com/seyDoggy/ “SeyDoggy Stats & Rankings (seyDoggy) | Twitterholic.com”). I’ve amassed nearly 6,500 posts on Twitter. That’s about to 9.25 posts a day. Even if each post only took me 1.5 minutes, you’re looking at nearly 15 minutes spent each and every single day for almost two years posting to Twitter… that’s about 91 hours per year, or tens of thousands of dollars worth of man hours spent on 300 people, a fraction of which actually care enough to pay attention. My advice, get into Twitter for the love of community, not for a leg up in the market.
###The rest
So where does that leave FaceBook, LinkedIn and Tumblr then? Well, take the above paragraph and divide the followers by two, then increase the effort by two and you have a $ per eyeball ratio that is four times as costly as Twitter (or 25% as effective depending on your perspective).
###The Best Approach
Is there a best approach? Different markets will have different needs. Certain demographics will embrace one approach more than the other so it depends on what your target market is. It wouldn’t make a lot of sense for me to market my downloadable RapidWeaver themes in a flyer sent to a few thousand local area homes, but that’s not to say I couldn’t benefit from the exposure. But Plus Branding, on the other hand could benefit immensely from both an online presence *and* a distributed print approach. But it’s finding the balance that is key.
Use RapidWeaver's %pathto()% syntax in javascript files
UPDATE (2009-07-17): We have updated the code to account for those who were having trouble understanding the reg-ex nature of rTrim. The new code and instructions should make it harder to mess up your path.
It may take me a while sometimes, but there is one simple truth about my workflow, I always strive to have the most efficient way of getting things done. This is especially true in RapidWeaver theme development. Developing themes for RapidWeaver is not like standard web design. You have no way of knowing how each user will structure their site, what plugins they’ll use, what they’ll add to their pages… All of these uncertanties leave us as developers scratching our heads sometimes, trying to sort out ways of dynamically including things and stuff without the end user being able to break it.
PHP would be the obvious choice here, but we don’t have the luxury of knowing what the end users hosting environment will be and whether they could, or even would be willing to support a host of PHP functions. So the next best thing is javascript; yes it’s a little slower and it does depending on the end user having javascript enabled, but the ubiquity of javascript has never been as great as it is today.
One thing that has plagued RapidWeaver developers for some time is how to utilize RapidWeaver’s %pathto()% syntax, the bit of code that allows RapidWeaver to imprint the end users chosen common file path, in any other file other than the index.html template file. For any javascript file that has required the inclusion of another file, we’ve previously had to fill our html with scripted variables for each file, each using the %pathto()% syntax and so forth until we have built a separate path to each file from outside our javascript that actually requires it. Since RapidWeaver will only write the path to files it can actually find, you need to do this for each and every file.
Today I had an AH-HA moment while in need of multiple paths to be defined for use in various javascript files. I decide to write a small bit of code that grabs RapidWeaver’s %pathto()% syntax while it chases a real file. Then I strip out the actual file name, and KABLOW! you have a common file path in the the form of a javascript variable, ready to be used in any javascript file you like.
To be Strict or not to be
I am about to geek out so bad it will make your eyes roll back and have you snoring before you finish the first paragraph. But to be honest, it’s not for you that I write this stuff, it’s for posterity and so that I can always look it up in the future, if such a thing should ever happen to me again.
I have finally nailed down an obscure little bug in cataLog (and in turn Acumen) that was causing the second level navigation to jump up about 14 or so pixels when the user used the “Tidy” setting in RapidWeaver and when the user used code or content that tripped the “Tidy” setting into converting the document into a Transitional DOCTYPE. The reason the bug remained so illusive is that this set of circumstances was not immediately clear and is not necessarily something the end user is mindful of.
My repeated testing, assuming that there had to be a difference in the content area or navigation area, kept leading me down the wrong path. One assumes, when “Tidy” is at work, that the HTML of the document is somehow being altered or “tidied up” as it were. And this is where I continued to search extensively but came up empty handed every time. Having exhausted nearly all HTML avenues and having run countless DIFF comparisons I finally turned my attention on the one thing in each document that I knew was different; the DOCTYPE. By simply switching the DOCTYPE from Strict to Transitional, regardless of whether the embodied code was in fact one or the other, I could trigger this odd navigational occurrence.
As much as this was a major breakthrough in the tracking of this bug, I now knew that the game had gotten that much more complex. I was no longer dealing with a bug in my code or the theme as a whole. I was now dealing with what was potentially a rendering bug, or interpretational difference in the two DOCTYPE’s, meaning that the bug being presented may very well be an issue in the HTML standard itself. Eeek!
Since I knew that the navigation in question uses inline-block as a value on its display property, and since I am well aware of the lack of widespread support that inline-block has among browsers, I knew that this was probably the place to look. I need to look in the CSS of the second level navigation.
Through considerable trial and error I found that an attempt to display the ancestor, or hidden navigation inline was what was causing the trouble. In DOCTYPE Strict, the combination of ul {display: inline;} and ul ul {dispay:inline-block;} caused the initial ul to have height, despite having tried to suppress it with ul {height:0; margin:0; padding:0;} etc… While in DOCTYPE Transitional, the initial ul rendered correctly (which is to say it didn’t render at all and had no height), so the latter ul would shift up to takes it’s position. The fix was simply this: ul {margin:0; padding:0;} with no attempt at any display value other that what it would naturally inherit (which would be “block”).
So is this in actual fact a bug in the Strict DOCTYPE standard? It’s hard to say really. In the making of RapidWeaver themes, we pour a lot of effort and trickery into making things happen the way we want them too. In the case of split navigation we use the same set of code in multiple locations and simply turn on or off the bits we want shown or hidden. This probably is not a typical practice in web design but a necessity in RapidWeaver theme development. Still, why would one DOCTYPE behave differently from another where such a small property in concerned?
Path Finder 5, thank you
It’s funny, nearly ironic that I bother to write a blog about Mac productivity when in actual fact there is little about the Mac operating system that I like at face value. When you look at what most people like the Mac for, ease of use with things like Finder and spotlight, and I use neither one, instead opting for alternatives like Path Finder and QuickSilver respectively.
But some of these tools can fall victim to Apples own drive to improve it’s OS, leaving some of these tools behind to die a slow death. This is certainly true if QuickSilver, and so too I feared for Path Finder. Until last week when CocoaTech announced the release of Path Finder 5, the long awaited version that would finally take FULL advantage of everything that Leapard has to offer.
Having been out of the country for nearly two weeks I was unable to get into it until Monday. I must say I am completely pleased with the new version which sees many major operational and interface improvements. One can’t help but notice it’s smoother handling and faster reaction time.
One welcome feature is that the favorites panel, it’s sidebar, will now acutarely reflect that of the Finder. Path Finder will also recognize the shared places items, such shared volumes, without you fist having to mount them in Finder.
For more, check out CocoaTech’s website.
RapidWeaver's %pathto%, TextMate can help
It’s no secret that many RapidWeaver developers are quite close and help each other out quite a bit. It’s also no secret that in order to develop RapidWeaver themes you need to use some pretty powerful tools. Some of use TextMate, the most powerful one in my opinion. There are so many ways to extend TextMate’s features to streamline our workflow, one of the simplest is to edit existing bundles by tweaking their commands or snippets or making a command or snippet of your own.
So back to the RapidWeaver developers… recently, Giuseppe at Bonsai Studio shared a TextMate snippet with the other developers. A snippet that would write a very specific RapidWeaver string that we tend to use quite a bit:
<script rel="stylesheet" type="text/css | text/javascript" src="%pathto(script/filename.file)"%></script>
I jumped all over this because as you may know I am a huge TextMate nut. However, the snippet didn’t quite run the way I wanted. So I set about to make it the way that was most useful to me. The main difference being that mine would highlight the file path when activated making it an even faster shortcut for me.
But I didn’t stop there. I wanted one that would handle <link> as well. So the result is to snippets that quickly write a <script> string and <link> string that include the %pathto% syntax.
So if you are a heavy TextMate user and happen to develop RapidWeaver themes then you might be interested in these two snippets.
The beauty of RapidWeaver meets the power of TextMate
As a web designer and fairly huge Mac geek I am one of those guys who gets rather passionate about certain apps and workflows, etc… Those of you who have read one or more entries on nutMac.com, a Mac workflow blog I write for on occasion, you’ll know that I am a big fan of Path Finder, Quicksilver and TextMate, three apps that rule my world. Recently, suspecting I wasn’t tapping into TextMates full potential, I purchased TextMate – Power Editing for the Mac by James Edward Gray II. Well I was correct in my suspicions, since by chapter 3 I had already learned so many more tricks that I couldn’t wait to get back into coding just to put what I had learned to the test.
One trick I had always been vaguely aware of, and apparently by name only, was the “Edit in TextMate” feature. I had looked at activating this at one time but had decided it was terribly complex for something I could just set of a Quicksilver trigger for (which I did, or so I thought). Having just skimmed over what this “Edit in TextMate” feature was, I figured this was just some short hand trick for forcing various files types and folders to open in TextMate as opposed to their default application. In fact, this is a power user feature that allows TextMate to hijack the editing fields of other apps (the search field in Google home page, or in this case, the blog post field of Blogger, my Fluid SSB app).
Here is where the little light bulb went off in my head… Could this be used in RapidWeaver? Now let me start by saying I LOVE RapidWeaver, I really do, but when it comes to HTML code editing, which I do on a continual basis, I can’t stand not having my TextMate features and functions handy. I have always found myself writing code in a dummy TextMate file, then copying and pasting it into RapidWeaver. And when I would have to make a change I would copy the code into the dummy TextMate file and so on until I was satisfied with the results.
So to make a long story short, after years of using TextMate, I finally enabled the “Edit in TextMate” feature and tried to invoke it in a RapidWeaver project and POOF! It works like a charm! Now I can place my caret in any RapidWeaver field (main content, sidebar, titles, custom fields, etc…) in RapidWeaver and type ctrl-cmd-E and edit the contents of that field with the power of TextMate.
Path Finder point release to 4.8.4
[Path Finder](http://www.cocoatech.com/ “Welcome to Cocoatech”) (my all time favorite OS file system) has had a long awaited point release, bringing the version to 4.8.4. This update brings some needed bug fixes for both Tiger and Leopard versions that are apparently rooted deep within the Mac OS itself (due to be fixed in OS X 10.5.3 I suspect). For a complete list of updates and bug fixes see the [Path Finder Changelog](http://www.cocoatech.com/changelog.php “Cocoatech: Revision History”).
ExpanDrive expands my horizons
[
](http://www.magnetk.com/expandrive “ExpanDrive – Bring your remote files closer to home.”)I’ve been pretty quite about [ExpanDrive](http://www.magnetk.com/expandrive “ExpanDrive – Bring your remote files closer to home.”) despite my HEAVY usage of it over the last week. I kept quiet simply because I really wanted to drill this one to death before getting behind something with this kind of power.
For those looking for a way to best describe [ExpanDrive](http://www.magnetk.com/expandrive “ExpanDrive – Bring your remote files closer to home.”), it’s like [iDisk](http://www.mac.com/ “Apple – .Mac”) without a [.Mac account](http://www.mac.com/ “Apple – .Mac”), it’s like [Jungle Disk](http://www.jungledisk.com/ “JungleDisk – Reliable online storage powered by Amazon S3 â„¢ – Jungle Disk”) without the transfer rate$, it’s [WebDAV](http://www.webdav.org/ “WebDAV Resources”) without jenky [WebDAV](http://www.webdav.org/ “WebDAV Resources”) protocol (can’t pass many programming commands since [WebDAV](http://www.webdav.org/ “WebDAV Resources”) uses those same commands) or it’s like an external Firewire or USB drive that you access anywhere with physically carrying an hard drive around… [ExpanDrive](http://www.magnetk.com/expandrive “ExpanDrive – Bring your remote files closer to home.”) brings mounted disk functionality to remote storage locations.
Like I said, I have been driving this thing to wall since I got it last week, and yes it gets a little shaggy at times (which could be to blame on the server or the ISP as much as the app itself) but overall, this is a must have app. I have been beating the snot out this doing web development from the Finder (or Path Finder, truth be told) once I need to move beyond local development yet not ready to go live. I have installed and run apps directly from [ExpanDrive](http://www.magnetk.com/expandrive “ExpanDrive – Bring your remote files closer to home.”) drives. I have used it for storage, a file server… the reality is, anything you use any mounted volume for you can use [ExpanDrive](http://www.magnetk.com/expandrive “ExpanDrive – Bring your remote files closer to home.”).
It’s brilliant.
Be warned: I have found that when using it as a web development platform the odd edit I make to a remote file will suddenly render that file useless leaving me no option but to replace that file with a local copy (this happens most often with style sheets). I have yet to watch my console to really see what’s going on but when I find out, I’ll let you know.
Web Search with Quicksilver: how-to
I’m always on the hunt for quick way to go from here to there. One thing I especially dislike is redundancy, repetition, extraneous steps, movements and keystrokes. That’s why I love Quicksilver. Every day I am able to tap the wonder app for more and more time saving tricks.
One aspect of my job in [web design](http://www.seydoggy.com/ “Web and Graphic Design by seyDoggy – weblog”) and [theme design](http://www.seydesign.com/ “RapidWeaver and WordPress theme developers”) is having to look up web sites and online resources constantly. So here are a three tricks I’ve dug up, which was not easy since Quicksilver documentation is few and far between.
1. Select, Grab and Search
—
* For this one you need to set a few obscure and not so well documented features.
* First of you’ll need to activate the “Services Menu Module” in Quicksilver > Plug-ins > All Plug-ins > System. This allows for the “Search With Google – A service of Safari.app” action,
* Next you need to add some extra function to Quicksilver by “Enabling advanced features”,
* Another useful setting will be “Pull selection from front application instead of Finder” from Quicksilver > Preferences > Extras,
* For [Path Finder](http://www.cocoatech.com/ “Welcome to Cocoatech”) users, you’ll also need to enable the Path Finder module (Quicksilver > Plug-ins > All Plug-ins > Applications) and then make Path Finder you default file browser (Quicksilver > Preferences > Handlers > File System Browser > Path Finder).
* relaunch Quicksilver.
* Once you’ve managed this much, you only need to:
* select any text from anywhere text is selectable,
* invoke Quicksilver (^space for most),
* press “⌘g”,
* tab to the action panel,
* type “sw” (which should result in “Search With Google” or will after one or two uses) and hit return.
* You’re selected text now turns up as a google query in Safari.

2. Select and search
—
* To take the above idea one step farther (and this comes courtesy of one commenter on my last [Quicksilver post](http://www.nutmac.com/index.php/2008/01/30/quicksilver-as-a-file-launcher/#comment-589 “QuickSilver as a file launcher”)), we can make a trigger that invokes Quicksilver, grabs the selection in the command window and tabs over to the action window all in one hot-key:
* first you need to enable the “Command With Selection” trigger in Quicksilver > Triggers > Quicksilver,
* select the trigger and tap the “i” button and the bottom of the window
* edit the hot key and enter “⌘esc” (or a hot-key of your choice)
* Now you can selecting anything selectable, tap “⌘esc” and immediately type “sw” to bring up “Search With Google” and press return and… well you know what happens.
* Incidentally, this hot-key can be used to grab a selection to be modified in any manner; select an image, “⌘esc”, type “ow” (Open With), tab, type “pr” (Preview.app). Or select a URL, “⌘esc”, hit return to open that URL, and so on… here are [some other examples](http://www.vimeo.com/652337 “Open files with Quicksilver on Vimeo”).
3. Type and search
—
* What if you could just type from anywhere and have Google look it up for you? Well here is a cool trigger for doing just that. If you haven’t done so already:
* activate the Web Search Module (Quicksilver > Plug-ins > All Plug-ins > Web)
* activate the “Web Searches (from docs.blacktree.com)” catalog (Quicksilver > Catalog > Modules)
* Hit the refresh button at the bottom of that window
* Create a web search trigger:
* invoke Quicksilver and type “ws”, it should yield “Web Search” (if not, arrow over and down until you see it). The default service is “http://www.google.com/search?q=***” and this is the one you want,
* tab to the action panel, it should default to “Search For…” but if not type “sf”,
* tab to the target or 3rd panel and enter some text,
* now tap “⌘’” to bring up Quicksilver > Triggers
* click the “+” button at the bottom of the window
* your command, action and target should already be propagated but there will be text in the target panel. Get rid of that text by selecting it and typing “⌘x”
* click “save”
* then select the “i” button near the bottom and edit the hot-key by entering “⌘2″ (my personal preference because of the relationship to the @ symbol).
* To use this trigger, simply tap “⌘2″ from anywhere, in any app and Quicksilver will prompt you with a text field. Type your query in and press return. Safari will pop up and serve the google results for the term you just typed into Quicksilver.

I hope this little how-to was useful to you. Bookmark it, Digg it or do whatever it takes to keep track of this permalink because you never know when you’ll need it.
[tags]Quicksilver, mac, app, how-to, Quicksilver web search[/tags]


