Home

Appendix

Application Icon   Scripts

Below is a list of the DEVONthink supplied scripts, segregated by the menu items in the Script menu:

Comments:

  • Icon
    Append Selected Text: Adds the selected text to the comments of the current document.
  • Icon
    Assemble: Collects the comments of the selected documents and creates a new document listing them.
  • Icon
    Convert to Tags: Converts the tag contained in the comments field to real tags if the comments field of the selected document contains tags separated by commas.
  • Icon
    Speak: Speaks the comments of the selected documents.

Data:

  • Icon
    Move Duplicates to Trash: Moves all duplicates of the selected document to the trash.
  • Icon
    Find & Remove Similar Contents: Finds and removes similar documents.
  • Icon
    Group With Duplicates: Creates a group with duplicates of the selected documents.
  • Icon
    Group With Replicants: Creates a group with replicants of the selected documents.
  • Icon
    Verify & Optimize Databases: Runs a verification on all open databases and optimizes them if they verify successfully. Errors are alerted and logged to Window > Log.
  • Icon
    Check file integrity of databases: Runs a checksum comparison on all items in open databases to check for any discrepancies in the current and stored values. Errors are alerted and logged to Window > Log.

Download:

  • Icon
    Linked Images of Page: Adds linked images of a displayed web page to the database.
  • Icon
    Images of Page: Adds the images of a displayed web page to the database.
  • Icon
    Links of Page: Adds links contained on a displayed web page to the database.
  • Icon
    Download as…: Converts bookmarks to one of these formats: Formatted Notes, HTML Pages, PDF Documents (One Page or Paginated), and Web Archives

Edit:

  • Icon
    Count Characters: Counts the characters in the current selection.
  • Icon
    Count Words: Counts the words in the current selection.
  • Icon
    Replace text in documents: Enter text to find and replace in plain and rich text documents.

Execute:

  • Icon
    AppleScript: Executes an AppleScript script.
  • Icon
    Perl: Executes a Perl script.
  • Icon
    Shell: Executes a shell script.

Export:

  • Icon
    Listing: Saves a UTF-8 text file containing a text listing of the names of all contents/groups of the current database.
  • Icon
    Daily Backup Archive: Creates a compressed backup (.Zip) of the current database in ~/Backup. All backups are include a datestamp in the filename for easy tracking and identification. These can be useful for copying to external media or uploading to a cloud service as a secondary backup strategy.

Feeds:

  • Icon
    Nature -- Hubble News: Downloads the latest Hubble news.
  • Icon
    iTMS -- Added Albums: Downloads covers of albums recently added to the iTunes Music Store.

Format:

  • Icon
    Body Normal: Formats selected text as "Body Normal".
  • Icon
    Body Small: Formats selected text as "Body Small".
  • Icon
    Header Capitalized: Formats selected text as "Header Capitalized".
  • Icon
    Header Main: Formats selected text as "Header Main".
  • Icon
    Header Secondary: Formats selected text as "Header Secondary".
  • Icon
    Source: Formats selected text as "Source".
  • Icon
    Reset Spacing: Resets the line and paragraph spacing of selected rich text.

Images:

  • Icon
    Copy Info to Comment: Copies basic image info to the comment field.
  • Icon
    Flip Horizontal / Vertical: Flips the image horizontally/vertically.
  • Icon
    Rotate Left / Right: Rotates the image left/right.
  • Icon
    Landscape to Portrait: Rotates only landscape images to portrait.
  • Icon
    Portrait to Landscape: Rotates only portrait images to landscape.
  • Icon
    Scale to 1024 pixels: Scales the image to 1,024 pixels.
  • Icon
    Scale to 200%: Scales the image to 200 percent.
  • Icon
    Scale to 50%: Scales the image to 50 percent.

Import:

  • Icon
    Del.icio.us: Imports your del.icio.us bookmarks. The descriptions are used to name the imported bookmarks; the notes and the tags are added to the comments. If the keychain does not contain a key for del.icio.us, dialogs pop up allowing you to enter the user name and password.
  • Icon
    Man Page: Imports a UNIX manual page as a PDF document.
  • Icon
    Perldoc: Imports the documentation of Perl pages, modules, functions, or programs.

Reminders:

  • Icon
    Add as Event to Calendar: Adds a new event to Calendar linking back to the selected item in DEVONthink.
  • Icon
    Add as To Do to OmniFocus: Adds the selected item as a to-do item to OmniFocus.
  • Icon
    Add as To Do to Reminders: Adds the selected item as a to-do item to Reminders.
  • Icon
    Add as To Do to The Hit List: Adds the selected item as a to-do item to The Hit List.
  • Icon
    Add as To Do to Things: Adds the selected item as a to-do item to Things.

Note: These are scripts for integrating with external applications. For scripting internal reminder scripts, see the Reminder Scripts section of the chapter about automation.

Rename:

  • Icon
    Append Selected Text: Appends the selected text to the title of the currently selected item.
  • Icon
    Replace Text: Replaces a text passage in the titles of selected documents.
  • Icon
    To Webpage Title: Sets the titles of the selected documents to the names of the web pages pointed to by their URL fields.
  • Icon
    To Subject: Sets the titles of the selected documents to the subject lines of the email messages if the selected documents are email messages.

Sheets:

  • Icon
    Add Multiple Records: Adds up to 999 empty records to a sheet.
  • Icon
    Column Sum&Mean Value: Calculates the sum and average of a table column.
  • Icon
    Row Sum&Mean Value: Calculates the sum and average of a table row.
  • Icon
    Check sums in last column: Checks the sums in the last column on validity.

Tabs:

  • Icon
    Open Bing: Open a new tab for the Bing search engine.
  • Icon
    Open Google: Open a new tab for the Google search engine.
  • Icon
    Open Location: Open a new tab for a location you specify.

Note: The last script does no URL validation, though DEVONthink's dictionary makes it possible to script this too.

Thumbnails:

  • Icon
    Flip Horizontal / Vertical: Flips the thumbnails of selected documents horizontally/vertically.
  • Icon
    Rotate Left / Right: Rotates the thumbnails of selected documents left/right.
  • Icon
    Landscape to Portrait: Rotates only landscape thumbnails to portrait.
  • Icon
    Portrait to Landscape: Rotates only portrait thumbnails to landscape.

Note: While these scripts work with all image formats including PDF, they should not be used for PDF documents. They will only work on the first page of the PDF and destroy all embedded metadata.

Caching: All scripts in the Scripts menu are cached, meaning their properties are persistent until you quit and relaunch the application or DEVONthink automatically updates the menu, e.g., after adding or removing scripts.