wordsmith 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -2,17 +2,19 @@ PATH
2
2
  remote: .
3
3
  specs:
4
4
  wordsmith (0.0.1)
5
- kindlegen
6
- nokogiri
5
+ git
6
+ kindlegen (>= 2.3.1)
7
+ nokogiri (>= 1.5.2)
7
8
 
8
9
  GEM
9
10
  remote: http://rubygems.org/
10
11
  specs:
11
- kindlegen (2.3.1)
12
+ git (1.2.5)
13
+ kindlegen (2.8.0)
12
14
  systemu
13
- nokogiri (1.5.2)
15
+ nokogiri (1.5.9)
14
16
  rake (0.9.2.2)
15
- systemu (2.5.0)
17
+ systemu (2.5.2)
16
18
  test-unit (2.4.8)
17
19
 
18
20
  PLATFORMS
data/README.md CHANGED
@@ -1,15 +1,15 @@
1
1
  ## What is it about?
2
2
 
3
- Wordsmith is a ruby Framework with a built in command-line toolset to
4
- create, share, publish and collaborate on e-books, guides, manuals, etc.
3
+ Wordsmith is a Ruby framework with a built in command-line toolset to create,
4
+ share, publish and collaborate on e-books, guides, manuals, etc.
5
5
 
6
- Through the command line interface, you can create a project repository
7
- with a standard directory structure that allows you and your co-authors
8
- to easily manage your content.
6
+ Through the command line interface, you can create a project repository with
7
+ a standard directory structure that allows you and your co-authors to easily
8
+ manage your content.
9
9
 
10
- The command line interface provides a set of commands to export
10
+ The command line interface provides a set of commands to export
11
11
  in the following formats:
12
-
12
+
13
13
  * epub
14
14
  * mobi
15
15
  * pdf
@@ -17,6 +17,11 @@ in the following formats:
17
17
 
18
18
  You can also publish your book to your github project page with a single command.
19
19
 
20
+ By the way, Wordsmith was heavily based on the [git-scribe][gitscribe] gem,
21
+ but with a few extra goodies such as painless installation.
22
+
23
+ [gitscribe]: https://github.com/schacon/git-scribe
24
+
20
25
  ## Installing
21
26
 
22
27
  First of all, you should have [Pandoc][pandoc] installed in your system.
@@ -25,38 +30,52 @@ First of all, you should have [Pandoc][pandoc] installed in your system.
25
30
 
26
31
  Next, install the wordsmith ruby gem.
27
32
 
28
- gem install wordsmith
33
+ $ gem install wordsmith
29
34
 
30
35
  Now you're good to go.
31
36
 
32
37
  ## Usage
33
38
 
34
- Wordsmith uses the following directory structure
35
-
36
- book/
37
- layout/
38
- header.html
39
- footer.html
40
- assets/
41
- images/
42
- cover.jpg
43
- stylesheets/
44
- default.css
45
- book.css
46
- content/
47
- 01_chapter_one.md
48
- 02_chapter_two.md
49
- 03_chapter_three/
50
- 01_lorem.md
51
- 02_ipsum.md
52
- final/
53
- book.epub
54
- book.mobi
55
- book.pdf
56
- book_html/
57
- Makefile
58
-
59
- The **layout** directory contains the header and footer for an online version of your book.
39
+ $ wordsmith new [book name]
40
+
41
+ After that, Wordsmith will create a default directory structure so you just
42
+ need to start creating your own content without worrying about anything else.
43
+
44
+ book/
45
+ .wordsmith
46
+ layout/
47
+ header.html
48
+ footer.html
49
+ assets/
50
+ images/
51
+ cover.jpg
52
+ stylesheets/
53
+ default.css
54
+ book.css
55
+ content/
56
+ 01_chapter_one.md
57
+ 02_chapter_two.md
58
+ 03_chapter_three/
59
+ 01_lorem.md
60
+ 02_ipsum.md
61
+ final/
62
+ book.epub
63
+ book.mobi
64
+ book.pdf
65
+ book/index.html
66
+
67
+ You can edit your book metadata inside the **.wordsmith** file:
68
+
69
+ ---
70
+ edition: 0.1
71
+ language: en
72
+ author: Your Name
73
+ title: Your Book Title
74
+ cover: assets/images/cover.jpg
75
+ stylesheet: assets/stylesheets/default.css
76
+
77
+ The **layout** directory contains the header and footer for an
78
+ online version of your book.
60
79
 
61
80
  The **assets** directory contains images and stylesheets.
62
81
 
@@ -65,5 +84,51 @@ In the **content** directory you can:
65
84
  1. write content as single files
66
85
  * use directories to easily manage long chapters
67
86
 
68
- **Please note** that the file names in the 'content' folder must be snake cased and begin with the number of
69
- the chapter or section (e.g. 01_chapter_one.md).
87
+ **Please note** that the file names in the 'content' folder must be
88
+ snake cased and begin with the number of the chapter or section
89
+ (e.g. 01_chapter_one.md).
90
+
91
+ ## To generate your book in different formats:
92
+
93
+ $ wordsmith generate [html|epub|mobi|pdf| ]
94
+ (don't pass any option to generate all formats at once)
95
+
96
+ ## Publishing your books
97
+
98
+ You can also publish a pretty neat html version of your
99
+ book/manual/guide/etc. in github:
100
+
101
+ $ wordsmith publish git@github.com:jassa/wordsmith-demo.git
102
+
103
+ This will be available in a site like http://jassa.github.com/wordsmith-demo/
104
+
105
+ ## REMEMBER
106
+
107
+ Git is an important part of this tool, a typical workflow should look like this:
108
+
109
+ $ wordsmith new ruby_guide
110
+ # this command will also create a git repository
111
+ # and the first commit, but IT WILL NOT BE PUSHED YET
112
+ # since you haven't provided a remote ref
113
+
114
+ $ cd ruby_guide
115
+ # Here you edit your 'content' directory with your own chapters
116
+
117
+ # then when you are ready to commit you do it normally:
118
+ $ wordsmith generate
119
+ $ git commit -am "finished chapter one"
120
+
121
+ # if you're not ready to publish to github pages, add a ref to a new repo
122
+ $ git add remote origin git@github.com:jassa/wordsmith-demo.git
123
+ $ git push origin master
124
+
125
+ # and if you are ready, you could do instead:
126
+ $ wordsmith publish git@github.com:jassa/wordsmith-demo.git
127
+
128
+ # This will create a branch called 'gh-pages' as github requires,
129
+ # you'll still need to run $ git push origin master
130
+ # to push your book editables
131
+
132
+ ## License
133
+
134
+ Wordsmith is released under the [MIT License](http://www.opensource.org/licenses/MIT).
@@ -8,7 +8,7 @@ class Wordsmith
8
8
  @output = local(File.join('final', @name))
9
9
 
10
10
  content_dir = local(File.join('content'))
11
- @files = Dir.glob(content_dir + '/**/*.*').join(" \\\n")
11
+ @files = Dir.glob(content_dir + '/**/*.*').sort.join(" \\\n")
12
12
 
13
13
  if @files.empty?
14
14
  raise "Exiting.. Nothing to generate in #{content_dir}.\nHave you run 'wordsmith new'?"
@@ -129,4 +129,4 @@ class Wordsmith
129
129
  $?.success?
130
130
  end
131
131
  end
132
- end
132
+ end
@@ -1,3 +1,3 @@
1
1
  module Wordsmith
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/wordsmith.gemspec CHANGED
@@ -1,26 +1,23 @@
1
- # encoding: utf-8
2
1
  $LOAD_PATH.unshift 'lib'
3
2
  require 'wordsmith/version'
4
3
 
5
- Gem::Specification.new do |s|
6
- s.name = "wordsmith"
7
- s.version = Wordsmith::VERSION
8
- s.authors = ["Amed Rodriguez", "Javier Saldana", "Rene Cienfuegos"]
9
- s.email = ["amed@tractical.com", "javier@tractical.com", "renecienfuegos@gmail.com"]
10
- s.homepage = "https://github.com/tractical/wordsmith"
11
- s.summary = "E-books publisher."
12
- s.description = "Create, collaborate and publish e-books -- easily."
13
- s.has_rdoc = false
4
+ Gem::Specification.new do |gem|
5
+ gem.name = "wordsmith"
6
+ gem.version = Wordsmith::VERSION
7
+ gem.authors = ["Amed Rodriguez", "Javier Saldana", "Rene Cienfuegos"]
8
+ gem.email = ["amed@tractical.com", "javier@tractical.com", "rene@tractical.com"]
9
+ gem.homepage = "https://github.com/tractical/wordsmith"
10
+ gem.summary = "The best way to publish ebooks. No, really."
11
+ gem.description = "Create, collaborate and publish ebooks easily."
12
+ gem.executables = "wordsmith"
13
+ gem.license = "MIT"
14
14
 
15
- s.rubyforge_project = "wordsmith"
15
+ gem.files = `git ls-files`.split("\n")
16
+ gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
16
17
 
17
- s.executables = %w( wordsmith )
18
- s.files = `git ls-files`.split("\n")
19
- s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
20
-
21
- s.add_dependency('nokogiri')
22
- s.add_dependency('kindlegen')
23
- s.add_dependency("git")
24
- s.add_development_dependency("rake")
25
- s.add_development_dependency("test-unit")
18
+ gem.add_dependency "nokogiri", ">= 1.5.2"
19
+ gem.add_dependency "kindlegen", ">= 2.3.1"
20
+ gem.add_dependency "git"
21
+ gem.add_development_dependency "rake"
22
+ gem.add_development_dependency "test-unit"
26
23
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wordsmith
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,33 +11,43 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2012-03-25 00:00:00.000000000 Z
14
+ date: 2013-03-26 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: nokogiri
18
- requirement: &70114637222780 !ruby/object:Gem::Requirement
18
+ requirement: !ruby/object:Gem::Requirement
19
19
  none: false
20
20
  requirements:
21
21
  - - ! '>='
22
22
  - !ruby/object:Gem::Version
23
- version: '0'
23
+ version: 1.5.2
24
24
  type: :runtime
25
25
  prerelease: false
26
- version_requirements: *70114637222780
26
+ version_requirements: !ruby/object:Gem::Requirement
27
+ none: false
28
+ requirements:
29
+ - - ! '>='
30
+ - !ruby/object:Gem::Version
31
+ version: 1.5.2
27
32
  - !ruby/object:Gem::Dependency
28
33
  name: kindlegen
29
- requirement: &70114637222320 !ruby/object:Gem::Requirement
34
+ requirement: !ruby/object:Gem::Requirement
30
35
  none: false
31
36
  requirements:
32
37
  - - ! '>='
33
38
  - !ruby/object:Gem::Version
34
- version: '0'
39
+ version: 2.3.1
35
40
  type: :runtime
36
41
  prerelease: false
37
- version_requirements: *70114637222320
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ none: false
44
+ requirements:
45
+ - - ! '>='
46
+ - !ruby/object:Gem::Version
47
+ version: 2.3.1
38
48
  - !ruby/object:Gem::Dependency
39
49
  name: git
40
- requirement: &70114637221800 !ruby/object:Gem::Requirement
50
+ requirement: !ruby/object:Gem::Requirement
41
51
  none: false
42
52
  requirements:
43
53
  - - ! '>='
@@ -45,10 +55,15 @@ dependencies:
45
55
  version: '0'
46
56
  type: :runtime
47
57
  prerelease: false
48
- version_requirements: *70114637221800
58
+ version_requirements: !ruby/object:Gem::Requirement
59
+ none: false
60
+ requirements:
61
+ - - ! '>='
62
+ - !ruby/object:Gem::Version
63
+ version: '0'
49
64
  - !ruby/object:Gem::Dependency
50
65
  name: rake
51
- requirement: &70114637221360 !ruby/object:Gem::Requirement
66
+ requirement: !ruby/object:Gem::Requirement
52
67
  none: false
53
68
  requirements:
54
69
  - - ! '>='
@@ -56,10 +71,15 @@ dependencies:
56
71
  version: '0'
57
72
  type: :development
58
73
  prerelease: false
59
- version_requirements: *70114637221360
74
+ version_requirements: !ruby/object:Gem::Requirement
75
+ none: false
76
+ requirements:
77
+ - - ! '>='
78
+ - !ruby/object:Gem::Version
79
+ version: '0'
60
80
  - !ruby/object:Gem::Dependency
61
81
  name: test-unit
62
- requirement: &70114637220940 !ruby/object:Gem::Requirement
82
+ requirement: !ruby/object:Gem::Requirement
63
83
  none: false
64
84
  requirements:
65
85
  - - ! '>='
@@ -67,12 +87,17 @@ dependencies:
67
87
  version: '0'
68
88
  type: :development
69
89
  prerelease: false
70
- version_requirements: *70114637220940
71
- description: Create, collaborate and publish e-books -- easily.
90
+ version_requirements: !ruby/object:Gem::Requirement
91
+ none: false
92
+ requirements:
93
+ - - ! '>='
94
+ - !ruby/object:Gem::Version
95
+ version: '0'
96
+ description: Create, collaborate and publish ebooks easily.
72
97
  email:
73
98
  - amed@tractical.com
74
99
  - javier@tractical.com
75
- - renecienfuegos@gmail.com
100
+ - rene@tractical.com
76
101
  executables:
77
102
  - wordsmith
78
103
  extensions: []
@@ -108,7 +133,8 @@ files:
108
133
  - test/test_helper.rb
109
134
  - wordsmith.gemspec
110
135
  homepage: https://github.com/tractical/wordsmith
111
- licenses: []
136
+ licenses:
137
+ - MIT
112
138
  post_install_message:
113
139
  rdoc_options: []
114
140
  require_paths:
@@ -126,11 +152,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
126
152
  - !ruby/object:Gem::Version
127
153
  version: '0'
128
154
  requirements: []
129
- rubyforge_project: wordsmith
130
- rubygems_version: 1.8.17
155
+ rubyforge_project:
156
+ rubygems_version: 1.8.23
131
157
  signing_key:
132
158
  specification_version: 3
133
- summary: E-books publisher.
159
+ summary: The best way to publish ebooks. No, really.
134
160
  test_files:
135
161
  - test/generate_test.rb
136
162
  - test/init_test.rb