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
Tips and Tricks
Change the display order of top level items in the key window
In the bibus directory locate the file 'bibus.config'and open it with a text editor. Add the line
after this code:
import BIBbase from wxPython.wx import *
Make sure that in the line you just added there are no space characters before the code begins ('BIBBase....'). You can change the order of the toplevel items to your liking by changing the order they appear in the above statement. For example, if you want the key 'All' at the very top you would change the code to:
-- tested with bibus 1.2
Changing the default sort order of the reference list
In the configuration dialog of Bibus you can select an item that determines in which order the reference list is displayed (year, title etc). However you cannot specfify if the list is displayed in ascending or descending order. The default is ascending order. If you want the list in descending order do the following. In this example I will adjust the sort order to be 'year'-'descending' (The newest references are on the top). In the bibus directory locate the file 'bibus.config' and open it with a text editor. Locate the following section:
## list display # BIBbase.LIST_DISPLAY = ('Identifier','Year','Author','Title') # Fields displayed in reflist wxListCtrl # BIBbase.LIST_COL_SIZE = (120, 55, 240, 440) # column sizes if fixed # BIBbase.LIST_COL_AUTO = True # bool, true if column size is auto # BIBbase.LIST_ORDER = 'Identifier' # Display order in reflist # BIBbase.LIST_HOW = 'ASC' # How list are sorted by default 'ASC'ending or 'DESC'ending # BIBbase.KEY_COLOR = wxRED # color display of keys (Title, AUthor, etc..) in textCtrl-1 # BIBbase.TEXT_COLOR = wxBLACK # color display of text (Title, Author, etc..) in textCtrl-1
Remove the '#' and blanks in front of the 'BIBbase.LIST_ORDER' and 'BIBbase.LIST_HOW = 'ASC lines. Finally change the assignement to:
BIBbase.LIST_ORDER = 'Year' BIBbase.LIST_HOW = 'DESC'
Save the edited file and restart Bibus.
-- tested with bibus 1.2
Changing the names of the custom fields
The names of the Custom fields can normally be changed during first connection. However if you need to change them later on you can open the bibus.config file (not bibus.conf) with a text editor and change (or add at the end if not there) the following lines :
BIBbase.NAME_FIELD['Custom1'] = u'Patent number' BIBbase.NAME_FIELD['Custom2'] = u'Custom2' BIBbase.NAME_FIELD['Custom3'] = u'Custom3' BIBbase.NAME_FIELD['Custom4'] = u'Custom4' BIBbase.NAME_FIELD['Custom5'] = u'Custom5'
Renaming of fields is at your own risk, I have no idea what this does if you have already heavily used these fields and then rename them
Id, Identifier and BibliographicType are case specific, that is "Custom1" is not equal "custom1"
This was discussed in then "Open Discussion Forum" 
Use english language for the Bibus GUI instead of localized version
A hack for versions 1.2.1 and older
Maybe you're like me and prefer the english language for the Bibus GUI. That's easy to do! Got to the bibus directory and then to the sub-directory 'locale'. Delete or move the subfolder that corresponds to your windows language/locale setting. For german the folder is named 'de'. Restart Bibus and thats it!
An other way to force English language is to add the following line to the [PATH] section to the bibus.cfg file:
[PATH] localedir=<any string>
Bibus is looking for localisation files in subdirectories defined by this variable (<bibus home>/locale/ by default). If the directory pointed by localedir does not exist, or does not contains localisation subdirectories (i.e. fr/LC_MESSAGES), it will fall back to English.
Method for version 1.3.0 (tested on Bibus 1.3.0 on Python 2.3.5 on Windows 2000&XP, French locale)
Find the "bibus.cfg" file (it is in the Bibus program directory) and ADD the two following lines at the end of the file:
Restart Bibus and it will speak English.
It is probably possible to select any of the supported languages by replacing "language=en" by "language=xx", where "xx" is the locale code for the language, but I did not test this.
Collecting references to be deleted
It is impossible to delete a reference from the database from Bibus. From time to time it might me be useful to 'clean' the references and sort out wrong or duplicate refs. Here's what I do. First I make a new key named 'to_be_deleted' (you can choose any other name if you want). Then I add all the refs I want to delete to this key. To delete the files we need to access the database directly either with the command line tools (mysql.exe for a MySQL db, SQlite.exe for a sqlite db) or an equivalent GUI tool (MySQL Query browser for MySQL for example). The following query will delete all refs that are in the 'to_be_deleted' key:
# delete marked entries from the bibref table: DELETE b.* from bibref b,bibreflink blk,bibrefkey bk where b.id=blk.ref_id AND bk.key_name='to_be_deleted' AND blk.key_id=bk.key_id; # clean up the bibreflink table (remove orphant links): DELETE bl.* from bibreflink bl LEFT JOIN bibref b ON b.id=bl.ref_id WHERE b.id IS NULL;
It will also clean the bibreflink table that contains the links between the keys and the refs. You can save the above code in a text file and execute it with one of the mentioned tools. I recommend to do a backup before you do it. Just in case you made a mistake....
--tested with Bibus 1.2 and MySQL >=4.1
A similar query, but for SQLite was suggested by elfunesto. It worked for me. It can be found under Deleting references (http://bibus-biblio.sourceforge.net/wiki/index.php/Deleting_references).
Searching for files with an url
This search will return all refs with a non-empty url field. You have to enter it in 'expert mode':
url not like ''
Searching for key strings
The Bibus search function does not search in the keys assigned to a reference. The following search string uses a 'subquery' to search the keys (in this example it searches all keys which contain the string 'review'):
id in (select t2.ref_Id from bibrefKey as t1,bibrefLink as t2 where t1.key_Id = t2.key_Id and t1.key_name like "%review%")This search string has to be entered in 'expert mode'. However, due to the way the keys are stored in the database it only finds references that are directly assigned to a key. For example it will find all refs in 'physics/reviews' but none in 'reviews/physics'. In other words it can only find the same refs that are displayed in the key tree and not refs in sub-keys.
The search above will search references associated with a key that contains the word "review" ("review2", "2reView", "2REview2", ...) but for all the users. If you are the unique user of your database this is not a problem but if you share your database with many users, you can restrict the search to the keys defined by user "login_name" using:
id in (select t2.ref_Id from bibrefKey as t1,bibrefLink as t2 where t1.user= "login_name" and t1.key_Id = t2.key_Id and t1.key_name like "%review%")
Of course, you will usually use your own "login_name" but you can also use the "login_name" of another user without problem. This is handy if somebody tells you "I have very interesting references under the key Antibody".
Case sensitive searching, search for special characters (MySQL)
The MySQL 'LIKE' string comparison operator is not case sensitve and also treats native unicode characters in a special way. For example, if you search for an author named 'Schütz' (using bibus or mysql.exe), the query will also return 'Schutz','schutz','SCHÜTZ'... In this case the special character 'ü' is considered the same as 'u'. If you only want exact matches you can use the Bibus expert search mode and enter a search string like this:
BINARY author like '%Schütz%'
With the 'BINARY' keyword in front of the column name (author), the search becomes case and special character sensitive. If you want the search to be special character sensitive but not case sensitive, try something like this:
BINARY UPPER(author) like UPPER('%Schütz%')
If you're using an SQLite database with Bibus, the default behaviour of the search (LIKE operator)is special character sensitive but not case sensitive.
Sorting query list alphabetically
The query list in Bibus is not alphabetically ordered. If you want change this, open the file dbBibBase.py in a text editor and find the following part:
def getQueries(self): """Return list of (name,key_id) of children of Key ID_QUERY_ROOT from table self.tableQuery""" try: tmpstr = """SELECT %s,%s FROM %s WHERE user=%s""" % ('name','query_id',self.tableQuery,self.param) self.dbCursor.execute(tmpstr, (self.user,)) return self.dbCursor.fetchall() except Error,errorType: self.showError(`errorType.args`) return None
Change the query string in the line starting with 'tmpstr = ' to:
tmpstr = """SELECT %s,%s FROM %s WHERE user=%s ORDER BY name""" % ('name','query_id',self.tableQuery,self.param)
and save the file. Restart Bibus.
--tested with bibus 1.2
I had to import many BibTex references and the import filter from bibus-1.2 just didn't do its job, so I tried to improve it. Its not finished yet, but seems to work better, see here.
See also the proposed BibTex.py attached to bug 1493683 here this can insert a complete bibtex database, handles the bibtex delimiters in a correct way and is able to handle @String definitions in bibtex databases (files)
Checking which version of Bibus is installed on Linux
The best way is to open a terminal and run:
dpkg -s bibus
OR if you use sudo, then
sudo dpkg -s bibus
You may want to take a look at this thread
How to setup a bibliography to be shared by many users on a remote computer You need to install a MySQL server.
Note on encoding and full text search:
The advice below was tested on Linux Ubuntu 10.04, WIndows XP and Windows Vista (September 2010). The default latin1 character encoding for MySQL is latin1_swedish_ci (http://dev.mysql.com/doc/refman/5.0/en/charset-mysql.html). This should be normally fine in most cases. However, if you copy-paste a full text from a web page to one of the field (to be able to make full text search from bibus), you might have a few non latin1 characters. Try to change the "Collation" to utf8_unicode_ci (for instance using phpMyAdmin). For storing long texts, an option is to use the MySQL "Note" field after converting it to "mediumtext" type; the size of the text box of this field increases when resizing the Reference editor window.
How to change bibus "Identifier" to your favorate pattern
In JabRef, I use Bibtex key like "[year]-[author]-p[pages]", and all my pdf files were named with this kind of keys. But I find that the "Identifier" pattern in bibus is fixed, like "author+year". After asking Pierre how to change the identifier pattern, I modified line 64 in dbBibBase.py to:
return record[BIB.BIBLIOGRAPHIC_FIELDS['Year']]+'-'+author.split(',').replace(' ','_')+'-p'+record[BIB.BIBLIOGRAPHIC_FIELDS['Pages']].split('-')
This line modifies the Identifier pattern to "Year-FirstAuthor-pFirstpage" .
But I found that bibus still showed Indentifers with the old pattern. Then I looked into the file BibFrame.py and changed line 958 to:
Identifier = ref[BIB.BIBLIOGRAPHIC_FIELDS['Year']]+'-'+ref[BIB.BIBLIOGRAPHIC_FIELDS['Author']].split(',').replace(' ',u'_')+'-p'+ref[BIB.BIBLIOGRAPHIC_FIELDS['Pages']].split('-')
Changed line 1248 to:
record[BIB.BIBLIOGRAPHIC_FIELDS['Identifier']] = record[BIB.BIBLIOGRAPHIC_FIELDS['Year']]+'-'+record[BIB.BIBLIOGRAPHIC_FIELDS['Author']].split(',').replace(' ','_')+'-p'+record[BIB.BIBLIOGRAPHIC_FIELDS['Pages']].split('-')
Then the Identifier pattern works as I expected.
Line 80 in DnD.py also redefines Identifier sometimes, I don't know whether it's necessary to modify, but I also changed it:
Identifier = ref[BIB.BIBLIOGRAPHIC_FIELDS['Year']] +'-'+ ref[BIB.BIBLIOGRAPHIC_FIELDS['Author']].split(',').replace(' ',u'_')+'-p'+ref[BIB.BIBLIOGRAPHIC_FIELDS['Pages']].split('-')