bookpress 0.0.2 → 0.0.4
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/bookpress +24 -0
- data/lib/bookpress/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b8637a48480c8ea87cac52fb80be87e6dc1c9a8
|
4
|
+
data.tar.gz: 6907e780d4de9e4b10972c31fe255826224e0bbe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 72a3d3e08f82b67680f8147b61607496bb63f02cd6c31c0db7298d0513737ab10d177f158d1f3dd44bccb44135198922e3c8dcafdd0f365c82158c18fcc1cac2
|
7
|
+
data.tar.gz: 9d736c0a6196f1eda024c9910bfa33905ac1bb236c460157a95ead6bdb06b96b4922ef1d93c477a142578501fbfdb1e5028b131922aeffc914574f290436db9f
|
data/bin/bookpress
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
lib = File.expand_path(File.dirname(__FILE__) + '/../lib')
|
4
|
+
$LOAD_PATH.unshift(lib) if File.directory?(lib) && !$LOAD_PATH.include?(lib)
|
5
|
+
|
6
|
+
require 'bookpress'
|
7
|
+
require 'aws/s3'
|
8
|
+
|
9
|
+
AWS::S3::Base.establish_connection!(
|
10
|
+
access_key_id: ENV['S3_ACCESS_KEY_ID'],
|
11
|
+
secret_access_key: ENV['S3_SECRET_ACCESS_KEY']
|
12
|
+
)
|
13
|
+
|
14
|
+
ARGV.each do |directory|
|
15
|
+
book = Bookpress::Book.new(directory)
|
16
|
+
|
17
|
+
filename = "#{book.tree.first.first}.html"
|
18
|
+
File.open(filename, 'w') { |file| file.truncate(0) }
|
19
|
+
File.write(filename, book.to_html)
|
20
|
+
|
21
|
+
S3Object.store(filename, open(filename), ENV['S3_BUCKET_NAME'])
|
22
|
+
end
|
23
|
+
|
24
|
+
|
data/lib/bookpress/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bookpress
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthew Sullivan
|
@@ -97,7 +97,8 @@ dependencies:
|
|
97
97
|
description:
|
98
98
|
email:
|
99
99
|
- msull92@gmail.com
|
100
|
-
executables:
|
100
|
+
executables:
|
101
|
+
- bookpress
|
101
102
|
extensions: []
|
102
103
|
extra_rdoc_files: []
|
103
104
|
files:
|
@@ -106,6 +107,7 @@ files:
|
|
106
107
|
- LICENSE.txt
|
107
108
|
- README.md
|
108
109
|
- Rakefile
|
110
|
+
- bin/bookpress
|
109
111
|
- bookpress.gemspec
|
110
112
|
- lib/bookpress.rb
|
111
113
|
- lib/bookpress/version.rb
|