planet 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/planet +10 -2
- data/lib/planet/blog.rb +1 -1
- data/lib/planet/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c3f10043797a9bca9f1ba85f58c9e78e2f6072ba
|
4
|
+
data.tar.gz: 26ed44e3f4fb01059819d29a866ce16bcba02241
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f7086f6942ac55ff20da540e2cb732fa9e3cbab1588f759ceea56294012bf8c181b73c2027659dbe9322ecf1cd05e038d432a24cac3bbb1e1913e22a82196db0
|
7
|
+
data.tar.gz: d36c5070f39fe5a634eaf8276ef0e74499e7feaf68eecf9db4584ed656c521fe009c65474facaeb700b61d2f31e10b6d056515cfedb43f206df25f3cb266c757
|
data/bin/planet
CHANGED
@@ -8,23 +8,31 @@ require 'box'
|
|
8
8
|
|
9
9
|
include GLI::App
|
10
10
|
|
11
|
-
|
12
11
|
program_desc 'Planet.rb is an awesome feed-aggregator gem that consumes RSS/Atom feeds and outputs them in a format suitable to use with Octopress or Jekyll'
|
13
12
|
|
14
13
|
desc 'Parses planet.yml file for blogs and generates their posts in Jekyll compliant format under the _posts directory'
|
15
14
|
command :generate do |c|
|
16
15
|
|
16
|
+
c.flag [:e,:extension], :desc => "Set post extension (markdown or html) ", :default_value => 'markdown', :long_desc => %Q{
|
17
|
+
Set the post's extension to the flag value.
|
18
|
+
The default is markdown, but many feeds deliver content
|
19
|
+
in html, and sometimes it is better to use that directly,
|
20
|
+
due to spacing issues possible with markdown.
|
21
|
+
}
|
17
22
|
c.action do |global_options,options,args|
|
18
23
|
|
19
24
|
Planet::Importer.import('planet.yml') do |planet|
|
20
25
|
|
26
|
+
post_extension = options[:extension] || 'markdown'
|
27
|
+
post_extension = '.' + post_extension unless post_extension[0] == '.'
|
28
|
+
|
21
29
|
posts_dir = planet.config.fetch('posts_directory', 'source/_posts/')
|
22
30
|
FileUtils.mkdir_p(posts_dir)
|
23
31
|
puts "=> Writing #{ planet.posts.size } posts to the #{ posts_dir } directory."
|
24
32
|
|
25
33
|
planet.posts.each do |post|
|
26
34
|
file_name = posts_dir + post.file_name
|
27
|
-
File.open(file_name +
|
35
|
+
File.open(file_name + post_extension, "w+") { |f| f.write(post.to_s) }
|
28
36
|
end
|
29
37
|
|
30
38
|
end
|
data/lib/planet/blog.rb
CHANGED
data/lib/planet/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: planet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- PoTe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-10-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gli
|
@@ -101,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
101
101
|
version: '0'
|
102
102
|
requirements: []
|
103
103
|
rubyforge_project:
|
104
|
-
rubygems_version: 2.0.
|
104
|
+
rubygems_version: 2.0.3
|
105
105
|
signing_key:
|
106
106
|
specification_version: 4
|
107
107
|
summary: An rss/atom feed aggregator designed to work with Octopress/Jekyll
|