shownotes_MCM20110911

Intro
  I read about some cool new additions in Automator in Lion and so decided to dive in a bit
Quick Automator recap
  One of the best analogies I've heard is the concept of a 'recipe'
  An Automator workflow is the recipe and the actions are ingredients.
  How you combine the different ingredients determines the outcome
  Most actions have inputs and results (outputs) and they types are important.
    These can be viewed in the info area when you select the item in the Library or from the 'Description' tab if you select the item in the workflow
Building a Workflow
  Launch Automator (Applications-->Automator)
  When you choose 'File --> New…' you'll get a panel with several types of documents
    Workflow - Workflows can be run from within Automator.
    Application - Applications are self-running workflows. Any files or folders dropped onto an Application will be used as input to the workflow.
    Service - Services are contextual workflows available throughout Mac OS X. They accept text or files from the current application or the Finder. Services appear in the Services menu.
    Print Plugin - Print plugins are workflows that are available in the print dialog. They accept PDF versions of the document being printed.
    Folder Action - Folder Actions are workflows that are attached to a folder in the Finder. Items added to the folder cause the workflow to run and are used as input to the workflow.
    iCal Alarm - iCal Alarms are workflows that are run when triggered by an event in iCal. They receive no input.
    Image Capture Plugin - Image Capture plugins are workflows that are available in Image Capture. They receive image files as input.
  Selecting the type will determine in Lion where and how it's saved by Version. Most of the time you'll probably create Applications or Services.
    One of the features new to Lion is a 'Duplicate to…' option which lets you take an existing Workflow and convert it to a different type.
New to Automator in Lion
  Already mentioned Duplicating Workflows
  Easy install of Actions or Services
    You can download 3rd party Actions (ingredients) to be used in Automator workflows
    Just double click and you will get a dialog
    Services are installed to '~/Library/Services' and Actions to '~/Library/Actions'
  Versions support
  New Actions
    Text To EPUB File
    Website PopUp
    Create Banner Image from Text
    Get Contents of Webpages (Webarchive type)
    Save Images from Web Content
    Encode to MPEG Audio
    Encode Media
    Create Annotated Media File (add metadata)
    Enhanced RTF Support, better support for the RTF format in text
    New Filtering Options for Text Input in Services, better use of Data Detectors. URLs, dates, or phone numbers, can now be both detected and filtered from selected text.
Text to ePub
  File New…, select the Service type
  At the top of the Workflow
    Service receives selected: 'Text' in 'Any application'
    Input is: 'Entire selection' (default) and 'Output replaces selected text' is unchecked.
  From the Actions List:
    If it's not visible Click the 'Show Library' button in the toolbar
    In the 'Text' library add the 'New Text File' action
      File format: 'Plain text'
      Save as: 'temporary.txt'
      Where: Desktop (I create a 'Temporary Items' folder in my Documents folder and set it to that) Check the 'Replace existing files' option
      Encoding: Default is fine (mine is Western (Mac OS Roman) )
    In the 'Text' section add the 'Text to EPUB File' action
      You can set a default Author, Title, and Save As (filename)
      Set the save location under 'Where:'. I created a My EPUBs folder in my Documents folder
      You can also set a default cover image. Apple automatically sets a generic brown cover in iBooks
      Chances are though you'll want to set the Title, etc at runtime
        Enable this by going under the 'Options' section at the bottom of the 'Text to EPUB File' action block
        Check the 'Show this action when the workflow runs' option.
    Save the Service.
      Name will be what is displayed when you see it in the 'Services' menu.
      I named mine 'Text to EPUB'
  To use it, not you can go to any app, make a selection, control+click (right-click), choose Services-->Text to EPUB.
    Once selected the dialog should pop up
    Set the Title, Author, filename, etc.
    Then the ePUB should generate and save to the location you specified.
    Now you can drag that .epub file to iTunes and it will be added to iBooks and you can sync.
  Some other things you can do:
    You could adjust the workflow to use RichText selections
    You can start with a set of selected TXT or RTF files instead of a selection (or a folder of files)
      Each TXT file will become a chapter and I think gets loaded in order by filename.
    Create EPUB Book with Contents of Clipboard
    Add media. Images, audio, or video (m4v or m4a) in the Text to EPUB action settings
      Added as 1 item per chapter at the beginning or end
      again these go in order by filename I believe
      Extra elements get added in a separate chapter
Save Emails from URL
  File New…, select the Service type
  At the top of the Workflow
    Service receives selected: 'URLs' in 'Any application'
    Input is: 'Only URLs'
  From the 'Internet' actions add the 'Get text from webpage' action
    Set the 'Get' value to 'Plain Text'
  From the 'Text' actions add the 'Extract Data from Text' action (new in Lion)
    Set the 'Extract' datatype to 'Email addresses'
  From the 'Text' actions add the 'New Text File' action
    File Format: Plain Text
    Save as: 'Emails.txt'. I also set the 'Replace existing file' option
    Where: Desktop
    Encoding: Western (Mac OS Roman) (default)
  Save the Service
    I named mine 'Save Emails from Web Page'
  To use
    Select any URL that goes to a page that contains email addresses on it. A club directory for example.
    Control+Click (Right+Click) on the URL
    Under Services-->Save Emails from Web Page
    Should generate a TXT file on the desktop with only the email addresses that appear on the web page. One email address per line.
Make stand alone web app widget
  File New…, select the Application type
  From the 'Internet' actions add the 'Get Specified URLs' action
    Add the Url for your widget. I used 'arstechnica.com'
    Tip: you can drag a URL into the Automator Workflow section and it will automatically add this action with the URL set.
  From the 'Internet' actions add the 'Website Popup' action
    Site Size: iPhone (Large, Medium, iPad, iPhone, and Custom option)
    User Agent: iPhone (Safari, iPhone, iPad)
    Position: Centered
    Output: Input URL
  Save the app. Name it whatever you'd like.
  Double click and you'll get an iPhone sized app window with the site loaded
    If you choose a site that has an iOS formatted version it will fit perfectly in the window
      Techinca, Macworld, Apple Insider, Twitter, Google
      Right+Click or use the Command + Left Arrow to go back
      You'll notice the "Automator" cog running in the menubar until you click OK or Cancel at the bottom of the app to exit the automator action.
Automator Resources
  Mac OS X Automation
  Automated Workflows, Ben Waldie - Books, Blog, tutorials
  Automator World