Skip to content

JenniferMack/Ulysses-post-to-WP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ulysses post to WP

Easily automate posting from Ulysses for Mac to a WordPress blog. Even with the newest version of Ulysses (currently in beta as of mid-May 2016) adding a built-in WordPress uploader, there’s a few things it does I don’t like.

  • The Ulysses keywords are used as post tags. I use the keywords to organize sheets, and having content-related keywords clutters things up in the sheet column. I’d rather have them in the post body.
  • There’s no option to specify links to open in a new window.
  • No built in support for the MORE option. Adding html directly is an option, but I’d rather just type ::MORE::.

Usage

Download the .zip file, then unzip it. There will be two files (Post-to-Wordpress.zip and ulysses-wp-password.json) that you need. The rest are optional. Place the Post-to-Wordpress.app in a convenient location. The Applications folder in your home folder is a good location. Then right click on it and select Open. Click the Open button in the security warning box. Then click cancel when the posting confirmation box. This happens because the app wasn’t created on your computer. If you don’t want to bypass the security warning this way, open the app file in Automator. Then make a change like adding a space to a blank line and re-save it. Now it should be recognized as something made on your computer and be trusted to run. In the ulysses-wp-password.json file, change the placeholder information to what’s needed to log into your blog. Then save your changes.

  1. yourWPblogURL.com: the base URL of your WordPress blog.
  2. yourWPusername: the username you use for logging into your blog.
  3. yourWPpassword: the password you use for logging into your blog.
  4. use_ssl: If you do not have SSL enabled on your blog (not recommended) change the true to false.

Now copy the ulysses-wp-password.json file to your home folder and rename it to .ulysses-wp-password.json. That’s where the app looks for it. If it’s not there, you’ll get an error message. The best way to do this is from the terminal with this command. cp ulysses-wp-password.json ~/.ulysses-wp-password.json If you’re using the Finder, hold the option key down while dragging to your home folder, then add the leading dot once it’s copied.

Usage

From inside Ulysses open the export sheet, and choose HTML snippet, then the app icon -> other. Navigate to where you saved the Post-to-WordPress app, and select it.

Ulysses export sheet.

If everything worked, you’ll get a notification showing the post number. Otherwise you’ll see the error message.

Ulysses formatting

For the original blog post that started this project, see part one and part two. Things you need to do in Ulysses:

  • The first line needs to be a first level Header (#), and it will become the title of the blog post.
  • The second line will be a list of tags, the best way to do this is to used the “marked” formatting tag (::). This will visually distinguish them.
  • The more tag is created by putting ::MORE:: on a line by itself. This is optional, but useful.

Here’s an example:

Ulysses recommended formatting,

The post will be uploaded as a draft post, and all other options will be your defaults. The title and tags are the most important, and are easy to configure this way.

Using categories instead of tags

Your taxonomies are your business. The default is to use tags. If you want to use categories, then look at lines 41-45. Categories can be activated by uncommenting line 45, and commenting line 42. To revert using tags, do the opposite.

For WordPress.com Users

Blogs hosted on WordPress.com have been upgraded to use SSL security recently. So the default is now to use SSL. If your blog has a custom domain name, you still need to use the WordPress.com blog URL (myawesomeblog.wordpress.com, for example) in the yourWPblogURL setting. Using the custom domain might work, but the WordPress.com URL always works.

Files

wp-post.rb: This is a stand-alone script for use from the command line. It takes standard input and posts to WordPress. If you have HTML on the clipboard, the easiest command is pbpaste | wp-post.rb. It’s the same code that’s contained in the Automator app. I’ve included it so that you can play with the code and not have to rip apart the app to see what makes it tick. Post-to-WordPress.zip: This is a zip file of the Automator app. It has to be zipped to survive the trip to GitHub and back. Unzipping this will create the Post-to-WordPress.app. There will be a security warning the first time the app is run. This is because it wasn’t created on your computer. To open it, right-click and chose open, and then click the open button. Now the app can run normally. Place it in a convenient place on your Mac (~/Applications is a good place), and then select it as the app Ulysses will export to. ulysses-wp-password.json: The settings file where your WordPress login information is stored.

Problems & Bugs

Please open an issue if you find a problem or bug. If you want to contribute, pull requests are always welcome.

About

Easily automate posting from Ulysses for Mac to a WordPress blog.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages