Web interface rather than executable

Hello:

I like the way Zotero sorts things, but the interface is a problem for me. I use multiple computers, so I prefer to have a web interface rather than a local program. I have a linux server, and I already have a website and a database setup there and many other services.

Of course, I'm going to assign this web interface to my website, so it cannot be public! So, there should be some kind of authentication. Preferably, I would like to have access for myself with full control, and access for others with read only access.

I have no problem in programming a little php if facilities (like APIs) already exist.

What are my options? Please advise.

Thank you in advance and sorry for the long question.
  • Zotero.org does have a nice web interface; see https://www.zotero.org/samerafach/items/

    But, if you'd like to build something new, the APIs are at https://www.zotero.org/support/dev/web_api/v2/start
  • Could you maybe step back a bit and explain why installing Zotero is not an option? It's designed to sync across multiple computers (and work cross-platform)and you're not going to be happy working just with a web interface. It's possible, but limiting compared to installing the software.

    If you really want to (and, again, you'll be mostly on your own and I strongly discourage going this way):
    You can just rely on Zotero's own online implementation.
    If you want to do it yourself, here's the API documentation:
    https://www.zotero.org/support/dev/web_api/v3/start
    Here's the API library Zotero uses for its own online display of libraries:
    https://github.com/zotero/web-library
  • I'm not allowed to use public syncing on the Zotero website, and I have a lot of literature (~20 GB). So I have to have everything running on my server.

    It's a good idea to synchronize everything on a server and work on a computer, but I can't do that on my own server, can I? I found that setting a synchronization server is extremely complicated. Then I found that Zotero uses a simple SQLLite database, so definitely someone thought about this before me, and I found that API website, but I didn't really know what to do, and that's why I'm asking for something I don't know.

    I tried to use the web-library (which sounds perfect), but it's linked with my Zotero account, which I don't understand why. Why should the web-library have anything whatsoever to do with my Zotero account? I expect some kind of authentication on my server. Isn't this weird? Why can't it just take information from the database on the server?

    A work-around that I invented is to use a file-syncing system that synchronizes the Zotero database (I currently use Seafile) that syncs my database folder. But this is not so good because I can't open Zotero from two computers (I don't know what would happen if I open two copies of Zotero and try to save in the same directory).

    Please advise.
  • Could specify the types of restrictions you face, exactly (what are you not allowed to sync to Zotero, precisely--no files, no data, nothing)?

    If you can't have any data on the Zotero server at all, the server API is of no use to you whatsoever--it's designed to work with the Zotero server. Same with the web library--it's a library designed to work with the Zotero server API, so again, relies on the Zotero server.

    No one has built any web application based on the Zotero sqlite directly and, frankly, doing that is likely significantly harder to do than to implement the Zotero server locally (which, at least, some people have worked done).
  • Thank you for your response.

    Yes, I can't have any data on Zotero servers... unfortunately. Bad for me there's no way to access the database without the Zotero server... in fact I'm really wondering why would it be done that way... it's an extremely weird approach for an open-source software... only commercial software would do such a thing.

    Let me shift the question a little bit (sorry) in order to be able to use Zotero locally. What would happen if I open Zotero on two computers with file synchronization of the data-base folder? When I open Zotero, I noticed that a file called "zotero.sqlite-journal" is opened, and the file is deleted when exiting the program. What is this file? And what would happen if this file is replaced by another copy of Zotero on another computer?
  • Bad for me there's no way to access the database without the Zotero server... in fact I'm really wondering why would it be done that way... it's an extremely weird approach for an open-source software... only commercial software would do such a thing.
    sorry, but that's nonsense and suggests you may not understand what sqlite is. There is a way to access the Zotero database without the server: It's called Zotero, of which zotero.sqlite is an integral part.
    What would happen if I open Zotero on two computers with file synchronization of the data-base folder?
    either it would fail because the database is (properly) locked, or it would corrupt the database. Don't do that.
  • Thank you for your response.

    I do understand that my request isn't available, but this doesn't mean it's impossible to implement or that I don't understand sqlite. By simple logic: If the database can be accessed by a C/C++ program locally without requiring Zotero server access, then a php program should be able to do exactly the same without requiring web access. I'm sorry, but this reasoning doesn't require me to have a PhD in sqlite, right? :-)

    Is this statement wrong?
  • edited October 14, 2014
    sorry, but none of this makes sense. sqlite is an embedded database, in this case of Zotero. It's not, as you seem to think, an alternative to MySQL.
  • edited October 14, 2014
    Sir, you seem to be very persistent that the database in the file "zotero.sqlite" is the magic world of narnia that can be accessed only with the Zotero program. This is so not true, and a simple program like "Database browser for SQLite" can view all the data structure of your Zotero database. One just has to do the correct linking with the information required from the database, which can be easily reverse engineered from the source code of Zotero. I estimate that this task requires a day or two of work on the source.

    If you don't believe what I'm saying, please feel free to download the SQLite browser and view the database "zotero.sqlite" yourself! I could've done this whole thing myself, but I'm busy with my own research in physics and have no time to do this. I hope some software developer would do this one day.

    http://sourceforge.net/projects/sqlitebrowser/

    So I still don't understand why you insist on making this impossible while it seems to be very feasible.
  • of course you can view, access, even modify any sqlite file. qnotero actually has a python implementation reading from it.
    But I don't see how that's going to help you in any way. It's still a local database, so in order to run it online or to sync it between computers you'd have to write software to read it, then sync it online and you'd have to write a server implementation to sync it to.

    And that's what Zotero is. Obviously, since it's open, you could write software that does exactly the same--including with zotero.sqlite--in pretty much any other programming language. I just don't see why you would.

    Plus, if you're not going to install Zotero--what exactly is supposed to create the zotero.sqlite? And if you're not going to use the Zotero software, nor are you going to use the Zotero server, I'm really not clear what part of Zotero you're going to use?
  • edited October 14, 2014
    @samerafach: I think you want to capitalize "Narnia" there. :-)

    Seriously, though, adamsmith is right, there seems to be a misunderstanding here.

    As you know, the "zotero.sqlite" file resides on each computer that is running Zotero, and is updated exclusively through the Zotero client that is running locally. The zotero.sqlite data of two clients can be synced in a hub-and-spoke fashion, by syncing each to zotero.org.

    Where sync is not possible, the separate instances of Zotero are just unrelated, separate copies of the program, just as would be the case for separate copies of Excel, for example. Two separate copies of Zotero (or Excel) can be made to display the same database (or spreadsheet) by copying the zotero.sqlite file (or *.xls file) from one computer to another. (You have been there and done that, of course.)

    You say:
    [A] simple program like "Database browser for SQLite" can view all the data structure of your Zotero database.
    The problem is that, insofar as you are unable to use Zotero sync via the servers at zotero.org, the "your Zotero database" referred to here is not a single entity: your data resides in two separate zotero.sqlite files, on two separate machines. The "Database browser for SQLite," like the Zotero client itself, is a local program, running on one machine, that can access only one copy of zotero.sqlite; so it doesn't solve the synchronization problem.

    What you may have in mind is a peer-to-peer linkage among Zotero clients over which you have control -- something similar to Gnutella, say. Zotero is not designed in that way; the best you can do is to manually move the zotero.sqlite file about, as you have been doing.
  • edited October 14, 2014
    EDIT: I was in the middle of this when the last two posts were made. I've left the text, as it may nudge you in the right direction...

    adamsmith never said the Zotero client was the only way to read SQLite. He did give you important advice to avoid data loss.

    A fundamental limitation of SQLite is that only a single program can write to it at the same time: https://www.sqlite.org/faq.html#q5
    adamsmith is trying to make sure you don't try to get around that (which is very likely to lead to you losing data). So, again: if you use a naive syncing methods (such as using seafile) can over-write the SQLite file causing corruption. If you attempt to open a single SQLite file with multiple programs, you may also run into problems. There's no getting around that.

    The source for the zotero client (stand-alone and extensions) and server are open. The Zotero team does not have the resources to provide the support for you to run the server on your machine, but the code is available. Feel free to use it, with or without modifications, on your own server.

    You don't describe what prevents you from using Zotero.org. Your server does not sound air-gapped, so it doesn't sound like an institutional policy. You can store your bibliographic data for free & use your own server to store PDFs. The data can be reasonably private. This is likely the easiest course of action. However, there's plenty of information for you to implement something else.
  • edited October 15, 2014
    Thank you all for your responses.

    This whole thing about the Zotero database started because I said that I found that limiting Zotero database access to an API that necessarily needs to connect to my account is crazy. With all your correct statements about the database and its access, with which I completely agree, I still can't find a reason why the web-library would need to do anything with my account on the Zotero official website.

    Ideally, what I would expect is that the web-library have local access to my database, which would be located on my server. Then, I can use the web-library from my browser exactly as I would be using Zotero on my local computer. This way, I wouldn't care on what computer I am, where I could just type the address, get authenticated with my own login to my own server, and use Zotero's web-library on my browser. So, the database will be accessed from one machine only (my server), and voila! Problem solved! Does this sound crazy? In this case, I won't need any kind of syncing whatsoever!

    What prevents me from doing that? It's that the web-library has something to do with the Zotero account on the Zotero official server which does not belong to me... but why? If the Zotero program can access my database without requiring the official Zotero server authentication, why should the web-library need that? That's exactly what the problem is.

    This is my whole contention to the matter! I work on many computers (over 5) and I find a web-Zotero an ideal solution to my issue. Perhaps I will make another post about creating a sync server on my own linux server, since it's not possible to access my Zotero with a web interface on my server as I was "dreaming".

    Thank you all for trying to help :)
  • So, the database will be accessed from one machine only (my server), and voila! Problem solved! Does this sound crazy?
    Well, it's not that it's crazy. It's just that you seem to be posting about some completely hypothetical software that has no technical relation to any software or services we provide and that would be for a completely different audience. So given that, I'm closing this thread.
  • Or, reconsidering this a little, I think your mention of SQLite — and your repeated assertions that the way various Zotero components work is bizarre or "crazy" — just sent the discussion profoundly off-track, since it didn't make any technical sense, and the rest of the thread was our trying to explain why that was.

    So to clarify/reiterate, what you're describing is essentially the Zotero dataserver + web-library + a few other glue parts. As various people said above, it's all open-source and none of it requires any connection to the Zotero servers or a Zotero account, so your claims that it does are incorrect. But it's all just the open-sourced code that we use to provide Zotero services, it's extremely technically difficult to run, and it's unlikely to be worth your time. But it's there if you want to try.
This discussion has been closed.