PDA

View Full Version : Erica Utilities v0.55



wraggster
January 14th, 2008, 22:29
via pdroms (http://www.pdroms.de)

Erica Sadun has updated his/her(?) collection of utilities for the iPhone.

Following utilities are with this pack:

Individual Utilities
alert
Alert is pretty much your one-utility source for all command-line alerts. It lets you customize text, buttons, and images and offers special features like timed alerts (no human intervention necessary) and progress indicators. Run at the command line for the full documentation and feature set. An early version of alert is documented here

autosnap
Like snapngo, autosnap grabs the contents of the screen and serves it via bonjour. Unlike snapngo, autosnap automatically names and serves files and can be triggered from your Mac using FileCatcher. Tap on the "File Throw Auto Snap" server and your iPhone snaps a picture and shares it to your Mac. The file appears on your desktop.

catch and throw
Command-line bonjour file sharing. Throw a file to another iPhone or iPod touch, where you catch it. Each takes one argument. Throw requires the file to send. Catch uses the path to save to, e.g. throw foo.amr and catch newsound.amr.

doAlert
You supply a string and doAlert opens an alert window with that string.

doPrompt
doPrompt opens an alert window with a string you supply and prompts the user to enter a text reply. The utility prints the result to stdout. (For Greg Hartstein by request)

doQuery
You supply a string and doQuery opens an alert window with that string asking "Yes" or "No". After running, you can get the result in $? (For Benanzo by request)

doSafari
Takes one argument, the URL to open in Mobile Safari.

ip-print
Scrapes the current ip-address used by your iPhone or iPod touch.

playaudio
Play an audio or video file from the command line on either iPod touch or iPhone.

phoneCheck
When run, determines whether the host is or is not an iPhone. If so, the environmental variable $? gets set to 1. If not, to 0. This lets you run an if statement in your shell script immediately after.

phonetime
Phonetime converts iPhone times into understandable dates, and will return the current time and the epoch time on request.

plutil
Property List utility modeled on OS X's plutil.

restart
Restart issues a launchctl command that restarts SpringBoard. Use this utility whenever you add or remove Applications to update the display and SpringBoard to recognize new items.

sendFileByMail
For iPhone or iPod touch with mail configured. SendFileByMail takes, at this time, one argument, a file to send by mail. It opens the mail program, creates a new message with that attachment.

showPic
Sometimes you just want to peek at a picture without having to bring it back to your development platform. showPic lets you do exactly that, with some crude resizing ability (double-tap is not supported yet but pinching is). Just give it one argument, the name of the picture to display.

snap
Snap grabs the contents of the screen and saves it to a snapshot in png format. Snap takes one argument, the name of the file to snap to.

snap2album
Thoroughly updated with better fidelity, this utility snaps a picture of your screen and adds it to your Photos library on the iPhone and (possibly) the iPod touch--even though that doesn't have a camera. It's unclear whether the iPod touch will sync to its album.

snapngo
Snapngo grabs the contents of the screen and then serves it via bonjour, using the file name you specify, e.g. snapngo fileshot will send fileshot.png to whatever device is listening for it. This is meant to be used with FileCatcher, so you can snap on your iPod touch or iPhone and the file instantly appears on your Mac Desktop.

sound
Sound takes one argument (y or n) and enables or disables system sound.

timedAlert
Takes two arguments, a number (in seconds) and a string. This displays the string as an alert for that number of seconds and then auto dismisses. (by request for Benanzo)

toggle
Very basic command-line app hiding toggle. It adds or removes application identifiers from the Special category.

toJPEG
Convert a file to JPEG. Meant for use with PNG. Be aware however, that the iPhone will read a png file that you just rename to jpg. This is meant more for files that must be in JPEG when sent back to your personal computer.

xwidg
Xwidg supports transferring your non-standard Applications into /var/root/Applications. It links to them via the undocumented /Widgets folder. Xwidg creates or deletes the folder and restarts SpringBoard. This lets you easily hide all third party apps (good for Genius Bar visits) or link them back. Xwidg takes no arguments. It looks for /Widgets and remove the symbolic link if present or adds it when absent.

http://ericasadun.com/ftp/EricaUtilities/