pluto 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -13,3 +13,4 @@ lib/pluto/version.rb
13
13
  templates/blank.html.erb
14
14
  templates/blank.top.html.erb
15
15
  templates/blank.txt
16
+ templates/feed-icon-10x10.png
@@ -8,7 +8,65 @@ from Published Web Feeds
8
8
 
9
9
  ## Usage
10
10
 
11
- TBD
11
+ Use the `pluto` command line tool and pass in one or more planet configuration files. Example:
12
+
13
+ pluto ruby.yml
14
+
15
+
16
+ This will
17
+
18
+ 1) fetch all feeds listed in `ruby.yml` and
19
+
20
+ 2) store all entries in a local database, that is, `ruby.sqlite` in your working folder and
21
+
22
+ 3) generate a planet web page, that is, `ruby.html` using the builtin [`blank` template](https://github.com/geraldb/pluto/blob/master/templates/blank.html.erb) in your working folder using all feed entries from the local database.
23
+
24
+ Open up `ruby.html` to see your planet web page. Voila!
25
+
26
+
27
+ ### Planet Configuration Sample
28
+
29
+ `ruby.yml`:
30
+
31
+ ```
32
+ title: Planet Ruby
33
+
34
+ feeds:
35
+ - rubyflow
36
+ - rubysource
37
+ - edgerails
38
+ - rubyonrails
39
+ - railstutorial
40
+
41
+ rubyflow:
42
+ title: Ruby Flow
43
+ feed_url: http://feeds.feedburner.com/Rubyflow?format=xml
44
+ url: http://rubyflow.com
45
+
46
+ rubysource:
47
+ title: Ruby Source
48
+ feed_url: http://rubysource.com/feed
49
+ url: http://rubysource.com
50
+
51
+ edgerails:
52
+ title: What's new in Edge Rails?
53
+ feed_url: http://www.edgerails.info/blog.atom
54
+ url: http://www.edgerails.info
55
+
56
+ rubyonrails:
57
+ title: Ruby on Rails Blog
58
+ feed_url: http://weblog.rubyonrails.org/feed/atom.xml
59
+ url: http://weblog.rubyonrails.org
60
+
61
+ railstutorial:
62
+ title: Rails Tutorial News
63
+ feed_url: http://feeds.feedburner.com/railstutorial?format=xml
64
+ url: http://news.railstutorial.org
65
+ ```
66
+
67
+ For more samples, see [`nytimes.yml`](https://github.com/geraldb/pluto/blob/master/samples/nytimes.yml),
68
+ [`js.yml`](https://github.com/geraldb/pluto/blob/master/samples/js.yml),
69
+ [`dart.yml`](https://github.com/geraldb/pluto/blob/master/samples/dart.yml).
12
70
 
13
71
 
14
72
  ## Install
@@ -18,6 +76,13 @@ Just install the gem:
18
76
  $ gem install pluto
19
77
 
20
78
 
79
+ ## Alternatives
80
+
81
+ planet.rb by Akira Yamada [(Site)](http://planet.rubyforge.org)
82
+
83
+ Planet.rb by Pablo Astigarraga [(Site)](https://github.com/pote/planet.rb) - Used with Jekyll/Octopress Site Genereator
84
+
85
+
21
86
  ## License
22
87
 
23
88
  The `pluto` scripts are dedicated to the public domain.
@@ -1,4 +1,4 @@
1
1
 
2
2
  module Pluto
3
- VERSION = '0.2.0'
3
+ VERSION = '0.3.0'
4
4
  end
@@ -1,20 +1,63 @@
1
1
  <html>
2
2
  <head>
3
+ <meta charset="UTF-8">
4
+ <title><%= headers['title'] %></title>
5
+ <meta name="generator" content="<%= Pluto.banner %>">
3
6
  <style>
7
+ /* fix: use sass w/ variables */
4
8
  body {
5
9
  font-family: sans-serif;
10
+ background-color: #F4F4F4;
11
+ color: #333333;
6
12
  }
7
13
 
8
14
  a, a:visited {
9
15
  text-decoration: none;
10
- color: black;
16
+ color: #1E68A6;
11
17
  }
12
18
 
13
19
  a:hover {
14
20
  text-decoration: underline;
15
- background-color: aqua;
21
+ color: #1E68A6;
22
+ background-color: yellow;
23
+ }
24
+
25
+ .item {
26
+ background-color: white;
27
+ border: 1px solid #9E9E9E;
28
+ padding: 0px 15px 15px 15px;
29
+ margin-bottom: 12px;
30
+ }
31
+
32
+ .item_title {
33
+ margin-top: 0;
34
+ font-size: 16px;
35
+ }
36
+
37
+ .feed_title {
38
+ margin-bottom: 5px;
39
+ font-size: 12px;
40
+ }
41
+
42
+ .colright {
43
+ margin-left: 20px;
44
+ }
45
+
46
+ ul.subscriptions {
47
+ list-style: none;
48
+ margin-left: 0;
49
+ padding-left: 0;
16
50
  }
17
51
 
52
+ /* fix: use .small instead */
53
+ .smaller {
54
+ font-size: 12px;
55
+ /* color: #666666; */ /* lighter gray than text gray */
56
+ }
57
+
58
+ .item_content {
59
+ font-size: 14px;
60
+ }
18
61
  </style>
19
62
  </head>
20
63
  <body>
@@ -33,24 +76,27 @@
33
76
 
34
77
 
35
78
 
36
- <h3 style='background-color: #eeeeee; padding: 2px 6px; border: 1px solid #7d7d7d;'>
79
+ <h3>
37
80
  <%= item.published_at.strftime('%A, %d. %B %Y') %>
38
81
  </h3>
39
82
 
40
83
  <% end %><!-- if new day? -->
41
-
42
- <p style='font-size: 80%; margin-bottom: 6px;'>
43
- (<a href='<%= item.feed.url %>'><%= item.feed.title %></a>)
44
- </p>
45
84
 
46
- <h2 style='margin-top: 0;'>
85
+
86
+ <div class='item'>
87
+
88
+ <h4 class='feed_title'>
89
+ <a href='<%= item.feed.url %>'><%= item.feed.title %></a>
90
+ </h4>
91
+
92
+ <h2 class='item_title'>
47
93
  <a href='<%= item.url %>'><%= item.title %></a>
48
94
  </h2>
49
95
 
50
- <div class='content'>
96
+ <div class='item_content'>
51
97
  <%= item.content %>
52
98
  </div>
53
-
99
+ </div>
54
100
  <!--
55
101
  <p>
56
102
  <%= item.published_at.strftime('%H:%M') %>
@@ -63,20 +109,22 @@
63
109
  </td>
64
110
  <td style='vertical-align:top;'><!-- second column -->
65
111
 
112
+ <div class='colright'>
66
113
  <p>
67
114
  Last Updated
68
115
  </p>
69
- <p style='font-size: 80%;'><%= Time.now.strftime('%A, %d. %B %Y %H:%M') %>
116
+ <p class='smaller'><%= Time.now.strftime('%A, %d. %B %Y %H:%M') %>
70
117
  </p>
71
118
 
72
119
  <p>Subscriptions</p>
73
- <ul style='list-style: none; margin-left: 0; padding-left: 0; font-size: 80%;'>
120
+ <ul class='subscriptions smaller' >
74
121
  <% Feed.all.each do |feed| %>
75
- <li><a href='<%= feed.url %>'><%= feed.title %></a></li>
122
+ <li>
123
+ <a href='<%= feed.feed_url %>'><img src='feed-icon-10x10.png'></a>
124
+ <a href='<%= feed.url %>'><%= feed.title %></a></li>
76
125
  <% end %>
77
126
  </ul>
78
-
79
-
127
+ </div>
80
128
 
81
129
  </td>
82
130
  </tr>
@@ -1,4 +1,5 @@
1
1
  # pakman manifest
2
2
 
3
3
  __file__.html blank.html.erb
4
- __file__.top.html blank.top.html.erb
4
+ __file__.top.html blank.top.html.erb
5
+ feed-icon-10x10.png
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pluto
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 2
8
+ - 3
9
9
  - 0
10
- version: 0.2.0
10
+ version: 0.3.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Gerald Bauer
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-07-17 00:00:00 Z
18
+ date: 2012-07-19 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: rdoc
@@ -72,6 +72,7 @@ files:
72
72
  - templates/blank.html.erb
73
73
  - templates/blank.top.html.erb
74
74
  - templates/blank.txt
75
+ - templates/feed-icon-10x10.png
75
76
  homepage: http://geraldb.github.com/pluto
76
77
  licenses: []
77
78