Skip to main content

Flask app providing a web-interface to a JabRef database

Project description

ppf.webref

ppf.webref is a web app providing an interface to a JabRef SQL database. Access your references from anywhere in the world and from any device with a web browser. You do not need to install Java, you do not need to install an app. Any non-archaic phone, tablet, PC, Mac, or Raspberry Pi will do.

Create a JabRef database (using your normal JabRef) and point ppf.webref to this database. Voila: Your references just became accessible worldwide.

Note: ppf.webref provides read-only access to your library. To add, edit, or delete entries from your library, you still need a standard JabRef installation somewhere.

Installation

Prerequisite: You need JabRef to create, edit, and extend your library.

Install ppf.webref (or have a look at docker.webref that provides a docker container running ppf.webref):

pip install ppf.webref

Then, create the config file ~/.config/ppf.webref/ppf.webref.conf:

[flask]
secret_key = <your secret key here>

[database]
server = <server>:<port>
databasename = <name of your jabref database>
username = <username ppf.webref should use to access db>
password = <password ppf.webref should use to access db>

secret_key is needed to encrypt cookies. Set it to a random string, e.g. by running this snippet:

python -c 'import secrets; print(secrets.token_hex())'

You can now start the web server by

flask --app ppf.webref run

and point your webbrowser to http://localhost:5000.

[This will start ppf.webref on your local machine which is nice for testing. To get the most out of ppf.webref, you will probably want to run ppf.webref on a server.]

ppf.webref will present a login form. However, as we have not created any users yet, we can't login. To create a user, run:

flask --app ppf.webref useradd <username>

This will:

  • create a table 'user' in your db if it does not exist yet
  • register user in user table

To set a password for this new user or to change the password of an existing user, do

flask --app ppf.webref passwd <username>

which will ask for and store (a salted hash of) the password in the user table.

Now we are able to login, but the entry table will not provide clickable links so you can easily open your documents. For ppf.webref to be able to serve the documents themselves, we have to put them under <app.root_path>/references (just place a symlink to your JabRef library there). The app's root path is something like /usr/local/lib/python3.11/site-packages/ppf/webref/.

Still reading?

If you read this far, you're probably not here for the first time. If you use and like this project, would you consider giving it a Github Star? (The button is at the top of this website.) If not, maybe you're interested in one of my my other projects?

Contributing

Did you find a bug and would like to report it? Or maybe you've fixed it already or want to help fixing it? That's great! Please read CONTRIBUTING to learn how to proceed.

To help ascertain that contributing to this project is a pleasant experience, we have established a code of conduct. You can expect everyone to adhere to it, just make sure you do as well.

Changelog

  • 0.1.1: Fix problem with path handling. Improve docs.
  • 0.1: Basic read-only functionality

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

ppf.webref-0.1.1-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file ppf.webref-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: ppf.webref-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for ppf.webref-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fff09d5a9ffe1bd6672980d39dddd7f1e6a1cab157a42b593d606ec3cb6d2779
MD5 39474f208f9f77201185b7e701a7cd86
BLAKE2b-256 7ef5c18adaa8c57842c240d015b629aea520b1b6fc97d40201a66f4f39626250

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page