anthracite export object
The Export Object tool gives you three ways to get the results of your processor chains out of Anthracite and into other programs or onto the web: Files, MySQL Databases and AppleScript.
Of course, these can be used in many ways, for example, the Files Export allows you to output CSV files for use with databases and other software or HTML/RDF files for use on websites and the AppleScript Export can be used as shown below to send e-mail with your results.
1. Files Export
![]()
The first step in configuring the Export Tool is to select a directory into which to put your output files. Click the "Set" button to choose the directory on your local hard drive or mounted volume where you wish for your output to be saved, or just type in the path.
Next, the "Name" pop-up menu lets you select the method for naming your output files: using the name you've given the object, the name of the process chain that produced the output, or a different fixed name that you enter.
You can enter a modifier for your file names and specify if it should be a prefix or suffix to the name.
The "Extension" pop up menu lets you specify the extension for the file, or choose "none."
Next, Select the format for the returns in your output file (Macintosh CR, UNIX LF, Windows CRLF, or HTML "BRLF").
Use the "Encoding" popup to choose the data encoding for your file (ASCII, Unicode, Windows).
Finally, the checkboxes at the bottom give you control over the content in the file and if files should be overwritten or appended.
The "Combined Output" option collects information from all of your sources into one output file, if not checked, there will be one output file per source.
"Prepend Info" will include information about the sources in the header of the file.
"Overwrite Existing Files" will overwrite any existing file with new data, destroying the old contents of the file. Note that if you do not allow overwriting, and don't use the next option, you will get an error when attempting to export files preventing you from accidentally overwriting data.
"Append File" will create log-style output where data is continually added to the end of an existing file.
2. MySQL Export
If you have the MySQL system (both client and server) installed on your system and configured in the standard way, this tool enables you to export your results to the database.
Installing and configuring a MySQL System is beyond the scope of this documentation, however there are many excellent resources that can help you, and several ways to make it extremely easy.
Host Configuration Tab
![]()
Five fields for you to configure, however, you may only need to use one of them.
User
Password
Host
Port
Socket
Query Configuration Tab
![]()
Database
Table
Include URL into field
Include Proc Path into field
Single Entry, Delimiter
Mutliple Entry, mismatch
3. AppleScript Export
![]()
The AppleScript Export Object subtype lets you use your Anthracite Results as variables in an AppleScript, and thus in other applications.
(click for larger image and script detail)
Results are accessed in the script by the name of the object that produced them.
In the example at right a source page is loaded, then all the links on the page are extracted, and finally the "extractedLinks" object passes its output to the AppleScript Export Object. Note in the detail of the script shown above that the first line copies these results into an AppleScript variable named "resultText" which is then passed into Apple Mail.app.
![]()
A Known Software Limitation is that all results are currently coerced into text/string format before being passed to AppleScript.
[ Top of Page ] [ Anthracite Tools ] [ Anthracite Documentation ]
Last Update: 7/22/2004
Last Update: 2/06/2004
Last Update: 3/27/2003
Copyright © 2004 All Rights Reserved, Metafy LLC. MySQL is a trademark of MySQL AB, AppleScript is a trademark of Apple Computer. Other marks are the property of their respective owners.