News

October 2009 : a new release (bibus 1.5.0)

  • OOo3.1 compatibility
  • Infinite number of file/http links
  • Clever capitalization (lord of war => Lord of War ...)
  • Better handling of journal abbreviations
  • Import/Export filters can be added easily (plugin)
  • journal abbreviations and shortcuts can be easily edited (simple csv file that can be edited in OOo/excel or a text editor)
  • Lot of bug fixes
  • Requires python2.5 (not a problem anymore under Windows since OOo3.1 includes 2.6)
  • Requires wxpython-2.8

Import/Export filters

From Bibus

Jump to: navigation, search

Since Bibus 1.5, you can add custom Import and Export filters (File -> Import / Export -> install a new filter). A filter is just a simple python file which can be edited with a traditional text editor. You can add here your own filters or corrections to existing filters: fill the table and copy your script. If you want to install a filter from this page, copy the corresponding script in a text editor and save the file (for ex: myfilter.py). Then File -> Import -> Install a new filter -> Select myfilter.py. The table is ordered by filter type (export and import).

You will find relevant tutorial detailing how to import/export references in bibus here.

Type Name Author Description Link
Export example example example link
Import Refer_Endnote ? Modified both filters Refer_Export exporting filter in EndNoteX and Refer_EndNote in Bibus to get complete information imported into Bibus 1.5 link


RefWorks to Bibus 1.5 Importfilter

When you import references from RefWorks using the RIS import filter, the ID-numbers will be imported as short descriptions. With this modification of the filter, the ID-numbers will be omitted. The short description will be AuthorYear as usual.

File:RefWorks without ID.zip

(References must be exported in RefWorks using the "Bibliographic Software" mode.)

Endnote X to Bibus 1.5 Filter

If you use Refer_Export exporting filter in EndNoteX and then Refer_EndNote in Bibus to import the file, some fields won`t be imported, such as notes, URL, ISBN, Address or Call Number. Hence, I've modified both filters to get this information imported into Bibus 1.5.
First I modified the Refer_Export filter. I don`t know how to upload it here, so I will explain how to do it:

  1. Edit-> Output Styles-> Open Style Manager
  2. Select Refer Export and click on Edit
  3. File-> Save As, to save the filter with a different name, for example, Refer Export to Bibus
  4. In the right-hand tree, click on Bibliography-Templates.
  5. Now you'll have to change the identifier %O before youre desired fields to the appropriate identifiers. You will have to change them in every reference type you want to use. I made the following changes:
 Book:
    %O Edition to %7 Edition
    %O ISBN to %1 ISBN
    %O DOI to %d DOI
    %O Call Number to %# Call Number
    %O Notes to %n Notes
    %O URL to %U URL
    %O Author Address to %@ Author Address
 Book Section:
    %O Edition to %7 Edition
    %O ISBN to %1 ISBN
    %O DOI to %d DOI
    %O Call Number to %# Call Number
    %O Notes to %n Notes
    %O URL to %U URL
    %O Author Address to %@ Author Address
 Conference Proceedings:
    %O Conference Name to %B Conference Name 
    %O Date to %f Date
    %O Edition to %7 Edition
    %O ISBN to %1 ISBN
    %O DOI to %d DOI
    %O Call Number to %# Call Number
    %O Notes to %n Notes
    %O URL to %U URL
    %O Author Address to %@ Author Address
 Edited book:
    %O Edition to %7 Edition
    %O ISBN to %1 ISBN
    %O DOI to %d DOI
    %O Call Number to %# Call Number
    %O Notes to %n Notes
    %O URL to %U URL
    %O Author Address to %@ Author Address
 Electronic Article:
    %O Date Accessed to %f Date Accessed 
    %O ISSN to %1 ISSN
    %O DOI to %d DOI
    %O Call Number to %# Call Number
    %O Notes to %n Notes
    %O URL to %U URL
    %O Author Address to %@ Author Address
    %O Access Date to %f Access Date 
        Introduce a new line (I used Call Number to store my accession number, and so, I needed it in every reference type):
    %# Call Number
 Journal Article:
    %O Date to %f Date
    %O ISSN to %1 ISSN
    %O DOI to %d DOI
    %O Call Number to %# Call Number
    %O Notes to %n Notes
    %O URL to %U URL
    %O Author Address to %@ Author Address
 Manuscript:
    %O Date to %f Date
    %O DOI to %d DOI
    %O Call Number to %# Call Number
    %O Notes to %n Notes
    %O URL to %U URL
    %O Author Address to %@ Author Address
 Report:
    %O Date to %f Date
    %O DOI to %d DOI
    %O Call Number to %# Call Number
    %O Notes to %n Notes
    %O URL to %U URL
    %O Author Address to %@ Author Address
 Thesis:
    %O Date to %f Date
    %O DOI to %d DOI
    %O Call Number to %# Call Number
    %O Notes to %n Notes
    %O URL to %U URL
    %O Author Address to %@ Author Address
 Unpublished Work:
    %O DOI to %d DOI
    %O Call Number to %# Call Number
    %O Notes to %n Notes
    %O URL to %U URL
    %O Author Address to %@ Author Address
    %O Access Date to %f Access Date
 Generic:
    %O Date to %f Date
    %O Edition to %7 Edition
    %O ISSN to %1 ISSN
    %O DOI to %d DOI
    %O Call Number to %# Call Number
    %O Notes to %n Notes
    %O URL to %U URL
    %O Author Address to %@ Author Address
  1. Check Refer Export to Bibus
  2. File-> Save
  3. File-> Close Style Manager
  4. Select Edit->Output Styles->Refer Export to Bibus
  5. File-> Export, select a name and path for the file and Save


For Conference Proceedings I had two different dates, that of the conference or meeting and that of publication. However, Bibus have a Year of Conference and a Date of Conference field. Hence, I use Year of Conference as Year of publication (%D), and Date of Conference as Date of Conference (%f).
Call number goes to Bibus field Custom3 and Date of Conference to field Custom4.
I don't know why but in some cases instead of %#, EndNote writes %%#. Thus, I had to edit the created file and replace all %% by % before importing into Bibus.

To import the created file from Bibus you will have to follow this steps:

  1. Copy the following text (under Filter title) into a new text file and save it as Refer_EndNote_toBibus.py
  2. Copy Refer_EndNote_toBibus.py into C:\\Program Files\bibus\Import
  3. Open Bibus and go to File-> Import->Refer_EndNote_toBibus
  4. Select the file to import, after a while the references to import will appear in the Impor Buffer
  5. Select all (or the desired ones) and copy
  6. Go to References and paste.


It worked for me. Good luck!!
Asier



_________________________________________________________________________ FILTER

# Copyright 2004,2005 Pierre Martineau <pmartino@users.sourceforge.net>
# This file is part of Bibus, a bibliographic database that can
# work together with OpenOffice.org to generate bibliographic indexes.
#
# Bibus is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# Bibus is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Bibus; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA.
#
# EndNote refer format
# from http://www.ecst.csuchico.edu/~jacobsd/bib/formats/endnote.html
#
from __future__ import generators		# to be removed in python 2.3
import BIB 
DEFAULT_ENCODING = 'utf_8'
class importRef(object):
       """Class is iterable. Return records one by one with None for the id (first field)."""
       # conversion EndNote <-> Openoffice.org Publication Type: dictionary Type[Medline Name]=OpenofficeName. 
       #Only needed for NON ARTICLE
       Type={
       'Artwork':'MISC',
       'Audiovisual Material':'MISC' ,
       'Book':'BOOK' ,
       'Book Section':'INBOOK' ,
       'Computer Program':'MISC' ,
       'Conference Proceedings':'INPROCEEDINGS' ,
       'Edited Book':'BOOK' ,
       'Generic':'MISC' ,
       'Journal Article':'ARTICLE' ,
       'Magazine Article':'MISC' ,
       'Map':'MISC' ,
       'Newspaper Article':'MISC' ,
       'Patent':'MISC' ,
       'Personal Communication':'UNPUBLISHED' ,
       'Report':'TECHREPORT' ,
       'Thesis':'PHDTHESIS'}
       def __init__(self,infile):
               self.infile = infile	# must be a file type. Need a readline() function.
               while self.infile.read(1) != '%': pass	# this is needed because EndNote8 refer files start with strange chars
               else: self.infile.seek(-1,1)
       def __iter__(self):
               """Generator of records. for record in <instance>: ... """
               record  = []
               line = self.infile.readline()
               reserved = ''
               while line != '':
                       #print 'line = %r' %line
                       if line not in  ('\n','\r\n','\r'):
                               if not line.startswith('%'): # it is a continuation of the previous line
                                       record[-1] = ' '.join( (record[-1],reserved + line[:-1].strip()) )
                               elif line.startswith('%0'):
                                       if record != []:
                                               yield self.__convertRecord(record)
                                               record  = []
                                       record.append(line[:-1].strip())
                               else:
                                       record.append(line[:-1].strip())
                               reserved = ''
                       else:
                               reserved = reserved + line	# we keep empty lines for latter
                       line = self.infile.readline()
               else:
                       if record != []: yield self.__convertRecord(record)
       def __convertRecord(self,record):
               """return a list of the record fields using ('Identifier', 'Bibliographic_Type', 'Address', 'Annote', 'Author', 'Booktitle', 'Chapter', 'Edition', 'Editor','HowPublished', 'Institution', 'Journal', 'Month', 'Note', 'Number', 'Organizations', 'Pages', 'Publisher', 'School', 'Series', 'Title', 'Report_Type', 'Volume', 'Year', 'URL', 'Custom1', 'Custom2', 'Custom3', 'Custom4', 'Custom5', 'ISBN','Abstract')"""
               Record={}
               for line in record:
                               refKey,tmpline = line[:2].strip(),line[2:].strip()
                               if tmpline.endswith('.'):
                                       tmpline = tmpline[:-1].rstrip()   	# remove final dot if present
                               if Record.has_key(refKey):	   # create a new key or add to a previous one
                                       Record[refKey] = BIB.SEP.join([Record[refKey],tmpline])
                               else:
                                       Record[refKey] = tmpline
               #print Record
               #
               Identifier = ''
               #
               try: Bibliographic_Type = BIB.BIBLIOGRAPHIC_TYPE[importRef.Type[Record['%0'].split(BIB.SEP)[0]]]
               except: Bibliographic_Type = BIB.BIBLIOGRAPHIC_TYPE['ARTICLE'] # default type = ARTICLE
               tipo = Record['%0']
               #
               try: Address = Record['%@'] 
               except KeyError: Address = ''
               #
               Annote = ''	# EndNote use the %U for URL instead of Annotation
               #
               try:
                       Author = Record['%A'].replace('.','')	# remove all the dots
                       if Author.find(",") == -1:			  # either FirstName Middle Name or Name, First Middle
                               authors = Author.split(BIB.SEP)
                               for i in xrange(len(authors)):
                                       auth = authors[i]
                                       #print auth
                                       try:
                                               authors[i] = "%s, %s"%(auth.rsplit(None,1)[1].strip(),auth.rsplit(None,1)[0].strip())
                                       except IndexError:
                                               pass
                               Author = BIB.SEP.join(authors)
               except KeyError: Author = ''
               #
               try:
                       Booktitle = Record['%B']
               except KeyError: Booktitle = ''
               #
               Chapter = ''
               #
               try: Edition = Record['%7']
               except KeyError: Edition = ''
               #
               try: Editor = Record['%E'].replace('.','')	# remove all the dots
               except KeyError:
                       try: Editor = Record['%Y'].replace('.','')	# series editor
                       except KeyError: Editor = ''
               #
               try: HowPublished = Record['%9']
               except KeyError: HowPublished = ''
               #
               try: Institution = Record['%+']
               except KeyError: 
                       try: Institution = Record['%I']
                       except KeyError: Institution = ''
               #
               try: Journal =  Record['%J']
               except KeyError: Journal = ''
               #
               try: Month = Record['%D'].split()[1]
               except: Month = ''
               #
               try: Note = Record['%n'] 
               except KeyError: Note = ''
               #
               try: Number = Record['%N']
               except KeyError: Number = ''
               #
               try: Organizations = Record['%+']
               except KeyError: Organizations = ''
               #
               try: Pages = Record['%P']
               except KeyError: Pages = ''
               #
               try: publiAddress = Record['%C']
               except KeyError: publiAddress = ''
               if publiAddress:
                       try: Publisher = ', '.join( (Record['%I'], publiAddress) )	# Publisher, Address
                       except KeyError: Publisher = publiAddress
               else:
                       try: Publisher = Record['%I']
                       except KeyError: Publisher = ''
               #
               School = ''
               #
               try: Series = Record['%S']
               except KeyError: Series = ''
               #
               try:
                       Title = Record['%T']
               except KeyError:
                       Title = ''
               #
               try: Report_Type = Record['%9']
               except KeyError: Report_Type = ''
               #
               try: Volume = Record['%V']
               except KeyError: Volume = ''
               #
               try: Year = Record['%D'].split()[0] 
               except KeyError: Year = ''
               #
               try: URL = Record['%U']			# EndNote put the URL in %U
               except KeyError: URL = ''
               #
               try: Custom1 = Record['%K']			# we put keywords in Custom1
               except KeyError: Custom1 = ''
               #
               try: Custom2 = Record['%F']			# we put Caption in Custom2
               except KeyError: Custom2 = ''
               #
               try: Custom3 = Record['%#']			# we put Call number in Custom3
               except KeyError: Custom3 = ''
               #
               try: Custom4 = Record['%f']			# we put Date of proceedings in Custom4
               except KeyError: Custom4 = ''
               #
               Custom5 = ''
               #
               try: ISBN = Record['%1']
               except KeyError: ISBN = ''
               #
               try: Abstract = Record['%X']
               except KeyError: Abstract = ''
               #
               #print [Identifier, Bibliographic_Type,Address, Annote, Author, Booktitle, Chapter, Edition, Editor,HowPublished, Institution, Journal, Month, Note, Number,Organizations, Pages,Publisher,School, Series, Title, Report_Type, Volume,Year,URL,Custom1,Custom2,Custom3,Custom4,Custom5,ISBN,Abstract]
return [None,Identifier, Bibliographic_Type,Address, Annote, Author, Booktitle, Chapter, Edition, Editor,HowPublished, Institution, Journal, Month, Note, Number,Organizations, Pages,Publisher,School, Series, Title, Report_Type, Volume,Year,URL,Custom1,Custom2,Custom3,Custom4,Custom5,ISBN,Abstract]

Personal tools