...

Menu Close

Category: Blogging (page 1 of 9)

BBEdit to MarsEdit (AppleScript)

You can never own too many text editors. Okay, I can never own too many text editors. I recently splurged on BBEdit, the venerable HTML and text editor for the Mac. There’s something pleasurable about tweaking BBEdit to use it as a blogging tool. One such tool I hacked together is an AppleScript to send a post from BBEdit to MarsEdit for final publishing. Here’s how you do it.

Paste the following text into the Script Editor app on your Mac (warning: I’m no coder, and did this through trial and error based on other scripts, so this script probably contains some completely unnecessary code):

on run
	tell application "BBEdit" to set theFile to file of document 1
	
	
	set appleScriptPath to theFile as text
	set currentURL to POSIX path of appleScriptPath
	set currentURL to ("file://" & currentURL)
	
	tell application "MarsEdit"
		activate
		make new document
		tell document 1
			set body to theFile
		end tell
		activate
	end tell
end run

Compile then save the AppleScript. For the final step, you need to move this AppleScript to the BBEdit scripts folder. Get there by clicking on the Scripts icon near the far right of the BBEdit menu, and choosing “Open Scripts Folder.”

BBEdit menu item - Scripts folder

Once the AppleScript is in place, it will appear at the bottom of the dropdown when you click on the Scripts icon. Selecting it will take the text in BBEdit, and open it in a new MarsEdit document. I wrote the initial draft of this post in BBEdit, before using the AppleScript to send it to MarsEdit for final edits, adding of the image, assigning tags and categories, and sending off to WordPress.


Blogging on a Mac Instead of My iPad →

Jeff Perry from Rocket Panda:

It also has an incredible editing system to show you where you can improve on your writing and grammar. It reminds me a lot of the Hemingway web-app, showing where you write in passive voice, or when you are using words that have preferred alternatives. So instead of saying something is “very large” it could show you something like “enormous” or “gigantic” making for it to be a much more pleasing thing to read.

Jeff’s post inspired me to try out Marked 2’s writing and grammar tools, which I had forgotten. In fact, I used Marked 2 to see some suggestions for improving the post you’re reading right now. To use Marked with MarsEdit, select the “MarsEdit Preview” menu item from within Marked.

In general, my blogging workflow on the Mac is a bit more basic than Jeff’s workflow. I use Ulysses on iOS, but not on the Mac. Instead I write and publish directly from MarsEdit when on the Mac. I, too, use the MarsEdit extension Quick Post extension in my browser.

One reason I don’t use Ulysses on the Mac is because I like MarEdit’s preview function, which uses your site’s CSS to show you what a post will look once published. I also favor MarsEdit’s ability to browse and grab links to posts located on my server. Once you publish a post, you can’t retrieve it or interact with it from within Ulysses.

Both Ulysses and MarEdit are great tools. It comes down to which features are important to you.


#OpenWeb →

Michael Rockwell writing for Initial Charge:

The site aggregates headlines from independent publishers that focus on Apple products and software. It also serves as a directory of single-person weblogs within our community. Over the past few years, social networks have become less and less exciting to use and there have been some subtle indications that the open web is poised for a comeback.

The new #OpenWeb site and its clean design is a quick way to not only get some news and insights if you use Apple products, but also to discover new bloggers. I like the focus on indie blogs, which is where I spend most of my time online. I have most of these blogs in my RSS feed already, but this is worth following for discovery, as the author intends to continue adding new blogs.


Link Post Workflow with Ulysses and Workflow on iOS

A link post is a type of post common on many blogs, including here at 40Tech, where the post links to a story on another site. The purpose of a link post is to say to the reader, “Hey, here’s a good story.” Often the post adds a few words of commentary. The post on sharing your WiFi credentials with a QR code was an example of a link post.

I’ve recently come up with an easy way create a link post on 40Tech using Ulysses and the Workflow app on iOS. I copy the author’s name to the clipboard, select the text I want to quote, and run the workflow via Safari’s share sheet. The workflow prompts me for the name of the other site, before opening Ulysses with my post almost all ready to go. All that’s left for me to do in Ulysses is add some comments, pick my tags and categories, and publish the post.

Behind the Scenes

Here’s what happens, mostly behind the scenes, in the Workflow app:

  1. After Workflow asks me to type the name of the publication, it sets it as a variable;
  2. Workflow gets the clipboard contents (which should be the author’s name, if you copied the name to your clipboard as I explained above), changes it to title case in the event that it isn’t properly capitalized, and sets it as a variable;
  3. Workflow gets the URL from the Safari web page, as well as the text I selected on the page;
  4. Workflow puts together the pieces and creates the text for the post; and
  5. Workflow opens Ulysses with the text as a new sheet.

In the first part of step 4, above, Workflow creates a header tag (#) followed by the name of the story as a clickable link. That’s because Ulysses will take the URL that follows a header tag in the first line and add it as a “linked_list_url” custom field on my WordPress blog. That’s what makes the title of my link posts clickable, and sends you to the other site when you click the title.

Here is a screenshot of the entire workflow:

Here is a link to download the complete workflow in the Workflow directory. I realize the final two steps could probably be redone using a “New Ulysses Sheet” action, but this is working so I’m not messing with it. If you are going to use the workflow yourself, you’ll need to change the path at the end of the second-to-last step to point to a group that already exists in your Ulysses setup (mine points to 40Tech > Linked).

My link post workflow on iOS is now almost as efficient as it is on Mac. More on my Mac workflow soon.


Quickly Extract an App Icon For Use Elsewhere

[Mac] Someone please tell me why I didn’t discovery this, oh, maybe six years ago? If you have a blog and write about software, you’re constantly looking looking for high quality icons to use. The method quoted at the bottom of this post from Macworld makes it easy.

Even easier, I’ve found, is a tip I stumbled upon a while back on another site. I’ve been unable to relocate the source, so regretfully can’t credit it, but I remember the tip: find an application in your Finder, and drag it onto the Preview icon in your Mac’s dock. Preview will then open, showing you all of the artwork used in that application, including the icon. You can then export a high quality version of it to use in your blog post.

Use Preview to extract app icons

In the Finder, select the program in question, and press Command-C (or if you love menus, select Edit -> Copy). You’ve now got a full copy of the application on your clipboard. . . Now launch Preview, and press Command-N (File -> New from Clipboard for you menu users). You may be surprised at the result: a full copy of the chosen application’s icons, in every available size.

Easily view an application’s icons | Macworld