View Single Post
Old 04-08-2010, 12:49 PM   #19
stsu
Member
stsu began at the beginning.
 
Posts: 13
Karma: 24
Join Date: Jan 2010
Device: irex dr1000s
Version 0.9

The zip file is attached to the first post of this thread.

* Works for both zotero1 and zotero2.
* Query by any combination of collection, tag, creator etc is available.
* Optionally, you can add Publication column.
* Menu added.
* Appropriate tags only will be displayed.
* PC utilities to create zbi's database included.

INSTALL:
Install procedure is the same as before.
Unpacking the zip file, you will get two directories named "Programs" and "utilities". The "utilities" directory contains perl, python and ruby script files named "zotero2zbi" and a txt file "sql.txt", which are to be used on PC. See below.

DESCRIPTION:
Since this version, for performance reason, zbi creates its own database on memory or file "Programs/_zbi/share/zbi/zbi.sqlite".
When you use this version for the first time (and if you do not use one of zotero2zbi scripts, see below), a dialog would appear. In the dialog, there are 4 check boxes:
"On Memory Database" -- Choose "onmemory" database or creating database file. The "onmemory" database might be of use only when your zotero library is small.
"Create Index" -- If your zotero library is small, then unticking this could make search faster.
"Publication Column" -- Add a column and search buttons for publication column. Adding the column would make database creation and search slower.
"Create Metadb" -- Create metadata.db (if not exist) or not on opening an attachment file.

You can change these settings from menu.

Check your preference and click the "OK" button.
Then database will be created. It would take a while. In my case (about 1800 items), it took about 30 seconds. (Optionally, you can use "zotero2zbi" to create the database on your PC.)

Edit: In the case when the zotero library contains about 600 items, it took about 3 seconds.

If you choose onmemory database, then every time you start zbi, database will be created on memory and it will take as long as the first time. Otherwise, zbi starts much faster from next time.

(zbi will recreate database when
you changed the settings from menu or
the file "zotero.sqlite" is changed.
The later is checked by the file modified time, hence, be sure that the clocks of your PC and DR1000 are (almost) on time.)

PC UTILITIES:
The "utilities" directory contains:
sql.txt -- data file used by the following scripts.
zotero2zbi.pl -- perl script.
zotero2zbi.py -- python (2.5 or 2.6) script.
zotero2zbi.rb -- ruby script.

Every script will do the same work.
For example, in the case of python in unix like environment:

Usage: zotero2zbi.py [options] your_zotero.sqlite

Options:
-h, --help show this help message and exit
-i WITHIDX Create index if 1, drop index if 0, default 1
-o OPF Create Publication column if 1, do not if 0, default 0
-m WITH_METADB Create meta_db if 1, do not if 0, default 1
-d OUTDIR Output directory, default is current


Then 2 files

zbi.sqlite, zbi.conf

will be created in

OUTDIR/Programs/_zbi/share/zbi

and copy these two files to DR1000.

Last edited by stsu; 04-09-2010 at 12:35 PM.
stsu is offline   Reply With Quote