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.
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.
This discussion has been closed.
But, if you'd like to build something new, the APIs are at https://www.zotero.org/support/dev/web_api/v2/start
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
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.
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).
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?
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?
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.
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?
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: 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.
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.
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 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.