Skip to content
Browse files

ajust for reloading infomation

  • Loading branch information...
1 parent c35177f commit ab8ba3b7d7ff795f03d78bd7eeb3054d9364d85c Puraumu committed
View
2 .gitignore
@@ -1,5 +1,5 @@
.sass-cache/
-evernote-sdk-ruby/out.json
+out.json
public/css/style.css
public/css/bootstrap/responsive.css
public/js/script.js
View
5 evernote-sdk-ruby/client.rb → client.rb
@@ -2,8 +2,8 @@
require './enclient'
require '~/scripts/rubylibs/util'
-src = "../../personal/evernote-heatmap.json"
-out = '../public/static/evernote.json'
+src = "../personal/evernote-heatmap.json"
+out = './public/static/evernote.json'
# out = './out.json'
obj = JSON.parse Util.read_file(src)
@@ -12,5 +12,6 @@
# exit
oo = client.guid_name
# p oo
+# exit
# Util.write_file(out, client.guid_name.to_json)
Util.write_file(out, oo.to_json)
View
0 evernote-sdk-ruby/en-sql.rb → en-sql.rb
File renamed without changes.
View
51 evernote-sdk-ruby/enclient.rb → enclient.rb
@@ -2,9 +2,9 @@
# This will only work if you run this application from the ruby/sample/client
# directory of the Evernote API SDK.
dir = File.expand_path(File.dirname(__FILE__))
-$LOAD_PATH.push("#{dir}/lib")
-$LOAD_PATH.push("#{dir}/lib/thrift")
-$LOAD_PATH.push("#{dir}/lib/Evernote/EDAM")
+$LOAD_PATH.push("#{dir}/evernote-sdk-ruby/lib")
+$LOAD_PATH.push("#{dir}/evernote-sdk-ruby/lib/thrift")
+$LOAD_PATH.push("#{dir}/evernote-sdk-ruby/lib/Evernote/EDAM")
require "thrift/types"
require "thrift/struct"
@@ -86,28 +86,22 @@ def all_tags
def all_notes
out = []
- notebooks = self.noteStore.listNotebooks(self.token)
- notebooks.each do |notebook|
- offset = 0
- pageSize = 100
-
- filter = Evernote::EDAM::NoteStore::NoteFilter.new
- filter.notebookGuid = notebook.guid
-
- spec = Evernote::EDAM::NoteStore::NotesMetadataResultSpec.new
- spec.includeNotebookGuid = true
- spec.includeTitle = true
- spec.includeCreated = true
- spec.includeTagGuids = true
-
- noteList = self.noteStore.findNotesMetadata(self.token, filter, offset, pageSize, spec)
- while 0 <= (noteList.totalNotes - (noteList.startIndex + noteList.notes.length))
- noteList.notes.each do |meta|
- out.push meta
- end
- offset = offset + pageSize
- noteList = self.noteStore.findNotesMetadata(self.token, filter, offset, pageSize, spec)
+ offset = 0
+ pageSize = 100
+ filter = Evernote::EDAM::NoteStore::NoteFilter.new
+ filter.words = "-created:#{Time.now.strftime("%Y%m%d")}"
+ spec = Evernote::EDAM::NoteStore::NotesMetadataResultSpec.new
+ spec.includeNotebookGuid = true
+ spec.includeTitle = true
+ spec.includeCreated = true
+ spec.includeTagGuids = true
+ noteList = self.noteStore.findNotesMetadata(self.token, filter, offset, pageSize, spec)
+ while 0 <= (noteList.totalNotes - (noteList.startIndex + noteList.notes.length))
+ noteList.notes.each do |meta|
+ out.push meta
end
+ offset = offset + pageSize
+ noteList = self.noteStore.findNotesMetadata(self.token, filter, offset, pageSize, spec)
end
out
end
@@ -131,6 +125,15 @@ def guid_name
out
end
+ def all_notes_number
+ filter = Evernote::EDAM::NoteStore::NoteFilter.new
+ filter.words = "-created:#{Time.now.strftime("%Y%m%d")}"
+ spec = Evernote::EDAM::NoteStore::NotesMetadataResultSpec.new
+ noteList = self.noteStore.findNotesMetadata(self.token, filter, 0, 10, spec)
+ noteList.totalNotes
+ end
+
+
end # /ENClient
# client = ENClient.new(authToken)
View
25 public/reload/index.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta http-equiv="content-type" content="text/html;charset=utf-8">
+ <title>DJI</title>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <script src="http://d3js.org/d3.v2.js"></script>
+ <link type="text/css" rel="stylesheet" href="/css/style.css"/>
+ <link type="text/css" rel="stylesheet" href="/css/colorbrewer.css"/>
+ <link type="text/css" rel="stylesheet" href="/css/calendar.css"/>
+ </head>
+ <body>
+
+ <div class="container">
+
+ <h1>Reload Cloud API</h1>
+
+ </div><!-- /.container -->
+
+ <script type="text/javascript" src="/js/script.js"></script>
+ <!-- <script type="text/javascript" src="/js/d3.scales.js"></script> -->
+ <!-- <script type="text/javascript" src="/js/dji.js"></script> -->
+
+ </body>
+</html>

0 comments on commit ab8ba3b

Please sign in to comment.
Something went wrong with that request. Please try again.