OO.o Writer integration
From refbase
Contents |
Introduction
OpenOffice.org Writer is a free and open source word processor. There are plans to improve citation management in OO.o and in the OpenDocument file format and there are third-party bibliographic applications that work with OpenOffice. Many of these programs could use refbase as a data source. However, OpenOffice.org currently ships with the ability to use a local or remote SQL database of bibliographic information.
Exporting refbase data into a local database
refbase-0.9.0 is able to export to a format which can be used by OO.o 2 (you need following programs of the OpenOffice suite, installed on your computer: OO.base; OO.calc; OO.writer).
- In refbase:
- Select one or more records
- Export as "ODF XML" as a "file"
- Save the resulting ODS file to disk
- In OO.o Base:
- Select "Connect to an existing database," "Spreadsheet," and click "Next"
- "Browse" and select the ODS file you saved from the refbase export and click "Finish"
- You can save the connection file to any location.
Use the refbase MySQL database as a data source
#Exporting refbase data into a local database is quick and easy to setup. However, it might be advantageous to use your refbase database as a global database. Your bibliographic data would be consistent between OO.o Writer and refbase, so you wouldn't have to export new ODS files as you added or modified records.
Please note that MySQL must be setup to accept a network connection from the IP address or addresses of the machines you use OO.o on, and requires a user/pass with select/add/delete/update rights on the 'refs' table from these addresses. This requires a config change from many default deployments of MySQL.
These instructions refer to OO.o 2. For instructions on OO.o 1, see their FAQ.
- If needed, install the MySQL JDBC connector
- Download and install the connector from MySQL's website
- Under OpenOffice.org Tools->Options->Java, make sure you have java enabled and a JRE selected
- Also under the Java options, edit the "Classpath" and "Add archive," point to the MySQL JDBC JAR file
- Launch oobase2
- Under "Connect to an existing database" choose "MySQL database" and select "Next"
- Select "Connect using "JDBC" and select "Next"
- Enter the name of your databse and the server and select "Next"
- Enter the username (you may wish to create a MySQL user which has read-only access to the refbase database and/or allow the user only from trusted machines)
- If the user has a password, select the 'Password required' box
- Select 'Finish' and save it as an OO.o base connection
Limitations and work-arounds
- If you #Use the refbase MySQL database as a data source, you will have to select the table (literature.refs) & map the column names (note to devs: depending on other direct usage of the database, we may wish to change some column names). In particular:
- Many versions of OO.o require a unique identifier for every record. 'serial' satisfies this
- Some versions of OO.o are strongly typed & type names differ from those in refbase. Setting the type column to something other than literature.refs:TYPE may be needed.
Using the database from within OO.o Writer
These instructions refer to OO.o 2.
- Launch oowriter2
- Under "Tools," select "Bibliography Database"
- Under "Edit," select "Choose Data Source"
- Select the refbase database