All Projects → dellsystem → bookmarker

dellsystem / bookmarker

Licence: MIT license
A personal project to help me retain information from books

Programming Languages

python
139335 projects - #7 most used programming language
HTML
75241 projects
javascript
184084 projects - #8 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to bookmarker

software-architecture-books
A comprehensive list of books on Software Architecture.
Stars: ✭ 7,397 (+11641.27%)
Mutual labels:  books, goodreads
goodreads-toolbox
9 tools for Goodreads.com, for finding people based on the books they’ve read, finding books popular among the people you follow, following new book reviews, etc
Stars: ✭ 56 (-11.11%)
Mutual labels:  books, goodreads
computer book list
一个综合了豆瓣,goodreads综合评分的计算机书籍书单
Stars: ✭ 1,535 (+2336.51%)
Mutual labels:  books, goodreads
ReaDB
ReaDB is your private digital bookshelf. Read. Review. Remember.
Stars: ✭ 84 (+33.33%)
Mutual labels:  books, goodreads
cummings.ee
A collection of the work of Edward Estlin Cummings, as it enters the public domain.
Stars: ✭ 32 (-49.21%)
Mutual labels:  books, literature
Nietzsche
Scrap quotes from Goodreads and schedule random tweets.
Stars: ✭ 44 (-30.16%)
Mutual labels:  quotes, goodreads
Mue
Fast, open and free-to-use new tab page for modern browsers
Stars: ✭ 56 (-11.11%)
Mutual labels:  quotes
Suitecrm
SuiteCRM - Open source CRM for the world
Stars: ✭ 2,770 (+4296.83%)
Mutual labels:  quotes
Offline invoicing
Desktop invoicing app built with electron. Create Quotes and Invoices. Download PDF or Email directly to your customers.
Stars: ✭ 47 (-25.4%)
Mutual labels:  quotes
Anyway.tab
一款 Chrome 的新建 Tab 插件,显示 Anyway.FM 节目中的语录、参考链接和更新提醒。
Stars: ✭ 40 (-36.51%)
Mutual labels:  quotes
voc-api
Unofficial API for vocabulary.com. Manage lists and get definitions.
Stars: ✭ 21 (-66.67%)
Mutual labels:  vocabulary
mobivoc
A vocabulary for future-oriented mobility solutions and value-added services supporting them.
Stars: ✭ 27 (-57.14%)
Mutual labels:  vocabulary
Go Quote
Yahoo finance/Google finance/Coinbase/Bittrex/Binance/Tiingo historical quote downloader library and cli written in golang
Stars: ✭ 198 (+214.29%)
Mutual labels:  quotes
Php Forex Quotes
PHP Library for fetching realtime forex quotes.
Stars: ✭ 61 (-3.17%)
Mutual labels:  quotes
book-library
📚 A book library app for both Android & IOS ~ Flutter.dev project in Dart
Stars: ✭ 89 (+41.27%)
Mutual labels:  books
Yetiforcecrm
Our team created for you one of the most innovative CRM systems that supports mainly business processes and allows for customization according to your needs. Be ahead of your competition and implement YetiForce!
Stars: ✭ 1,056 (+1576.19%)
Mutual labels:  quotes
unpaprd
An audiobook 🎧 📔 app made using Flutter
Stars: ✭ 73 (+15.87%)
Mutual labels:  books
Change Inside Surroundings.vim
vim plugin to change the contents of the innermost 'surrounding'
Stars: ✭ 41 (-34.92%)
Mutual labels:  quotes
Fortune Mod
Implementation of the Unix fortune command for displaying a random quotation, for Linux and other systems.
Stars: ✭ 156 (+147.62%)
Mutual labels:  quotes
barnsworthburning
A commonplace book.
Stars: ✭ 20 (-68.25%)
Mutual labels:  literature

Bookmarker

A personal project to help me retain information from the books I'm reading. MIT license.

Currently only supports a single user, but I plan to extend it to support multiple users eventually.

Demo

You can view a read-only active demo at http://bookmarker.dellsystem.me. This is also a great way to creep on what books I'm reading.

Setup

If you're familiar with Django, you can skip this; it's a standard deployment with Django 3.11. Pip requirements can be found in requirements.txt.

Here's the step-by-step for how to set it up via the command line on a Linux machine that already has git, Python (v3), and virtualenv installed:

Cloning from git

This will create a folder called "bookmarker" in your working directory with all the necessary code.

If you have a Github account with your SSH keys set up:

git clone [email protected]:dellsystem/bookmarker.git

Otherwise:

git clone https://github.com/dellsystem/bookmarker.git

Setting up the virtualenv

Now, access the new directory (cd bookmarker). You'll want to set up a virtualenv in this directory for installing all the dependencies (basically a way to isolate requirements so you can develop multiple projects on the same machine). The exact command may depend on your setup, but for me, it looks like this:

virtualenv -p python3 env

This creates a new directory named "env" within "bookmarker", which will contain all the Python dependencies for this project. You'll want to activate the virtualenv every time you need to run Bookmarker, which you can do in the command line by running

source env/bin/activate

I personally set up an alias to do this automatically every time I need to work on a project. In my bash profile, I have aliases like

alias bm="cd ~/Projects/bookmarker && source env/bin/activate"

so I can just type "bm" in a terminal any time I need to work on Bookmarker.

You can leave the virtualenv at any time with the command deactivate.

Installing the dependencies

Now that you're in the virtualenv, it's to install all the dependencies. This might be a little finnicky depending on your machine and on the state of the dependencies at any given time - if you run into any problems, I'd suggest either Googling the error messages or deleting dependencies from requirements.txt until you get it working (some of them don't need to be there explicitly).

pip install -r requirements.txt

(Make sure you're in the project directory - mine is ~/Projects/bookmarker.)

Setting up the database

For development, we use SQLite, which you may have to install through your OS package manager. In production, you should PostgreSQL or something like that (if that's running locally, all you have to do is set up POSTGRES_PASSWORD as an environment variable), but don't worry about that for now.

To set up the database initially (and create all the basic tables), run:

python code/manage.py makemigrations activity books vocab
python code/manage.py migrate

(Again, this should be in the project directory, bookmarker/).

This will create all the database tables needed for this app to work.

Setting up your account

You'll want to create an admin account to access the admin tools & add/edit/delete data via the frontend. Run

python code/manage.py createsuperuser

and set your desired username/password. Don't worry about the email address.

Setting up the Goodreads integration

For the moment, this app currently makes heavy use of the Goodreads API when adding books and authors. You'll need to get a Goodreads account, and then you'll have to set up a developer key to access the Goodreads API. This part is a little annoying, but I haven't figured out how to skip it yet, so in the meantime you'll need to do this or Bookmarker won't run.

Using your browser, navigate to https://www.goodreads.com/api/keys, fill in the form (the details don't really matter - call it whatever you want, and leave the optional fields blank) and click "Apply for a Developer Key". Now, at the top of the page it should say something like

key: KEY
secret: SECRET

We'll have to save both the key and the secret to our virtualenv. Open up env/bin/activate (it's a text file), and add this to the end of the file (replace KEY and SECRET with their respective values):

GOODREADS_KEY='KEY'
export GOODREADS_KEY
GOODREADS_SECRET='SECRET'
export GOODREADS_SECRET

For that to take effect, you'll have to exit the virtualenv then activate it again. Run:

deactivate && source env/bin/activate

You'll also need to authorize the app to use your account. This is even more annoying and I will try to find a way to make this step optional, but again, for now it's mandatory. In the bookmarker directory, open up a Python shell (run python) and paste in the following:

import os
from goodreads import client

CLIENT = client.GoodreadsClient(
    os.environ.get('GOODREADS_KEY'),
    os.environ.get('GOODREADS_SECRET'),
)

CLIENT.authenticate()

This should pop up a window in your browser (if it doesn't, copy and paste the URL shown). Authorize the app in your browser, then return to your Python shell, and type 'y' in response to the prompt ("Have you authorized me?").

Now you'll be able to get your token and secret. In your Python shell, type

CLIENT.session.access_token, CLIENT.session.access_token_secret

This will output two strings in a tuple, looking something like this:

('24o7htksgslilu5l3w5h', 'slektlyl3wy5wl3y53wskhgksdhgkldshgsdlg')

Open up env/bin/activate one last time and add those to the bottom:

GOODREADS_ACCESS_TOKEN='24o7htksgslilu5l3w5h'
export GOODREADS_ACCESS_TOKEN
GOODREADS_ACCESS_SECRET='slektlyl3wy5wl3y53wskhgksdhgkldshgsdlg'
export GOODREADS_ACCESS_SECRET

(replacing the token and secret above with whatever was output in your shell)

Almost done, I promise! Final step: reactivate the virtualenv one more time.

deactivate && source env/bin/activate

Running your server locally

Now you're all set to test it out! Run

python code/manage.py runserver

and navigate your browser to http://localhost:8000. It should show you an empty dashboard. To log in, click the "Log in" link in the menu and enter the username and password you set earlier.

To confirm that the Goodreads API integration worked, visit http://localhost:8000/stats (or click "Stats" in the top menu). It should display your Goodreads profile picture as well as the number of books you have on your "read" and "to-read" shelves.

Adding data

To add a book, navigate to the book's page on Goodreads, then get the book's Goodreads ID from the URL. For example, if the URL is

https://www.goodreads.com/book/show/369873.A_Hacker_Manifesto

then the Goodreads ID is 369873. From the dashboard, paste that into the "Book" field in the top right, then press + or hit enter. You'll now be able to add chapters to the book if you like (optional). Click the green arrow button when done, and you'll be presented with the option to add notes (for quotes) and terms (for vocabulary). If the book details didn't quite get saved properly, click the edit icon next to the book title.

NEW: You can now add books via the "b b" keyboard shortcut. This is recommended over the copy-and-paste the ID method above. To add an author, use "a a".

To add an author, find the Goodreads ID for the author (same method), and use the Author field from the dashboard or the author page. If the author doesn't have a Goodreads page, just click the + button directly to add the author details manually. The rest should be fairly self-explanatory, though I make no guarantees when it comes to usability.

If anything is confusing or buggy, feel free to contact me.

Advanced

If you want to deploy this in production, I'd recommend using nginx, gunicorn, systemd, and postgres. To enable postgres, set POSTGRES_PASSWORD.

Unit tests (the few that exist) can be run with python code/manage.py test.

Contact

If this is something you'd be interested in using, send me an email at [email protected].

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].