For anyone who ends up on this page, I realized I should post the answer:
Using launchd instead of cron does indeed fix the authorization problem. Your user launchd jobs (which run only when you are logged in) correctly use the SSH agent information that was unlocked via your keychain as part of login (as part of standard OS X key management, no other software required).
To minimize my interactions with launchd, I created a single launchd job that calls a bash script. In this way I can simply edit the script without dealing with launchd.
Here's the launchd file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.mycron.hourly</string>
<key>ProgramArguments</key>
<array>
<string>/Users/john/bin/cron.hourly</string>
</array>
<key>Nice</key>
<integer>1</integer>
<key>StartInterval</key>
<integer>3600</integer> <!-- start every X seconds -->
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
I saved the file to ~/Library/LaunchAgents/com.mycron.hourly.plist
, and then loaded it with:
launchctl load ~/Library/LaunchAgents/com.mycron.hourly.plist
Once loaded, it will run right away and then again every 60 minutes.
If you follow the same procedure, you'll want to change the `ProgramArguments' string with the right path to your script.
You can use Automator.
Open Automator.
Choose Application from the templates.
Add a Ask for Text action. Tick 'Require an Answer'
Add a Create Banner Image from Text action.
Tick 'Use text input as image filename'.
Open the actions options options.
Tick 'Show this action when workflow runs'
Add a Lopp Action.
Control + click on the Loop Actions Title bar and select 'ignore input'
From the Loop Actions's drop down menus, select 'Ask to Continue' and Use the 'current results as input'
Save and run.
You will then be prompted to enter your text.
Then after you ok that you will be prompted to Choose you font.
Use the font size to determine the image size.
example 64 in Helvetica Bold gives me about 46x77
The same font but at size 300 gives me 177x360.
In each case I am only using 1 character.
If you want to do it from 'Selection'
Open Automator.
Choose Services from the templates.
Set the 'Sevices Receives input' to :rich text * and
in* any application
Add a Create Banner Image from Text action.
Tick 'Use text input as image filename'.
Set the Text Style drop down menu to : 'Use Style of Rich Text input'.
Optionally you can add a 'Reveal in Finder' Action
The Size is set by what ever the original fonts are.
To use the Service.
You can select some text, and control click to get a contextual menu. Listed is the services sub menu. Under this you should find your new service that will run on the selected text.
Best Answer
You could try using a scripting language that comes installed with OS X, such as PHP or Ruby, and write a command line script using that.
Here's an example using PHP:
Save this script to a file called something like addtext.php and then run it like this…
This example script should output an image called out-image.png with the text added, using the Impact True Type font that's installed with OS X, in the same directory as the PHP script.
You may want to read up on PHP's imagettftext function to play around with the text rendering.
Something similar could be done in Ruby, Python, etc. but I'm not sure of the "in-built" image manipulation / creation commands / libraries that come installed with OS X for those scripting languages.
Hope this is a good starting point.