Giter VIP home page Giter VIP logo

franklin's Introduction

Franklin

Franklin is a command line utility, written in ruby, that allows searching public libraries powered by Overdrive. It supports multiple library searching for those that have accounts in more than one library (city, county, state, etc.)

Installation

Install gem:

$ gem install franklin

Configuration

Franklin needs to be configured with information about the Overdrive libraries it will search. It expects a file in YAML format to exist in your home directory called .franklin. The contents of the file should look like:

---
libraries:
  - name: San Francisco Public Library
    url: http://sfpl.lib.overdrive.com
  - name: San Diego Public Library
    url: http://sdpl.lib.overdrive.com
default_type: eBook # Optional, will show all types if not set.

There needs to be a minimum of one library, but there is no maximum. The name can be anything and will be included when the search results are presented. The url should point to the domain of the public library. It can be obtained by visiting Overdrive's site for each library, copying the url and stripping everything after the domain name.

Usage

Once the library has been installed and configured, the franklin executable will be available. It can be called from the command line with the list of terms to be searched for:

$ franklin chamber of secrets
Searched for: chamber of secrets
======================================================
Harry Potter and the Chamber of Secrets
By J.K. Rowling
Format: Audiobook
Availability:
  2.8 people/copy @ San Francisco Public Library
  15.5 people/copy @ San Diego Public Library
  1.3 people/copy @ San Diego County Library
  5.4 people/copy @ Los Angeles County Library
======================================================
Harry Potter and the Chamber of Secrets
By J.K. Rowling
Format: eBook
Availability:
  0.9 people/copy @ San Francisco Public Library
  Available @ San Diego Public Library
  0.6 people/copy @ San Diego County Library
  0.0 people/copy @ Los Angeles County Library
======================================================
Harry Potter
By Chris Peacock
Format: eBook
Availability:
  2.5 people/copy @ San Francisco Public Library
  1.0 people/copy @ San Diego Public Library
======================================================
Room at Heron's Inn
By Ginger Chambers
Format: eBook
Availability:
  Available @ San Francisco Public Library
======================================================
The Secret of the Fiery Chamber
By Carolyn Keene
Format: eBook
Availability:
  Available @ San Diego County Library

Franklin supports using a different path for the configuration file and filtering results by type (ie, eBook, Audiobook, etc).

See franklin --help for more information.

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/ylansegal/franklin.

License

This software is provided under the terms of the MIT license. See LICENSE.txt for more information

franklin's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

dkam

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.