blob: 417ecb2cd7e7419e363701626e76b953c5fc36d2 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Scripts contributed by the OpenOffice.org community</title>
<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
</head>
<body>
<a name="top"></a>
<h1>Utility Scripts contributed by the OpenOffice.org community</h1>
This page contains downloads of utility scripts that have been
contributed by the OpenOffice.org community. These scripts are intended
to demonstrate how to write Java (or the dynamically-typed Beanshell)
scripts for OpenOffice, with full access to both the OpenOffice.org API
and the Java APIs. The scripts are for use with the Early Developer
Release 0.3 of the Office Scripting Framework and all subsequent
releases.
<h2>Pre-requisites</h2>
<ul>
<li>OpenOffice.org 1.1beta2 or above installed with the Scripting
Framework Early Developer release 0.3. If you have not already done this
then see the <a href="release-0.3/install-guide.html">installation guide</a>.</li>
</ul>
<h2>General Installation Procedure</h2>
<ul>
<li>The scripts are made available for download as Zip files. To
install the scripts, simply unzip them in either the
&lt;OfficeInstallation&gt;/user or &lt;OfficeInstallation&gt;/share
directories.</li>
<li>The scripts are then available to be bound to the key or menu of
your choice using the Assign dialogs.<br>
</li>
<li>If the scripts require any additional pre-requisites,
installation steps or subsequent modification this will be documented
below.</li>
<li>If you wish to deploy these scripts into a document you will need
to create a new parcel recipe and copy the sources from the zip files
below. See the <a
href="http://framework.openoffice.org/scripting/scriptingf1/netbeans-devguide.html">Developer
Guide for Netbeans</a> for more information.<br>
</li>
</ul>
<h2>Available Scripts</h2>
<ul>
<li><a href="#Word_Count">Word Count&nbsp;</a> <br>
</li>
<li><a href="#Capitalisation">Capitalisation</a></li>
<li><a href="#Post_to_Newsgroups_">Post To Newsgroups</a></li>
<li><a href="#Issuezilla_Query_Writer">Scripting Framework Issuezilla
Query -&gt; Writer</a></li>
<li><a href="#Issuezilla_Query_Calc">Scripting Framework Issuezilla
Query -&gt; Calc</a></li>
<li><a href="#Insert_Copyright_Symbol">Insert Copyright Symbol</a></li>
<li><a href="#Insert_Trademark_Symbol">Insert Trademark Symbol</a></li>
<li><a href="#Insert_Hidden_Text">Insert Hidden Text</a></li>
<li><a href="#Export_To_HTML">Export To HTML</a><br>
</li>
<li><a href="#Combined_Utilities">Combined Utilities</a><br>
</li>
</ul>
<h2><a name="Word_Count"></a>Word Count</h2>
<b>Author:</b> <a href="mailto:dfoster@openoffice.org">Duncan Foster</a><br>
<b>Aim:</b> Provides a simple word count of the selected text.<br>
<span style="font-weight: bold;">Language:</span> BeanShell<br>
<b>Pre-requisites:</b> none<br>
<b>Download:</b>&nbsp; <a
href="http://framework.openoffice.org/scripting/UtilityScripts/WordCount.zip">WordCount.zip</a>
(2Kb)<br>
<b>Installation:</b> no additional steps needed<br>
<b>Description:</b> Uses the OpenOffice API to get the selected text,
and then uses Java's StringTokenizer (using the default delimiters) to
obtain a word count. Displays the result in a simple Swing dialog.<br>
<b>Issues:</b> none<br>
<br>
<a href="#top">Top</a><br>
<h2><a name="Capitalisation"></a>Capitalisation</h2>
<b>Author:</b> <a href="mailto:dfoster@openoffice.org">Duncan Foster</a><br>
<b>Aim:</b> Converts the selected text from upper case to first letter
upper case, rest lower case, to lower case.<br>
<span style="font-weight: bold;">Language:</span> BeanShell<br>
<b>Pre-requisites:</b> none<br>
<b>Download:</b>&nbsp; <a
href="http://framework.openoffice.org/scripting/UtilityScripts/Capitalise.zip">Capitalise.zip</a>
(2Kb)<br>
<b>Installation:</b> no additional steps needed<br>
<b>Description:</b> Uses the OpenOffice API to get the selected text (or
makes a selection of the current word if no text selected), and then
uses Java to change the case. Rotates from "THIS" -&gt; "This" -&gt;
"this" -&gt; "THIS". The script attempts to break up selected text into
sentences using the Java StringTokenizer. The script also attempts to
maintain the selection.<br>
<b>Issues:</b> The script fails to maintain the selection if two
separate areas of text are selected. For example, if the first and last
words of the previous sentence were selected, only one (undefined) would
remain selected after the script has been run.<br>
<a href="#top">Top</a><br>
<h2><a name="Post_to_Newsgroups_"></a>Post to Newsgroups </h2>
<b>Author:</b> <a href="mailto:neilm@openoffice.org">Neil Montgomery</a> <br>
<b>Aim:</b> Facilitates the posting of an OpenOffice document to a
newsgroup.<br>
<span style="font-weight: bold;">Language:</span> Java<br>
<b>Pre-requisites:</b> none<br>
<b>Download:</b> <a
href="http://framework.openoffice.org/scripting/UtilityScripts/Newsgroup.zip">Newsgroup.zip</a>
(540Kb)<br>
<b>Installation:</b> no additional steps needed<br>
<b>Description:</b>&nbsp; The script will detect if a local
installation of either Netscape or Mozilla has been used to subscribe to
any newsgroups. These newsgroups will be listed for the user in a combo
box. If no newsgroups are detected the user must supply the name of the
newgroup and server. The user may also supply the reply-to address,
subject and message body (in the comment text field). The user can also
specify the format in which to send the attached document (the currently
active document). If the document hasn't already been saved with a
title, then the default name for the attachment(s) will be
"Attachment.sxw" and/or "Attachment.html".<br>
<b>Issues:</b> none.<br>
<a href="#top">Top</a><br>
<h2><a name="Issuezilla_Query_Writer"></a>Scripting Framework
Issuezilla Query -&gt; Writer</h2>
<b>Author:</b> <a href="mailto:jmrice@openoffice.org">John Rice</a><br>
<b>Aim:</b> Outputs the results of an Issuezilla query into the open
Writer document.<br>
<span style="font-weight: bold;">Language:</span> BeanShell<br>
<b>Pre-requisites:</b> none<br>
<b>Download:</b> <a
href="http://framework.openoffice.org/scripting/UtilityScripts/SFBugsQueryIssuezilla.zip">SFBugsQueryIssuezilla.zip</a>
(2Kb)<br>
<b>Installation:</b> The script sets a HTTP proxy on lines 43,44. The
user will need to modify or remove these according to their local
settings. The script also contains a certain amount of debug output
which the user may want to remove.<br>
<b>Description:</b>&nbsp; The script uses Java to open a HTTP
connection to the OpenOffice.org website, passing a URL for an
Issuezilla query for Scripting Framework bugs. The script then writes
summary information for each bug into the open Writer document.<br>
<b>Issues:</b> none.<br>
<a href="#top">Top</a><br>
<h2><a name="Issuezilla_Query_Calc"></a>Scripting Framework Issuezilla
Query -&gt; Calc</h2>
<b>Author:</b> <a href="mailto:jmrice@openoffice.org">John Rice</a><br>
<b>Aim:</b> Outputs the results of an Issuezilla query into the open
Calc document.<br>
<span style="font-weight: bold;">Language:</span> BeanShell<br>
<b>Pre-requisites:</b> none<br>
<b>Download:</b> <a
href="http://framework.openoffice.org/scripting/UtilityScripts/SFBugsQueryIssuezillaCalc.zip">SFBugsQueryIssuezillaCalc.zip</a>
(2Kb)<br>
<b>Installation:</b> The script sets a HTTP proxy on lines 25,26. The
user will need to modify or remove these according to their local
settings. <br>
<b>Description:</b>&nbsp; The script uses Java to open a HTTP
connection to the OpenOffice.org website, passing a URL for an
Issuezilla query for Scripting Framework bugs. The script then writes
summary information for each bug into the open Calc document.<br>
<b>Issues:</b> none.<br>
<a href="#top">Top</a><br>
<h2><a name="Insert_Copyright_Symbol"></a>Insert Copyright Symbol</h2>
<span style="font-weight: bold;"> Author:</span> <a
href="mailto:dfoster@openoffice.org">Duncan Foster</a><br>
<span style="font-weight: bold;"> Aim:</span> Inserts a copyright symbol
(or replaces the current selection with a copyright symbol).<br>
<span style="font-weight: bold;"> Language:</span> Beanshell<br>
<span style="font-weight: bold;"> Pre-requisites:</span> none<br>
<span style="font-weight: bold;"> Download:</span> <a
href="http://framework.openoffice.org/scripting/UtilityScripts/InsertC.zip">InsertC.zip</a>
(4Kb)<br>
<span style="font-weight: bold;"> Installation:</span> No additional
steps needed.<br>
<span style="font-weight: bold;"> Description:</span> Inserts a copyright
symbol (or replaces the current selection with a copyright symbol).<br>
<span style="font-weight: bold;"> Issues:</span> None.<br>
<a href="#top">Top</a><br>
<h2><a name="Insert_Trademark_Symbol"></a>Insert Trademark Symbol</h2>
<span style="font-weight: bold;"> Author:</span> <a
href="mailto:dfoster@openoffice.org">Duncan Foster</a><br>
<span style="font-weight: bold;"> Aim:</span> Inserts a trademark symbol
(or replaces the current selection with a trademark symbol).<br>
<span style="font-weight: bold;"> Language:</span> Beanshell<br>
<span style="font-weight: bold;"> Pre-requisites:</span> none<br>
<span style="font-weight: bold;"> Download:</span> <a
href="http://framework.openoffice.org/scripting/UtilityScripts/InsertTM.zip">InsertTM.zip</a>
(4Kb)<br>
<span style="font-weight: bold;"> Installation:</span> No additional
steps needed.<br>
<span style="font-weight: bold;"> Description:</span> Inserts a trademark
symbol (or replaces the current selection with a trademark symbol).<br>
<span style="font-weight: bold;"> Issues:</span> None.<br>
<a href="#top">Top</a><br>
<h2><a name="Insert_Hidden_Text"></a>Insert Hidden Text<br>
</h2>
<span style="font-weight: bold;"> Author:</span> <a
href="mailto:dfoster@openoffice.org">Duncan Foster</a><br>
<span style="font-weight: bold;"> Aim:</span> Inserts a hidden text field<br>
<span style="font-weight: bold;"> Language:</span> Beanshell<br>
<span style="font-weight: bold;"> Pre-requisites:</span> none<br>
<span style="font-weight: bold;"> Download:</span> <a
href="http://framework.openoffice.org/scripting/UtilityScripts/InsertHiddenText.zip">InsertHiddenText.zip</a>
(4Kb)<br>
<span style="font-weight: bold;"> Installation:</span> No additional
steps needed.<br>
<span style="font-weight: bold;"> Description:</span> Replaces the
currently selected text with a hidden text field with the same contents.<br>
<span style="font-weight: bold;"> Issues:</span> None.<br>
<a href="#top">Top</a><br>
<h2><a name="Export_To_HTML"></a>Export To HTML<br>
</h2>
<span style="font-weight: bold;"> Author:</span> <a
href="mailto:jmrice@openoffice.org">John Rice</a><br>
<span style="font-weight: bold;"> Aim:</span> Saves a copy of the
document in HTML format.<br>
<span style="font-weight: bold;"> Language:</span> Beanshell<br>
<span style="font-weight: bold;"> Pre-requisites: </span>none<br>
<span style="font-weight: bold;"> Download:</span> <a
href="http://framework.openoffice.org/scripting/UtilityScripts/ExportToHTML.zip">ExportToHTML.zip</a>
(4Kb)<br>
<span style="font-weight: bold;"> Installation:</span> No additional
steps needed.<br>
<span style="font-weight: bold;"> Description:</span> Saves a copy of the
document in the user's home directory in HTML format. Does not change
the type of the current document (as happens with "Save As").<br>
<span style="font-weight: bold;"> Issues:</span> None.<br>
<a href="#top">Top</a><br>
<h2><a name="Combined_Utilities"></a>Combined Utilities</h2>
<span style="font-weight: bold;">Aim:</span> A zip file containing all
of the scripts above.<br>
<span style="font-weight: bold;">Download:</span> <a
href="http://framework.openoffice.org/scripting/UtilityScripts/all.zip">all.zip</a>
(550Kb)<br>
<br>
<a href="#top">Top</a><br>
<br>
<hr> Last Modified:
Fri Jun 20 15:28:18 BST 2003
</body>
</html>