robertseaton / bkz

What should you read? bkz knows.
3 stars 1 forks source link

Installing dependencies

Install R, Ruby, SQLite, and Python from the repository:

$ pacman -S r ruby sqlite python

On debian based distributions, you will need the dev packages, too. (e.g. ruby-dev)

Install Ruby libraries:

$ gem install sequel trollop nokogiri sqlite3

Alternatively, install Ruby libraries with apt-get (Ubuntu):

$ sudo apt-get install ruby-sequel libtrollop-ruby ruby-nokogiri ruby-sqlite3

Next, you will need to install the necessary R libraries. Boot up the R REPL like so:

$ R
R version 3.0.0 (2013-04-03) -- "Masked Marvel"
Copyright (C) 2013 The R Foundation for Statistical Computing
Platform: x86_64-unknown-linux-gnu (64-bit)
...
> install.packages("sqldf")
...
> install.packages("caret", dependencies = c("Depends", "Suggests"))
...
> install.packages("doMC")

Then, if it works you should be able to do things like:

$ ruby bkz.rb --title "Information Theory, Inference, and Learning Algorithm"
Is this the title of your book: Information theory, inference and learning algorithms? [y/n]
y
$ Rscript bkz.R 
...
NULL
NULL

Components

To add books:

ruby bkz.rb --title "BOOK_TITLE"

To update predictions:

Rscript bkz.R

The predictions and book data are stored in books.db, a SQLite table, which can be view inside of one of the many GUI-based SQLite managers. Firefox users can use this plugin.

scholar.py credit

The scholar.py code is the work of Christian Kreibich and contributors. The project page can be found here.