Logging in to Drupal from AppleScript

I found that it’s relatively easy to login to Drupal from AppleScript by using cURL. I created a sample script to show how; grab DrupalFromAppleScript, load it into Script Editor, enter values for your username, password and Drupal URL, and you should be able to get it to login to your site.

This will only get you logged in of course — you’ll have to amplify the script to make it do anything useful (like uploading content, grabbing information, etc.)

Comments

Peter Rukavina's picture
The blogAPI is great for posting to blogs, and with patches it can be used to post pages and stories. This script is useful, however, to post images (with some add-ons, of course) and for other things not available via an API.
Boris Mann's picture
Actually, if you want remote access to Drupal for posting, look at the blogAPI. If you built it for Drupal to work with (e.g.) the metaWeblogAPI, it would also work with any other blog tool that supports the metaWeblogAPI. Googling metaweblog API applescript shows some useful hits: http://www.google.ca/search?q=metaweblog+api+applescript

Post new comment

You can comment anonymously if you must, but I would prefer it if you used your real name.
The content of this field is kept private and will not be shown publicly. If you have a Gravatar account associated with the e-mail address you provide, it will be used to display your avatar.
Optional. If you enter the address of a website here, your name will be publicly linked to the site.
  • Adds typographic refinements.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.