querybooks
v0.1.0
Published
Query books by file names in local directory.
Downloads
5
Readme
QueryBooks
bk
is a command line tool to search books in local directory by file name.
Installation
$ [sudo] npm install -g querybooks
Setup
Before using bk
, you have to config your books directory. Open the user configuration file $HOME/.bkconf.json
and add the field booksdir
. Here is an example:
{
"booksdir": "/Users/kylqin/Documents/books",
"bookformats": ["pdf", "epub" ,"mobi"]
}
Usage
Execute following command to get the usage:
$ bk --help
Usage: bk {-h | --help | -v | --version}
bk [fuzzy | f | lunr | l | simple | s] searchTerm
Options:
--help, -h Show this infomation
--version, -v Show version
These are common sub commands used to search books with various search engines:
fuzzy, f Search with fuzzy style
lunr, l Search with lunr.js, a search engine which is like Solr
simple, s Search with exact match case insensitively
collect,c Collect books from collectfrom directories to booksdir
<searchTerm> Same search with both simple and lunr sub commands
Please modify the configuration file `/Users/timber/.bkconf.json` (created it if not
existed), assigning the field `booksdir` the path where your books located.
Screenshots
Note that you can open the book by clicking the blue block with holding Command (for MacOS) or Ctrl ( for Linux) key.
License
MIT