everlog 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +19 -0
- data/.rspec +2 -0
- data/Gemfile +4 -0
- data/Guardfile +8 -0
- data/LICENSE.txt +22 -0
- data/README.md +29 -0
- data/Rakefile +1 -0
- data/everlog.gemspec +33 -0
- data/lib/everlog.rb +42 -0
- data/lib/everlog/app.rb +15 -0
- data/lib/everlog/app/animetick.rb +14 -0
- data/lib/everlog/app/evernote.rb +9 -0
- data/lib/everlog/app/github.rb +9 -0
- data/lib/everlog/app/hatena.rb +13 -0
- data/lib/everlog/app/moves.rb +9 -0
- data/lib/everlog/app/twitter.rb +11 -0
- data/lib/everlog/app/weather.rb +9 -0
- data/lib/everlog/dom.rb +9 -0
- data/lib/everlog/dom/entity.rb +11 -0
- data/lib/everlog/dom/entity/config.rb +30 -0
- data/lib/everlog/dom/entity/content.erb +170 -0
- data/lib/everlog/dom/entity/content.rb +14 -0
- data/lib/everlog/dom/module.rb +6 -0
- data/lib/everlog/dom/module/github.rb +28 -0
- data/lib/everlog/dom/module/moves.rb +26 -0
- data/lib/everlog/dom/repository.rb +5 -0
- data/lib/everlog/dom/repository/evernote.rb +24 -0
- data/lib/everlog/dom/service.rb +5 -0
- data/lib/everlog/dom/service/nullobject.rb +18 -0
- data/lib/everlog/dom/value.rb +18 -0
- data/lib/everlog/dom/value/animetick.rb +25 -0
- data/lib/everlog/dom/value/github.rb +6 -0
- data/lib/everlog/dom/value/github/activity.rb +18 -0
- data/lib/everlog/dom/value/github/commit.rb +13 -0
- data/lib/everlog/dom/value/hatena.rb +20 -0
- data/lib/everlog/dom/value/moves.rb +16 -0
- data/lib/everlog/dom/value/moves/move.rb +31 -0
- data/lib/everlog/dom/value/moves/place.rb +13 -0
- data/lib/everlog/dom/value/moves/referer.rb +10 -0
- data/lib/everlog/dom/value/moves/referer/move.rb +7 -0
- data/lib/everlog/dom/value/moves/referer/place.rb +8 -0
- data/lib/everlog/dom/value/moves/summary.rb +30 -0
- data/lib/everlog/dom/value/twitter.rb +13 -0
- data/lib/everlog/dom/value/weather.rb +31 -0
- data/lib/everlog/inf.rb +5 -0
- data/lib/everlog/inf/api.rb +20 -0
- data/lib/everlog/inf/api/animetick.rb +25 -0
- data/lib/everlog/inf/api/evernote.rb +37 -0
- data/lib/everlog/inf/api/github.rb +26 -0
- data/lib/everlog/inf/api/googlemap.rb +15 -0
- data/lib/everlog/inf/api/hatena.rb +20 -0
- data/lib/everlog/inf/api/moves.rb +21 -0
- data/lib/everlog/inf/api/twitter.rb +26 -0
- data/lib/everlog/inf/api/wunderground.rb +15 -0
- data/lib/everlog/version.rb +3 -0
- data/spec/fixtures/animetick/list_ticket_response.json +1 -0
- data/spec/fixtures/hatena/feed_response.json +80 -0
- data/spec/fixtures/moves/daily_storyline_response.json +319 -0
- data/spec/fixtures/moves/daily_summary_response.json +29 -0
- data/spec/fixtures/moves/sample_for_erb.json +29 -0
- data/spec/fixtures/wunderground/yesterday_response.json +1 -0
- data/spec/lifelog/app/animetick_spec.rb +13 -0
- data/spec/lifelog/app/evernote_spec.rb +14 -0
- data/spec/lifelog/app/github_spec.rb +22 -0
- data/spec/lifelog/app/hatena_spec.rb +35 -0
- data/spec/lifelog/app/moves_spec.rb +9 -0
- data/spec/lifelog/app/twitter_spec.rb +33 -0
- data/spec/lifelog/app/weather_spec.rb +11 -0
- data/spec/lifelog/dom/entity/config_spec.rb +22 -0
- data/spec/lifelog/dom/entity/content_spec.rb +23 -0
- data/spec/lifelog/dom/module/github_spec.rb +60 -0
- data/spec/lifelog/dom/module/moves_spec.rb +37 -0
- data/spec/lifelog/dom/repository/evernote_spec.rb +26 -0
- data/spec/lifelog/dom/service/nullobject_spec.rb +19 -0
- data/spec/lifelog/dom/value/animetick_spec.rb +49 -0
- data/spec/lifelog/dom/value/github/activity_spec.rb +25 -0
- data/spec/lifelog/dom/value/github/commit_spec.rb +23 -0
- data/spec/lifelog/dom/value/hatena_spec.rb +23 -0
- data/spec/lifelog/dom/value/moves/move_spec.rb +45 -0
- data/spec/lifelog/dom/value/moves/place_spec.rb +18 -0
- data/spec/lifelog/dom/value/moves/referer/move_spec.rb +18 -0
- data/spec/lifelog/dom/value/moves/referer/place_spec.rb +17 -0
- data/spec/lifelog/dom/value/moves/summary_spec.rb +64 -0
- data/spec/lifelog/dom/value/twitter_spec.rb +23 -0
- data/spec/lifelog/dom/value/weather_spec.rb +43 -0
- data/spec/lifelog/inf/api/animetick_spec.rb +22 -0
- data/spec/lifelog/inf/api/evernote_spec.rb +49 -0
- data/spec/lifelog/inf/api/github_spec.rb +36 -0
- data/spec/lifelog/inf/api/googlemap_spec.rb +9 -0
- data/spec/lifelog/inf/api/hatena_spec.rb +23 -0
- data/spec/lifelog/inf/api/moves_spec.rb +13 -0
- data/spec/lifelog/inf/api/twitter_spec.rb +23 -0
- data/spec/lifelog/inf/api/wunderground_spec.rb +11 -0
- data/spec/spec_helper.rb +8 -0
- metadata +345 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 0917b0218651734025af83c972f25fa6860bdf87
|
4
|
+
data.tar.gz: 64f9772e5f0a5999dc01dad761dd347c6260dbf3
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 9fe192be8b781b85653996f1784a87fffc9587d4c43e7031a41b6f3ef6e025508333cc98f356db0a141b2841c83a5f722ddeefc2ccdf0845228910fbc3f2b4c2
|
7
|
+
data.tar.gz: 636ff57c7254c4ffa82913d96c5ce231900dbc535e520904ed8c81cf689108f6bb7f3abd6efa774fc681e8ef2e17006e146b75aafe71dcddd719a4bcec4e31e5
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/Gemfile
ADDED
data/Guardfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 gong023
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# Everlog
|
2
|
+
|
3
|
+
TODO: Write a gem description
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'everlog'
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install everlog
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
TODO: Write usage instructions here
|
22
|
+
|
23
|
+
## Contributing
|
24
|
+
|
25
|
+
1. Fork it
|
26
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
27
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
28
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
29
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
data/everlog.gemspec
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'everlog/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "everlog"
|
8
|
+
spec.version = Everlog::VERSION
|
9
|
+
spec.authors = ["gong023"]
|
10
|
+
spec.email = ["gon.gong.gone@gmail.com"]
|
11
|
+
spec.description = %q{post log got from third paty to evernote}
|
12
|
+
spec.summary = %q{post lifelog to evernote}
|
13
|
+
spec.homepage = "https://github.com/gong023/everlog"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/)
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_dependency 'evernote_oauth'
|
22
|
+
spec.add_dependency 'twitter', '~> 5.7.1'
|
23
|
+
spec.add_dependency 'moves'
|
24
|
+
spec.add_dependency 'geocoder'
|
25
|
+
spec.add_dependency 'hatena-bookmark'
|
26
|
+
spec.add_dependency 'octokit'
|
27
|
+
spec.add_dependency 'wunderground'
|
28
|
+
spec.add_development_dependency "rspec"
|
29
|
+
spec.add_development_dependency "guard-rspec"
|
30
|
+
spec.add_development_dependency "dotenv"
|
31
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
32
|
+
spec.add_development_dependency "rake"
|
33
|
+
end
|
data/lib/everlog.rb
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
require 'everlog/inf'
|
2
|
+
require 'everlog/dom'
|
3
|
+
require 'everlog/app'
|
4
|
+
|
5
|
+
class Everlog
|
6
|
+
def initialize
|
7
|
+
@content = Dom::Entity::Content.new
|
8
|
+
end
|
9
|
+
|
10
|
+
def push(service, option = {})
|
11
|
+
setup_config(service.to_sym, option)
|
12
|
+
data = App.const_get(service.capitalize).fetch_since((DateTime.now -1).to_time)
|
13
|
+
@content.push(service, data)
|
14
|
+
ensure
|
15
|
+
Dom::Entity::Config.clear!
|
16
|
+
end
|
17
|
+
|
18
|
+
def publish(title, access_token = nil, output = 'local')
|
19
|
+
return @content.render if output == 'local'
|
20
|
+
raise EverlogConfigError, 'evernote access_token not given' if access_token.nil?
|
21
|
+
|
22
|
+
Dom::Entity::Config.evernote.access_token = access_token
|
23
|
+
Dom::App::Evernote.publish(title, @content.render, output)
|
24
|
+
ensure
|
25
|
+
Dom::Entity::Config.clear!
|
26
|
+
end
|
27
|
+
|
28
|
+
private
|
29
|
+
def setup_config(service, option)
|
30
|
+
case service
|
31
|
+
when :weather
|
32
|
+
Dom::Entity::Config.wunderground.access_token = option[:access_token]
|
33
|
+
else
|
34
|
+
Dom::Entity::Config.send(service).consumer_key = option[:consumer_key]
|
35
|
+
Dom::Entity::Config.send(service).consumer_secret = option[:consumer_secret]
|
36
|
+
Dom::Entity::Config.send(service).access_token = option[:access_token]
|
37
|
+
Dom::Entity::Config.send(service).access_secret = option[:access_secret]
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
class EverlogConfigError < StandardError; end
|
42
|
+
end
|
data/lib/everlog/app.rb
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
class Everlog
|
2
|
+
class App
|
3
|
+
require 'everlog/app/twitter'
|
4
|
+
require 'everlog/app/hatena'
|
5
|
+
require 'everlog/app/github'
|
6
|
+
require 'everlog/app/moves'
|
7
|
+
require 'everlog/app/animetick'
|
8
|
+
require 'everlog/app/weather'
|
9
|
+
require 'everlog/app/evernote'
|
10
|
+
|
11
|
+
def self.fetch_since
|
12
|
+
raise 'no implemented.'
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
class Everlog
|
2
|
+
class App::Animetick < App
|
3
|
+
def self.fetch_since date
|
4
|
+
config = Dom::Entity::Config.animetick
|
5
|
+
api_response = Inf::Api::Animetick.new(config).ticket_list
|
6
|
+
|
7
|
+
tickets = api_response.map do |r|
|
8
|
+
ticket = Dom::Value::Animetick.new(r)
|
9
|
+
ticket.updated_at > date ? ticket : nil
|
10
|
+
end
|
11
|
+
tickets.compact
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class Everlog
|
2
|
+
class App::Hatena < App
|
3
|
+
def self.fetch_since date
|
4
|
+
config = Dom::Entity::Config.hatena
|
5
|
+
api_response = Inf::Api::Hatena.new(config).feed_entry
|
6
|
+
bookmarks = api_response.map do |r|
|
7
|
+
feed = Dom::Value::Hatena.new(r)
|
8
|
+
feed.issued > date ? feed : nil
|
9
|
+
end
|
10
|
+
bookmarks.compact
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
class Everlog
|
2
|
+
class App::Twitter < App
|
3
|
+
|
4
|
+
def self.fetch_since date
|
5
|
+
config = Dom::Entity::Config.twitter
|
6
|
+
api_response = Inf::Api::Twitter.new(config).timeline
|
7
|
+
tweets = api_response.map { |r| Dom::Value::Twitter.new(r) if r.created_at > date }
|
8
|
+
tweets.compact.reverse
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
data/lib/everlog/dom.rb
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
class Everlog
|
2
|
+
class Dom::Entity::Config < Dom::Entity
|
3
|
+
THIRD_PARTY = %w(evernote twitter hatena github moves animetick wunderground googlemap).freeze
|
4
|
+
|
5
|
+
THIRD_PARTY.each do |service|
|
6
|
+
const_set service.capitalize, Class.new {
|
7
|
+
class << self
|
8
|
+
attr_accessor :consumer_key
|
9
|
+
attr_accessor :consumer_secret
|
10
|
+
attr_accessor :access_token
|
11
|
+
attr_accessor :access_secret
|
12
|
+
end
|
13
|
+
}
|
14
|
+
end
|
15
|
+
|
16
|
+
class << self
|
17
|
+
def clear!
|
18
|
+
THIRD_PARTY.each do |service|
|
19
|
+
const_get(service.to_s.capitalize).access_token = nil
|
20
|
+
const_get(service.to_s.capitalize).access_secret = nil
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
def method_missing name
|
25
|
+
raise NoMethodError, 'specified service is invalid.' unless THIRD_PARTY.include?(name.to_s)
|
26
|
+
return const_get(name.to_s.capitalize)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,170 @@
|
|
1
|
+
<?xml version='1.0' encoding='UTF-8'?>
|
2
|
+
<!DOCTYPE en-note SYSTEM 'http://xml.evernote.com/pub/enml2.dtd'>
|
3
|
+
<en-note>
|
4
|
+
|
5
|
+
<table border="0" cellspacing="0" cellpadding="9">
|
6
|
+
<% unless @weather.nil? || @weather.empty? %>
|
7
|
+
<tr bgcolor="ffaa33">
|
8
|
+
<td></td>
|
9
|
+
<td><font size="+1" color="ffffff">Weather</font></td>
|
10
|
+
<td></td>
|
11
|
+
<td></td>
|
12
|
+
</tr>
|
13
|
+
<tr>
|
14
|
+
<td></td>
|
15
|
+
<td><font color="5E5E5E">Tokyo is <%= @weather.condition %>.</font></td>
|
16
|
+
<td><font color="5E5E5E">Temp is <%= @weather.max_temp %>℃ / <%= @weather.min_temp %>℃</font></td>
|
17
|
+
<td></td>
|
18
|
+
</tr>
|
19
|
+
<% end %>
|
20
|
+
|
21
|
+
<% unless @twitter.nil? || @twitter.empty? %>
|
22
|
+
<tr><td><div></div></td><td><div></div></td><td><div></div></td><td><div></div></td></tr>
|
23
|
+
<tr bgcolor="a4cce0">
|
24
|
+
<td></td>
|
25
|
+
<td><font size="+1" color="ffffff">Twitter</font></td>
|
26
|
+
<td></td>
|
27
|
+
<td></td>
|
28
|
+
</tr>
|
29
|
+
<% @twitter.each do |t| %>
|
30
|
+
<tr>
|
31
|
+
<td></td>
|
32
|
+
<td colspan="2"><font color="5E5E5E"><%= t.tweet %></font></td>
|
33
|
+
<td><font color="5E5E5E"><%= t.created_at %></font></td>
|
34
|
+
</tr>
|
35
|
+
<% end %>
|
36
|
+
<% end %>
|
37
|
+
|
38
|
+
<% unless @hatena.nil? || @hatena.empty? %>
|
39
|
+
<tr><td><div></div></td><td><div></div></td><td><div></div></td><td><div></div></td></tr>
|
40
|
+
<tr bgcolor="4a80c7">
|
41
|
+
<td></td>
|
42
|
+
<td colspan="2"><font size="+1" color="ffffff">HatenaBookmark</font></td>
|
43
|
+
<td></td>
|
44
|
+
</tr>
|
45
|
+
<% @hatena.each do |h| %>
|
46
|
+
<tr>
|
47
|
+
<td></td>
|
48
|
+
<td colspan="2">
|
49
|
+
<font color="5E5E5E"><a href="<%= h.link %>"><%= h.title %></a></font>
|
50
|
+
</td>
|
51
|
+
<td></td>
|
52
|
+
</tr>
|
53
|
+
<% end %>
|
54
|
+
<% end %>
|
55
|
+
|
56
|
+
<% unless @github.nil? || @github.empty? %>
|
57
|
+
<tr><td><div></div></td><td><div></div></td><td><div></div></td><td><div></div></td></tr>
|
58
|
+
<tr bgcolor="B0C0D0">
|
59
|
+
<td></td>
|
60
|
+
<td><font size="+1" color="ffffff">Github</font></td>
|
61
|
+
<td></td>
|
62
|
+
<td></td>
|
63
|
+
</tr>
|
64
|
+
<% @github.each do |g| %>
|
65
|
+
<tr>
|
66
|
+
<td></td>
|
67
|
+
<td><font color="5E5E5E"><%= g.repo_name %></font></td>
|
68
|
+
<td></td>
|
69
|
+
<td></td>
|
70
|
+
</tr>
|
71
|
+
<% g.commits.each do |commit| %>
|
72
|
+
<tr>
|
73
|
+
<td></td>
|
74
|
+
<td></td>
|
75
|
+
<td>
|
76
|
+
<font color="5E5E5E"> <a href="<%= commit.url %>"><%= commit.message %></a></font>
|
77
|
+
</td>
|
78
|
+
</tr>
|
79
|
+
<% end %>
|
80
|
+
<% end %>
|
81
|
+
<% end %>
|
82
|
+
|
83
|
+
<% unless @animetick.nil? || @animetick.empty? %>
|
84
|
+
<tr><td><div></div></td><td><div></div></td><td><div></div></td><td><div></div></td></tr>
|
85
|
+
<tr bgcolor="f75c24">
|
86
|
+
<td></td>
|
87
|
+
<td><font size="+1" color="ffffff">Animetick</font></td>
|
88
|
+
<td></td>
|
89
|
+
<td></td>
|
90
|
+
</tr>
|
91
|
+
<% @animetick.each do |a| %>
|
92
|
+
<tr>
|
93
|
+
<td></td>
|
94
|
+
<td colspan="2"><font color="5E5E5E"><%= a.title %> #<%= a.count %></font></td>
|
95
|
+
<td></td>
|
96
|
+
</tr>
|
97
|
+
<tr>
|
98
|
+
<td></td>
|
99
|
+
<td></td>
|
100
|
+
<td><font color="5E5E5E"><%= a.sub_title %></font></td>
|
101
|
+
<td><font color="5E5E5E"><%= a.updated_at_screen %></font></td>
|
102
|
+
</tr>
|
103
|
+
<% end %>
|
104
|
+
<% end %>
|
105
|
+
|
106
|
+
<% unless @moves.nil? || @moves.empty? %>
|
107
|
+
<tr><td><div></div></td><td><div></div></td><td><div></div></td><td><div></div></td></tr>
|
108
|
+
<tr bgcolor="84e388">
|
109
|
+
<td></td>
|
110
|
+
<td><font size="+1" color="ffffff"> Moves</font></td>
|
111
|
+
<td></td>
|
112
|
+
<td></td>
|
113
|
+
</tr>
|
114
|
+
|
115
|
+
<tr>
|
116
|
+
<td></td>
|
117
|
+
<td><font color="5E5E5E">summary</font></td>
|
118
|
+
<td></td>
|
119
|
+
<td></td>
|
120
|
+
</tr>
|
121
|
+
<tr>
|
122
|
+
<td></td>
|
123
|
+
<td></td>
|
124
|
+
<td><font color="5E5E5E">Walk</font></td>
|
125
|
+
<td><font color="5E5E5E"><%= @moves[:summary].walk %>km</font></td>
|
126
|
+
</tr>
|
127
|
+
<tr>
|
128
|
+
<td></td>
|
129
|
+
<td></td>
|
130
|
+
<td><font color="5E5E5E">Cycle</font></td>
|
131
|
+
<td><font color="5E5E5E"><%= @moves[:summary].cycle %>km</font></td>
|
132
|
+
</tr>
|
133
|
+
<tr>
|
134
|
+
<td></td>
|
135
|
+
<td></td>
|
136
|
+
<td></td>
|
137
|
+
<td><font color="5E5E5E"><%= @moves[:summary].cal %>cal</font></td>
|
138
|
+
</tr>
|
139
|
+
|
140
|
+
<tr>
|
141
|
+
<td></td>
|
142
|
+
<td><font color="5E5E5E">storyline</font></td>
|
143
|
+
<td></td>
|
144
|
+
<td></td>
|
145
|
+
</tr>
|
146
|
+
<% @moves[:storyline].each do |story| %>
|
147
|
+
<% if story.name === 'place' %>
|
148
|
+
<tr>
|
149
|
+
<td></td>
|
150
|
+
<td></td>
|
151
|
+
<td colspan="2"><font color="5E5E5E"><%= story.screen_name %></font></td>
|
152
|
+
</tr>
|
153
|
+
<% elsif story.name === 'move' %>
|
154
|
+
<% story.to_a.each do |s| %>
|
155
|
+
<tr>
|
156
|
+
<td></td>
|
157
|
+
<td></td>
|
158
|
+
<td><font color="5E5E5E">↓ <%= s.action %></font></td>
|
159
|
+
<td>
|
160
|
+
<font color="5E5E5E"><%= "#{s.start_time} ~ #{s.end_time}(#{s.duration}min)" %></font>
|
161
|
+
<div><font color="5E5E5E"><%= s.distance %>km</font></div>
|
162
|
+
</td>
|
163
|
+
</tr>
|
164
|
+
<% end %>
|
165
|
+
<% end %>
|
166
|
+
<% end %>
|
167
|
+
<% end %>
|
168
|
+
</table>
|
169
|
+
|
170
|
+
</en-note>
|