Permalink
Browse files

more refine README

  • Loading branch information...
1 parent a3f7104 commit a4f5502bf628c0c579e7fbea9cfa6abcb67f681a Puraumu committed Jul 26, 2012
Showing with 34 additions and 12 deletions.
  1. +23 −12 README.md
  2. +11 −0 Rakefile
View
@@ -4,17 +4,18 @@ Evernote HeatMap visualizes Evernote metadata using [d3.js](https://github.com/m
# Overview
-* `rake server` - run sinatra server
+* `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](https://github.com/evernote/evernote-sdk-ruby) (already in the repository).
+Evernote HeatMap uses [evernote/evernote-sdk-ruby](https://github.com/evernote/evernote-sdk-ruby) (already in the repository).
# Requirements
-To run `rake server`, following libraries, gems or datas will be required:
+To run `rake full`, following libraries, gems or datas will be required:
* [CoffeeScript](http://coffeescript.org/)
* [Sinatra](http://www.sinatrarb.com/)
@@ -23,10 +24,12 @@ To run `rake server`, following libraries, gems or datas will be required:
# For minimalists
-If you would like to view your Evernote data immediately, you need followings:
+If you would like to view your Evernote HeatMap immediately, you need followings:
+* Command-Line-Interface
* Ruby Programming Language
* Sinatra Gem
+* Git
* Developer Token
If you you know and available above, edit config.ru like
@@ -37,28 +40,32 @@ to
$token = "S=s1:U=279bf:E=13f92f064bf:C=1383b3f38c3:P=1cd:A=en-devtoken:H=725df8b086b2cb08e13a7bf5ca186406"
-Then, open [the URL](http://localhost:9292/reload) and skip to [Generating JSON](#generating-json).
+Then `rackup`, open [the URL](http://localhost:9292/reload) and skip to [Generating JSON](#generating-json).
-This script is written in [Ruby Programming Language](http://www.ruby-lang.org/en/). You need to install Ruby. To install Ruby, read [this](http://www.ruby-lang.org/en/downloads/) page. If you are using Mac, you don't need to install Ruby. You can check whether Ruby is woking by typing the following command in Command-Line (e.g. Terminal):
+Sinatra Gem is driven by [Ruby Programming Language](http://www.ruby-lang.org/en/). You need to install Ruby. To install Ruby, read [this](http://www.ruby-lang.org/en/downloads/) 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'"
-[Sinatra gem](http://www.sinatrarb.com/) requires [RubyGems](http://docs.rubygems.org/read/chapter/1/). Because RubyGems is a part of Ruby, RubyGems is basically available if Ruby is installed. To get Sinatra gem, type:
+[Sinatra gem](http://www.sinatrarb.com/) requires [RubyGems](http://docs.rubygems.org/read/chapter/1/). Because RubyGems is a part of Ruby, RubyGems is basically available if Ruby is installed. To get Sinatra Gem, type:
gem install sinatra
-To get Developer Token, visit [Evernote developer page](http://dev.evernote.com/documentation/cloud/chapters/Authentication.php#devtoken) and [get a production developer token](https://www.evernote.com/api/DeveloperToken.action). Once you've got developer token,
-
-edit config.ru file using TextEditor, not Word Processor. find the line something like this:
+To get Developer Token, visit [Evernote developer page](http://dev.evernote.com/documentation/cloud/chapters/Authentication.php#devtoken) and [get a production developer token](https://www.evernote.com/api/DeveloperToken.action). 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](http://git-scm.com/) 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
-**Make suer you quote Developer token using " (quotation mark).** When you finish editing the file, you can run Rackup Server by typing following command in Command-Line:
+Now, you can run Sinatra Server by typing following command in Command-Line-Interface:
rackup
@@ -72,6 +79,10 @@ This page will generate JSON file. But the page does not immediately generate JS
When you got some error, check out the message or google some words.
+# Note
+
+This code uses your Evernote Account. The code uses Developer Tokens for read only access, but use at your own risk.
+
# License
(The MIT License)
@@ -82,4 +93,4 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of
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.
+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.
View
@@ -7,6 +7,17 @@ coffee_src = "coffee"
task :server do
puts "Run Rackup Server"
rackupPid = Process.spawn("rackup --port #{server_port}")
+ trap("INT") {
+ [rackupPid].each { |pid| Process.kill(9, pid) rescue Errno::ESRCH }
+ exit 0
+ }
+ [rackupPid].each { |pid| Process.wait(pid) }
+end
+
+task :full do
+ puts "Run Rackup Server"
+ rackupPid = Process.spawn("rackup --port #{server_port}")
+ puts "Start watching files"
coffeePid = Process.spawn("coffee --watch --compile --output #{coffee_out} #{coffee_src}")
compassPid = Process.spawn("compass watch")
trap("INT") {

0 comments on commit a4f5502

Please sign in to comment.