Direct access to zotero database

36 views
Skip to first unread message

psimon

unread,
Dec 23, 2009, 3:19:58 AM12/23/09
to zotero-dev
Hello,
Is the direct (read only) access to Zotero database advisable? Is the
database likely to change substantially in (near) future?
I am thinking about a support for Lyx. Lyx now supports pipes also on
Windows so the Lytero approach (writing to a pipe) might be a better
way to go, but it would certainly be nicer to be able to manage the
citation from within Lyx.

Many thanks for your comments
Petr

Bilal Abdul Kader

unread,
Dec 23, 2009, 1:05:24 PM12/23/09
to zoter...@googlegroups.com
Hi Petr,
I do not think that direct access to any database is advisable. However, you can do it and it is just link any sqllite application.

Sqlite has a lock on the database when firefox is open. 

bilal
--
Verily, with hardship comes ease.



--

You received this message because you are subscribed to the Google Groups "zotero-dev" group.
To post to this group, send email to zoter...@googlegroups.com.
To unsubscribe from this group, send email to zotero-dev+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/zotero-dev?hl=en.



psimon

unread,
Dec 23, 2009, 7:20:28 PM12/23/09
to zotero-dev

Thanks. So the only approach that can be sustained is the XPCOM,
right? Or are there thoughts to enable the server again? I wouldn't
want to waste time on something that has "no future" ;)
I have followed the emacs discussion and it didn't seem as if the
sqlite was an (reasonable) option.
I haven't looked too closely, but OOo integration uses the XPCOM,
correct? So is the XPCOM the only "right" way or are there plans for
another RPC server?
Many thanks
Petr

Avram Lyon

unread,
Dec 23, 2009, 7:38:01 PM12/23/09
to zotero-dev

Another option is to communicate via MozRepl, which will give you
access to the Zotero JavaScript object and methods. This amounts to an
additional dependency, but it should work fine and not run into
locking issues. For an example of using MozRepl with emacs, see:
http://people.internetconnection.net/2009/02/interactive-html-development-in-emacs/
.

I haven't used MozRepl for more than exploring the JavaScript innards
of Zotero, but this should be feasible.

Avram

psimon

unread,
Dec 23, 2009, 9:38:52 PM12/23/09
to zotero-dev
Ah, now I see the database connection is out of the question, because
of the lock.
Thanks

Dan Stillman

unread,
Dec 23, 2009, 11:15:40 PM12/23/09
to zoter...@googlegroups.com
On 12/23/09 9:38 PM, psimon wrote:
> Ah, now I see the database connection is out of the question, because
> of the lock.
>

Well, you can disable the lock with the
extensions.zotero.dbLockExclusive hidden pref, but MozRepl (or a custom
Zotero plugin with a trivial HTTP server) is still likely a better
option. There's no guarantee that the database schema won't change at
any time.

Dan Stillman

unread,
Dec 23, 2009, 11:29:35 PM12/23/09
to zoter...@googlegroups.com

There are no plans to restore the integration HTTP server. The current
integration plugins do use XPCOM from Java/Python/C++, but that's a
pretty complex route to go.

The integration server was specific to the integration plugins, but
we've considered a more general server that third-party apps could use.
It's unclear what real benefit that would provide over MozRepl,
though�we already use the JS API internally, and any abstraction of that
API in a server would require additional work and maintenance.

We use MozRepl ourselves to generate previews for the style repository
(which was set up before citeproc-js existed). There's an actual
Firefox+Zotero+MozRepl instance running in a VNC session on a server,
and the repo gets the previews from there.

psimon

unread,
Dec 23, 2009, 11:59:33 PM12/23/09
to zotero-dev
Thanks for clarification.
Yes, I was little put of by the complexity of the XPCOM stuff.
I'll learn a bit about the MozRepl. Right now Lyx can be used with
data exported from Zotero to Bibtex, which works quite nice, but it's
not ideal.
Reply all
Reply to author
Forward
0 new messages