Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/spier/springerquotes
Springer Quotes
https://github.com/spier/springerquotes
Last synced: about 1 month ago
JSON representation
Springer Quotes
- Host: GitHub
- URL: https://github.com/spier/springerquotes
- Owner: spier
- Created: 2011-10-22T13:47:19.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2012-04-02T20:38:08.000Z (almost 13 years ago)
- Last Synced: 2024-04-15T02:51:16.506Z (9 months ago)
- Homepage: http://springerquotes.heroku.com
- Size: 652 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Springer Quotes
This is the source code for [Springer Quotes][sq], the application with which [I won the 1st prize][challenge] in the Springer API Challenge 1.0.
I am open sourcing this code, so that others can take some bits and pieces that they need. Also this seems like the right thing to do, as I have used some many open source tools (as you will see later). This code is released under [MIT License (MIT)](http://spier.mit-license.org/).
If you should have any issues getting this to work, you can ping me [@sebastianspier][@seb] and I will try to help out.
## Highlights
There are two interesting pieces to this application that I want to highlight:
* `./emphasis` folder - The [Emphasis JavaScript Library](https://github.com/NYTimes/Emphasis) is used for the quote selection effect in the UI. I have ported the Javascript code to ruby as well. This is used for the generation of the **quotes view** (see the images below).
* `./xls` folder - XSLT is used to transform Springer's A++ XML format, as returned by the Springer API, into HTML.
* yql_simple gem - I am using my ruby gem [YqlSimple](https://github.com/spier/gem_yql_simple) as a minimalist wrapper around [YQL][yql]. I don't really need the power of YQL in this application but I like YQL, so I ended up using it for the bit.ly communication ;)## Tools
Besides this source code, these are the tools and services that I used to build Springer Quotes:
-
heroku for hosting this site -
CouchDB for the data storage -
Ruby and Sinatra for the implementation and server DSL -
bit.ly for shortening the links -
Nokogiri + XSLT for the conversion of Springer's A++ format into somewhat more readable HTML. -
MathJax for beautifying mathematic formulas -
'Sticky' buttons at the top of the article -
Pure CSS speech bubbles for the nice speech bubbles you see on the /quotes page -
jQuery as my JavaScript library of choice
## Prerequisites
Before you can run this application you will need a couple of things:
- ruby 1.8.7
- your own CouchDB
- Springer API keys - go to the [Springer API portal](http://dev.springer.com) and register to get your own keys
- (optionally) a bit.ly account
Once you have these, you need to modify the configuration file `environment_variables.rb` accordingly.
## Installation
1. `bundle`
1. `bundle exec rackup`
1. Springer Quotes is now running at `http://localhost:9292`
Test the application by visiting the following URLs. The screens should look like the images below.
- **normal article view** - `http://localhost:9292/article/doi:10.1007/s10680-009-9177-y#h[Itacin,1,4]`
- **quotes view** - `http://localhost:9292/quotes/doi:10.1007/s10680-009-9177-y?quotes=h[Itacin,1,4]`
![normal article view](https://github.com/spier/springerquotes/raw/master/example_images/normal_article_view.png "Normal article view")
![quotes view](https://github.com/spier/springerquotes/raw/master/example_images/quotes_view.png "Quotes view")
Have fun with [Springer Quotes][sq]!
# License
[MIT License (MIT)](http://spier.mit-license.org/)
[@seb]: https://twitter.com/#!/sebastianspier
[challenge]: http://spier.hu/2011/07/i-won-the-springer-api-challenge-1.0/
[sq]: http://springerquotes.heroku.com
[yql]: http://developer.yahoo.com/yql