hobix 0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (156) hide show
  1. data/COPYING +18 -0
  2. data/README +18 -0
  3. data/Rakefile +96 -0
  4. data/bin/hobix +94 -0
  5. data/contrib/blosxom-to-hobix.rb +253 -0
  6. data/contrib/txp-to-hobix.rb +56 -0
  7. data/contrib/webrick-all-mine.rb +20 -0
  8. data/doc/CHANGELOG +285 -0
  9. data/doc/rdoc/classes/Hobix/API.html +382 -0
  10. data/doc/rdoc/classes/Hobix/Article.html +111 -0
  11. data/doc/rdoc/classes/Hobix/BaseContent.html +692 -0
  12. data/doc/rdoc/classes/Hobix/BaseEntry.html +218 -0
  13. data/doc/rdoc/classes/Hobix/BaseFacet.html +205 -0
  14. data/doc/rdoc/classes/Hobix/BaseOutput.html +122 -0
  15. data/doc/rdoc/classes/Hobix/BasePlugin.html +201 -0
  16. data/doc/rdoc/classes/Hobix/BaseProperties/ClassMethods.html +243 -0
  17. data/doc/rdoc/classes/Hobix/BaseProperties.html +218 -0
  18. data/doc/rdoc/classes/Hobix/BasePublish.html +157 -0
  19. data/doc/rdoc/classes/Hobix/BaseStorage.html +417 -0
  20. data/doc/rdoc/classes/Hobix/BixWik/Entry.html +196 -0
  21. data/doc/rdoc/classes/Hobix/BixWik/IndexEntry.html +170 -0
  22. data/doc/rdoc/classes/Hobix/BixWik/WikiRedCloth.html +111 -0
  23. data/doc/rdoc/classes/Hobix/BixWik.html +418 -0
  24. data/doc/rdoc/classes/Hobix/BixWikPlugin.html +158 -0
  25. data/doc/rdoc/classes/Hobix/CommandLine.html +1970 -0
  26. data/doc/rdoc/classes/Hobix/Comment.html +113 -0
  27. data/doc/rdoc/classes/Hobix/Config.html +212 -0
  28. data/doc/rdoc/classes/Hobix/DataMarsh.html +667 -0
  29. data/doc/rdoc/classes/Hobix/Entry.html +178 -0
  30. data/doc/rdoc/classes/Hobix/EntryEnum.html +162 -0
  31. data/doc/rdoc/classes/Hobix/Enumerable.html +170 -0
  32. data/doc/rdoc/classes/Hobix/Facets/WikiEdit.html +180 -0
  33. data/doc/rdoc/classes/Hobix/Facets.html +111 -0
  34. data/doc/rdoc/classes/Hobix/LinkList.html +182 -0
  35. data/doc/rdoc/classes/Hobix/Out/Quick.html +412 -0
  36. data/doc/rdoc/classes/Hobix/Out.html +119 -0
  37. data/doc/rdoc/classes/Hobix/Page.html +381 -0
  38. data/doc/rdoc/classes/Hobix/Trackback.html +113 -0
  39. data/doc/rdoc/classes/Hobix/UriStr.html +198 -0
  40. data/doc/rdoc/classes/Hobix/WebApp/QueryString.html +207 -0
  41. data/doc/rdoc/classes/Hobix/WebApp/QueryValidationFailure.html +111 -0
  42. data/doc/rdoc/classes/Hobix/WebApp.html +1383 -0
  43. data/doc/rdoc/classes/Hobix/Weblog/AuthorNotFound.html +111 -0
  44. data/doc/rdoc/classes/Hobix/Weblog.html +2082 -0
  45. data/doc/rdoc/classes/Hobix.html +399 -0
  46. data/doc/rdoc/classes/Kernel.html +139 -0
  47. data/doc/rdoc/classes/Regexp.html +154 -0
  48. data/doc/rdoc/classes/YAML/Omap.html +144 -0
  49. data/doc/rdoc/classes/YAML.html +111 -0
  50. data/doc/rdoc/created.rid +1 -0
  51. data/doc/rdoc/files/COPYING.html +129 -0
  52. data/doc/rdoc/files/README.html +131 -0
  53. data/doc/rdoc/files/doc/CHANGELOG.html +101 -0
  54. data/doc/rdoc/files/lib/hobix/api_rb.html +119 -0
  55. data/doc/rdoc/files/lib/hobix/article_rb.html +126 -0
  56. data/doc/rdoc/files/lib/hobix/base_rb.html +128 -0
  57. data/doc/rdoc/files/lib/hobix/bixwik_rb.html +126 -0
  58. data/doc/rdoc/files/lib/hobix/commandline_rb.html +140 -0
  59. data/doc/rdoc/files/lib/hobix/comments_rb.html +126 -0
  60. data/doc/rdoc/files/lib/hobix/config_rb.html +125 -0
  61. data/doc/rdoc/files/lib/hobix/datamarsh_rb.html +108 -0
  62. data/doc/rdoc/files/lib/hobix/entry_rb.html +118 -0
  63. data/doc/rdoc/files/lib/hobix/linklist_rb.html +127 -0
  64. data/doc/rdoc/files/lib/hobix/publisher_rb.html +126 -0
  65. data/doc/rdoc/files/lib/hobix/trackbacks_rb.html +128 -0
  66. data/doc/rdoc/files/lib/hobix/webapp_rb.html +127 -0
  67. data/doc/rdoc/files/lib/hobix/weblog_rb.html +135 -0
  68. data/doc/rdoc/files/lib/hobix_rb.html +127 -0
  69. data/doc/rdoc/fr_class_index.html +67 -0
  70. data/doc/rdoc/fr_file_index.html +44 -0
  71. data/doc/rdoc/fr_method_index.html +307 -0
  72. data/doc/rdoc/index.html +24 -0
  73. data/doc/rdoc/rdoc-style.css +208 -0
  74. data/git_hobix_update.php +13 -0
  75. data/lib/hobix/api.rb +91 -0
  76. data/lib/hobix/article.rb +22 -0
  77. data/lib/hobix/base.rb +480 -0
  78. data/lib/hobix/bixwik.rb +200 -0
  79. data/lib/hobix/commandline.rb +677 -0
  80. data/lib/hobix/comments.rb +98 -0
  81. data/lib/hobix/config.rb +39 -0
  82. data/lib/hobix/datamarsh.rb +110 -0
  83. data/lib/hobix/entry.rb +84 -0
  84. data/lib/hobix/facets/comments.rb +99 -0
  85. data/lib/hobix/facets/publisher.rb +314 -0
  86. data/lib/hobix/facets/trackbacks.rb +80 -0
  87. data/lib/hobix/linklist.rb +81 -0
  88. data/lib/hobix/out/atom.rb +101 -0
  89. data/lib/hobix/out/erb.rb +64 -0
  90. data/lib/hobix/out/okaynews.rb +55 -0
  91. data/lib/hobix/out/quick.rb +314 -0
  92. data/lib/hobix/out/rdf.rb +97 -0
  93. data/lib/hobix/out/redrum.rb +26 -0
  94. data/lib/hobix/out/rss.rb +128 -0
  95. data/lib/hobix/plugin/akismet.rb +196 -0
  96. data/lib/hobix/plugin/bloglines.rb +73 -0
  97. data/lib/hobix/plugin/calendar.rb +212 -0
  98. data/lib/hobix/plugin/flickr.rb +110 -0
  99. data/lib/hobix/plugin/recent_comments.rb +84 -0
  100. data/lib/hobix/plugin/sections.rb +91 -0
  101. data/lib/hobix/plugin/tags.rb +60 -0
  102. data/lib/hobix/publish/ping.rb +53 -0
  103. data/lib/hobix/publish/replicate.rb +283 -0
  104. data/lib/hobix/publisher.rb +18 -0
  105. data/lib/hobix/search/dictionary.rb +141 -0
  106. data/lib/hobix/search/porter_stemmer.rb +203 -0
  107. data/lib/hobix/search/simple.rb +209 -0
  108. data/lib/hobix/search/vector.rb +100 -0
  109. data/lib/hobix/storage/filesys.rb +408 -0
  110. data/lib/hobix/trackbacks.rb +93 -0
  111. data/lib/hobix/util/objedit.rb +193 -0
  112. data/lib/hobix/util/patcher.rb +155 -0
  113. data/lib/hobix/webapp/cli.rb +195 -0
  114. data/lib/hobix/webapp/htmlform.rb +107 -0
  115. data/lib/hobix/webapp/message.rb +177 -0
  116. data/lib/hobix/webapp/urigen.rb +141 -0
  117. data/lib/hobix/webapp/webrick-servlet.rb +90 -0
  118. data/lib/hobix/webapp.rb +723 -0
  119. data/lib/hobix/weblog.rb +893 -0
  120. data/lib/hobix.rb +230 -0
  121. data/share/default-blog/hobix.yaml +16 -0
  122. data/share/default-blog/htdocs/site.css +174 -0
  123. data/share/default-blog/skel/entry.html.quick +0 -0
  124. data/share/default-blog/skel/index.atom.atom +0 -0
  125. data/share/default-blog/skel/index.html.quick-summary +0 -0
  126. data/share/default-blog/skel/index.xml.rss +0 -0
  127. data/share/default-blog/skel/index.yaml.okaynews +0 -0
  128. data/share/default-blog/skel/monthly.html.quick-archive +0 -0
  129. data/share/default-blog/skel/section.html.quick-archive +0 -0
  130. data/share/default-blog/skel/yearly.html.quick-archive +0 -0
  131. data/share/default-blog-modes.yaml +7 -0
  132. data/share/default-blog.apache-cgi.patch +8 -0
  133. data/share/default-blog.apache-ssi.patch +38 -0
  134. data/share/default-blog.apache2-ssi.patch +3 -0
  135. data/share/default-blog.cgi.patch +8 -0
  136. data/share/default-blog.comments.patch +5 -0
  137. data/share/default-blog.prototype.patch +766 -0
  138. data/share/default-blog.publisher.patch +5 -0
  139. data/share/default-blog.wiki.patch +29 -0
  140. data/share/publisher/css/control.css +90 -0
  141. data/share/publisher/css/form.css +238 -0
  142. data/share/publisher/css/form.import.css +72 -0
  143. data/share/publisher/css/main-menu.css +134 -0
  144. data/share/publisher/i/hobix-emblazen-1.png +0 -0
  145. data/share/publisher/i/hobix-emblazen-2.png +0 -0
  146. data/share/publisher/i/hobix-emblazen-3.png +0 -0
  147. data/share/publisher/i/hobix-emblazen-4.png +0 -0
  148. data/share/publisher/i/hobix-emblazen-5.png +0 -0
  149. data/share/publisher/i/hobix-emblazen-6.png +0 -0
  150. data/share/publisher/i/hobix-emblazen-7.png +0 -0
  151. data/share/publisher/index.erb +66 -0
  152. data/share/publisher/js/controls.js +261 -0
  153. data/share/publisher/js/dragdrop.js +476 -0
  154. data/share/publisher/js/effects.js +570 -0
  155. data/share/publisher/js/prototype.js +1011 -0
  156. metadata +230 -0
@@ -0,0 +1,692 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Class: Hobix::BaseContent</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Class</strong></td>
53
+ <td class="class-name-in-header">Hobix::BaseContent</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/hobix/base_rb.html">
59
+ lib/hobix/base.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ <tr class="top-aligned-row">
66
+ <td><strong>Parent:</strong></td>
67
+ <td>
68
+ Object
69
+ </td>
70
+ </tr>
71
+ </table>
72
+ </div>
73
+ <!-- banner header -->
74
+
75
+ <div id="bodyContent">
76
+
77
+
78
+
79
+ <div id="contextContent">
80
+
81
+
82
+
83
+ </div>
84
+
85
+ <div id="method-list">
86
+ <h3 class="section-bar">Methods</h3>
87
+
88
+ <div class="name-list">
89
+ <a href="#M000191">base_id</a>&nbsp;&nbsp;
90
+ <a href="#M000199">canonical_tags</a>&nbsp;&nbsp;
91
+ <a href="#M000187">day_id</a>&nbsp;&nbsp;
92
+ <a href="#M000194">force_tags</a>&nbsp;&nbsp;
93
+ <a href="#M000193">link_format</a>&nbsp;&nbsp;
94
+ <a href="#M000203">load</a>&nbsp;&nbsp;
95
+ <a href="#M000206">maker</a>&nbsp;&nbsp;
96
+ <a href="#M000188">month_id</a>&nbsp;&nbsp;
97
+ <a href="#M000186">new</a>&nbsp;&nbsp;
98
+ <a href="#M000195">no_implicit_tags</a>&nbsp;&nbsp;
99
+ <a href="#M000198">path_to_tags</a>&nbsp;&nbsp;
100
+ <a href="#M000196">root_tag=</a>&nbsp;&nbsp;
101
+ <a href="#M000190">section_id</a>&nbsp;&nbsp;
102
+ <a href="#M000197">split_implicit_tags</a>&nbsp;&nbsp;
103
+ <a href="#M000200">tags</a>&nbsp;&nbsp;
104
+ <a href="#M000204">text_processor</a>&nbsp;&nbsp;
105
+ <a href="#M000205">text_processor_fields</a>&nbsp;&nbsp;
106
+ <a href="#M000202">to_yaml</a>&nbsp;&nbsp;
107
+ <a href="#M000192">url_link</a>&nbsp;&nbsp;
108
+ <a href="#M000201">yaml_type</a>&nbsp;&nbsp;
109
+ <a href="#M000189">year_id</a>&nbsp;&nbsp;
110
+ </div>
111
+ </div>
112
+
113
+ </div>
114
+
115
+
116
+ <!-- if includes -->
117
+ <div id="includes">
118
+ <h3 class="section-bar">Included Modules</h3>
119
+
120
+ <div id="includes-list">
121
+ <span class="include-name"><a href="BaseProperties.html">BaseProperties</a></span>
122
+ </div>
123
+ </div>
124
+
125
+ <div id="section">
126
+
127
+
128
+
129
+ <div id="aliases-list">
130
+ <h3 class="section-bar">External Aliases</h3>
131
+
132
+ <div class="name-list">
133
+ <table summary="aliases">
134
+ <tr class="top-aligned-row context-row">
135
+ <td class="context-item-name">to_yaml</td>
136
+ <td>-&gt;</td>
137
+ <td class="context-item-value">to_yaml_orig</td>
138
+ </tr>
139
+ </table>
140
+ </div>
141
+ </div>
142
+
143
+
144
+
145
+
146
+
147
+ <!-- if method_list -->
148
+ <div id="methods">
149
+ <h3 class="section-bar">Public Class methods</h3>
150
+
151
+ <div id="method-M000193" class="method-detail">
152
+ <a name="M000193"></a>
153
+
154
+ <div class="method-heading">
155
+ <a href="#M000193" class="method-signature">
156
+ <span class="method-name">link_format</span><span class="method-args">( e )</span>
157
+ </a>
158
+ </div>
159
+
160
+ <div class="method-description">
161
+ <p><a class="source-toggle" href="#"
162
+ onclick="toggleCode('M000193-source');return false;">[Source]</a></p>
163
+ <div class="method-source-code" id="M000193-source">
164
+ <pre>
165
+ <span class="ruby-comment cmt"># File lib/hobix/base.rb, line 319</span>
166
+ 319: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">link_format</span>( <span class="ruby-identifier">e</span> ); <span class="ruby-identifier">e</span>.<span class="ruby-identifier">id</span>; <span class="ruby-keyword kw">end</span>
167
+ </pre>
168
+ </div>
169
+ </div>
170
+ </div>
171
+
172
+ <div id="method-M000203" class="method-detail">
173
+ <a name="M000203"></a>
174
+
175
+ <div class="method-heading">
176
+ <a href="#M000203" class="method-signature">
177
+ <span class="method-name">load</span><span class="method-args">( file )</span>
178
+ </a>
179
+ </div>
180
+
181
+ <div class="method-description">
182
+ <p>
183
+ Load the weblog entry from a file.
184
+ </p>
185
+ <p><a class="source-toggle" href="#"
186
+ onclick="toggleCode('M000203-source');return false;">[Source]</a></p>
187
+ <div class="method-source-code" id="M000203-source">
188
+ <pre>
189
+ <span class="ruby-comment cmt"># File lib/hobix/base.rb, line 410</span>
190
+ 410: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">load</span>( <span class="ruby-identifier">file</span> )
191
+ 411: <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>( <span class="ruby-identifier">file</span> ) { <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-constant">YAML</span><span class="ruby-operator">::</span><span class="ruby-identifier">load</span>( <span class="ruby-identifier">f</span> ) }
192
+ 412: <span class="ruby-keyword kw">end</span>
193
+ </pre>
194
+ </div>
195
+ </div>
196
+ </div>
197
+
198
+ <div id="method-M000206" class="method-detail">
199
+ <a name="M000206"></a>
200
+
201
+ <div class="method-heading">
202
+ <a href="#M000206" class="method-signature">
203
+ <span class="method-name">maker</span><span class="method-args">( val )</span>
204
+ </a>
205
+ </div>
206
+
207
+ <div class="method-description">
208
+ <p>
209
+ Factory method for generating <a href="Entry.html">Entry</a> classes from a
210
+ hash. Used by the <a href="../YAML.html">YAML</a> loader.
211
+ </p>
212
+ <p><a class="source-toggle" href="#"
213
+ onclick="toggleCode('M000206-source');return false;">[Source]</a></p>
214
+ <div class="method-source-code" id="M000206-source">
215
+ <pre>
216
+ <span class="ruby-comment cmt"># File lib/hobix/base.rb, line 425</span>
217
+ 425: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">maker</span>( <span class="ruby-identifier">val</span> )
218
+ 426: <span class="ruby-keyword kw">self</span><span class="ruby-operator">::</span><span class="ruby-identifier">text_processor_fields</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
219
+ 427: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">val</span>[<span class="ruby-identifier">f</span>].<span class="ruby-identifier">respond_to?</span> <span class="ruby-identifier">:value</span>
220
+ 428: <span class="ruby-identifier">str</span> = <span class="ruby-identifier">val</span>[<span class="ruby-identifier">f</span>].<span class="ruby-identifier">value</span>
221
+ 429: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">str</span>.<span class="ruby-identifier">to_html</span>
222
+ 430: <span class="ruby-keyword kw">self</span>
223
+ 431: <span class="ruby-keyword kw">end</span>
224
+ 432: <span class="ruby-identifier">val</span>[<span class="ruby-identifier">f</span>] = <span class="ruby-identifier">str</span>
225
+ 433: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">val</span>[<span class="ruby-identifier">f</span>].<span class="ruby-identifier">respond_to?</span> <span class="ruby-identifier">:to_str</span>
226
+ 434: <span class="ruby-identifier">val</span>[<span class="ruby-identifier">f</span>] = <span class="ruby-keyword kw">self</span><span class="ruby-operator">::</span><span class="ruby-identifier">text_processor</span>.<span class="ruby-identifier">new</span>( <span class="ruby-identifier">val</span>[<span class="ruby-identifier">f</span>].<span class="ruby-identifier">to_str</span> )
227
+ 435: <span class="ruby-keyword kw">end</span>
228
+ 436: <span class="ruby-keyword kw">end</span>
229
+ 437: <span class="ruby-constant">YAML</span><span class="ruby-operator">::</span><span class="ruby-identifier">object_maker</span>( <span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">val</span> )
230
+ 438: <span class="ruby-keyword kw">end</span>
231
+ </pre>
232
+ </div>
233
+ </div>
234
+ </div>
235
+
236
+ <div id="method-M000186" class="method-detail">
237
+ <a name="M000186"></a>
238
+
239
+ <div class="method-heading">
240
+ <a href="#M000186" class="method-signature">
241
+ <span class="method-name">new</span><span class="method-args">() {|self if block_given?;| ...}</span>
242
+ </a>
243
+ </div>
244
+
245
+ <div class="method-description">
246
+ <p><a class="source-toggle" href="#"
247
+ onclick="toggleCode('M000186-source');return false;">[Source]</a></p>
248
+ <div class="method-source-code" id="M000186-source">
249
+ <pre>
250
+ <span class="ruby-comment cmt"># File lib/hobix/base.rb, line 312</span>
251
+ 312: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>; <span class="ruby-keyword kw">yield</span> <span class="ruby-keyword kw">self</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>; <span class="ruby-keyword kw">end</span>
252
+ </pre>
253
+ </div>
254
+ </div>
255
+ </div>
256
+
257
+ <div id="method-M000195" class="method-detail">
258
+ <a name="M000195"></a>
259
+
260
+ <div class="method-heading">
261
+ <a href="#M000195" class="method-signature">
262
+ <span class="method-name">no_implicit_tags</span><span class="method-args">()</span>
263
+ </a>
264
+ </div>
265
+
266
+ <div class="method-description">
267
+ <p><a class="source-toggle" href="#"
268
+ onclick="toggleCode('M000195-source');return false;">[Source]</a></p>
269
+ <div class="method-source-code" id="M000195-source">
270
+ <pre>
271
+ <span class="ruby-comment cmt"># File lib/hobix/base.rb, line 327</span>
272
+ 327: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">no_implicit_tags</span>
273
+ 328: <span class="ruby-ivar">@@no_implicit_tags</span> = <span class="ruby-keyword kw">true</span>
274
+ 329: <span class="ruby-keyword kw">end</span>
275
+ </pre>
276
+ </div>
277
+ </div>
278
+ </div>
279
+
280
+ <div id="method-M000196" class="method-detail">
281
+ <a name="M000196"></a>
282
+
283
+ <div class="method-heading">
284
+ <a href="#M000196" class="method-signature">
285
+ <span class="method-name">root_tag=</span><span class="method-args">( tag )</span>
286
+ </a>
287
+ </div>
288
+
289
+ <div class="method-description">
290
+ <p><a class="source-toggle" href="#"
291
+ onclick="toggleCode('M000196-source');return false;">[Source]</a></p>
292
+ <div class="method-source-code" id="M000196-source">
293
+ <pre>
294
+ <span class="ruby-comment cmt"># File lib/hobix/base.rb, line 336</span>
295
+ 336: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">root_tag=</span>( <span class="ruby-identifier">tag</span> )
296
+ 337: <span class="ruby-ivar">@@root_tag</span> = <span class="ruby-identifier">tag</span>
297
+ 338: <span class="ruby-keyword kw">end</span>
298
+ </pre>
299
+ </div>
300
+ </div>
301
+ </div>
302
+
303
+ <div id="method-M000197" class="method-detail">
304
+ <a name="M000197"></a>
305
+
306
+ <div class="method-heading">
307
+ <a href="#M000197" class="method-signature">
308
+ <span class="method-name">split_implicit_tags</span><span class="method-args">()</span>
309
+ </a>
310
+ </div>
311
+
312
+ <div class="method-description">
313
+ <p><a class="source-toggle" href="#"
314
+ onclick="toggleCode('M000197-source');return false;">[Source]</a></p>
315
+ <div class="method-source-code" id="M000197-source">
316
+ <pre>
317
+ <span class="ruby-comment cmt"># File lib/hobix/base.rb, line 347</span>
318
+ 347: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">split_implicit_tags</span>
319
+ 348: <span class="ruby-ivar">@@split_implicit_tags</span> = <span class="ruby-keyword kw">true</span>
320
+ 349: <span class="ruby-keyword kw">end</span>
321
+ </pre>
322
+ </div>
323
+ </div>
324
+ </div>
325
+
326
+ <div id="method-M000204" class="method-detail">
327
+ <a name="M000204"></a>
328
+
329
+ <div class="method-heading">
330
+ <a href="#M000204" class="method-signature">
331
+ <span class="method-name">text_processor</span><span class="method-args">()</span>
332
+ </a>
333
+ </div>
334
+
335
+ <div class="method-description">
336
+ <p>
337
+ Accessor which returns the text processor used for untyped strings in <a
338
+ href="Entry.html">Entry</a> fields. (defaults to <tt>RedCloth</tt>.)
339
+ </p>
340
+ <p><a class="source-toggle" href="#"
341
+ onclick="toggleCode('M000204-source');return false;">[Source]</a></p>
342
+ <div class="method-source-code" id="M000204-source">
343
+ <pre>
344
+ <span class="ruby-comment cmt"># File lib/hobix/base.rb, line 416</span>
345
+ 416: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">text_processor</span>; <span class="ruby-constant">RedCloth</span>; <span class="ruby-keyword kw">end</span>
346
+ </pre>
347
+ </div>
348
+ </div>
349
+ </div>
350
+
351
+ <div id="method-M000205" class="method-detail">
352
+ <a name="M000205"></a>
353
+
354
+ <div class="method-heading">
355
+ <a href="#M000205" class="method-signature">
356
+ <span class="method-name">text_processor_fields</span><span class="method-args">()</span>
357
+ </a>
358
+ </div>
359
+
360
+ <div class="method-description">
361
+ <p>
362
+ Returns an Array of fields to which the text processor applies.
363
+ </p>
364
+ <p><a class="source-toggle" href="#"
365
+ onclick="toggleCode('M000205-source');return false;">[Source]</a></p>
366
+ <div class="method-source-code" id="M000205-source">
367
+ <pre>
368
+ <span class="ruby-comment cmt"># File lib/hobix/base.rb, line 418</span>
369
+ 418: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">text_processor_fields</span>
370
+ 419: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">properties</span>.<span class="ruby-identifier">map</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span>, <span class="ruby-identifier">opts</span><span class="ruby-operator">|</span>
371
+ 420: <span class="ruby-identifier">name</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:text_processor</span>]
372
+ 421: <span class="ruby-keyword kw">end</span>.<span class="ruby-identifier">compact</span>
373
+ 422: <span class="ruby-keyword kw">end</span>
374
+ </pre>
375
+ </div>
376
+ </div>
377
+ </div>
378
+
379
+ <div id="method-M000192" class="method-detail">
380
+ <a name="M000192"></a>
381
+
382
+ <div class="method-heading">
383
+ <a href="#M000192" class="method-signature">
384
+ <span class="method-name">url_link</span><span class="method-args">( e, url = nil, ext = nil )</span>
385
+ </a>
386
+ </div>
387
+
388
+ <div class="method-description">
389
+ <p><a class="source-toggle" href="#"
390
+ onclick="toggleCode('M000192-source');return false;">[Source]</a></p>
391
+ <div class="method-source-code" id="M000192-source">
392
+ <pre>
393
+ <span class="ruby-comment cmt"># File lib/hobix/base.rb, line 318</span>
394
+ 318: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">url_link</span>( <span class="ruby-identifier">e</span>, <span class="ruby-identifier">url</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">ext</span> = <span class="ruby-keyword kw">nil</span> ); <span class="ruby-node">&quot;#{ url }/#{ link_format e }#{ '.' + ext if ext }&quot;</span>; <span class="ruby-keyword kw">end</span>
395
+ </pre>
396
+ </div>
397
+ </div>
398
+ </div>
399
+
400
+ <div id="method-M000201" class="method-detail">
401
+ <a name="M000201"></a>
402
+
403
+ <div class="method-heading">
404
+ <a href="#M000201" class="method-signature">
405
+ <span class="method-name">yaml_type</span><span class="method-args">( tag )</span>
406
+ </a>
407
+ </div>
408
+
409
+ <div class="method-description">
410
+ <p><a class="source-toggle" href="#"
411
+ onclick="toggleCode('M000201-source');return false;">[Source]</a></p>
412
+ <div class="method-source-code" id="M000201-source">
413
+ <pre>
414
+ <span class="ruby-comment cmt"># File lib/hobix/base.rb, line 380</span>
415
+ 380: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">yaml_type</span>( <span class="ruby-identifier">tag</span> )
416
+ 381: <span class="ruby-comment cmt"># if self.respond_to? :yaml_as</span>
417
+ 382: <span class="ruby-comment cmt"># yaml_as tag</span>
418
+ 383: <span class="ruby-comment cmt"># else</span>
419
+ 384: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">tag</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^tag:([^:]+):(.+)$/</span>
420
+ 385: <span class="ruby-identifier">define_method</span>( <span class="ruby-identifier">:to_yaml_type</span> ) { <span class="ruby-value str">&quot;!#$1/#$2&quot;</span> }
421
+ 386: <span class="ruby-constant">YAML</span><span class="ruby-operator">::</span><span class="ruby-identifier">add_domain_type</span>( <span class="ruby-identifier">$1</span>, <span class="ruby-identifier">$2</span> ) { <span class="ruby-operator">|</span><span class="ruby-identifier">t</span>, <span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">maker</span>( <span class="ruby-identifier">v</span> ) }
422
+ 387: <span class="ruby-keyword kw">end</span>
423
+ 388: <span class="ruby-comment cmt"># end</span>
424
+ 389: <span class="ruby-keyword kw">end</span>
425
+ </pre>
426
+ </div>
427
+ </div>
428
+ </div>
429
+
430
+ <h3 class="section-bar">Public Instance methods</h3>
431
+
432
+ <div id="method-M000191" class="method-detail">
433
+ <a name="M000191"></a>
434
+
435
+ <div class="method-heading">
436
+ <a href="#M000191" class="method-signature">
437
+ <span class="method-name">base_id</span><span class="method-args">()</span>
438
+ </a>
439
+ </div>
440
+
441
+ <div class="method-description">
442
+ <p><a class="source-toggle" href="#"
443
+ onclick="toggleCode('M000191-source');return false;">[Source]</a></p>
444
+ <div class="method-source-code" id="M000191-source">
445
+ <pre>
446
+ <span class="ruby-comment cmt"># File lib/hobix/base.rb, line 317</span>
447
+ 317: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">base_id</span>; <span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span>( <span class="ruby-identifier">id</span> ) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">id</span>; <span class="ruby-keyword kw">end</span>
448
+ </pre>
449
+ </div>
450
+ </div>
451
+ </div>
452
+
453
+ <div id="method-M000199" class="method-detail">
454
+ <a name="M000199"></a>
455
+
456
+ <div class="method-heading">
457
+ <a href="#M000199" class="method-signature">
458
+ <span class="method-name">canonical_tags</span><span class="method-args">( path=nil )</span>
459
+ </a>
460
+ </div>
461
+
462
+ <div class="method-description">
463
+ <p>
464
+ return canonical <a href="BaseContent.html#M000200">tags</a>, i.e. <a
465
+ href="BaseContent.html#M000200">tags</a> that are forced and that are
466
+ deduced from the entry path
467
+ </p>
468
+ <p><a class="source-toggle" href="#"
469
+ onclick="toggleCode('M000199-source');return false;">[Source]</a></p>
470
+ <div class="method-source-code" id="M000199-source">
471
+ <pre>
472
+ <span class="ruby-comment cmt"># File lib/hobix/base.rb, line 374</span>
473
+ 374: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">canonical_tags</span>( <span class="ruby-identifier">path</span>=<span class="ruby-keyword kw">nil</span> )
474
+ 375: ( <span class="ruby-identifier">force_tags</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">path_to_tags</span>( <span class="ruby-identifier">path</span> <span class="ruby-operator">||</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">id</span> ) ).<span class="ruby-identifier">uniq</span>
475
+ 376: <span class="ruby-keyword kw">end</span>
476
+ </pre>
477
+ </div>
478
+ </div>
479
+ </div>
480
+
481
+ <div id="method-M000187" class="method-detail">
482
+ <a name="M000187"></a>
483
+
484
+ <div class="method-heading">
485
+ <a href="#M000187" class="method-signature">
486
+ <span class="method-name">day_id</span><span class="method-args">()</span>
487
+ </a>
488
+ </div>
489
+
490
+ <div class="method-description">
491
+ <p><a class="source-toggle" href="#"
492
+ onclick="toggleCode('M000187-source');return false;">[Source]</a></p>
493
+ <div class="method-source-code" id="M000187-source">
494
+ <pre>
495
+ <span class="ruby-comment cmt"># File lib/hobix/base.rb, line 313</span>
496
+ 313: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">day_id</span>; <span class="ruby-identifier">created</span>.<span class="ruby-identifier">strftime</span>( <span class="ruby-value str">&quot;%Y/%m/%d&quot;</span> ) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">created</span>; <span class="ruby-keyword kw">end</span>
497
+ </pre>
498
+ </div>
499
+ </div>
500
+ </div>
501
+
502
+ <div id="method-M000194" class="method-detail">
503
+ <a name="M000194"></a>
504
+
505
+ <div class="method-heading">
506
+ <a href="#M000194" class="method-signature">
507
+ <span class="method-name">force_tags</span><span class="method-args">()</span>
508
+ </a>
509
+ </div>
510
+
511
+ <div class="method-description">
512
+ <p><a class="source-toggle" href="#"
513
+ onclick="toggleCode('M000194-source');return false;">[Source]</a></p>
514
+ <div class="method-source-code" id="M000194-source">
515
+ <pre>
516
+ <span class="ruby-comment cmt"># File lib/hobix/base.rb, line 320</span>
517
+ 320: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">force_tags</span>; []; <span class="ruby-keyword kw">end</span>
518
+ </pre>
519
+ </div>
520
+ </div>
521
+ </div>
522
+
523
+ <div id="method-M000188" class="method-detail">
524
+ <a name="M000188"></a>
525
+
526
+ <div class="method-heading">
527
+ <a href="#M000188" class="method-signature">
528
+ <span class="method-name">month_id</span><span class="method-args">()</span>
529
+ </a>
530
+ </div>
531
+
532
+ <div class="method-description">
533
+ <p><a class="source-toggle" href="#"
534
+ onclick="toggleCode('M000188-source');return false;">[Source]</a></p>
535
+ <div class="method-source-code" id="M000188-source">
536
+ <pre>
537
+ <span class="ruby-comment cmt"># File lib/hobix/base.rb, line 314</span>
538
+ 314: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">month_id</span>; <span class="ruby-identifier">created</span>.<span class="ruby-identifier">strftime</span>( <span class="ruby-value str">&quot;%Y/%m&quot;</span> ) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">created</span>; <span class="ruby-keyword kw">end</span>
539
+ </pre>
540
+ </div>
541
+ </div>
542
+ </div>
543
+
544
+ <div id="method-M000198" class="method-detail">
545
+ <a name="M000198"></a>
546
+
547
+ <div class="method-heading">
548
+ <a href="#M000198" class="method-signature">
549
+ <span class="method-name">path_to_tags</span><span class="method-args">( path )</span>
550
+ </a>
551
+ </div>
552
+
553
+ <div class="method-description">
554
+ <p>
555
+ return an array of <a href="BaseContent.html#M000200">tags</a> deduced from
556
+ the path i.e. a path like ruby/hobix/foo.yml will lead to [ ruby, hobix ]
557
+ <a href="BaseContent.html#M000200">tags</a> Occurence of . (alone) will be
558
+ either removed or replaced by the value of <tt>root_tag</tt>
559
+ </p>
560
+ <p><a class="source-toggle" href="#"
561
+ onclick="toggleCode('M000198-source');return false;">[Source]</a></p>
562
+ <div class="method-source-code" id="M000198-source">
563
+ <pre>
564
+ <span class="ruby-comment cmt"># File lib/hobix/base.rb, line 358</span>
565
+ 358: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">path_to_tags</span>( <span class="ruby-identifier">path</span> )
566
+ 359: <span class="ruby-keyword kw">return</span> [] <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@@no_implicit_tags</span>
567
+ 360: <span class="ruby-keyword kw">return</span> [] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">path</span>.<span class="ruby-identifier">nil?</span>
568
+ 361: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@@split_implicit_tags</span>
569
+ 362: <span class="ruby-identifier">tags_array</span> = <span class="ruby-identifier">path</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">&quot;/&quot;</span>).<span class="ruby-identifier">find_all</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span> }
570
+ 363: <span class="ruby-identifier">tags_array</span>.<span class="ruby-identifier">pop</span> <span class="ruby-comment cmt"># Last item is the entry title</span>
571
+ 364: <span class="ruby-keyword kw">else</span>
572
+ 365: <span class="ruby-identifier">tags_array</span> = [ <span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>( <span class="ruby-identifier">path</span> )]
573
+ 366: <span class="ruby-keyword kw">end</span>
574
+ 367: <span class="ruby-identifier">tags_array</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span> <span class="ruby-identifier">e</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'.'</span> <span class="ruby-operator">?</span> <span class="ruby-ivar">@@root_tag</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">e</span> }.<span class="ruby-identifier">compact</span>
575
+ 368: <span class="ruby-keyword kw">end</span>
576
+ </pre>
577
+ </div>
578
+ </div>
579
+ </div>
580
+
581
+ <div id="method-M000190" class="method-detail">
582
+ <a name="M000190"></a>
583
+
584
+ <div class="method-heading">
585
+ <a href="#M000190" class="method-signature">
586
+ <span class="method-name">section_id</span><span class="method-args">()</span>
587
+ </a>
588
+ </div>
589
+
590
+ <div class="method-description">
591
+ <p><a class="source-toggle" href="#"
592
+ onclick="toggleCode('M000190-source');return false;">[Source]</a></p>
593
+ <div class="method-source-code" id="M000190-source">
594
+ <pre>
595
+ <span class="ruby-comment cmt"># File lib/hobix/base.rb, line 316</span>
596
+ 316: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">section_id</span>; <span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>( <span class="ruby-identifier">id</span> ) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">id</span>; <span class="ruby-keyword kw">end</span>
597
+ </pre>
598
+ </div>
599
+ </div>
600
+ </div>
601
+
602
+ <div id="method-M000200" class="method-detail">
603
+ <a name="M000200"></a>
604
+
605
+ <div class="method-heading">
606
+ <a href="#M000200" class="method-signature">
607
+ <span class="method-name">tags</span><span class="method-args">()</span>
608
+ </a>
609
+ </div>
610
+
611
+ <div class="method-description">
612
+ <p><a class="source-toggle" href="#"
613
+ onclick="toggleCode('M000200-source');return false;">[Source]</a></p>
614
+ <div class="method-source-code" id="M000200-source">
615
+ <pre>
616
+ <span class="ruby-comment cmt"># File lib/hobix/base.rb, line 378</span>
617
+ 378: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">tags</span>;( <span class="ruby-identifier">canonical_tags</span> <span class="ruby-operator">+</span> <span class="ruby-constant">Array</span>( <span class="ruby-ivar">@tags</span> ) ).<span class="ruby-identifier">uniq</span>; <span class="ruby-keyword kw">end</span>
618
+ </pre>
619
+ </div>
620
+ </div>
621
+ </div>
622
+
623
+ <div id="method-M000202" class="method-detail">
624
+ <a name="M000202"></a>
625
+
626
+ <div class="method-heading">
627
+ <a href="#M000202" class="method-signature">
628
+ <span class="method-name">to_yaml</span><span class="method-args">( opts = {} )</span>
629
+ </a>
630
+ </div>
631
+
632
+ <div class="method-description">
633
+ <p><a class="source-toggle" href="#"
634
+ onclick="toggleCode('M000202-source');return false;">[Source]</a></p>
635
+ <div class="method-source-code" id="M000202-source">
636
+ <pre>
637
+ <span class="ruby-comment cmt"># File lib/hobix/base.rb, line 392</span>
638
+ 392: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_yaml</span>( <span class="ruby-identifier">opts</span> = {} )
639
+ 393: <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:UseFold</span>] = <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">respond_to?</span> <span class="ruby-identifier">:[]</span>
640
+ 394: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">text_processor_fields</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
641
+ 395: <span class="ruby-identifier">v</span> = <span class="ruby-identifier">instance_variable_get</span>( <span class="ruby-value str">'@'</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">f</span> )
642
+ 396: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">v</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">text_processor</span>
643
+ 397: <span class="ruby-identifier">instance_eval</span> <span class="ruby-node">%{
644
+ 398: def @#{ f }.to_yaml( opts = {} )
645
+ 399: s = self.to_str
646
+ 400: def s.to_yaml_style; :literal; end
647
+ 401: s.to_yaml( opts )
648
+ 402: end
649
+ 403: }</span>
650
+ 404: <span class="ruby-keyword kw">end</span>
651
+ 405: <span class="ruby-keyword kw">end</span>
652
+ 406: <span class="ruby-identifier">to_yaml_orig</span>( <span class="ruby-identifier">opts</span> )
653
+ 407: <span class="ruby-keyword kw">end</span>
654
+ </pre>
655
+ </div>
656
+ </div>
657
+ </div>
658
+
659
+ <div id="method-M000189" class="method-detail">
660
+ <a name="M000189"></a>
661
+
662
+ <div class="method-heading">
663
+ <a href="#M000189" class="method-signature">
664
+ <span class="method-name">year_id</span><span class="method-args">()</span>
665
+ </a>
666
+ </div>
667
+
668
+ <div class="method-description">
669
+ <p><a class="source-toggle" href="#"
670
+ onclick="toggleCode('M000189-source');return false;">[Source]</a></p>
671
+ <div class="method-source-code" id="M000189-source">
672
+ <pre>
673
+ <span class="ruby-comment cmt"># File lib/hobix/base.rb, line 315</span>
674
+ 315: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">year_id</span>; <span class="ruby-identifier">created</span>.<span class="ruby-identifier">strftime</span>( <span class="ruby-value str">&quot;%Y&quot;</span> ) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">created</span>; <span class="ruby-keyword kw">end</span>
675
+ </pre>
676
+ </div>
677
+ </div>
678
+ </div>
679
+
680
+
681
+ </div>
682
+
683
+
684
+ </div>
685
+
686
+
687
+ <div id="validator-badges">
688
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
689
+ </div>
690
+
691
+ </body>
692
+ </html>