tdiary-contrib 3.2.2.20130518

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.
Files changed (393) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +1 -0
  3. data/.travis.yml +7 -0
  4. data/Gemfile +13 -0
  5. data/Gemfile.lock +35 -0
  6. data/README.en.md +12 -0
  7. data/README.md +13 -0
  8. data/Rakefile +41 -0
  9. data/doc/en/filter/spambayes.txt +3 -0
  10. data/doc/en/plugin.txt +1 -0
  11. data/doc/en/style/hatena.txt +10 -0
  12. data/doc/en/style/markdown.txt +16 -0
  13. data/doc/en/util.txt +1 -0
  14. data/doc/ja/filter/antirefspam.history.txt +59 -0
  15. data/doc/ja/filter/antirefspam.txt +86 -0
  16. data/doc/ja/filter/comment_key.ja.html +182 -0
  17. data/doc/ja/filter/spambayes.txt +3 -0
  18. data/doc/ja/plugin/add_bookmark.txt +50 -0
  19. data/doc/ja/plugin/category_to_tag.txt +21 -0
  20. data/doc/ja/plugin/cocoment.txt +31 -0
  21. data/doc/ja/plugin/google_adsense.txt +25 -0
  22. data/doc/ja/plugin/google_analytics.txt +7 -0
  23. data/doc/ja/plugin/image_detail.txt +69 -0
  24. data/doc/ja/plugin/image_gps.txt +36 -0
  25. data/doc/ja/plugin/image_gps2.txt +41 -0
  26. data/doc/ja/plugin/livedoor_weather.txt +105 -0
  27. data/doc/ja/plugin/opensearch_ad.txt +16 -0
  28. data/doc/ja/plugin/section_footer.txt +84 -0
  29. data/doc/ja/plugin/select_theme.txt +1 -0
  30. data/doc/ja/plugin.txt +13 -0
  31. data/doc/ja/style/hatena.txt +10 -0
  32. data/doc/ja/style/markdown.txt +13 -0
  33. data/doc/ja/util.txt +12 -0
  34. data/filter/antirefspam.rb +263 -0
  35. data/filter/commentkey.rb +29 -0
  36. data/filter/commentsize.rb +18 -0
  37. data/filter/hidecomment.rb +13 -0
  38. data/filter/iplookup.rb +55 -0
  39. data/filter/plugin/antirefspam.rb +59 -0
  40. data/filter/plugin/commentkey.rb +58 -0
  41. data/filter/plugin/commentsize.rb +12 -0
  42. data/filter/plugin/en/iplookup.rb +9 -0
  43. data/filter/plugin/en/spambayes.rb +123 -0
  44. data/filter/plugin/iplookup.rb +39 -0
  45. data/filter/plugin/ja/antirefspam.rb +91 -0
  46. data/filter/plugin/ja/commentkey.rb +17 -0
  47. data/filter/plugin/ja/commentsize.rb +6 -0
  48. data/filter/plugin/ja/iplookup.rb +9 -0
  49. data/filter/plugin/ja/spambayes.rb +124 -0
  50. data/filter/plugin/spambayes.rb +501 -0
  51. data/filter/plugin/zh/iplookup.rb +9 -0
  52. data/filter/rblcheck.rb +36 -0
  53. data/filter/spambayes.rb +535 -0
  54. data/filter/spamlookup.rb +37 -0
  55. data/io/dbi_io/ChangeLog +19 -0
  56. data/io/dbi_io/README.ja +39 -0
  57. data/io/dbi_io/dbi_io.rb +181 -0
  58. data/io/dbi_io/plugin/refererDbiIO.rb +76 -0
  59. data/io/dbi_io/tdiary_table.sql +42 -0
  60. data/js/appstore.js +109 -0
  61. data/js/datepicker.js +69 -0
  62. data/js/editor.js +82 -0
  63. data/js/flickr.js +157 -0
  64. data/js/image_ex.js +79 -0
  65. data/js/jquery.socialbutton.js +842 -0
  66. data/js/nicovideo.js +17 -0
  67. data/js/picasa.js +322 -0
  68. data/js/plugin_checker.js +71 -0
  69. data/js/prettify/lang-apollo.js +2 -0
  70. data/js/prettify/lang-clj.js +18 -0
  71. data/js/prettify/lang-css.js +2 -0
  72. data/js/prettify/lang-go.js +1 -0
  73. data/js/prettify/lang-hs.js +2 -0
  74. data/js/prettify/lang-lisp.js +3 -0
  75. data/js/prettify/lang-lua.js +2 -0
  76. data/js/prettify/lang-ml.js +2 -0
  77. data/js/prettify/lang-n.js +4 -0
  78. data/js/prettify/lang-proto.js +1 -0
  79. data/js/prettify/lang-scala.js +2 -0
  80. data/js/prettify/lang-sql.js +2 -0
  81. data/js/prettify/lang-tex.js +1 -0
  82. data/js/prettify/lang-vb.js +2 -0
  83. data/js/prettify/lang-vhdl.js +3 -0
  84. data/js/prettify/lang-wiki.js +2 -0
  85. data/js/prettify/lang-xq.js +3 -0
  86. data/js/prettify/lang-yaml.js +2 -0
  87. data/js/prettify/prettify.css +1 -0
  88. data/js/prettify/prettify.js +28 -0
  89. data/js/referer.js +17 -0
  90. data/js/show_and_hide.js +39 -0
  91. data/js/socialbutton.js +126 -0
  92. data/js/twitter_anywhere.js +28 -0
  93. data/js/yahoo_kousei.js +21 -0
  94. data/lib/bayes/convert.rb +34 -0
  95. data/lib/bayes.rb +232 -0
  96. data/lib/exifparser/BUGS +1 -0
  97. data/lib/exifparser/ChangeLog +169 -0
  98. data/lib/exifparser/README +15 -0
  99. data/lib/exifparser/install.rb +1015 -0
  100. data/lib/exifparser/lib/exifparser/makernote/canon.rb +502 -0
  101. data/lib/exifparser/lib/exifparser/makernote/fujifilm.rb +415 -0
  102. data/lib/exifparser/lib/exifparser/makernote/minolta.rb +84 -0
  103. data/lib/exifparser/lib/exifparser/makernote/mk_nikonflensname.rb +39 -0
  104. data/lib/exifparser/lib/exifparser/makernote/nikon.rb +267 -0
  105. data/lib/exifparser/lib/exifparser/makernote/nikon2.rb +581 -0
  106. data/lib/exifparser/lib/exifparser/makernote/nikonflensname.rb +438 -0
  107. data/lib/exifparser/lib/exifparser/makernote/olympus.rb +225 -0
  108. data/lib/exifparser/lib/exifparser/makernote/prove.rb +84 -0
  109. data/lib/exifparser/lib/exifparser/makernote/sigma.rb +237 -0
  110. data/lib/exifparser/lib/exifparser/pre-setup.rb +1 -0
  111. data/lib/exifparser/lib/exifparser/scan.rb +278 -0
  112. data/lib/exifparser/lib/exifparser/tag.rb +2298 -0
  113. data/lib/exifparser/lib/exifparser/thumbnail.rb +76 -0
  114. data/lib/exifparser/lib/exifparser/utils.rb +88 -0
  115. data/lib/exifparser/lib/exifparser.rb +265 -0
  116. data/lib/exifparser/sample/exifview.rb +279 -0
  117. data/lib/tdiary-contrib.rb +19 -0
  118. data/lib/wgs2tky.rb +93 -0
  119. data/misc/section_footer2/buzzurl.yaml +6 -0
  120. data/misc/section_footer2/fc2.yaml +6 -0
  121. data/misc/section_footer2/ldc.yaml +6 -0
  122. data/misc/section_footer2/retweet.yaml +7 -0
  123. data/misc/section_footer2/twitter.yaml +7 -0
  124. data/misc/section_footer2/yahoo.yaml +6 -0
  125. data/misc/tdiarygraph/tdiarygraph120x90e.swf +0 -0
  126. data/misc/tdiarygraph/tdiarygraph125x125e.swf +0 -0
  127. data/misc/tdiarygraph/tdiarygraph240x180e.swf +0 -0
  128. data/misc/tdiarygraph/tdiarygraph468x60e.swf +0 -0
  129. data/misc/tdiarygraph/tdiarygraph728x90e.swf +0 -0
  130. data/misc/tdiarytimes/tdiarytimes125x125r.swf +0 -0
  131. data/misc/tdiarytimes/tdiarytimes125x125r7.swf +0 -0
  132. data/misc/tdiarytimes/tdiarytimes125x125s.swf +0 -0
  133. data/misc/tdiarytimes/tdiarytimes125x30.swf +0 -0
  134. data/misc/tdiarytimes/tdiarytimes234x30.swf +0 -0
  135. data/misc/tdiarytimes/tdiarytimes468x30.swf +0 -0
  136. data/plugin/add_bookmark.rb +89 -0
  137. data/plugin/apple_webclip.rb +26 -0
  138. data/plugin/appstore.rb +47 -0
  139. data/plugin/bigpresen.rb +86 -0
  140. data/plugin/bitly.rb +39 -0
  141. data/plugin/bootstrap-navi.rb +54 -0
  142. data/plugin/canonical.rb +9 -0
  143. data/plugin/category_similar.rb +73 -0
  144. data/plugin/category_to_tag.rb +60 -0
  145. data/plugin/category_to_tagcloud.rb +172 -0
  146. data/plugin/cocomment.rb +37 -0
  147. data/plugin/code-prettify.rb +23 -0
  148. data/plugin/coderwall.rb +34 -0
  149. data/plugin/datepicker.rb +28 -0
  150. data/plugin/day2section.rb +20 -0
  151. data/plugin/del_footer.rb +111 -0
  152. data/plugin/description_from_body.rb +23 -0
  153. data/plugin/development.rb +16 -0
  154. data/plugin/editor.rb +11 -0
  155. data/plugin/en/add_bookmark.rb +20 -0
  156. data/plugin/en/del_footer.rb +10 -0
  157. data/plugin/en/git-register.rb +3 -0
  158. data/plugin/en/livedoor_weather.rb +25 -0
  159. data/plugin/en/microsummary.rb +18 -0
  160. data/plugin/en/nicovideo.rb +38 -0
  161. data/plugin/en/openid.rb +8 -0
  162. data/plugin/en/section_footer.rb +6 -0
  163. data/plugin/en/section_footer2.rb +3 -0
  164. data/plugin/en/socialbutton.rb +5 -0
  165. data/plugin/everytrail.rb +39 -0
  166. data/plugin/facebook_comments.rb +59 -0
  167. data/plugin/flickr.rb +209 -0
  168. data/plugin/gist.rb +16 -0
  169. data/plugin/git-register.rb +240 -0
  170. data/plugin/github_badge.rb +27 -0
  171. data/plugin/github_link.rb +9 -0
  172. data/plugin/goo_gl.rb +42 -0
  173. data/plugin/google_adsense.rb +132 -0
  174. data/plugin/google_analytics.rb +39 -0
  175. data/plugin/google_map.rb +168 -0
  176. data/plugin/google_sitemaps.rb +60 -0
  177. data/plugin/google_webmaster.rb +22 -0
  178. data/plugin/hatena_bookmark_nocomment.rb +9 -0
  179. data/plugin/hatena_star.rb +66 -0
  180. data/plugin/hb_footer.rb +255 -0
  181. data/plugin/hb_footer4sec.rb +244 -0
  182. data/plugin/hb_footer4sec_js.rb +30 -0
  183. data/plugin/hide_comment_form.rb +4 -0
  184. data/plugin/hide_sidebar_iphone.rb +21 -0
  185. data/plugin/iddy.rb +81 -0
  186. data/plugin/image_detail.rb +143 -0
  187. data/plugin/image_ex.rb +462 -0
  188. data/plugin/image_gps.rb +128 -0
  189. data/plugin/inline_wiki.rb +6 -0
  190. data/plugin/instagr.rb +64 -0
  191. data/plugin/ja/add_bookmark.rb +20 -0
  192. data/plugin/ja/del_footer.rb +10 -0
  193. data/plugin/ja/flickr.rb +62 -0
  194. data/plugin/ja/git-register.rb +3 -0
  195. data/plugin/ja/google_sitemaps.rb +35 -0
  196. data/plugin/ja/livedoor_weather.rb +25 -0
  197. data/plugin/ja/microsummary.rb +18 -0
  198. data/plugin/ja/nicovideo.rb +41 -0
  199. data/plugin/ja/openid.rb +7 -0
  200. data/plugin/ja/section_footer.rb +6 -0
  201. data/plugin/ja/section_footer2.rb +4 -0
  202. data/plugin/ja/socialbutton.rb +6 -0
  203. data/plugin/jdate.rb +20 -0
  204. data/plugin/jholiday.rb +16 -0
  205. data/plugin/jmonth.rb +20 -0
  206. data/plugin/jquery_ui_theme.rb +55 -0
  207. data/plugin/jroku.rb +28 -0
  208. data/plugin/jyear.rb +37 -0
  209. data/plugin/latlonglab_route.rb +25 -0
  210. data/plugin/lazy_referer.rb +38 -0
  211. data/plugin/livedoor_weather.rb +180 -0
  212. data/plugin/make_link.rb +44 -0
  213. data/plugin/makerss_category.rb +43 -0
  214. data/plugin/makerss_comment.rb +35 -0
  215. data/plugin/microsummary.rb +62 -0
  216. data/plugin/mm_footer.rb +215 -0
  217. data/plugin/monthly_autopagerize.rb +67 -0
  218. data/plugin/my_hotentry.rb +132 -0
  219. data/plugin/navi_day.rb +118 -0
  220. data/plugin/navi_this_month.rb +15 -0
  221. data/plugin/nicovideo.rb +115 -0
  222. data/plugin/notify_miniblog.rb +134 -0
  223. data/plugin/ogp.rb +55 -0
  224. data/plugin/ohmsha_estore.rb +71 -0
  225. data/plugin/openid.rb +90 -0
  226. data/plugin/opensearch_ad.rb +33 -0
  227. data/plugin/picasa.rb +56 -0
  228. data/plugin/plugin_checker.rb +41 -0
  229. data/plugin/popit.rb +22 -0
  230. data/plugin/prettify.rb +19 -0
  231. data/plugin/prezi.rb +10 -0
  232. data/plugin/profile.rb +222 -0
  233. data/plugin/puboo.rb +93 -0
  234. data/plugin/pygments_css.rb +76 -0
  235. data/plugin/rating.rb +419 -0
  236. data/plugin/recent_estraier.rb +50 -0
  237. data/plugin/recent_tweet.rb +71 -0
  238. data/plugin/retweet.rb +86 -0
  239. data/plugin/rubykaigi.rb +99 -0
  240. data/plugin/search-bing.rb +87 -0
  241. data/plugin/search-default.rb +264 -0
  242. data/plugin/search-google-custom.rb +60 -0
  243. data/plugin/search-yahoo-websearch.rb +121 -0
  244. data/plugin/search-yahoo.rb +109 -0
  245. data/plugin/section_footer.rb +195 -0
  246. data/plugin/section_footer2.rb +278 -0
  247. data/plugin/section_permalink.rb +73 -0
  248. data/plugin/section_permalink_anchor.rb +39 -0
  249. data/plugin/select_style.rb +42 -0
  250. data/plugin/select_theme.rb +90 -0
  251. data/plugin/show_and_hide.rb +77 -0
  252. data/plugin/slideshare.rb +10 -0
  253. data/plugin/socialbutton.rb +60 -0
  254. data/plugin/tatsu_zine.rb +93 -0
  255. data/plugin/tdiarygraph_flashstyle.rb +296 -0
  256. data/plugin/tdiarytimes.rb +166 -0
  257. data/plugin/tdiarytimes2.rb +406 -0
  258. data/plugin/tdiarytimes_flashstyle.rb +263 -0
  259. data/plugin/tdiarytimes_textstyle.rb +290 -0
  260. data/plugin/title_anchor.rb +16 -0
  261. data/plugin/tweet_quote.rb +106 -0
  262. data/plugin/twitpic.rb +10 -0
  263. data/plugin/twitter.rb +46 -0
  264. data/plugin/twitter_anywhere.rb +209 -0
  265. data/plugin/twitter_badge.rb +42 -0
  266. data/plugin/twitter_js.rb +59 -0
  267. data/plugin/ustream.rb +19 -0
  268. data/plugin/vimeo.rb +14 -0
  269. data/plugin/volatile.rb +89 -0
  270. data/plugin/vote.rb +100 -0
  271. data/plugin/wikiloc.rb +27 -0
  272. data/plugin/windex.rb +512 -0
  273. data/plugin/yahoo_kousei.rb +79 -0
  274. data/plugin/yahoo_map.rb +97 -0
  275. data/plugin/youtube.rb +33 -0
  276. data/plugin/yshop.rb +189 -0
  277. data/plugin/zenback.rb +46 -0
  278. data/spec/apple_webclip_spec.rb +46 -0
  279. data/spec/fixtures/friendfeed.xml +2 -0
  280. data/spec/fixtures/github.json +1 -0
  281. data/spec/fixtures/twitter.xml +73 -0
  282. data/spec/gist_spec.rb +16 -0
  283. data/spec/github_link_spec.rb +39 -0
  284. data/spec/google_analytics_spec.rb +60 -0
  285. data/spec/jdate_spec.rb +23 -0
  286. data/spec/jmonth_spec.rb +28 -0
  287. data/spec/jyear_spec.rb +21 -0
  288. data/spec/my_hotentry_spec.rb +78 -0
  289. data/spec/openid_spec.rb +246 -0
  290. data/spec/opensearch_ad_spec.rb +50 -0
  291. data/spec/profile_spec.rb +88 -0
  292. data/spec/rcov.opts +2 -0
  293. data/spec/spec_helper.rb +223 -0
  294. data/spec/title_anchor_spec.rb +39 -0
  295. data/spec/twitter_js_spec.rb +116 -0
  296. data/spec/youtube_spec.rb +20 -0
  297. data/style/hatena_style.rb +1011 -0
  298. data/style/markdown_style.rb +239 -0
  299. data/style/wikiext_style.rb +21 -0
  300. data/tdiary-contrib.gemspec +25 -0
  301. data/util/clean-spam/README.ja +1 -0
  302. data/util/clean-spam/tdiary-comment-clean +46 -0
  303. data/util/clean-spam/tdiary-comment-clean2 +81 -0
  304. data/util/clean-spam/tdiary-referer-clean +46 -0
  305. data/util/convert_pstore.rb +82 -0
  306. data/util/estraier-search/ChangeLog +36 -0
  307. data/util/estraier-search/README.ja +114 -0
  308. data/util/estraier-search/en/estraier-register.rb +3 -0
  309. data/util/estraier-search/estraier-register.rb +298 -0
  310. data/util/estraier-search/estraier-search.rb +273 -0
  311. data/util/estraier-search/estraier.rhtml +73 -0
  312. data/util/estraier-search/estraier.rxml +23 -0
  313. data/util/estraier-search/i.estraier.rhtml +31 -0
  314. data/util/estraier-search/ja/estraier-register.rb +3 -0
  315. data/util/image-gallery/README.ja +27 -0
  316. data/util/image-gallery/image-gallery.rb +523 -0
  317. data/util/image-gallery/image-gallery.rb.euc-jp +523 -0
  318. data/util/image-gallery/js/SmoothGallery/Changelog +52 -0
  319. data/util/image-gallery/js/SmoothGallery/css/ReMooz.css +186 -0
  320. data/util/image-gallery/js/SmoothGallery/css/img/carrow1.gif +0 -0
  321. data/util/image-gallery/js/SmoothGallery/css/img/carrow2.gif +0 -0
  322. data/util/image-gallery/js/SmoothGallery/css/img/closebox.gif +0 -0
  323. data/util/image-gallery/js/SmoothGallery/css/img/closebox.png +0 -0
  324. data/util/image-gallery/js/SmoothGallery/css/img/fleche1.gif +0 -0
  325. data/util/image-gallery/js/SmoothGallery/css/img/fleche1.png +0 -0
  326. data/util/image-gallery/js/SmoothGallery/css/img/fleche2.gif +0 -0
  327. data/util/image-gallery/js/SmoothGallery/css/img/fleche2.png +0 -0
  328. data/util/image-gallery/js/SmoothGallery/css/img/loading-bar-black.gif +0 -0
  329. data/util/image-gallery/js/SmoothGallery/css/img/open.gif +0 -0
  330. data/util/image-gallery/js/SmoothGallery/css/img/open.png +0 -0
  331. data/util/image-gallery/js/SmoothGallery/css/img/remo_bg_e.png +0 -0
  332. data/util/image-gallery/js/SmoothGallery/css/img/remo_bg_n.png +0 -0
  333. data/util/image-gallery/js/SmoothGallery/css/img/remo_bg_ne.png +0 -0
  334. data/util/image-gallery/js/SmoothGallery/css/img/remo_bg_nw.png +0 -0
  335. data/util/image-gallery/js/SmoothGallery/css/img/remo_bg_s.png +0 -0
  336. data/util/image-gallery/js/SmoothGallery/css/img/remo_bg_se.png +0 -0
  337. data/util/image-gallery/js/SmoothGallery/css/img/remo_bg_sw.png +0 -0
  338. data/util/image-gallery/js/SmoothGallery/css/img/remo_bg_w.png +0 -0
  339. data/util/image-gallery/js/SmoothGallery/css/img/spinner.gif +0 -0
  340. data/util/image-gallery/js/SmoothGallery/css/jd.gallery.css +371 -0
  341. data/util/image-gallery/js/SmoothGallery/css/layout.css +91 -0
  342. data/util/image-gallery/js/SmoothGallery/license.txt +621 -0
  343. data/util/image-gallery/js/SmoothGallery/resizer.php +113 -0
  344. data/util/image-gallery/js/SmoothGallery/scripts/Changelog +52 -0
  345. data/util/image-gallery/js/SmoothGallery/scripts/History.Routing.js +126 -0
  346. data/util/image-gallery/js/SmoothGallery/scripts/History.js +109 -0
  347. data/util/image-gallery/js/SmoothGallery/scripts/ReMooz.js +364 -0
  348. data/util/image-gallery/js/SmoothGallery/scripts/jd.gallery.js +843 -0
  349. data/util/image-gallery/js/SmoothGallery/scripts/jd.gallery.set.js +183 -0
  350. data/util/image-gallery/js/SmoothGallery/scripts/jd.gallery.transitions.js +90 -0
  351. data/util/image-gallery/js/SmoothGallery/scripts/jdgalleryresize.js +828 -0
  352. data/util/image-gallery/js/SmoothGallery/scripts/license.txt +621 -0
  353. data/util/image-gallery/js/SmoothGallery/scripts/mootools-1.2-more.js +103 -0
  354. data/util/image-gallery/js/SmoothGallery/scripts/mootools-1.2.1-core-yc.js +349 -0
  355. data/util/image-gallery/js/SmoothGallery/scripts/resizer.php +113 -0
  356. data/util/image-gallery/misc/plugin/recent_image.rb +406 -0
  357. data/util/image-gallery/skel/gallery.rhtml +154 -0
  358. data/util/image-gallery/skel/gallery.rhtml.euc-jp +154 -0
  359. data/util/image-gallery/tdiary.conf.igsample +8 -0
  360. data/util/image-gallery/theme/image-gallery.css +85 -0
  361. data/util/image2flickr.rb +282 -0
  362. data/util/posttdiary/README.ja +12 -0
  363. data/util/posttdiary/posttdiary-ex.rb +1155 -0
  364. data/util/posttdiary/posttdiary.rb +245 -0
  365. data/util/rast-search/ChangeLog +55 -0
  366. data/util/rast-search/README.ja +99 -0
  367. data/util/rast-search/en/rast-register.rb +3 -0
  368. data/util/rast-search/i.rast.rhtml +33 -0
  369. data/util/rast-search/ja/rast-register.rb +3 -0
  370. data/util/rast-search/rast-register.rb +326 -0
  371. data/util/rast-search/rast-search.rb +249 -0
  372. data/util/rast-search/rast.rhtml +66 -0
  373. data/util/rast-search/rast.rxml +21 -0
  374. data/util/section_link/README +11 -0
  375. data/util/section_link/misc/plugin/section_link.rb +68 -0
  376. data/util/section_link/misc/plugin/section_link_anchor.rb +38 -0
  377. data/util/section_link/tdiary/tdiary_day_ext.rb +21 -0
  378. data/util/section_link/tdiary/tdiaryext_style.rb +36 -0
  379. data/util/section_link/tdiary/wikiext_style.rb +36 -0
  380. data/util/tdiary-for-ruby1.9/compatible.rb +97 -0
  381. data/util/tdiary-for-ruby1.9/tdiary-2.2.0.patch +98 -0
  382. data/util/tdiary-for-ruby1.9/tdiary-2.3.1.patch +212 -0
  383. data/util/tdiary-grep/README +4 -0
  384. data/util/tdiary-grep/grep.rb +445 -0
  385. data/util/tdiary-mode/http.el +130 -0
  386. data/util/tdiary-mode/tdiary-mode.el +613 -0
  387. data/util/tdiary-vim/ChangeLog +25 -0
  388. data/util/tdiary-vim/README +60 -0
  389. data/util/tdiary-vim/tdiary.vim +350 -0
  390. data/util/tdiarysearch/README.en +53 -0
  391. data/util/tdiarysearch/README.ja +99 -0
  392. data/util/tdiarysearch/search.rb +504 -0
  393. metadata +497 -0
@@ -0,0 +1,298 @@
1
+ #!/usr/bin/env ruby
2
+ # estraier-register.rb
3
+ #
4
+ # Copyright (C) 2007 Kazuhiko <kazuhiko@fdiary.net>
5
+ # You can redistribute it and/or modify it under GPL2.
6
+ #
7
+ require "estraierpure"
8
+
9
+ unless $tdiary_estraier_register_loaded
10
+ $tdiary_estraier_register_loaded ||= true
11
+
12
+ mode = ""
13
+ if $0 == __FILE__
14
+ require 'cgi'
15
+ ARGV << '' # dummy argument against cgi.rb offline mode.
16
+ @cgi = CGI::new
17
+ mode = "CMD"
18
+ else
19
+ mode = "PLUGIN"
20
+ end
21
+
22
+ if mode == "CMD"
23
+ tdiary_path = "."
24
+ tdiary_conf = "."
25
+ $stdout.sync = true
26
+
27
+ def usage
28
+ puts "hyper-estraier-register.rb $Revision: 1.1.2.13 $"
29
+ puts " register to hyper-estraier index files from tDiary's database."
30
+ puts " usage: ruby hyper-estraier-regiser.rb [-p <tDiary directory>] [-c <tdiary.conf directory>]"
31
+ exit
32
+ end
33
+
34
+ require 'getoptlong'
35
+ parser = GetoptLong::new
36
+ parser.set_options(['--path', '-p', GetoptLong::REQUIRED_ARGUMENT], ['--conf', '-c', GetoptLong::REQUIRED_ARGUMENT])
37
+ begin
38
+ parser.each do |opt, arg|
39
+ case opt
40
+ when '--path'
41
+ tdiary_path = arg
42
+ when '--conf'
43
+ tdiary_conf = arg
44
+ end
45
+ end
46
+ rescue
47
+ usage
48
+ exit( 1 )
49
+ end
50
+
51
+ tdiary_conf = tdiary_path unless tdiary_conf
52
+ Dir::chdir( tdiary_conf )
53
+
54
+ begin
55
+ $:.unshift tdiary_path
56
+ require "#{tdiary_path}/tdiary"
57
+ rescue LoadError
58
+ $stderr.puts "hyper-estraier-register.rb: cannot load tdiary.rb. <#{tdiary_path}/tdiary>\n"
59
+ $stderr.puts " usage: ruby hyper-estraier-regiser.rb [-p <tDiary directory>] [-c <tdiary.conf directory>]"
60
+ exit( 1 )
61
+ end
62
+ end
63
+
64
+ module ::TDiary
65
+ #
66
+ # Database
67
+ #
68
+ class EstraierDB
69
+ attr_accessor :db
70
+ attr_reader :conf
71
+
72
+ def initialize(conf)
73
+ @conf = conf
74
+ @host = @conf["estraier.host"] || "localhost"
75
+ @port = @conf["estraier.port"] || 1978
76
+ @path = @conf["estraier.path"] || "/node/"
77
+ @node = @conf["estraier.node"] || "tdiary"
78
+ @name = @conf["estraier.name"] || "admin"
79
+ @password = @conf["estraier.password"] || "admin"
80
+ end
81
+
82
+ def transaction
83
+ db = EstraierPure::Node.new
84
+ db.set_url("http://#{@host}:#{@port}#{@path}#{@node}")
85
+ db.set_auth(@name, @password)
86
+
87
+ if db.doc_num < 0
88
+ raise "Database not found : http://#{@host}:#{@port}#{@path}#{@node}"
89
+ end
90
+ @db = db
91
+ yield self
92
+ end
93
+
94
+ def cache_path
95
+ @conf.cache_path || "#{@conf.data_path}cache"
96
+ end
97
+ end
98
+
99
+ #
100
+ # Register
101
+ #
102
+ class EstraierRegister < TDiaryBase
103
+ def initialize(estraier_db, diary)
104
+ @db = estraier_db.db
105
+ super(CGI::new, 'day.rhtml', estraier_db.conf)
106
+ @diary = diary
107
+ @date = diary.date
108
+ @diaries = {@date.strftime('%Y%m%d') => @diary} if @diaries.empty?
109
+ @plugin = ::TDiary::Plugin::new(
110
+ 'conf' => @conf,
111
+ 'cgi' => @cgi,
112
+ 'cache_path' => @io.cache_path,
113
+ 'diaries' => @diaries
114
+ )
115
+ def @plugin.apply_plugin_alt( str, remove_tag = false )
116
+ apply_plugin( str, remove_tag )
117
+ end
118
+ end
119
+
120
+ def execute(force = false)
121
+ date = @date.strftime('%Y%m%d')
122
+ cond = EstraierPure::Condition.new
123
+ if @conf["estraier.with_user_name"]
124
+ cond.add_attr("@uri STRBW #{@conf.user_name}:#{date}")
125
+ else
126
+ cond.add_attr("@uri STRBW #{date}")
127
+ end
128
+ result = @db.search(cond, 0)
129
+ if result
130
+ for i in 0...result.doc_num
131
+ doc_id = result.get_doc(i).attr("@id")
132
+ @db.out_doc(doc_id)
133
+ end
134
+ end
135
+ return unless @diary.visible?
136
+
137
+ # body
138
+ index = 0
139
+ anchor = ''
140
+ @diary.each_section do |section|
141
+ index += 1
142
+ @conf['apply_plugin'] = true
143
+ anchor = "#{date}p%02d" % index
144
+ title = CGI.unescapeHTML( @plugin.apply_plugin_alt( section.subtitle_to_html, true ).strip )
145
+ if title.empty?
146
+ title = @plugin.apply_plugin_alt( section.body_to_html, true ).strip
147
+ title = @conf.shorten( CGI.unescapeHTML( title ), 20 )
148
+ end
149
+ last_modified = @diary.last_modified.strftime("%FT%T")
150
+ body = CGI.unescapeHTML( @plugin.apply_plugin_alt( section.body_to_html, true ).strip )
151
+ doc = EstraierPure::Document.new
152
+ doc.add_attr("@title", title)
153
+ if @conf["estraier.with_user_name"]
154
+ doc.add_attr("@uri", "#{@conf.user_name}:#{anchor}")
155
+ else
156
+ doc.add_attr("@uri", anchor)
157
+ end
158
+ doc.add_attr("@mdate", last_modified)
159
+ doc.add_hidden_text(title)
160
+ doc.add_text(body)
161
+ @db.put_doc(doc)
162
+ end
163
+
164
+ # comment
165
+ @diary.each_visible_comment do |comment, index|
166
+ if /^(TrackBack|Pingback)$/i =~ comment.name
167
+ anchor = "#{date}t%02d" % index
168
+ title = "TrackBack (#{comment.name})"
169
+ else
170
+
171
+
172
+ anchor = "#{date}c%02d" % index
173
+ title = "#{@plugin.comment_description_short} (#{comment.name})"
174
+ end
175
+ body = comment.body
176
+ doc = EstraierPure::Document.new
177
+ doc.add_attr("@title", title)
178
+ if @conf["estraier.with_user_name"]
179
+ doc.add_attr("@uri", "#{@conf.user_name}:#{anchor}")
180
+ else
181
+ doc.add_attr("@uri", anchor)
182
+ end
183
+ doc.add_attr("@mdate", comment.date.strftime("%FT%T"))
184
+ doc.add_hidden_text(title)
185
+ doc.add_text(body)
186
+ @db.put_doc(doc)
187
+ end
188
+ end
189
+
190
+ protected
191
+
192
+ def mode; 'day'; end
193
+ def cookie_name; ''; end
194
+ def cookie_mail; ''; end
195
+
196
+ def convert(str)
197
+ str
198
+ end
199
+ end
200
+
201
+ #
202
+ # Main
203
+ #
204
+ class EstraierRegisterMain < TDiaryBase
205
+ def initialize(conf)
206
+ super(CGI::new, 'day.rhtml', conf)
207
+ end
208
+
209
+ def execute(out = $stdout)
210
+ require 'fileutils'
211
+ calendar
212
+ db = EstraierDB.new(conf)
213
+ db.transaction do |estraier_db|
214
+ @years.keys.sort.reverse_each do |year|
215
+ out << "(#{year.to_s}/) "
216
+ @years[year.to_s].sort.reverse_each do |month|
217
+ @io.transaction(Time::local(year.to_i, month.to_i)) do |diaries|
218
+ diaries.sort.reverse_each do |day, diary|
219
+ EstraierRegister.new(estraier_db, diary).execute
220
+ out << diary.date.strftime('%m%d ')
221
+ end
222
+ false
223
+ end
224
+ end
225
+ end
226
+ end
227
+ end
228
+ end
229
+ end
230
+
231
+ if mode == "CMD"
232
+ begin
233
+ require 'cgi'
234
+ if TDiary::Config.instance_method(:initialize).arity != 0
235
+ # for tDiary 2.1 or later
236
+ cgi = CGI.new
237
+ conf = TDiary::Config::new(cgi)
238
+ else
239
+ # for tDiary 2.0 or earlier
240
+ conf = TDiary::Config::new
241
+ end
242
+ conf.header = ''
243
+ conf.footer = ''
244
+ conf.show_comment = true
245
+ conf.hide_comment_form = true
246
+ conf.show_nyear = false
247
+ def conf.bot?; true; end
248
+ TDiary::EstraierRegisterMain.new(conf).execute
249
+ rescue
250
+ print $!, "\n"
251
+ $@.each do |v|
252
+ print v, "\n"
253
+ end
254
+ exit( 1 )
255
+ end
256
+
257
+ puts
258
+ else
259
+ add_update_proc do
260
+ conf = @conf.clone
261
+ conf.header = ''
262
+ conf.footer = ''
263
+ conf.show_comment = true
264
+ conf.hide_comment_form = true
265
+ conf.show_nyear = false
266
+ def conf.bot?; true; end
267
+
268
+ diary = @diaries[@date.strftime('%Y%m%d')]
269
+ TDiary::EstraierDB.new(conf).transaction do |estraier_db|
270
+ TDiary::EstraierRegister.new(estraier_db, diary).execute(true)
271
+ end
272
+ end
273
+
274
+ if !@conf['estraier.hideconf'] && (@mode == 'conf' || @mode == 'saveconf')
275
+ args = ['estraier_register', @estraier_register_conf_label]
276
+ args << 'update' if TDIARY_VERSION > '2.1.3'
277
+ add_conf_proc(*args) do
278
+ str = <<-HTML
279
+ <h3 class="subtitle">#{@estraier_register_conf_header}</h3>
280
+ <p>
281
+ <label for="estraier_register_rebuild"><input id="estraier_register_rebuild" type="checkbox" name="estraier_register_rebuild" value="1">
282
+ #{@estraier_register_conf_description}</label>
283
+ </p>
284
+ HTML
285
+ if @mode == 'saveconf'
286
+ if @cgi.valid?( 'estraier_register_rebuild' )
287
+ str << '<p>The following diaries were registered.</p>'
288
+ out = ''
289
+ TDiary::EstraierRegisterMain.new(@conf).execute(out)
290
+ str << "<p>#{out}</p>"
291
+ end
292
+ end
293
+ str
294
+ end
295
+ end
296
+ end
297
+
298
+ end # $tdiary_estraier_register_loaded
@@ -0,0 +1,273 @@
1
+ #!/usr/bin/env ruby
2
+ # -*- coding: utf-8; -*-
3
+ # estraier-search.rb $Revision: 1.1.2.12 $
4
+ #
5
+ # Copyright (C) 2007 Kazuhiko <kazuhiko@fdiary.net>
6
+ # You can redistribute it and/or modify it under GPL2.
7
+ #
8
+ BEGIN { $stdout.binmode }
9
+ begin
10
+ Encoding::default_external = 'UTF-8'
11
+ rescue NameError
12
+ $KCODE = 'n'
13
+ end
14
+
15
+ require "estraierpure"
16
+ require "enumerator"
17
+ require "date"
18
+
19
+ if FileTest::symlink?( __FILE__ ) then
20
+ org_path = File::dirname( File::readlink( __FILE__ ) )
21
+ else
22
+ org_path = File::dirname( __FILE__ )
23
+ end
24
+ $:.unshift( org_path.untaint )
25
+ require 'tdiary'
26
+
27
+ #
28
+ # class TDiaryEstraier
29
+ #
30
+ module TDiary
31
+ class TDiaryEstraier < ::TDiary::TDiaryBase
32
+ MAX_PAGES = 20
33
+ SORT_OPTIONS = [
34
+ ["score", "スコア順"],
35
+ ["date", "日付順"],
36
+ ]
37
+ ORDER_OPTIONS = [
38
+ ["asc", "昇順"],
39
+ ["desc", "降順"],
40
+ ]
41
+ FORM_OPTIONS = [
42
+ ["simple", "簡便書式"],
43
+ ["normal", "通常書式"],
44
+ ]
45
+ NUM_OPTIONS = [10, 20, 30, 50, 100]
46
+
47
+ def initialize( cgi, rhtml, conf )
48
+ super
49
+ @host = @conf["estraier.host"] || "localhost"
50
+ @port = @conf["estraier.port"] || 1978
51
+ @path = @conf["estraier.path"] || "/node/"
52
+ @node = @conf["estraier.node"] || "tdiary"
53
+ parse_args
54
+ format_form
55
+ if @query.empty?
56
+ @msg = '検索条件を入力して、「検索」ボタンを押してください'
57
+ else
58
+ search
59
+ end
60
+ end
61
+
62
+ def load_plugins
63
+ super
64
+ # add a opensearch rss link
65
+ @plugin.instance_variable_get('@header_procs').unshift Proc.new {
66
+ cgi_url = @conf.base_url.sub(%r|/[^/]*$|, '/') + (@cgi.script_name ? _(File.basename(@cgi.script_name)) : '')
67
+ %Q|\t<link rel="alternate" type="application/rss+xml" title="Search Result RSS" href="#{cgi_url}#{format_anchor(@start, @num)};type=rss">\n|
68
+ }
69
+ # override some plugins
70
+ def @plugin.sn(number = nil); ''; end
71
+ def @plugin.whats_new; ''; end
72
+ end
73
+
74
+ def eval_rxml
75
+ require 'time'
76
+ load_plugins
77
+ ERB::new( File::open( "#{PATH}/skel/estraier.rxml" ){|f| f.read }.untaint ).result( binding )
78
+ end
79
+
80
+ private
81
+
82
+ def parse_args
83
+ @query = @cgi["query"].strip
84
+ @start = @cgi["start"].to_i
85
+ @num = @cgi["num"].to_i
86
+ if @num < 1
87
+ @num = 10
88
+ elsif @num > 100
89
+ @num = 100
90
+ end
91
+ @sort = @cgi["sort"].empty? ? "score" : @cgi["sort"]
92
+ @order = @cgi["order"].empty? ? "desc" : @cgi["order"]
93
+ @form = @cgi["form"].empty? ? "simple" : @cgi["form"]
94
+ end
95
+
96
+ def search
97
+ @db = EstraierPure::Node.new
98
+ @db.set_url("http://#{@host}:#{@port}#{@path}#{@node}")
99
+ begin
100
+ t = Time.now
101
+ cond = create_search_options
102
+ cond.set_phrase(convert(@query))
103
+ @result = @db.search(cond, 0)
104
+ @secs = Time.now - t
105
+ rescue
106
+ @msg = "エラー: #{_($!.to_s + $@.join)}</p>"
107
+ end
108
+ end
109
+
110
+ def format_result_item(item)
111
+ @date = item.attr('@uri')
112
+ if @conf["estraier.with_user_name"]
113
+ @date.gsub!(/.*:/, "")
114
+ end
115
+ @date_str = Date.parse(@date).strftime(@conf.date_format)
116
+ @last_modified = item.attr('@mdate')
117
+ @title = _(item.attr('@title'))
118
+ @summary = _(item.snippet).gsub(/\t.*/, "").gsub(/\n\n/, " ... ").delete("\n")
119
+ for term in @query.split
120
+ @title.gsub!(Regexp.new(Regexp.quote(CGI.escapeHTML(term)), true, @encoding), "<strong>\\&</strong>")
121
+ @summary.gsub!(Regexp.new(Regexp.quote(CGI.escapeHTML(term)), true, @encoding), "<strong>\\&</strong>")
122
+ end
123
+ query = "[SIMILAR]"
124
+ item.keywords.split(/\t/).each_slice(2).collect do |k, s|
125
+ query << " WITH #{s} #{k}"
126
+ end
127
+ @similar = "%s?query=%s" %
128
+ [_(@cgi.script_name || ""), CGI::escape(query)]
129
+ end
130
+
131
+ def format_links(result)
132
+ page_count = (result.doc_num - 1) / @num + 1
133
+ current_page = @start / @num + 1
134
+ first_page = current_page - (MAX_PAGES / 2 - 1)
135
+ if first_page < 1
136
+ first_page = 1
137
+ end
138
+ last_page = first_page + MAX_PAGES - 1
139
+ if last_page > page_count
140
+ last_page = page_count
141
+ end
142
+ buf = "<p class=\"infobar\">\n"
143
+ if current_page > 1
144
+ buf.concat(format_link("前へ", @start - @num, @num))
145
+ end
146
+ if first_page > 1
147
+ buf.concat("... ")
148
+ end
149
+ for i in first_page..last_page
150
+ if i == current_page
151
+ buf.concat("#{i} ")
152
+ else
153
+ buf.concat(format_link(i.to_s, (i - 1) * @num, @num))
154
+ end
155
+ end
156
+ if last_page < page_count
157
+ buf.concat("... ")
158
+ end
159
+ if current_page < page_count
160
+ buf.concat(format_link("次へ", @start + @num, @num))
161
+ end
162
+ buf.concat("</p>\n")
163
+ return buf
164
+ end
165
+
166
+ def format_anchor(start, num)
167
+ return format('?query=%s;start=%d;num=%d;sort=%s;order=%s', CGI::escape(@query), start, num, _(@sort), _(@order))
168
+ end
169
+
170
+ def format_link(label, start, num)
171
+ return format('<a href="%s%s">%s</a> ', _(@cgi.script_name ? @cgi.script_name : ""), format_anchor(start, num), _(label))
172
+ end
173
+
174
+ def create_search_options
175
+ cond = EstraierPure::Condition.new
176
+ if @conf["estraier.with_user_name"]
177
+ cond.add_attr("@uri STRBW #{@conf.user_name}:")
178
+ end
179
+ if @sort == "date"
180
+ order = "@uri"
181
+ else
182
+ order = ""
183
+ end
184
+ if @order == "asc"
185
+ order = "[SCA]" if order.empty?
186
+ else
187
+ unless order.empty?
188
+ order << " STRD"
189
+ end
190
+ end
191
+ if @form == "simple"
192
+ cond.set_options(EstraierPure::Condition::SIMPLE)
193
+ end
194
+ cond.set_order(order)
195
+ return cond
196
+ end
197
+
198
+ def format_options(options, value)
199
+ return options.collect { |val, label|
200
+ if val == value
201
+ "<option value=\"#{_(val)}\" selected>#{_(label)}</option>"
202
+ else
203
+ "<option value=\"#{_(val)}\">#{_(label)}</option>"
204
+ end
205
+ }.join("\n")
206
+ end
207
+
208
+ def format_form
209
+ @num_options = NUM_OPTIONS.collect { |n|
210
+ if n == @num
211
+ "<option value=\"#{n}\" selected>#{n}件ずつ</option>"
212
+ else
213
+ "<option value=\"#{n}\">#{n}件ずつ</option>"
214
+ end
215
+ }.join("\n")
216
+ @sort_options = format_options(SORT_OPTIONS, @sort)
217
+ @order_options = format_options(ORDER_OPTIONS, @order)
218
+ @form_options = format_options(FORM_OPTIONS, @form)
219
+ end
220
+
221
+ def _(str)
222
+ CGI::escapeHTML(str)
223
+ end
224
+
225
+ def convert(str)
226
+ @conf.to_native(str)
227
+ end
228
+ end
229
+ end
230
+
231
+ begin
232
+ @cgi = CGI::new
233
+ if ::TDiary::Config.instance_method(:initialize).arity != 0
234
+ # for tDiary 2.1 or later
235
+ conf = ::TDiary::Config::new(@cgi)
236
+ else
237
+ # for tDiary 2.0 or earlier
238
+ conf = ::TDiary::Config::new
239
+ end
240
+ tdiary = TDiary::TDiaryEstraier::new( @cgi, 'estraier.rhtml', conf )
241
+
242
+ head = {
243
+ 'type' => 'text/html',
244
+ 'Vary' => 'User-Agent'
245
+ }
246
+ if @cgi.mobile_agent? then
247
+ body = conf.to_mobile( tdiary.eval_rhtml( 'i.' ) )
248
+ head['charset'] = conf.mobile_encoding
249
+ head['Content-Length'] = body.bytesize.to_s
250
+ else
251
+ if @cgi['type'] == 'rss'
252
+ head['type'] = "application/xml; charset=#{conf.encoding}"
253
+ body = tdiary.eval_rxml
254
+ else
255
+ body = tdiary.eval_rhtml
256
+ end
257
+ head['charset'] = conf.encoding
258
+ head['Content-Length'] = body.bytesize.to_s
259
+ head['Pragma'] = 'no-cache'
260
+ head['Cache-Control'] = 'no-cache'
261
+ end
262
+ print @cgi.header( head )
263
+ print body
264
+ rescue Exception
265
+ if @cgi then
266
+ print @cgi.header( 'type' => 'text/plain' )
267
+ else
268
+ print "Content-Type: text/plain\n\n"
269
+ end
270
+ puts "#$! (#{$!.class})"
271
+ puts ""
272
+ puts $@.join( "\n" )
273
+ end
@@ -0,0 +1,73 @@
1
+ <div class="adminmenu"><%%=navi_user%></div>
2
+
3
+ <h1><%= _(@conf.html_title) %> [全文検索]</h1>
4
+
5
+ <form action="<%= @cgi.script_name ? _(@cgi.script_name) : '' %>">
6
+ <p>
7
+ <input type="text" name="query" value="<%= _(@conf.to_native(@query)) %>" size="60">
8
+ <input type="submit" value="検索">
9
+ <a href="http://hyperestraier.sourceforge.net/uguide-ja.html#searchcond">検索方法</a>
10
+ </p>
11
+ <p>
12
+ 並べ替え:
13
+ <select name="sort">
14
+ <%= @sort_options %>
15
+ </select>
16
+ <select name="order">
17
+ <%= @order_options %>
18
+ </select>
19
+
20
+ 表示件数:
21
+ <select name="num">
22
+ <%= @num_options %>
23
+ </select>
24
+
25
+ 検索条件の書式:
26
+ <select name="form">
27
+ <%= @form_options %>
28
+ </select>
29
+ </p>
30
+ </form>
31
+
32
+ <% if @msg %>
33
+ <p><%= @msg %></p>
34
+ <% else %>
35
+ <% @end = [@result.doc_num, @start + @num].min %>
36
+ <p>
37
+ <%= _(@conf.to_native(@query)) %> の検索結果
38
+ <%= @result.doc_num %> 件中 <%= @start + 1 %> - <%= @end %> 件目
39
+ (<%= @secs %> 秒)
40
+ </p>
41
+ <% if @result.doc_num > @num %>
42
+ <%= format_links(@result) %>
43
+ <% end %>
44
+ <% for i in @start...@end %>
45
+ <% item = @result.get_doc(i) || next %>
46
+ <% format_result_item(item) %>
47
+ <div class="day">
48
+ <h2><span class="date"><a href="<%= @conf.index %><%= @plugin.anchor(@date) %>"><%= @date_str %></a></span> <span class="nyear">[<a href="<%= @similar %>">類似検索</a>]</span></h2>
49
+ <div class="body">
50
+ <div class="section">
51
+ <h3><a href="<%= @conf.index %><%= @plugin.anchor(@date) %>"><%= @conf.section_anchor %></a><%= @conf.to_native(@title) %></h3>
52
+ <p>
53
+ <%= @conf.to_native(@summary) %>
54
+ </p>
55
+ </div>
56
+ </div>
57
+ <div class="comment">
58
+ <div class="commentshort">
59
+ <p><%= @conf.comment_anchor %>
60
+ <span class="commentator"></span>&nbsp;(スコア:<%= item.attr("#nodescore") %>)</p>
61
+ </div>
62
+ </div>
63
+ <div class="referer">
64
+ </div>
65
+ </div>
66
+ <% end %>
67
+ <% if @result.doc_num > @num %>
68
+ <%= format_links(@result) %>
69
+ <% end %>
70
+ <% end %>
71
+
72
+ <div class="footer">
73
+ Powered by <a href="http://hyperestraier.sourceforge.net/">Hyper Estraier</a></div>
@@ -0,0 +1,23 @@
1
+ <?xml version="1.0" encoding="<%= @conf.encoding %>"?>
2
+ <rss xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" version="2.0">
3
+ <channel>
4
+ <title><%= _( @conf.html_title ) %> [全文検索]: <%= _(@query) %></title>
5
+ <link><%= @conf.base_url.sub(%r|/[^/]*$|, '/') %><%= _(@cgi.script_name ? File.basename(@cgi.script_name) : "") %><%= format_anchor(@start, @num) %></link>
6
+ <description>HyperEstraier 検索: <%= _(@query) %></description>
7
+ <language>ja-JP</language>
8
+ <openSearch:totalResults><%= @result.doc_num %></openSearch:totalResults>
9
+ <openSearch:startIndex><%= @start + 1 %></openSearch:startIndex>
10
+ <openSearch:itemsPerPage><%= @num %></openSearch:itemsPerPage>
11
+ <% for i in @start...@start+@num %>
12
+ <% item = @result.get_doc(i) || next %>
13
+ <% format_result_item(item) %>
14
+ <item>
15
+ <title><%= _(@date.sub(/^(\d{4})(\d{2})(\d{2}).*/, "\\1-\\2-\\3")) %> <%= _(@conf.to_native(@title)) %></title>
16
+ <link><%= @conf.base_url %><%= @plugin.anchor(@date) %></link>
17
+ <pubDate><%= _(CGI.rfc1123_date(Time.parse(@last_modified))) %></pubDate>
18
+ <description><%= _(@conf.to_native(@summary)) %></description>
19
+ <guid><%= @conf.base_url %><%= @plugin.anchor(@date) %></guid>
20
+ </item>
21
+ <% end %>
22
+ </channel>
23
+ </rss>
@@ -0,0 +1,31 @@
1
+ <h1><%= _(@conf.html_title) %> [全文検索]</h1>
2
+ <form action="<%= _(@cgi.script_name) %>">
3
+ <p>
4
+ <input type="text" name="query" value="<%= _(@conf.to_native(@query)) %>">
5
+ <input type="submit" value="検索">
6
+ </p>
7
+ <p>
8
+ 並べ替え:
9
+ <select name="sort">
10
+ <%= @sort_options %>
11
+ </select>
12
+ <select name="order">
13
+ <%= @order_options %>
14
+ </select>
15
+ 表示件数:
16
+ <select name="num">
17
+ <%= @num_options %>
18
+ </select>
19
+ </p>
20
+ </form>
21
+ <% if @msg %>
22
+ <p><%= @msg %></p>
23
+ <% else %>
24
+ <p><%= @result.doc_num %>件中<%= @start + 1 %>-<%= [@result.doc_num, @start + @num].min %>件目</p>
25
+ <% for i in @start...@start+@num %><% item = @result.get_doc(i) || next %><% format_result_item(item) %>
26
+ <h2><a href="<%= @conf.index %><%= @plugin.anchor(@date) %>"><%= _(@date.sub(/^(\d{4})(\d{2})(\d{2}).*/, "\\1-\\2-\\3")) %></a><%= @conf.to_native(@title) %>(スコア:<%= item.attr("#nodescore") %>)</h2>
27
+ <% end %>
28
+ <% if @result.doc_num > @num %>
29
+ <%= format_links(@result) %>
30
+ <% end %>
31
+ <% end %>
@@ -0,0 +1,3 @@
1
+ @estraier_register_conf_label = 'Estraier検索'
2
+ @estraier_register_conf_header = 'Estraier検索インデックスの再構築'
3
+ @estraier_register_conf_description = 'Estraier検索のインデックスを再構築する場合は、チェックボックスをチェックしてOKを押してください。'