rackup- run sinatra server
rake full- run sinatra server and start watching files
localhost:9292/- view heatmap
localhost:9292/reload- regenerate JSON file via Cloud API
Paste your "Developer Tokens" to config.ru
Evernote HeatMap uses evernote/evernote-sdk-ruby (already in the repository).
rake full, following libraries, gems or datas will be required:
If you would like to view your Evernote HeatMap immediately, you need followings:
- Ruby Programming Language
- Sinatra Gem
- Developer Token
If you you know and available above, edit config.ru like
$token = "YOUR-DEVELOPER-TOKEN"
$token = "S=s1:U=279bf:E=13f92f064bf:C=1383b3f38c3:P=1cd:A=en-devtoken:H=725df8b086b2cb08e13a7bf5ca186406"
Sinatra Gem is driven by Ruby Programming Language. You need to install Ruby. To install Ruby, read this page. If you are using Mac, you don't need to install Ruby because Ruby is already installed. You can check whether Ruby is woking by typing the following command in Command-Line-Interface (e.g. Terminal):
ruby -e "puts 'hello, world'"
gem install sinatra
To get Developer Token, visit Evernote developer page and get a production developer token. Once you've got developer token, edit config.ru file using Text Editor (not Word Processor). find the line something like this:
$token = "YOUR-DEVELOPER-TOKEN"
Change that line like so:
$token = "S=s1:U=279bf:E=13f92f064bf:C=1383b3f38c3:P=1cd:A=en-devtoken:H=725df8b086b2cb08e13a7af5ca186406"
Make suer you quote Developer token using " (quotation mark).
Download this repository via Git and go to the repository. Again, if you are using Mac, you don't need to install Git because Git is already installed. In Command-Line-Interface, type the following commands:
git clone git://github.com/puraumu/evernote-heatmap.git cd evernote-heatmap
Now, you can run Sinatra Server by typing following command in Command-Line-Interface:
Then open your browser and go to the URL:
This page will generate JSON file. But the page does not immediately generate JSON file unless you click "reload" button. So the page seems no error or no warning, click the button.
When you got some error, check out the message or google some words.
This code uses your Evernote Account. The code uses Developer Tokens for read only access, but use at your own risk.
(The MIT License)
Copyright (C) 2012 Puraumu
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.