tdiary-contrib 3.2.2.20130518
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +1 -0
- data/.travis.yml +7 -0
- data/Gemfile +13 -0
- data/Gemfile.lock +35 -0
- data/README.en.md +12 -0
- data/README.md +13 -0
- data/Rakefile +41 -0
- data/doc/en/filter/spambayes.txt +3 -0
- data/doc/en/plugin.txt +1 -0
- data/doc/en/style/hatena.txt +10 -0
- data/doc/en/style/markdown.txt +16 -0
- data/doc/en/util.txt +1 -0
- data/doc/ja/filter/antirefspam.history.txt +59 -0
- data/doc/ja/filter/antirefspam.txt +86 -0
- data/doc/ja/filter/comment_key.ja.html +182 -0
- data/doc/ja/filter/spambayes.txt +3 -0
- data/doc/ja/plugin/add_bookmark.txt +50 -0
- data/doc/ja/plugin/category_to_tag.txt +21 -0
- data/doc/ja/plugin/cocoment.txt +31 -0
- data/doc/ja/plugin/google_adsense.txt +25 -0
- data/doc/ja/plugin/google_analytics.txt +7 -0
- data/doc/ja/plugin/image_detail.txt +69 -0
- data/doc/ja/plugin/image_gps.txt +36 -0
- data/doc/ja/plugin/image_gps2.txt +41 -0
- data/doc/ja/plugin/livedoor_weather.txt +105 -0
- data/doc/ja/plugin/opensearch_ad.txt +16 -0
- data/doc/ja/plugin/section_footer.txt +84 -0
- data/doc/ja/plugin/select_theme.txt +1 -0
- data/doc/ja/plugin.txt +13 -0
- data/doc/ja/style/hatena.txt +10 -0
- data/doc/ja/style/markdown.txt +13 -0
- data/doc/ja/util.txt +12 -0
- data/filter/antirefspam.rb +263 -0
- data/filter/commentkey.rb +29 -0
- data/filter/commentsize.rb +18 -0
- data/filter/hidecomment.rb +13 -0
- data/filter/iplookup.rb +55 -0
- data/filter/plugin/antirefspam.rb +59 -0
- data/filter/plugin/commentkey.rb +58 -0
- data/filter/plugin/commentsize.rb +12 -0
- data/filter/plugin/en/iplookup.rb +9 -0
- data/filter/plugin/en/spambayes.rb +123 -0
- data/filter/plugin/iplookup.rb +39 -0
- data/filter/plugin/ja/antirefspam.rb +91 -0
- data/filter/plugin/ja/commentkey.rb +17 -0
- data/filter/plugin/ja/commentsize.rb +6 -0
- data/filter/plugin/ja/iplookup.rb +9 -0
- data/filter/plugin/ja/spambayes.rb +124 -0
- data/filter/plugin/spambayes.rb +501 -0
- data/filter/plugin/zh/iplookup.rb +9 -0
- data/filter/rblcheck.rb +36 -0
- data/filter/spambayes.rb +535 -0
- data/filter/spamlookup.rb +37 -0
- data/io/dbi_io/ChangeLog +19 -0
- data/io/dbi_io/README.ja +39 -0
- data/io/dbi_io/dbi_io.rb +181 -0
- data/io/dbi_io/plugin/refererDbiIO.rb +76 -0
- data/io/dbi_io/tdiary_table.sql +42 -0
- data/js/appstore.js +109 -0
- data/js/datepicker.js +69 -0
- data/js/editor.js +82 -0
- data/js/flickr.js +157 -0
- data/js/image_ex.js +79 -0
- data/js/jquery.socialbutton.js +842 -0
- data/js/nicovideo.js +17 -0
- data/js/picasa.js +322 -0
- data/js/plugin_checker.js +71 -0
- data/js/prettify/lang-apollo.js +2 -0
- data/js/prettify/lang-clj.js +18 -0
- data/js/prettify/lang-css.js +2 -0
- data/js/prettify/lang-go.js +1 -0
- data/js/prettify/lang-hs.js +2 -0
- data/js/prettify/lang-lisp.js +3 -0
- data/js/prettify/lang-lua.js +2 -0
- data/js/prettify/lang-ml.js +2 -0
- data/js/prettify/lang-n.js +4 -0
- data/js/prettify/lang-proto.js +1 -0
- data/js/prettify/lang-scala.js +2 -0
- data/js/prettify/lang-sql.js +2 -0
- data/js/prettify/lang-tex.js +1 -0
- data/js/prettify/lang-vb.js +2 -0
- data/js/prettify/lang-vhdl.js +3 -0
- data/js/prettify/lang-wiki.js +2 -0
- data/js/prettify/lang-xq.js +3 -0
- data/js/prettify/lang-yaml.js +2 -0
- data/js/prettify/prettify.css +1 -0
- data/js/prettify/prettify.js +28 -0
- data/js/referer.js +17 -0
- data/js/show_and_hide.js +39 -0
- data/js/socialbutton.js +126 -0
- data/js/twitter_anywhere.js +28 -0
- data/js/yahoo_kousei.js +21 -0
- data/lib/bayes/convert.rb +34 -0
- data/lib/bayes.rb +232 -0
- data/lib/exifparser/BUGS +1 -0
- data/lib/exifparser/ChangeLog +169 -0
- data/lib/exifparser/README +15 -0
- data/lib/exifparser/install.rb +1015 -0
- data/lib/exifparser/lib/exifparser/makernote/canon.rb +502 -0
- data/lib/exifparser/lib/exifparser/makernote/fujifilm.rb +415 -0
- data/lib/exifparser/lib/exifparser/makernote/minolta.rb +84 -0
- data/lib/exifparser/lib/exifparser/makernote/mk_nikonflensname.rb +39 -0
- data/lib/exifparser/lib/exifparser/makernote/nikon.rb +267 -0
- data/lib/exifparser/lib/exifparser/makernote/nikon2.rb +581 -0
- data/lib/exifparser/lib/exifparser/makernote/nikonflensname.rb +438 -0
- data/lib/exifparser/lib/exifparser/makernote/olympus.rb +225 -0
- data/lib/exifparser/lib/exifparser/makernote/prove.rb +84 -0
- data/lib/exifparser/lib/exifparser/makernote/sigma.rb +237 -0
- data/lib/exifparser/lib/exifparser/pre-setup.rb +1 -0
- data/lib/exifparser/lib/exifparser/scan.rb +278 -0
- data/lib/exifparser/lib/exifparser/tag.rb +2298 -0
- data/lib/exifparser/lib/exifparser/thumbnail.rb +76 -0
- data/lib/exifparser/lib/exifparser/utils.rb +88 -0
- data/lib/exifparser/lib/exifparser.rb +265 -0
- data/lib/exifparser/sample/exifview.rb +279 -0
- data/lib/tdiary-contrib.rb +19 -0
- data/lib/wgs2tky.rb +93 -0
- data/misc/section_footer2/buzzurl.yaml +6 -0
- data/misc/section_footer2/fc2.yaml +6 -0
- data/misc/section_footer2/ldc.yaml +6 -0
- data/misc/section_footer2/retweet.yaml +7 -0
- data/misc/section_footer2/twitter.yaml +7 -0
- data/misc/section_footer2/yahoo.yaml +6 -0
- data/misc/tdiarygraph/tdiarygraph120x90e.swf +0 -0
- data/misc/tdiarygraph/tdiarygraph125x125e.swf +0 -0
- data/misc/tdiarygraph/tdiarygraph240x180e.swf +0 -0
- data/misc/tdiarygraph/tdiarygraph468x60e.swf +0 -0
- data/misc/tdiarygraph/tdiarygraph728x90e.swf +0 -0
- data/misc/tdiarytimes/tdiarytimes125x125r.swf +0 -0
- data/misc/tdiarytimes/tdiarytimes125x125r7.swf +0 -0
- data/misc/tdiarytimes/tdiarytimes125x125s.swf +0 -0
- data/misc/tdiarytimes/tdiarytimes125x30.swf +0 -0
- data/misc/tdiarytimes/tdiarytimes234x30.swf +0 -0
- data/misc/tdiarytimes/tdiarytimes468x30.swf +0 -0
- data/plugin/add_bookmark.rb +89 -0
- data/plugin/apple_webclip.rb +26 -0
- data/plugin/appstore.rb +47 -0
- data/plugin/bigpresen.rb +86 -0
- data/plugin/bitly.rb +39 -0
- data/plugin/bootstrap-navi.rb +54 -0
- data/plugin/canonical.rb +9 -0
- data/plugin/category_similar.rb +73 -0
- data/plugin/category_to_tag.rb +60 -0
- data/plugin/category_to_tagcloud.rb +172 -0
- data/plugin/cocomment.rb +37 -0
- data/plugin/code-prettify.rb +23 -0
- data/plugin/coderwall.rb +34 -0
- data/plugin/datepicker.rb +28 -0
- data/plugin/day2section.rb +20 -0
- data/plugin/del_footer.rb +111 -0
- data/plugin/description_from_body.rb +23 -0
- data/plugin/development.rb +16 -0
- data/plugin/editor.rb +11 -0
- data/plugin/en/add_bookmark.rb +20 -0
- data/plugin/en/del_footer.rb +10 -0
- data/plugin/en/git-register.rb +3 -0
- data/plugin/en/livedoor_weather.rb +25 -0
- data/plugin/en/microsummary.rb +18 -0
- data/plugin/en/nicovideo.rb +38 -0
- data/plugin/en/openid.rb +8 -0
- data/plugin/en/section_footer.rb +6 -0
- data/plugin/en/section_footer2.rb +3 -0
- data/plugin/en/socialbutton.rb +5 -0
- data/plugin/everytrail.rb +39 -0
- data/plugin/facebook_comments.rb +59 -0
- data/plugin/flickr.rb +209 -0
- data/plugin/gist.rb +16 -0
- data/plugin/git-register.rb +240 -0
- data/plugin/github_badge.rb +27 -0
- data/plugin/github_link.rb +9 -0
- data/plugin/goo_gl.rb +42 -0
- data/plugin/google_adsense.rb +132 -0
- data/plugin/google_analytics.rb +39 -0
- data/plugin/google_map.rb +168 -0
- data/plugin/google_sitemaps.rb +60 -0
- data/plugin/google_webmaster.rb +22 -0
- data/plugin/hatena_bookmark_nocomment.rb +9 -0
- data/plugin/hatena_star.rb +66 -0
- data/plugin/hb_footer.rb +255 -0
- data/plugin/hb_footer4sec.rb +244 -0
- data/plugin/hb_footer4sec_js.rb +30 -0
- data/plugin/hide_comment_form.rb +4 -0
- data/plugin/hide_sidebar_iphone.rb +21 -0
- data/plugin/iddy.rb +81 -0
- data/plugin/image_detail.rb +143 -0
- data/plugin/image_ex.rb +462 -0
- data/plugin/image_gps.rb +128 -0
- data/plugin/inline_wiki.rb +6 -0
- data/plugin/instagr.rb +64 -0
- data/plugin/ja/add_bookmark.rb +20 -0
- data/plugin/ja/del_footer.rb +10 -0
- data/plugin/ja/flickr.rb +62 -0
- data/plugin/ja/git-register.rb +3 -0
- data/plugin/ja/google_sitemaps.rb +35 -0
- data/plugin/ja/livedoor_weather.rb +25 -0
- data/plugin/ja/microsummary.rb +18 -0
- data/plugin/ja/nicovideo.rb +41 -0
- data/plugin/ja/openid.rb +7 -0
- data/plugin/ja/section_footer.rb +6 -0
- data/plugin/ja/section_footer2.rb +4 -0
- data/plugin/ja/socialbutton.rb +6 -0
- data/plugin/jdate.rb +20 -0
- data/plugin/jholiday.rb +16 -0
- data/plugin/jmonth.rb +20 -0
- data/plugin/jquery_ui_theme.rb +55 -0
- data/plugin/jroku.rb +28 -0
- data/plugin/jyear.rb +37 -0
- data/plugin/latlonglab_route.rb +25 -0
- data/plugin/lazy_referer.rb +38 -0
- data/plugin/livedoor_weather.rb +180 -0
- data/plugin/make_link.rb +44 -0
- data/plugin/makerss_category.rb +43 -0
- data/plugin/makerss_comment.rb +35 -0
- data/plugin/microsummary.rb +62 -0
- data/plugin/mm_footer.rb +215 -0
- data/plugin/monthly_autopagerize.rb +67 -0
- data/plugin/my_hotentry.rb +132 -0
- data/plugin/navi_day.rb +118 -0
- data/plugin/navi_this_month.rb +15 -0
- data/plugin/nicovideo.rb +115 -0
- data/plugin/notify_miniblog.rb +134 -0
- data/plugin/ogp.rb +55 -0
- data/plugin/ohmsha_estore.rb +71 -0
- data/plugin/openid.rb +90 -0
- data/plugin/opensearch_ad.rb +33 -0
- data/plugin/picasa.rb +56 -0
- data/plugin/plugin_checker.rb +41 -0
- data/plugin/popit.rb +22 -0
- data/plugin/prettify.rb +19 -0
- data/plugin/prezi.rb +10 -0
- data/plugin/profile.rb +222 -0
- data/plugin/puboo.rb +93 -0
- data/plugin/pygments_css.rb +76 -0
- data/plugin/rating.rb +419 -0
- data/plugin/recent_estraier.rb +50 -0
- data/plugin/recent_tweet.rb +71 -0
- data/plugin/retweet.rb +86 -0
- data/plugin/rubykaigi.rb +99 -0
- data/plugin/search-bing.rb +87 -0
- data/plugin/search-default.rb +264 -0
- data/plugin/search-google-custom.rb +60 -0
- data/plugin/search-yahoo-websearch.rb +121 -0
- data/plugin/search-yahoo.rb +109 -0
- data/plugin/section_footer.rb +195 -0
- data/plugin/section_footer2.rb +278 -0
- data/plugin/section_permalink.rb +73 -0
- data/plugin/section_permalink_anchor.rb +39 -0
- data/plugin/select_style.rb +42 -0
- data/plugin/select_theme.rb +90 -0
- data/plugin/show_and_hide.rb +77 -0
- data/plugin/slideshare.rb +10 -0
- data/plugin/socialbutton.rb +60 -0
- data/plugin/tatsu_zine.rb +93 -0
- data/plugin/tdiarygraph_flashstyle.rb +296 -0
- data/plugin/tdiarytimes.rb +166 -0
- data/plugin/tdiarytimes2.rb +406 -0
- data/plugin/tdiarytimes_flashstyle.rb +263 -0
- data/plugin/tdiarytimes_textstyle.rb +290 -0
- data/plugin/title_anchor.rb +16 -0
- data/plugin/tweet_quote.rb +106 -0
- data/plugin/twitpic.rb +10 -0
- data/plugin/twitter.rb +46 -0
- data/plugin/twitter_anywhere.rb +209 -0
- data/plugin/twitter_badge.rb +42 -0
- data/plugin/twitter_js.rb +59 -0
- data/plugin/ustream.rb +19 -0
- data/plugin/vimeo.rb +14 -0
- data/plugin/volatile.rb +89 -0
- data/plugin/vote.rb +100 -0
- data/plugin/wikiloc.rb +27 -0
- data/plugin/windex.rb +512 -0
- data/plugin/yahoo_kousei.rb +79 -0
- data/plugin/yahoo_map.rb +97 -0
- data/plugin/youtube.rb +33 -0
- data/plugin/yshop.rb +189 -0
- data/plugin/zenback.rb +46 -0
- data/spec/apple_webclip_spec.rb +46 -0
- data/spec/fixtures/friendfeed.xml +2 -0
- data/spec/fixtures/github.json +1 -0
- data/spec/fixtures/twitter.xml +73 -0
- data/spec/gist_spec.rb +16 -0
- data/spec/github_link_spec.rb +39 -0
- data/spec/google_analytics_spec.rb +60 -0
- data/spec/jdate_spec.rb +23 -0
- data/spec/jmonth_spec.rb +28 -0
- data/spec/jyear_spec.rb +21 -0
- data/spec/my_hotentry_spec.rb +78 -0
- data/spec/openid_spec.rb +246 -0
- data/spec/opensearch_ad_spec.rb +50 -0
- data/spec/profile_spec.rb +88 -0
- data/spec/rcov.opts +2 -0
- data/spec/spec_helper.rb +223 -0
- data/spec/title_anchor_spec.rb +39 -0
- data/spec/twitter_js_spec.rb +116 -0
- data/spec/youtube_spec.rb +20 -0
- data/style/hatena_style.rb +1011 -0
- data/style/markdown_style.rb +239 -0
- data/style/wikiext_style.rb +21 -0
- data/tdiary-contrib.gemspec +25 -0
- data/util/clean-spam/README.ja +1 -0
- data/util/clean-spam/tdiary-comment-clean +46 -0
- data/util/clean-spam/tdiary-comment-clean2 +81 -0
- data/util/clean-spam/tdiary-referer-clean +46 -0
- data/util/convert_pstore.rb +82 -0
- data/util/estraier-search/ChangeLog +36 -0
- data/util/estraier-search/README.ja +114 -0
- data/util/estraier-search/en/estraier-register.rb +3 -0
- data/util/estraier-search/estraier-register.rb +298 -0
- data/util/estraier-search/estraier-search.rb +273 -0
- data/util/estraier-search/estraier.rhtml +73 -0
- data/util/estraier-search/estraier.rxml +23 -0
- data/util/estraier-search/i.estraier.rhtml +31 -0
- data/util/estraier-search/ja/estraier-register.rb +3 -0
- data/util/image-gallery/README.ja +27 -0
- data/util/image-gallery/image-gallery.rb +523 -0
- data/util/image-gallery/image-gallery.rb.euc-jp +523 -0
- data/util/image-gallery/js/SmoothGallery/Changelog +52 -0
- data/util/image-gallery/js/SmoothGallery/css/ReMooz.css +186 -0
- data/util/image-gallery/js/SmoothGallery/css/img/carrow1.gif +0 -0
- data/util/image-gallery/js/SmoothGallery/css/img/carrow2.gif +0 -0
- data/util/image-gallery/js/SmoothGallery/css/img/closebox.gif +0 -0
- data/util/image-gallery/js/SmoothGallery/css/img/closebox.png +0 -0
- data/util/image-gallery/js/SmoothGallery/css/img/fleche1.gif +0 -0
- data/util/image-gallery/js/SmoothGallery/css/img/fleche1.png +0 -0
- data/util/image-gallery/js/SmoothGallery/css/img/fleche2.gif +0 -0
- data/util/image-gallery/js/SmoothGallery/css/img/fleche2.png +0 -0
- data/util/image-gallery/js/SmoothGallery/css/img/loading-bar-black.gif +0 -0
- data/util/image-gallery/js/SmoothGallery/css/img/open.gif +0 -0
- data/util/image-gallery/js/SmoothGallery/css/img/open.png +0 -0
- data/util/image-gallery/js/SmoothGallery/css/img/remo_bg_e.png +0 -0
- data/util/image-gallery/js/SmoothGallery/css/img/remo_bg_n.png +0 -0
- data/util/image-gallery/js/SmoothGallery/css/img/remo_bg_ne.png +0 -0
- data/util/image-gallery/js/SmoothGallery/css/img/remo_bg_nw.png +0 -0
- data/util/image-gallery/js/SmoothGallery/css/img/remo_bg_s.png +0 -0
- data/util/image-gallery/js/SmoothGallery/css/img/remo_bg_se.png +0 -0
- data/util/image-gallery/js/SmoothGallery/css/img/remo_bg_sw.png +0 -0
- data/util/image-gallery/js/SmoothGallery/css/img/remo_bg_w.png +0 -0
- data/util/image-gallery/js/SmoothGallery/css/img/spinner.gif +0 -0
- data/util/image-gallery/js/SmoothGallery/css/jd.gallery.css +371 -0
- data/util/image-gallery/js/SmoothGallery/css/layout.css +91 -0
- data/util/image-gallery/js/SmoothGallery/license.txt +621 -0
- data/util/image-gallery/js/SmoothGallery/resizer.php +113 -0
- data/util/image-gallery/js/SmoothGallery/scripts/Changelog +52 -0
- data/util/image-gallery/js/SmoothGallery/scripts/History.Routing.js +126 -0
- data/util/image-gallery/js/SmoothGallery/scripts/History.js +109 -0
- data/util/image-gallery/js/SmoothGallery/scripts/ReMooz.js +364 -0
- data/util/image-gallery/js/SmoothGallery/scripts/jd.gallery.js +843 -0
- data/util/image-gallery/js/SmoothGallery/scripts/jd.gallery.set.js +183 -0
- data/util/image-gallery/js/SmoothGallery/scripts/jd.gallery.transitions.js +90 -0
- data/util/image-gallery/js/SmoothGallery/scripts/jdgalleryresize.js +828 -0
- data/util/image-gallery/js/SmoothGallery/scripts/license.txt +621 -0
- data/util/image-gallery/js/SmoothGallery/scripts/mootools-1.2-more.js +103 -0
- data/util/image-gallery/js/SmoothGallery/scripts/mootools-1.2.1-core-yc.js +349 -0
- data/util/image-gallery/js/SmoothGallery/scripts/resizer.php +113 -0
- data/util/image-gallery/misc/plugin/recent_image.rb +406 -0
- data/util/image-gallery/skel/gallery.rhtml +154 -0
- data/util/image-gallery/skel/gallery.rhtml.euc-jp +154 -0
- data/util/image-gallery/tdiary.conf.igsample +8 -0
- data/util/image-gallery/theme/image-gallery.css +85 -0
- data/util/image2flickr.rb +282 -0
- data/util/posttdiary/README.ja +12 -0
- data/util/posttdiary/posttdiary-ex.rb +1155 -0
- data/util/posttdiary/posttdiary.rb +245 -0
- data/util/rast-search/ChangeLog +55 -0
- data/util/rast-search/README.ja +99 -0
- data/util/rast-search/en/rast-register.rb +3 -0
- data/util/rast-search/i.rast.rhtml +33 -0
- data/util/rast-search/ja/rast-register.rb +3 -0
- data/util/rast-search/rast-register.rb +326 -0
- data/util/rast-search/rast-search.rb +249 -0
- data/util/rast-search/rast.rhtml +66 -0
- data/util/rast-search/rast.rxml +21 -0
- data/util/section_link/README +11 -0
- data/util/section_link/misc/plugin/section_link.rb +68 -0
- data/util/section_link/misc/plugin/section_link_anchor.rb +38 -0
- data/util/section_link/tdiary/tdiary_day_ext.rb +21 -0
- data/util/section_link/tdiary/tdiaryext_style.rb +36 -0
- data/util/section_link/tdiary/wikiext_style.rb +36 -0
- data/util/tdiary-for-ruby1.9/compatible.rb +97 -0
- data/util/tdiary-for-ruby1.9/tdiary-2.2.0.patch +98 -0
- data/util/tdiary-for-ruby1.9/tdiary-2.3.1.patch +212 -0
- data/util/tdiary-grep/README +4 -0
- data/util/tdiary-grep/grep.rb +445 -0
- data/util/tdiary-mode/http.el +130 -0
- data/util/tdiary-mode/tdiary-mode.el +613 -0
- data/util/tdiary-vim/ChangeLog +25 -0
- data/util/tdiary-vim/README +60 -0
- data/util/tdiary-vim/tdiary.vim +350 -0
- data/util/tdiarysearch/README.en +53 -0
- data/util/tdiarysearch/README.ja +99 -0
- data/util/tdiarysearch/search.rb +504 -0
- metadata +497 -0
@@ -0,0 +1,172 @@
|
|
1
|
+
#
|
2
|
+
# category_to_tagcloud.rb
|
3
|
+
#
|
4
|
+
# Usage:
|
5
|
+
# <% tag_list n %>
|
6
|
+
# n: 表示最大数(default: nil)
|
7
|
+
#
|
8
|
+
# options configurable through settings:
|
9
|
+
# @options['tagcloud.hidecss'] : cssの出力 default: false
|
10
|
+
#
|
11
|
+
# This plugin modifes and includes tagcloud-ruby.
|
12
|
+
# http://yatsu.info/articles/2005/08/05/ruby%E3%81%A7tagcloud-tagcloud-ruby
|
13
|
+
|
14
|
+
require 'pstore'
|
15
|
+
|
16
|
+
def category_enable?
|
17
|
+
!@plugin_files.grep(/\/category\.rb$/).empty?
|
18
|
+
end
|
19
|
+
|
20
|
+
def add tag, url, count, elapsed_time
|
21
|
+
@counts[tag] = count
|
22
|
+
@urls[tag] = url
|
23
|
+
@elapsed_times[tag] = elapsed_time
|
24
|
+
end
|
25
|
+
|
26
|
+
def print_html
|
27
|
+
tags = @counts.sort_by {|a, b| b }.reverse.map {|a, b| a }
|
28
|
+
return '' if tags.empty?
|
29
|
+
tags = tags[0..@limit-1] if @limit
|
30
|
+
|
31
|
+
if tags.size == 1
|
32
|
+
tag = tags[0]
|
33
|
+
url = @urls[tag]
|
34
|
+
elapsed_time = @elapsed_times[tag]
|
35
|
+
return %{<ul class="tagcloud"><li class="tagcloud24#{elapsed_time}"><a title="#{tag}" href="#{url}">#{tag}</a></li></ul>\n}
|
36
|
+
end
|
37
|
+
|
38
|
+
min = Math.sqrt(@counts[tags.last])
|
39
|
+
max = Math.sqrt(@counts[tags.first])
|
40
|
+
factor = 0
|
41
|
+
|
42
|
+
# special case all tags having the same count
|
43
|
+
if max - min == 0
|
44
|
+
min = min - 24
|
45
|
+
factor = 1
|
46
|
+
else
|
47
|
+
factor = 24 / (max - min)
|
48
|
+
end
|
49
|
+
|
50
|
+
html = %{<ul class="tagcloud">}
|
51
|
+
tags.sort{|a,b| a.downcase <=> b.downcase}.each do |tag|
|
52
|
+
count = @counts[tag]
|
53
|
+
level = ((Math.sqrt(count) - min) * factor).to_i
|
54
|
+
html << %{<li class="tagcloud#{level}#{@elapsed_times[tag]}"><a title="#{tag} - #{count}" href="#{@urls[tag]}">#{tag}</a></li>\n}
|
55
|
+
end
|
56
|
+
html << "</ul>"
|
57
|
+
html
|
58
|
+
end
|
59
|
+
|
60
|
+
def init_category_to_tagcloud
|
61
|
+
@counts = Hash.new
|
62
|
+
@urls = Hash.new
|
63
|
+
@elapsed_times = Hash.new
|
64
|
+
@conf['category_to_tagcloud.cache'] ||= "#{@cache_path}/category2tagcloud.cache"
|
65
|
+
@limit = nil
|
66
|
+
end
|
67
|
+
|
68
|
+
def tag_list limit = nil
|
69
|
+
return '' if bot?
|
70
|
+
return '' unless category_enable?
|
71
|
+
|
72
|
+
init_category_to_tagcloud
|
73
|
+
cache = @conf['category_to_tagcloud.cache']
|
74
|
+
@limit = limit
|
75
|
+
|
76
|
+
PStore.new(cache).transaction(read_only=true) do |db|
|
77
|
+
break unless db.root?('tagcloud') or db.root?('last_update')
|
78
|
+
break if Time.now.strftime('%Y%m%d').to_i > db['last_update']
|
79
|
+
@counts = db['tagcloud'][0]
|
80
|
+
@urls = db['tagcloud'][1]
|
81
|
+
@elapsed_times = db['tagcloud'][2]
|
82
|
+
end
|
83
|
+
|
84
|
+
gen_tag_list if @urls.empty?
|
85
|
+
print_html
|
86
|
+
end
|
87
|
+
|
88
|
+
def styleclass diff
|
89
|
+
c = ' old'
|
90
|
+
if diff > 30
|
91
|
+
c = " oldest"
|
92
|
+
elsif diff > 14
|
93
|
+
c = " older"
|
94
|
+
elsif diff < 7
|
95
|
+
c = " hot"
|
96
|
+
end
|
97
|
+
c
|
98
|
+
end
|
99
|
+
|
100
|
+
def gen_tag_list
|
101
|
+
init_category_to_tagcloud if @mode == 'append' or @mode == 'replace'
|
102
|
+
cache = @conf['category_to_tagcloud.cache']
|
103
|
+
info = Category::Tagcloud_Info.new(@cgi, @years, @conf)
|
104
|
+
categorized = @category_cache.categorize(info.category, info.years)
|
105
|
+
|
106
|
+
categorized.keys.each do |key|
|
107
|
+
count = categorized[key].size
|
108
|
+
ymd = categorized[key].keys.sort.reverse
|
109
|
+
diff = (Time.now - Time.local(ymd[0][0,4], ymd[0][4,2], ymd[0][6,2])) / 86400
|
110
|
+
url = "#{@conf.index}?category=#{CGI.escape(key)}"
|
111
|
+
add(key, url, count, "#{styleclass(diff.to_i)}")
|
112
|
+
end
|
113
|
+
|
114
|
+
PStore.new(cache).transaction do |db|
|
115
|
+
db['last_update'] = Time.now.strftime('%Y%m%d').to_i
|
116
|
+
db['tagcloud'] = [@counts, @urls, @elapsed_times]
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
def tagcloud_css
|
121
|
+
r = ''
|
122
|
+
r = "\t<style type=\"text/css\"><!--\n"
|
123
|
+
for level in 0..24
|
124
|
+
font = 12 + level
|
125
|
+
r << "\t.tagcloud li.tagcloud#{level} {font-size: #{font}px;}\n"
|
126
|
+
end
|
127
|
+
|
128
|
+
r << "\t.tagcloud {line-height:1}\n"
|
129
|
+
r << "\t.tagcloud ul {list-style-type:none;}\n"
|
130
|
+
r << "\t.tagcloud li {display:inline;}\n"
|
131
|
+
r << "\t.tagcloud li a {text-decoration:none;}\n"
|
132
|
+
r << "\t--></style>\n"
|
133
|
+
r
|
134
|
+
end
|
135
|
+
|
136
|
+
add_update_proc do
|
137
|
+
gen_tag_list if @mode == 'append' or @mode == 'replace'
|
138
|
+
end
|
139
|
+
|
140
|
+
add_header_proc do
|
141
|
+
tagcloud_css unless @conf['tagcloud.hidecss']
|
142
|
+
end
|
143
|
+
|
144
|
+
|
145
|
+
if category_enable?
|
146
|
+
module Category
|
147
|
+
class Tagcloud_Info < Info
|
148
|
+
def years
|
149
|
+
now_year = Time.now.year
|
150
|
+
now_month = Time.now.month
|
151
|
+
r = Hash.new
|
152
|
+
|
153
|
+
months = [
|
154
|
+
['01'],['01','02'],['01','02','03'],['02','03','04'],['03','04','05'],
|
155
|
+
['04','05','06'],['05','06','07'],['06','07','08'],['07','08','09'],
|
156
|
+
['08','09','10'],['09','10','11'],['10','11','12']
|
157
|
+
][now_month - 1]
|
158
|
+
|
159
|
+
r[now_year.to_s] = months
|
160
|
+
case now_month
|
161
|
+
when 1
|
162
|
+
r["#{now_year - 1}"] = ['11','12']
|
163
|
+
when 2
|
164
|
+
r["#{now_year - 1}"] = ['12']
|
165
|
+
end
|
166
|
+
r
|
167
|
+
end
|
168
|
+
end
|
169
|
+
end
|
170
|
+
end
|
171
|
+
|
172
|
+
## vim: ts=3
|
data/plugin/cocomment.rb
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
# cocomment.rb $Revision: 1.6 $
|
2
|
+
#
|
3
|
+
# Copyright (C) 2006 by Hiroshi SHIBATA
|
4
|
+
# You can redistribute it and/or modify it under GPL2.
|
5
|
+
#
|
6
|
+
|
7
|
+
if @mode == 'day' and not bot? and not @conf.mobile_agent? then
|
8
|
+
add_body_enter_proc do |date|
|
9
|
+
<<-SCRIPT
|
10
|
+
<script type="text/javascript">
|
11
|
+
coco =
|
12
|
+
{
|
13
|
+
blogTool : "tDiary",
|
14
|
+
blogURL : "#{h @conf.base_url}",
|
15
|
+
blogTitle : "#{h @conf.html_title}",
|
16
|
+
postURL : "#{h @conf.base_url + anchor( date.strftime( '%Y%m%d' ) )}",
|
17
|
+
postTitle : "#{h apply_plugin( @diaries[date.strftime('%Y%m%d')].title, true )}",
|
18
|
+
commentAuthorFieldName : "name",
|
19
|
+
commentAuthorLoggedIn : false,
|
20
|
+
commentFormName : "comment-form",
|
21
|
+
commentTextFieldName : "body",
|
22
|
+
commentButtonName : "comment"
|
23
|
+
}
|
24
|
+
</script>
|
25
|
+
<script id="cocomment-fetchlet" src="http://www.cocomment.com/js/enabler.js" type="text/javascript">
|
26
|
+
</script>
|
27
|
+
SCRIPT
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
# Local Variables:
|
32
|
+
# mode: ruby
|
33
|
+
# indent-tabs-mode: t
|
34
|
+
# tab-width: 3
|
35
|
+
# ruby-indent-level: 3
|
36
|
+
# End:
|
37
|
+
# vi: ts=3 sw=3
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# Source code embedded plugin for tDiary.
|
2
|
+
# Copyright (C) 2012 Koichiro Ohba <koichiro@meadowy.org>
|
3
|
+
# License under MIT.
|
4
|
+
|
5
|
+
add_header_proc do
|
6
|
+
<<-EOS
|
7
|
+
<link href="js/prettify/prettify.css" type="text/css" rel="stylesheet" />
|
8
|
+
<script type="text/javascript" src="js/prettify/prettify.js"></script>
|
9
|
+
<script type="text/javascript"><!--
|
10
|
+
jQuery.event.add(window, "load", function(){
|
11
|
+
prettyPrint();
|
12
|
+
});
|
13
|
+
//-->
|
14
|
+
</script>
|
15
|
+
EOS
|
16
|
+
end
|
17
|
+
|
18
|
+
def code(content, lang = nil)
|
19
|
+
<<-EOS
|
20
|
+
<pre class="prettyprint#{lang ? ' lang-' + lang : ''}">
|
21
|
+
#{content}</pre>
|
22
|
+
EOS
|
23
|
+
end
|
data/plugin/coderwall.rb
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'open-uri'
|
2
|
+
require 'timeout'
|
3
|
+
require 'json'
|
4
|
+
|
5
|
+
def coderwall(name, size = [60, 60])
|
6
|
+
begin
|
7
|
+
cache = "#{@cache_path}/coderwall.json"
|
8
|
+
json = File.read(cache)
|
9
|
+
File::delete(cache) if Time::now > File::mtime( cache ) + 60*60*24
|
10
|
+
rescue Errno::ENOENT
|
11
|
+
begin
|
12
|
+
timeout(10) do
|
13
|
+
json = open( "https://coderwall.com/#{name}.json" ) {|f| f.read }
|
14
|
+
end
|
15
|
+
open(cache, 'wb') {|f| f.write(json) }
|
16
|
+
rescue Timeout::Error
|
17
|
+
return ""
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
html = '<div class="coderwall">'
|
22
|
+
JSON.parse(json)['badges'].each do |badge|
|
23
|
+
html << %Q|<img src="#{badge['badge']}" alt="#{badge['name']}" title="#{badge['description']}" height="#{size[0]}px" width="#{size[1]}px" />|
|
24
|
+
end
|
25
|
+
html << '</div>'
|
26
|
+
end
|
27
|
+
|
28
|
+
# Local Variables:
|
29
|
+
# mode: ruby
|
30
|
+
# indent-tabs-mode: t
|
31
|
+
# tab-width: 3
|
32
|
+
# ruby-indent-level: 3
|
33
|
+
# End:
|
34
|
+
# vim: ts=3
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
#
|
3
|
+
# datepickr.rb - show jQuery UI datepicker
|
4
|
+
#
|
5
|
+
# Copyright (C) 2012, tamoot <tamoot+tdiary@gmail.com>
|
6
|
+
# You can redistribute it and/or modify it under GPL.
|
7
|
+
#
|
8
|
+
|
9
|
+
#
|
10
|
+
# not support
|
11
|
+
#
|
12
|
+
return if feed? || @conf.mobile_agent?
|
13
|
+
|
14
|
+
if /\A(?:form|preview|append|edit|update)\z/ =~ @mode
|
15
|
+
enable_js('http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js')
|
16
|
+
if @conf.lang == 'ja'
|
17
|
+
enable_js('http://ajax.googleapis.com/ajax/libs/jqueryui/1/i18n/jquery.ui.datepicker-ja.min.js')
|
18
|
+
end
|
19
|
+
enable_js('datepicker.js')
|
20
|
+
end
|
21
|
+
|
22
|
+
# Local Variables:
|
23
|
+
# mode: ruby
|
24
|
+
# indent-tabs-mode: t
|
25
|
+
# tab-width: 3
|
26
|
+
# ruby-indent-level: 3
|
27
|
+
# End:
|
28
|
+
# vim: ts=3
|
@@ -0,0 +1,20 @@
|
|
1
|
+
#
|
2
|
+
# day2section.rb - tDiary plugin
|
3
|
+
#
|
4
|
+
# When a visitor accesses to day page without section anchor, navigate to first section.
|
5
|
+
#
|
6
|
+
# Copyright (c) MATSUOKA Kohei <http://www.machu.jp/>
|
7
|
+
# Distributed under the GPL
|
8
|
+
#
|
9
|
+
add_footer_proc do
|
10
|
+
if @mode == 'day'
|
11
|
+
<<-SCRIPT
|
12
|
+
<script type="text/javascript">
|
13
|
+
if(!location.hash) {
|
14
|
+
location.replace(location.hash + "#p01");
|
15
|
+
}
|
16
|
+
</script>
|
17
|
+
SCRIPT
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
@@ -0,0 +1,111 @@
|
|
1
|
+
=begin
|
2
|
+
delicious.rb
|
3
|
+
Delicious から その日付分のメモを取ってきて表示するプラグイン
|
4
|
+
|
5
|
+
tdiary.conf で以下を設定します。tDiaryの設定画面からも設定可能です。
|
6
|
+
|
7
|
+
@options['delicious.id'] = 'YOUR DELICIOUS ID HERE'
|
8
|
+
@options['delicious.pw'] = 'YOUR DELICIOUS PW HERE'
|
9
|
+
|
10
|
+
proxy は以下に設定します。
|
11
|
+
|
12
|
+
@options['amazon.proxy'] = 'PROXY_HOST:PORT'
|
13
|
+
|
14
|
+
reference:
|
15
|
+
* mm_footer.rb by ishinao san
|
16
|
+
* rss-show.rb (in Hiki) by TAKEUCHI Hitoshi san
|
17
|
+
* fujisan.rb by Michitaka Ohno.
|
18
|
+
|
19
|
+
=end
|
20
|
+
|
21
|
+
require 'net/https'
|
22
|
+
require 'rexml/document'
|
23
|
+
require 'fileutils'
|
24
|
+
|
25
|
+
def delicious_save_cache cache_file, file
|
26
|
+
FileUtils.mkdir_p "#{@cache_path}/delicious"
|
27
|
+
File.open("#{@cache_path}/delicious/#{cache_file}", 'w') do |f|
|
28
|
+
f.flock(File::LOCK_EX)
|
29
|
+
f.puts file
|
30
|
+
f.flock(File::LOCK_UN)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def delicious_parse_xml(xml)
|
35
|
+
posts = []
|
36
|
+
REXML::Document.new(xml).elements.each("posts/post") do |post|
|
37
|
+
post = <<-EOS
|
38
|
+
<li><a href="#{post.attribute("href").to_s}">
|
39
|
+
#{post.attribute("description").to_s}
|
40
|
+
</a></li>
|
41
|
+
EOS
|
42
|
+
posts << post.delete("\r\n")
|
43
|
+
end
|
44
|
+
|
45
|
+
return posts
|
46
|
+
end
|
47
|
+
|
48
|
+
def delicious_get_html(date = Date.now)
|
49
|
+
req = Net::HTTP::Get.new "/v1/posts/get?dt=#{date.strftime('%Y-%m-%d')}"
|
50
|
+
req.basic_auth @options['delicious.id'], @options['delicious.pw']
|
51
|
+
|
52
|
+
https = Net::HTTP.new('api.del.icio.us', 443)
|
53
|
+
https.use_ssl = true
|
54
|
+
|
55
|
+
parsed = https.start {|w|
|
56
|
+
response = w.request(req)
|
57
|
+
delicious_parse_xml(response.body)
|
58
|
+
}
|
59
|
+
|
60
|
+
delicious_save_cache date.strftime("%Y-%m-%d"), parsed
|
61
|
+
end
|
62
|
+
|
63
|
+
|
64
|
+
add_edit_proc do |date|
|
65
|
+
delicious_get_html date
|
66
|
+
nil
|
67
|
+
end
|
68
|
+
|
69
|
+
add_body_leave_proc do |date|
|
70
|
+
path = "#{@cache_path}/delicious/#{date.strftime('%Y-%m-%d')}"
|
71
|
+
ret = ''
|
72
|
+
|
73
|
+
if File.exist? path
|
74
|
+
File.open(path) do |file|
|
75
|
+
ret = <<-EOS
|
76
|
+
<h3>Delicious</h3>
|
77
|
+
<ul>
|
78
|
+
#{file.read}
|
79
|
+
</ul>
|
80
|
+
EOS
|
81
|
+
end
|
82
|
+
end
|
83
|
+
ret
|
84
|
+
end
|
85
|
+
|
86
|
+
|
87
|
+
def delicious_init
|
88
|
+
@conf['delicious.id'] ||= ""
|
89
|
+
@conf['delicious.pw'] ||= ""
|
90
|
+
@conf['delicious.title'] ||= "Todey's URL Clip"
|
91
|
+
end
|
92
|
+
|
93
|
+
add_conf_proc( 'delicious', @delicious_label_conf ) do
|
94
|
+
delicious_conf_proc
|
95
|
+
end
|
96
|
+
|
97
|
+
def delicious_conf_proc
|
98
|
+
if @mode == 'saveconf' then
|
99
|
+
@conf['delicious.id'] = @cgi.params['delicious.id'][0]
|
100
|
+
@conf['delicious.pw'] = @cgi.params['delicious.pw'][0]
|
101
|
+
end
|
102
|
+
|
103
|
+
delicious_init
|
104
|
+
|
105
|
+
<<-HTML
|
106
|
+
<h3>#{@delicious_label_id}</h3>
|
107
|
+
<p><input name="delicious.id" value="#{CGI::escapeHTML( @conf['delicious.id'] )}"></p>
|
108
|
+
<h3>#{@delicious_label_pw}</h3>
|
109
|
+
<p><input name="delicious.pw" value="#{CGI::escapeHTML( @conf['delicious.pw'] )}"></p>
|
110
|
+
HTML
|
111
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
#
|
2
|
+
# description_from_body.rb - set meta description by first section's body in day mode
|
3
|
+
#
|
4
|
+
# Copyright (C) 2011, TADA Tadashi <t@tdtds.jp>
|
5
|
+
# You can redistribute it and/or modify it under GPL.
|
6
|
+
#
|
7
|
+
|
8
|
+
alias description_tag_dfb_orig description_tag
|
9
|
+
def description_tag
|
10
|
+
if @mode == 'day' then
|
11
|
+
diary = @diaries[@date.strftime '%Y%m%d']
|
12
|
+
return '' unless diary
|
13
|
+
|
14
|
+
body = ''
|
15
|
+
diary.each_section do |sec|
|
16
|
+
body = remove_tag( apply_plugin( sec.body_to_html ) ).strip
|
17
|
+
break
|
18
|
+
end
|
19
|
+
%Q|<meta name="description" content="#{@conf.shorten body, 256}">|
|
20
|
+
else
|
21
|
+
description_tag_dfb_orig
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# development.rb - utility methods for plugin developers
|
2
|
+
#
|
3
|
+
# Copyright (c) 2011 MATSUOKA Kohei <kmachu@gmail.com>
|
4
|
+
# You can redistribute it and/or modify it under GPL2.
|
5
|
+
#
|
6
|
+
|
7
|
+
# load standard version jquery.js instead of jquery.min.js
|
8
|
+
alias :jquery_tag_original :jquery_tag
|
9
|
+
def jquery_tag
|
10
|
+
jquery_tag_original.gsub(/\.min/, '')
|
11
|
+
end
|
12
|
+
|
13
|
+
# js cache clear by seconds.
|
14
|
+
def script_tag_query_string
|
15
|
+
"?#{TDIARY_VERSION}#{Time::now.strftime('%Y%m%d%H%M%S')}"
|
16
|
+
end
|
data/plugin/editor.rb
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
#
|
2
|
+
# editor.rb - support writing using wiki/gfm notation.
|
3
|
+
#
|
4
|
+
# Copyright (c) 2012 MATSUOKA Kohei <kmachu@gmail.com>
|
5
|
+
# You can distribute it under GPL.
|
6
|
+
#
|
7
|
+
|
8
|
+
# load javascript
|
9
|
+
if /\A(form|edit|preview|showcomment)\z/ === @mode then
|
10
|
+
enable_js('editor.js')
|
11
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# en/add_bookmark.rb $Revision 1.3 $
|
2
|
+
#
|
3
|
+
# English resource of add_bookmark.rb
|
4
|
+
# You can redistribute it and/or modify it under GPL2.
|
5
|
+
#
|
6
|
+
|
7
|
+
@add_bookmark_label = 'add to bookmark'
|
8
|
+
@add_bookmark_desc = 'Please check the link that wants to be displayed.'
|
9
|
+
|
10
|
+
@caption_delicious = 'add to del.icio.us'
|
11
|
+
@caption_hatena = 'add to Hatena bookmark'
|
12
|
+
@caption_livedoor = 'add to livedoor clip'
|
13
|
+
@caption_buzzurl = 'add to Buzzurl'
|
14
|
+
|
15
|
+
@bookmark_label = [
|
16
|
+
'del.icio.us',
|
17
|
+
'Hatena bookmark',
|
18
|
+
'livedoor Clip',
|
19
|
+
'Buzzurl'
|
20
|
+
]
|
@@ -0,0 +1,10 @@
|
|
1
|
+
#
|
2
|
+
# English resource of delicious plugin $Revision: 1.0 $
|
3
|
+
#
|
4
|
+
# Copyright (C) 2006 SHIBATA Hiroshi <h-sbt@nifty.com>
|
5
|
+
# You can redistribute it and/or modify it under GPL2.
|
6
|
+
#
|
7
|
+
|
8
|
+
@delicious_label_conf = 'del.icio.us'
|
9
|
+
@delicious_label_id = 'User ID'
|
10
|
+
@delicious_label_pw = 'Password'
|
@@ -0,0 +1,25 @@
|
|
1
|
+
#
|
2
|
+
# English resource of livedoor_weather plugin $Revision$
|
3
|
+
#
|
4
|
+
# Copyright (C) 2006 SHIBATA Hiroshi <h-sbt@nifty.com>
|
5
|
+
# You can redistribute it and/or modify it under GPL2.
|
6
|
+
#
|
7
|
+
|
8
|
+
#
|
9
|
+
# setting of tdiary.conf
|
10
|
+
# @options['lwws.city_id'] : City ID where weather information is specified.
|
11
|
+
#
|
12
|
+
|
13
|
+
@lwws_plugin_name = 'livedoor weather'
|
14
|
+
@lwws_label_city_id = 'City ID'
|
15
|
+
@lwws_desc_city_id = 'City ID where weather information is specified. Please select City ID from among <a href ="http://weather.livedoor.com/forecast/rss/forecastmap.xml">Point definition table(RSS)</a>'
|
16
|
+
@lwws_label_disp_item = 'View items'
|
17
|
+
@lwws_desc_disp_item = 'Please select the item to want to display.'
|
18
|
+
@lwws_icon_label = 'Icon'
|
19
|
+
@lwws_icon_desc = 'Weather information is displayed in the icon. '
|
20
|
+
@lwws_max_temp_label = 'Max Tempreture'
|
21
|
+
@lwws_min_temp_label = 'Min Tempreture'
|
22
|
+
@celsius_label = 'C'
|
23
|
+
@lwws_label_cache = 'Auto update of cache'
|
24
|
+
@lwws_desc_cache = 'Enable auto update.'
|
25
|
+
@lwws_desc_cache_time = 'Please set number of update time.'
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# ja/microsummary.rb
|
2
|
+
#
|
3
|
+
# Japanese resources for microsummary.rb
|
4
|
+
#
|
5
|
+
# Copyright (c) 2006 elytsllams <smallstyle@gmail.com>
|
6
|
+
# Distributed under the GPL
|
7
|
+
#
|
8
|
+
|
9
|
+
if @mode == 'conf' || @mode == 'saveconf'
|
10
|
+
add_conf_proc( 'microsummary', 'Microsummary Generator' ) do
|
11
|
+
saveconf_microsummary
|
12
|
+
microsummary_init
|
13
|
+
<<-HTML
|
14
|
+
<h3 class="subtitle">URI for microsummary generator XML</h3>
|
15
|
+
<p><input name="generator.xml" value="#{CGI::escapeHTML(@conf['generator.xml'])}" size="60"></p>
|
16
|
+
HTML
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
#
|
2
|
+
# ja/nicovideo.rb - Japanese resource
|
3
|
+
#
|
4
|
+
# Copyright (C) TADA Tadashi <sho@spc.gr.jp>
|
5
|
+
# Distributed under GPL.
|
6
|
+
#
|
7
|
+
|
8
|
+
def nicovideo_player_path
|
9
|
+
'http://www.nicovideo.jp'
|
10
|
+
end
|
11
|
+
|
12
|
+
def nicovideo_feed( i )
|
13
|
+
<<-HTML
|
14
|
+
<table border="0" cellpadding="4" cellspacing="0" summary="#{h i[:title]}"><tr valign="top">
|
15
|
+
<td><a href="#{i[:url]}"><img alt="#{h i[:title]}" src="#{i[:thumb]}" width="130" height="100" style="border:solid 1px #333;"></a></td>
|
16
|
+
<td width="100%"><a href="#{i[:url]}"><strong>#{h i[:title]}</strong></a> (#{i[:length]})</td>
|
17
|
+
</tr></table>
|
18
|
+
HTML
|
19
|
+
end
|
20
|
+
|
21
|
+
def nicovideo_html( i )
|
22
|
+
<<-HTML
|
23
|
+
<table border="0" cellpadding="4" cellspacing="0" summary="#{h i[:title]}" style="margin-left:0em;">
|
24
|
+
<tr valign="top">
|
25
|
+
<td style="font-size:70%;border-width:0px;">
|
26
|
+
<div style="margin:4px 0px;"><a href="#{i[:url]}" onclick="return nicovideoPlayer( '#{i[:id]}' );"><img alt="#{h i[:title]}" src="#{i[:thumb]}" width="130" height="100" style="border:solid 1px #333;"></a></div>
|
27
|
+
</td>
|
28
|
+
<td width="100%" style="font-size:80%;border-width:0px;">
|
29
|
+
<p><a href="#{i[:url]}" class="video" onclick="return nicovideoPlayer( '#{i[:id]}' );"><strong>#{h i[:title]}</strong></a> (#{i[:length].split(/:/).map{|j|'%02d' % j.to_i}.join(':')})</p>
|
30
|
+
<p><strong>#{i[:date][0,10]}</strong> Posted<br>
|
31
|
+
<strong>#{i[:view].scan(/\d+?(?=\d{3}*$)/).join(",")}</strong> Views<br>
|
32
|
+
<strong>#{i[:comment_num].scan(/\d+?(?=\d{3}*$)/).join(",")}</strong> Comments<br>
|
33
|
+
<strong>#{i[:mylist].scan(/\d+?(?=\d{3}*$)/).join(",")}</strong> Mylists</p>
|
34
|
+
</td>
|
35
|
+
</tr>
|
36
|
+
</table>
|
37
|
+
HTML
|
38
|
+
end
|
data/plugin/en/openid.rb
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
# openid.rb: English resource
|
2
|
+
|
3
|
+
@openid_conf_label = 'OpenID'
|
4
|
+
@openid_service_label = 'OpenID Service'
|
5
|
+
@openid_service_desc = 'select your OpenID service name.'
|
6
|
+
@openid_id_label = 'Your ID'
|
7
|
+
@openid_id_desc = 'Specify your ID of OpenID service selected above.'
|
8
|
+
|
@@ -0,0 +1,6 @@
|
|
1
|
+
# section_footer.rb: English resource
|
2
|
+
@section_footer_delicious_label = "del.icio.us history for this entry"
|
3
|
+
@section_footer_hatenabm_label = "this entry on Hatena Bookmark"
|
4
|
+
@section_footer_ldclip_label = "this entry on livedoor clip"
|
5
|
+
@section_footer_buzzurl_label = "this entry on Buzzurl"
|
6
|
+
@section_footer_yahoobm_label = "this entry on Yahoo! JAPAN Bookmark"
|
@@ -0,0 +1,39 @@
|
|
1
|
+
#
|
2
|
+
# everytrail.rb: plugin embedding trip map on everytrail.com.
|
3
|
+
#
|
4
|
+
# Copyright (C) 2010 TADA Tadashi <t@tdtds.jp>
|
5
|
+
# You can redistribute it and/or modify it under GPL2.
|
6
|
+
#
|
7
|
+
|
8
|
+
def everytrail_adjust_size( size )
|
9
|
+
s = size.collect {|i| i.to_i }
|
10
|
+
s[0] = 400 if s[0] == 0
|
11
|
+
s[1] = 300 if s[1] == 0
|
12
|
+
if @conf.iphone? then
|
13
|
+
s = [300, 300 * s[1] / s[0]]
|
14
|
+
end
|
15
|
+
s
|
16
|
+
end
|
17
|
+
|
18
|
+
def everytrail( trip_id, label = nil, size = [400, 300] )
|
19
|
+
size = everytrail_adjust_size( size )
|
20
|
+
r = %Q|<div class="everytrail"><iframe src="http://www.everytrail.com/iframe2.php?trip_id=#{h trip_id}&width=#{size[0]}&height=#{size[1]}" marginwidth="0" marginheight="0" frameborder="0" scrolling="no" width=#{size[0]} height=#{size[1]}>|
|
21
|
+
r << %Q|<a href="http://www.everytrail.com/view_trip.php?trip_id=#{h trip_id}">#{h label}</a>| if label
|
22
|
+
r << %Q|</iframe></div>|
|
23
|
+
end
|
24
|
+
|
25
|
+
def everytrail_flash( trip_id, label = nil, size = [400, 300] )
|
26
|
+
size = everytrail_adjust_size( size )
|
27
|
+
%Q|<div class="everytrail"><object width="#{size[0]}" height="#{size[1]}" codebase="http://fpdownload.adobe.com/pub/shockwave/cabs/flash/swflash.cab"><param name="movie" value="http://www.everytrail.com/swf/widget.swf"><param name="FlashVars" value="units=metric&mode=0&key=ABQIAAAAggE6oX7o-2CFkLBRN20X9BTCaWgBOrVzmDbJc0e41WeTNzCWNBSYkdZ8D6iOk2yqQd-kgDCXfoqiUQ&tripId=#{trip_id}"><embed src="http://www.everytrail.com/swf/widget.swf" quality="high" width="#{size[0]}" height="#{size[1]}" FlashVars="units=metric&mode=0&key=ABQIAAAAggE6oX7o-2CFkLBRN20X9BTCaWgBOrVzmDbJc0e41WeTNzCWNBSYkdZ8D6iOk2yqQd-kgDCXfoqiUQ&tripId=#{trip_id}" play="true" quality="high" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer"></embed></object></div>|
|
28
|
+
end
|
29
|
+
|
30
|
+
def everytrail_widget( trip_id, latitude = nil, longtitude = nil, label = nil, size = [400, 300] )
|
31
|
+
return '' if @conf.iphone?
|
32
|
+
|
33
|
+
size = everytrail_adjust_size( size )
|
34
|
+
lat_param = latitude ? "&startLat=#{latitude}" : ''
|
35
|
+
lon_param = longtitude ? "&startLon=#{longtitude}" : ''
|
36
|
+
r = label ? %Q|<h3><a href="http://www.everytrail.com/view_trip.php?trip_id=#{h trip_id}">#{h label}</a></h3>| : ''
|
37
|
+
r << %Q|<object width="#{size[0]}" height="#{size[1]}" codebase="http://fpdownload.adobe.com/pub/shockwave/cabs/flash/swflash.cab"><param name="movie" value="http://www.everytrail.com/swf/widget.swf"><param name="FlashVars" value="tripId=#{h trip_id}&units=metric&mode=0#{lon_param}#{lat_param}&stats=off&mapType=Terrain"><embed src="http://www.everytrail.com/swf/widget.swf" quality="high" width="#{size[0]}" height="#{size[1]}" FlashVars="tripId=#{h trip_id}&units=metric&mode=0#{lon_param}#{lat_param}&stats=off&mapType=Terrain" play="true" quality="high" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer"></embed></object><br><a href="http://www.everytrail.com">Map your trip with EveryTrail</a>|
|
38
|
+
end
|
39
|
+
|