Importing and Exporting

Sixpack, using the excellent perl package bp can import and export from many bibliography database formats. The menus Transfer->Import and Transfer->export list the formats that sixpack currently supports. Here is a table of supported formats (This table is partly taken from the old sixpack web-page. I have not confirmed that all of these indeed work, since I don't have files in all these formats):

format import export notes
bibtex x x The bibtex format
refer x x The refer / BibIX format
endnote x x Endnote's refer-line format. See below about importing from endnote.
tib x x Like refer using TeX
procite x x Comma-delimited import format
rfc1807 x x RFC 1807/1357. Not well tested
text x x Raw lines or paragraphs
cstra x   CS Tech Report format
inspec x   The “Doc Type” version
medline x   MEDLARS as output by Entrez
melvyl x   not quite sure which version
ieee x   The old IEEE catalog
powells x   An old Powell's format
output   x Styles generic, booklist, aacf
html   x Synonym for output format with HTML charset.

Importing from a file

To import from a file, select 'Transfer->Import->Import type' from the menu, or enter

import type filename
  

At the cli. You will be prompted for the name of the file to be imported from. The entries from the file will be imported into the current database. All imported entries are also selected, so that you can do operations on all selected entries.

Usually a window will pop up with he warnings and errors produced by bp. You can usually ignore those - some formats contain fields that are not imported into sixpack or bibtex, and bp is telling us that.

The status line will then say something like:

Mod:Y Status:INFO 2 items converted, included and selected  Database: /home/dirk/pd.bib 
  

If the file contains html tags

In some cases, the file will contain html tags, maybe because it was downloaded from the web. In that case toggle the menu entry 'Transfer->import is raw html'. Notice that not all formats have the option to ignore html tags.

cli: use

import type filename html
   

Importing from bibtex

With bibtex files, there are a couple of additional options, which deal with @STRINGS and @CROSSREF:

Import simple bibtex (keep everything)

When importing with this option, strings and crossrefs will not be converted. The database will contain all of those. Notice that Sixpack doesn't currently deal with @STRINGS correctly, so that after exporting to bibtex the strings will not have the desired effect.

Import complex bibtex (convert @string)

Using this option strings will be replaced in all entries with their intended content. Crossrefs will still remain.

Import more complex bibtex (convert crossref)

Using this option, both strings and crossrefs will be converted - the new file will contain neither strings nor crossreffs.

Importing from Endnote

It is easy to import bibliography files from ISI Researchsoft's EndNote into Sixpack, if you have access to a copy of EndNote. Instructions for doing so are as follows.

  1. Download the "Refer/BibIX" EndNote style from ISI Researchsoft's web page in Macintosh or PC format. (In Netscape, right-click on the appropriate link to download the file to disk.)

  2. In EndNote:

    1. Select the REFER style: Choosing "More Styles..." from the Styles sub-menu on the main menu. Find and select the newly-loaded Refer style file.

    2. Load the bibliography file that you wish to export.

    3. Export the bibliography file: Select "Export..." from the file menu. In the "Save as Type" box, select "Text file (*.txt)". Choose a file name, and save.

  3. In Sixpack:

    1. Open a new database: File-"Open Database" or File-"Open Bibtex".

    2. Import the file that you created using the Endnote refer style: Transfer-Import-"Import endnote". (Make sure that the "Import is raw html" and "Use selection for import" checkboxes in the Transfer sub-menu are unselected.)

Importing from the X11 selection buffer

In some cases, you will want to copy an entry from one program to another. For example, this might be useful if you have an entry open in some format on a web browser, and you want to import it into sixpack.

In that case,

  1. toggle the 'Transfer->Use selection for import/export' menu entry to on.

  2. make sure that the 'Transfer->import is raw html' toggle is in the right state.

  3. Select the entry (or entries) in the program.

  4. Select the 'Transfer->Import->Import type' from the menu.

The entries will then be imported into sixpack.

Importing from the web

Sometimes it is easier to directly download references from a web site. Some online journals and search engines give you the references on a web-page. To import these into sixpack, first - the WGET variable needs to be set to the path of the wget program in the configuration file. If that is true then do the following:

  1. Make sure that the Transfer->Use selection for import/export' toggle is off.

  2. Make sure that the 'Transfer->import is raw html' toggle is in the right state. (usually on)

  3. Copy the selection address into the X11 selection buffer. This can be done, for example by right-clicking on the link in Netscape, and selecting 'copy link location'

  4. Select 'Transfer->Import->Import type' from the menu.

  5. A file-dialog will pop up. Notice that it asks you for URL/file. Enter the URL. The easiest way to do this is to select the entry field for URL/file with the mouse, and pressing 'insert' on the keyboard. The selection will be inserted into the field.

That's it! Now the entries should be imported into Sixpack.

Advanced: Causing web pages to be directly imported into Sixpack.

Some web sites allow you to download citations directly into your citation manager. This usually means that they specify the mime type for the citation. For example, when medlib lets you download a citation for endnote, it specifies the mimetype as: application/x-endnote-refer

To have sixpack deal with these, all you need to do is this:

  1. go to the helper application menu in Netscape preferences, and add a new mime-type, application/x-endnote-refer (or any other type you need to deal with) and

  2. set the application (of that mimetype) to “bib-remote import endnote %s text”. to import a regular text formated file (that's usually the case) or “bib-remote import endnote %s html” for an html formated file. (Of course you need to replace 'endnote' with whatever format that particular mime-type is).

And, that's it! Now if sixpack is open (cmd line or gui mode) it will automatically import the citations when you click on the link.

Exporting to a file

To export to a file, make sure that the menu toggle 'Transfer->use selection for import/export' is off. Then just select 'Transfer->Export->Export type' from the menu. You will be prompted for a filename to export to. Sixpack will export all selected entries, so if no entries are selected, none will be exported.

Exporting to the X11 selection buffer

Sometimes you might want to paste an entry into another application. In this case make sure that the menu toggle 'Transfer->use selection for import/export' is on. Then select 'Transfer->Export->Export type'. The selected entries will be exported to the X selection buffer.