fnando-bookmaker 0.0.7 → 0.0.8

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.
data/History.txt CHANGED
@@ -22,7 +22,7 @@
22
22
  * Textile was escaping code inside <pre> blocks
23
23
 
24
24
  == 0.0.5 2008-06-17
25
- * 1 small changes
25
+ * 1 minor changes
26
26
  * Removed frontcover and backcover jpgs
27
27
  * 1 bug fix
28
28
  * Line stub (__) now ignores spaces and tabs
@@ -37,5 +37,10 @@
37
37
  * 1 major enhancement
38
38
  * Added Table of Contents based on h2-h6 tags
39
39
  * Added `book:titles` rake task
40
- * 1 small enhancement
41
- * Added new Textile link tag (similar to Markdown)
40
+ * 1 minor enhancement
41
+ * Added new Textile link tag (similar to Markdown)
42
+
43
+ == 0.0.8 2008-06-22
44
+ * 1 minor change
45
+ * Added Hpricot as dependency
46
+ * README updated to document highlight syntax
data/README.markdown CHANGED
@@ -113,6 +113,50 @@ Textile.
113
113
  To generate the TOC, you need to print a variable called `toc`, using the eRb
114
114
  tag `<%= toc %>`.
115
115
 
116
+ Syntax Highlighting (Mac OS X)
117
+ ==============================
118
+
119
+ If you're using Textile, all you need to do is use the tag `syntax.`. For
120
+ example, to highlight a code added right into your text, just do something like
121
+
122
+ syntax(ruby_on_rails). class User < ActiveRecord::Base
123
+ validates_presence_of :login, :password, :email
124
+ __
125
+ validates_uniqueness_of :login, :email
126
+ end
127
+
128
+ To keep multiple line breaks into a single code block, add a line `__`;
129
+ Bookmaker will replace it when generating the HTML file.
130
+
131
+ If you want to highlight a file, you need to place it into the `code`
132
+ directory and call it like this:
133
+
134
+ syntax(ruby_on_rails). some_file.rb
135
+
136
+ You can specify the lines you want to highlight; the example below will
137
+ highlight lines 10-17 from some_file.rb.
138
+
139
+ syntax(ruby_on_rails 10,17). some_file.rb
140
+
141
+ You can also specify named blocks to highlight. Named blocks are identified
142
+ by `#begin` and `#end` marks. If some_file.rb has the following code
143
+
144
+ require "rubygems"
145
+ require "hpricot"
146
+ require "open"
147
+
148
+ # begin: get_all_h2_tags
149
+ doc = Hpricot(open('http://simplesideias.com.br'))
150
+ (doc/"h2").each {|h2| puts h2.inner_text }
151
+ # end: get_all_h2_tags
152
+
153
+ you can get the code between `get_all_h2_tags` using
154
+
155
+ syntax(ruby#get_all_h2_tags). some_file.rb
156
+
157
+ *Note:* Makdown uses the same syntax above. You just need to indent your code
158
+ (as usual) and add the `syntax.` thing as the first line.
159
+
116
160
  INSTALL:
117
161
  --------
118
162
 
@@ -121,6 +165,8 @@ You need to install some gems before you go any further.
121
165
  sudo gem install rubigen
122
166
  sudo gem install discount
123
167
  sudo gem install RedCloth
168
+ sudo gem install hpricot
169
+ sudo gem install unicode
124
170
 
125
171
  If you're a Mac user and have Textmate installed, you can
126
172
  generate HTML from your source code with syntax highlight,
@@ -131,6 +177,10 @@ Oniguruma regular expression library that can be found at
131
177
  Then, you need to install the Ultraviolet gem.
132
178
 
133
179
  sudo gem install ultraviolet
180
+
181
+ After installing these dependencies, you can install Bookmaker:
182
+
183
+ sudo gem install fnando-bookmaker -s http://gems.github.com
134
184
 
135
185
  REFERENCES:
136
186
  -----------
data/config/hoe.rb CHANGED
@@ -11,7 +11,8 @@ EXTRA_DEPENDENCIES = [
11
11
  ['unicode', '>= 0.1'],
12
12
  ['RedCloth', '>= 3.0.4'],
13
13
  ['rubigen', '>= 1.3.2'],
14
- ['discount', '>= 1.2.6.1']
14
+ ['discount', '>= 1.2.6.1'],
15
+ ['hpricot', '>=0.6']
15
16
  ] # An array of rubygem dependencies [name, version]
16
17
 
17
18
  @config_file = "~/.rubyforge/user-config.yml"
@@ -2,7 +2,7 @@ module Bookmaker #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 0
5
- TINY = 7
5
+ TINY = 8
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fnando-bookmaker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nando Vieira
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-06-21 00:00:00 -07:00
12
+ date: 2008-06-22 00:00:00 -07:00
13
13
  default_executable: bookmaker
14
14
  dependencies: []
15
15