qwik2md 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.travis.yml +4 -0
- data/Gemfile +4 -0
- data/README.md +36 -0
- data/Rakefile +10 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/exe/qwik2md +17 -0
- data/lib/qwik2md/version.rb +3 -0
- data/lib/qwik2md.rb +39 -0
- data/qwik2md.gemspec +30 -0
- data/vendor/qwik/AUTHORS +10 -0
- data/vendor/qwik/COPYING +340 -0
- data/vendor/qwik/COPYRIGHT +346 -0
- data/vendor/qwik/lib/qwik/Makefile +63 -0
- data/vendor/qwik/lib/qwik/Rakefile +17 -0
- data/vendor/qwik/lib/qwik/act-aa.rb +83 -0
- data/vendor/qwik/lib/qwik/act-archive.rb +386 -0
- data/vendor/qwik/lib/qwik/act-attach.rb +304 -0
- data/vendor/qwik/lib/qwik/act-backup.rb +236 -0
- data/vendor/qwik/lib/qwik/act-basic.rb +325 -0
- data/vendor/qwik/lib/qwik/act-book.rb +161 -0
- data/vendor/qwik/lib/qwik/act-calc.rb +371 -0
- data/vendor/qwik/lib/qwik/act-charset.rb +251 -0
- data/vendor/qwik/lib/qwik/act-christel.rb +112 -0
- data/vendor/qwik/lib/qwik/act-chronology.rb +149 -0
- data/vendor/qwik/lib/qwik/act-code.rb +155 -0
- data/vendor/qwik/lib/qwik/act-comment.rb +554 -0
- data/vendor/qwik/lib/qwik/act-config.rb +49 -0
- data/vendor/qwik/lib/qwik/act-counter.rb +125 -0
- data/vendor/qwik/lib/qwik/act-day.rb +96 -0
- data/vendor/qwik/lib/qwik/act-describe.rb +135 -0
- data/vendor/qwik/lib/qwik/act-diary.rb +109 -0
- data/vendor/qwik/lib/qwik/act-edit.rb +317 -0
- data/vendor/qwik/lib/qwik/act-embed-html.rb +296 -0
- data/vendor/qwik/lib/qwik/act-emode.rb +150 -0
- data/vendor/qwik/lib/qwik/act-event.rb +187 -0
- data/vendor/qwik/lib/qwik/act-file.rb +303 -0
- data/vendor/qwik/lib/qwik/act-files.rb +771 -0
- data/vendor/qwik/lib/qwik/act-getpass.rb +295 -0
- data/vendor/qwik/lib/qwik/act-history.rb +136 -0
- data/vendor/qwik/lib/qwik/act-html.rb +204 -0
- data/vendor/qwik/lib/qwik/act-httpauth.rb +147 -0
- data/vendor/qwik/lib/qwik/act-include.rb +142 -0
- data/vendor/qwik/lib/qwik/act-interwiki.rb +189 -0
- data/vendor/qwik/lib/qwik/act-isearch.rb +109 -0
- data/vendor/qwik/lib/qwik/act-keywords.rb +137 -0
- data/vendor/qwik/lib/qwik/act-lang.rb +81 -0
- data/vendor/qwik/lib/qwik/act-license.rb +63 -0
- data/vendor/qwik/lib/qwik/act-list.rb +287 -0
- data/vendor/qwik/lib/qwik/act-login.rb +410 -0
- data/vendor/qwik/lib/qwik/act-logout.rb +60 -0
- data/vendor/qwik/lib/qwik/act-mail.rb +159 -0
- data/vendor/qwik/lib/qwik/act-map.rb +292 -0
- data/vendor/qwik/lib/qwik/act-md5.rb +42 -0
- data/vendor/qwik/lib/qwik/act-mdlb.rb +741 -0
- data/vendor/qwik/lib/qwik/act-media.rb +416 -0
- data/vendor/qwik/lib/qwik/act-member.rb +157 -0
- data/vendor/qwik/lib/qwik/act-menu.rb +142 -0
- data/vendor/qwik/lib/qwik/act-metadata.rb +323 -0
- data/vendor/qwik/lib/qwik/act-mlsubmitform.rb +49 -0
- data/vendor/qwik/lib/qwik/act-monitor.rb +167 -0
- data/vendor/qwik/lib/qwik/act-new.rb +418 -0
- data/vendor/qwik/lib/qwik/act-pagelist.rb +248 -0
- data/vendor/qwik/lib/qwik/act-password.rb +145 -0
- data/vendor/qwik/lib/qwik/act-plan.rb +210 -0
- data/vendor/qwik/lib/qwik/act-povray.rb +230 -0
- data/vendor/qwik/lib/qwik/act-presen.rb +380 -0
- data/vendor/qwik/lib/qwik/act-redirect.rb +133 -0
- data/vendor/qwik/lib/qwik/act-ring.rb +1071 -0
- data/vendor/qwik/lib/qwik/act-rrefs.rb +255 -0
- data/vendor/qwik/lib/qwik/act-ruby.rb +116 -0
- data/vendor/qwik/lib/qwik/act-sample.rb +170 -0
- data/vendor/qwik/lib/qwik/act-save.rb +295 -0
- data/vendor/qwik/lib/qwik/act-schedule.rb +374 -0
- data/vendor/qwik/lib/qwik/act-search.rb +180 -0
- data/vendor/qwik/lib/qwik/act-searchwords.rb +51 -0
- data/vendor/qwik/lib/qwik/act-sendpass.rb +83 -0
- data/vendor/qwik/lib/qwik/act-site.rb +89 -0
- data/vendor/qwik/lib/qwik/act-sitebackup.rb +419 -0
- data/vendor/qwik/lib/qwik/act-sitelog.rb +118 -0
- data/vendor/qwik/lib/qwik/act-smil.rb +299 -0
- data/vendor/qwik/lib/qwik/act-status.rb +220 -0
- data/vendor/qwik/lib/qwik/act-style.rb +608 -0
- data/vendor/qwik/lib/qwik/act-table.rb +263 -0
- data/vendor/qwik/lib/qwik/act-tableform.rb +241 -0
- data/vendor/qwik/lib/qwik/act-tag.rb +103 -0
- data/vendor/qwik/lib/qwik/act-text.rb +70 -0
- data/vendor/qwik/lib/qwik/act-textarea.rb +164 -0
- data/vendor/qwik/lib/qwik/act-theme.rb +346 -0
- data/vendor/qwik/lib/qwik/act-toc.rb +112 -0
- data/vendor/qwik/lib/qwik/act-typekey.rb +198 -0
- data/vendor/qwik/lib/qwik/act-under-const.rb +94 -0
- data/vendor/qwik/lib/qwik/act-webservice.rb +321 -0
- data/vendor/qwik/lib/qwik/act-wema.rb +558 -0
- data/vendor/qwik/lib/qwik/act-wysiwyg.rb +238 -0
- data/vendor/qwik/lib/qwik/action.rb +325 -0
- data/vendor/qwik/lib/qwik/autoreload.rb +98 -0
- data/vendor/qwik/lib/qwik/bench-bench.rb +28 -0
- data/vendor/qwik/lib/qwik/bench-emode.rb +47 -0
- data/vendor/qwik/lib/qwik/bench-format-xml.rb +70 -0
- data/vendor/qwik/lib/qwik/bench-large-table.rb +62 -0
- data/vendor/qwik/lib/qwik/bench-md5.rb +14 -0
- data/vendor/qwik/lib/qwik/bench-module-session.rb +19 -0
- data/vendor/qwik/lib/qwik/bench-page.rb +50 -0
- data/vendor/qwik/lib/qwik/bench-s-md5.rb +28 -0
- data/vendor/qwik/lib/qwik/bench-session.rb +25 -0
- data/vendor/qwik/lib/qwik/bench-textformat.rb +31 -0
- data/vendor/qwik/lib/qwik/catalog-factory.rb +91 -0
- data/vendor/qwik/lib/qwik/catalog-ja.rb +479 -0
- data/vendor/qwik/lib/qwik/catalog-ml-ja.rb +145 -0
- data/vendor/qwik/lib/qwik/check-act-monitor.rb +112 -0
- data/vendor/qwik/lib/qwik/check-act-monitor2.rb +46 -0
- data/vendor/qwik/lib/qwik/check-act-theme.rb +27 -0
- data/vendor/qwik/lib/qwik/check-event.rb +112 -0
- data/vendor/qwik/lib/qwik/check-event2.rb +55 -0
- data/vendor/qwik/lib/qwik/check-htree-rexml.rb +77 -0
- data/vendor/qwik/lib/qwik/check-htree.rb +51 -0
- data/vendor/qwik/lib/qwik/check-libxml.rb +135 -0
- data/vendor/qwik/lib/qwik/check-many-pages.rb +47 -0
- data/vendor/qwik/lib/qwik/check-monitor.rb +33 -0
- data/vendor/qwik/lib/qwik/check-observer.rb +67 -0
- data/vendor/qwik/lib/qwik/check-server.rb +61 -0
- data/vendor/qwik/lib/qwik/check-uuencode.rb +33 -0
- data/vendor/qwik/lib/qwik/check-webdav.rb +65 -0
- data/vendor/qwik/lib/qwik/check-xml-xpath.rb +27 -0
- data/vendor/qwik/lib/qwik/common-backtrace.rb +94 -0
- data/vendor/qwik/lib/qwik/common-basic.rb +111 -0
- data/vendor/qwik/lib/qwik/common-condition.rb +142 -0
- data/vendor/qwik/lib/qwik/common-error.rb +48 -0
- data/vendor/qwik/lib/qwik/common-gettext.rb +50 -0
- data/vendor/qwik/lib/qwik/common-javascript.rb +45 -0
- data/vendor/qwik/lib/qwik/common-notice.rb +132 -0
- data/vendor/qwik/lib/qwik/common-plain.rb +105 -0
- data/vendor/qwik/lib/qwik/common-plugin.rb +111 -0
- data/vendor/qwik/lib/qwik/common-res.rb +76 -0
- data/vendor/qwik/lib/qwik/common-resolve.rb +92 -0
- data/vendor/qwik/lib/qwik/common-send.rb +171 -0
- data/vendor/qwik/lib/qwik/common-session.rb +139 -0
- data/vendor/qwik/lib/qwik/common-surface.rb +261 -0
- data/vendor/qwik/lib/qwik/common-url.rb +90 -0
- data/vendor/qwik/lib/qwik/compat/Makefile +12 -0
- data/vendor/qwik/lib/qwik/compat/add_load_path.rb +1 -0
- data/vendor/qwik/lib/qwik/config.rb +299 -0
- data/vendor/qwik/lib/qwik/db-b-backup.rb +142 -0
- data/vendor/qwik/lib/qwik/db-backup.rb +184 -0
- data/vendor/qwik/lib/qwik/db-berkeley.rb +306 -0
- data/vendor/qwik/lib/qwik/db-filesystem.rb +305 -0
- data/vendor/qwik/lib/qwik/db-indexer.rb +154 -0
- data/vendor/qwik/lib/qwik/db-searchwords.rb +238 -0
- data/vendor/qwik/lib/qwik/description-ja.rb +267 -0
- data/vendor/qwik/lib/qwik/description.rb +256 -0
- data/vendor/qwik/lib/qwik/dev-add-copyright.rb +23 -0
- data/vendor/qwik/lib/qwik/dev-backup.rb +24 -0
- data/vendor/qwik/lib/qwik/dev-bench.rb +175 -0
- data/vendor/qwik/lib/qwik/dev-calctime.rb +52 -0
- data/vendor/qwik/lib/qwik/dev-css-compressor.rb +60 -0
- data/vendor/qwik/lib/qwik/dev-extract-catalog.rb +102 -0
- data/vendor/qwik/lib/qwik/dev-js-compressor.rb +73 -0
- data/vendor/qwik/lib/qwik/dev-release.rb +235 -0
- data/vendor/qwik/lib/qwik/dev-replace.rb +353 -0
- data/vendor/qwik/lib/qwik/dev-sendmail.rb +25 -0
- data/vendor/qwik/lib/qwik/farm.rb +283 -0
- data/vendor/qwik/lib/qwik/gettext.rb +56 -0
- data/vendor/qwik/lib/qwik/group-cond.rb +157 -0
- data/vendor/qwik/lib/qwik/group-config.rb +247 -0
- data/vendor/qwik/lib/qwik/group-confirm.rb +147 -0
- data/vendor/qwik/lib/qwik/group-db.rb +326 -0
- data/vendor/qwik/lib/qwik/group-mail.rb +195 -0
- data/vendor/qwik/lib/qwik/group-member.rb +307 -0
- data/vendor/qwik/lib/qwik/group-sendmail.rb +231 -0
- data/vendor/qwik/lib/qwik/group-site.rb +374 -0
- data/vendor/qwik/lib/qwik/group-sweep.rb +63 -0
- data/vendor/qwik/lib/qwik/group.rb +157 -0
- data/vendor/qwik/lib/qwik/helper.rb +6 -0
- data/vendor/qwik/lib/qwik/html-generator.rb +104 -0
- data/vendor/qwik/lib/qwik/html-to-wabisabi.rb +148 -0
- data/vendor/qwik/lib/qwik/htree-diff.rb +87 -0
- data/vendor/qwik/lib/qwik/htree-format-xml.rb +57 -0
- data/vendor/qwik/lib/qwik/htree-generator.rb +144 -0
- data/vendor/qwik/lib/qwik/htree-get.rb +251 -0
- data/vendor/qwik/lib/qwik/htree-html-generator.rb +179 -0
- data/vendor/qwik/lib/qwik/htree-template.rb +263 -0
- data/vendor/qwik/lib/qwik/htree-to-wabisabi.rb +171 -0
- data/vendor/qwik/lib/qwik/loadlib.rb +79 -0
- data/vendor/qwik/lib/qwik/logger.rb +115 -0
- data/vendor/qwik/lib/qwik/mail-body.rb +171 -0
- data/vendor/qwik/lib/qwik/mail-header.rb +474 -0
- data/vendor/qwik/lib/qwik/mail-multipart.rb +193 -0
- data/vendor/qwik/lib/qwik/mail-parse.rb +147 -0
- data/vendor/qwik/lib/qwik/mail.rb +341 -0
- data/vendor/qwik/lib/qwik/mailaddress.rb +83 -0
- data/vendor/qwik/lib/qwik/mdlb-model.rb +81 -0
- data/vendor/qwik/lib/qwik/mdlb-sample.rb +324 -0
- data/vendor/qwik/lib/qwik/ml-catalog-factory.rb +27 -0
- data/vendor/qwik/lib/qwik/ml-exception.rb +15 -0
- data/vendor/qwik/lib/qwik/ml-generator.rb +28 -0
- data/vendor/qwik/lib/qwik/ml-gettext.rb +137 -0
- data/vendor/qwik/lib/qwik/ml-logger.rb +82 -0
- data/vendor/qwik/lib/qwik/ml-memory.rb +65 -0
- data/vendor/qwik/lib/qwik/ml-msg-validator.rb +86 -0
- data/vendor/qwik/lib/qwik/ml-processor.rb +609 -0
- data/vendor/qwik/lib/qwik/ml-quickml-server.rb +122 -0
- data/vendor/qwik/lib/qwik/ml-sendmail.rb +0 -0
- data/vendor/qwik/lib/qwik/ml-server.rb +107 -0
- data/vendor/qwik/lib/qwik/ml-session.rb +348 -0
- data/vendor/qwik/lib/qwik/ml-sweeper.rb +101 -0
- data/vendor/qwik/lib/qwik/mock-logger.rb +65 -0
- data/vendor/qwik/lib/qwik/mock-sendmail.rb +78 -0
- data/vendor/qwik/lib/qwik/mock-socket.rb +82 -0
- data/vendor/qwik/lib/qwik/modulobe.rb +406 -0
- data/vendor/qwik/lib/qwik/mongrel-server.rb +72 -0
- data/vendor/qwik/lib/qwik/page-files.rb +249 -0
- data/vendor/qwik/lib/qwik/page-generate.rb +82 -0
- data/vendor/qwik/lib/qwik/page-get.rb +262 -0
- data/vendor/qwik/lib/qwik/page-images.rb +168 -0
- data/vendor/qwik/lib/qwik/page-put.rb +128 -0
- data/vendor/qwik/lib/qwik/page-rrefs.rb +154 -0
- data/vendor/qwik/lib/qwik/page-title.rb +0 -0
- data/vendor/qwik/lib/qwik/page-wikidb.rb +234 -0
- data/vendor/qwik/lib/qwik/page.rb +67 -0
- data/vendor/qwik/lib/qwik/pages.rb +444 -0
- data/vendor/qwik/lib/qwik/parse-plugin.rb +249 -0
- data/vendor/qwik/lib/qwik/parser-emode.rb +116 -0
- data/vendor/qwik/lib/qwik/parser-inline.rb +272 -0
- data/vendor/qwik/lib/qwik/parser.rb +349 -0
- data/vendor/qwik/lib/qwik/password.rb +183 -0
- data/vendor/qwik/lib/qwik/periodic.rb +79 -0
- data/vendor/qwik/lib/qwik/qp.rb +56 -0
- data/vendor/qwik/lib/qwik/qwik-service.rb +341 -0
- data/vendor/qwik/lib/qwik/qwik.rb +5 -0
- data/vendor/qwik/lib/qwik/qwikweb-adduser.rb +34 -0
- data/vendor/qwik/lib/qwik/qwikweb-catalog-validator.rb +110 -0
- data/vendor/qwik/lib/qwik/qwikweb-incgen.rb +28 -0
- data/vendor/qwik/lib/qwik/qwikweb-makesite.rb +41 -0
- data/vendor/qwik/lib/qwik/qwikweb-server.rb +44 -0
- data/vendor/qwik/lib/qwik/qwikweb-showpassword.rb +26 -0
- data/vendor/qwik/lib/qwik/qwikweb-watchlog.rb +67 -0
- data/vendor/qwik/lib/qwik/request-path.rb +304 -0
- data/vendor/qwik/lib/qwik/request-ua.rb +76 -0
- data/vendor/qwik/lib/qwik/request-webrick.rb +81 -0
- data/vendor/qwik/lib/qwik/request.rb +91 -0
- data/vendor/qwik/lib/qwik/resolve-tdiary.rb +292 -0
- data/vendor/qwik/lib/qwik/resolve.rb +121 -0
- data/vendor/qwik/lib/qwik/response.rb +228 -0
- data/vendor/qwik/lib/qwik/server-memory.rb +57 -0
- data/vendor/qwik/lib/qwik/server-webrick.rb +102 -0
- data/vendor/qwik/lib/qwik/server.rb +252 -0
- data/vendor/qwik/lib/qwik/site-config.rb +149 -0
- data/vendor/qwik/lib/qwik/site-db.rb +136 -0
- data/vendor/qwik/lib/qwik/site-event.rb +162 -0
- data/vendor/qwik/lib/qwik/site-files.rb +86 -0
- data/vendor/qwik/lib/qwik/site-group.rb +103 -0
- data/vendor/qwik/lib/qwik/site-index.rb +47 -0
- data/vendor/qwik/lib/qwik/site-log.rb +64 -0
- data/vendor/qwik/lib/qwik/site-member.rb +230 -0
- data/vendor/qwik/lib/qwik/site-monitor.rb +97 -0
- data/vendor/qwik/lib/qwik/site-pages.rb +62 -0
- data/vendor/qwik/lib/qwik/site-plan.rb +139 -0
- data/vendor/qwik/lib/qwik/site-report.rb +282 -0
- data/vendor/qwik/lib/qwik/site-resolve.rb +230 -0
- data/vendor/qwik/lib/qwik/site-rrefs.rb +18 -0
- data/vendor/qwik/lib/qwik/site-search.rb +180 -0
- data/vendor/qwik/lib/qwik/site-timeline.rb +153 -0
- data/vendor/qwik/lib/qwik/site-url.rb +189 -0
- data/vendor/qwik/lib/qwik/site.rb +76 -0
- data/vendor/qwik/lib/qwik/smil-time.rb +105 -0
- data/vendor/qwik/lib/qwik/smtp-session.rb +331 -0
- data/vendor/qwik/lib/qwik/template-generator.rb +149 -0
- data/vendor/qwik/lib/qwik/template.rb +85 -0
- data/vendor/qwik/lib/qwik/test-common.rb +10 -0
- data/vendor/qwik/lib/qwik/test-ml-info.rb +225 -0
- data/vendor/qwik/lib/qwik/test-module-ml.rb +142 -0
- data/vendor/qwik/lib/qwik/test-module-path.rb +110 -0
- data/vendor/qwik/lib/qwik/test-module-public.rb +70 -0
- data/vendor/qwik/lib/qwik/test-module-server.rb +98 -0
- data/vendor/qwik/lib/qwik/test-module-session.rb +264 -0
- data/vendor/qwik/lib/qwik/test-module-suite.rb +91 -0
- data/vendor/qwik/lib/qwik/test-ms-applemail.rb +59 -0
- data/vendor/qwik/lib/qwik/test-ms-attach.rb +174 -0
- data/vendor/qwik/lib/qwik/test-ms-basic.rb +40 -0
- data/vendor/qwik/lib/qwik/test-ms-close.rb +35 -0
- data/vendor/qwik/lib/qwik/test-ms-confirm.rb +75 -0
- data/vendor/qwik/lib/qwik/test-ms-ignore-spam.rb +57 -0
- data/vendor/qwik/lib/qwik/test-ms-japanese.rb +97 -0
- data/vendor/qwik/lib/qwik/test-ms-jfilename.rb +82 -0
- data/vendor/qwik/lib/qwik/test-ms-large.rb +58 -0
- data/vendor/qwik/lib/qwik/test-ms-member.rb +103 -0
- data/vendor/qwik/lib/qwik/test-ms-multipart.rb +84 -0
- data/vendor/qwik/lib/qwik/test-ms-org.rb +129 -0
- data/vendor/qwik/lib/qwik/test-ms-plan.rb +130 -0
- data/vendor/qwik/lib/qwik/test-ms-post.rb +53 -0
- data/vendor/qwik/lib/qwik/test-ms-quopri.rb +76 -0
- data/vendor/qwik/lib/qwik/test-sub-quopri.rb +45 -0
- data/vendor/qwik/lib/qwik/test-submit-base64.rb +59 -0
- data/vendor/qwik/lib/qwik/test-submit-forward.rb +61 -0
- data/vendor/qwik/lib/qwik/test-submit-html-mail.rb +52 -0
- data/vendor/qwik/lib/qwik/test-submit-japanese.rb +135 -0
- data/vendor/qwik/lib/qwik/test-submit-jfilename.rb +144 -0
- data/vendor/qwik/lib/qwik/test-submit-uuencode.rb +71 -0
- data/vendor/qwik/lib/qwik/test-suite-all.rb +8 -0
- data/vendor/qwik/lib/qwik/test-suite-basic.rb +9 -0
- data/vendor/qwik/lib/qwik/test-suite-ml.rb +9 -0
- data/vendor/qwik/lib/qwik/test-typekey.rb +64 -0
- data/vendor/qwik/lib/qwik/testunit.rb +45 -0
- data/vendor/qwik/lib/qwik/tokenizer-inline.rb +288 -0
- data/vendor/qwik/lib/qwik/tokenizer.rb +331 -0
- data/vendor/qwik/lib/qwik/typekey.rb +160 -0
- data/vendor/qwik/lib/qwik/util-basic.rb +135 -0
- data/vendor/qwik/lib/qwik/util-charset.rb +331 -0
- data/vendor/qwik/lib/qwik/util-css.rb +56 -0
- data/vendor/qwik/lib/qwik/util-csv-tokenizer.rb +113 -0
- data/vendor/qwik/lib/qwik/util-filename.rb +112 -0
- data/vendor/qwik/lib/qwik/util-pathname.rb +202 -0
- data/vendor/qwik/lib/qwik/util-pid.rb +58 -0
- data/vendor/qwik/lib/qwik/util-safe.rb +67 -0
- data/vendor/qwik/lib/qwik/util-sendmail.rb +273 -0
- data/vendor/qwik/lib/qwik/util-string.rb +202 -0
- data/vendor/qwik/lib/qwik/util-time.rb +125 -0
- data/vendor/qwik/lib/qwik/util-webrick.rb +176 -0
- data/vendor/qwik/lib/qwik/version.rb +11 -0
- data/vendor/qwik/lib/qwik/wabisabi-basic.rb +163 -0
- data/vendor/qwik/lib/qwik/wabisabi-diff.rb +130 -0
- data/vendor/qwik/lib/qwik/wabisabi-format-xml.rb +310 -0
- data/vendor/qwik/lib/qwik/wabisabi-generator.rb +262 -0
- data/vendor/qwik/lib/qwik/wabisabi-index.rb +174 -0
- data/vendor/qwik/lib/qwik/wabisabi-table.rb +212 -0
- data/vendor/qwik/lib/qwik/wabisabi-template.rb +295 -0
- data/vendor/qwik/lib/qwik/wabisabi-to-htree.rb +111 -0
- data/vendor/qwik/lib/qwik/wabisabi-to-wiki.rb +690 -0
- data/vendor/qwik/lib/qwik/wabisabi-traverse.rb +207 -0
- data/vendor/qwik/lib/qwik/wabisabi-validator.rb +116 -0
- data/vendor/qwik/lib/qwik/wabisabi.rb +5 -0
- metadata +492 -0
@@ -0,0 +1,292 @@
|
|
1
|
+
# Copyright (C) 2003-2006 Kouichirou Eto, All rights reserved.
|
2
|
+
# This is free software with ABSOLUTELY NO WARRANTY.
|
3
|
+
# You can redistribute it and/or modify it under the terms of the GNU GPL 2.
|
4
|
+
|
5
|
+
$LOAD_PATH.unshift '..' unless $LOAD_PATH.include? '..'
|
6
|
+
|
7
|
+
module Qwik
|
8
|
+
class Action
|
9
|
+
D_PluginMap = {
|
10
|
+
:dt => 'Map plugin',
|
11
|
+
:dd => 'You can embed a map and create makers.',
|
12
|
+
:dc => "* Example
|
13
|
+
{{{
|
14
|
+
{{map(139.7005, 35.6595, 3)
|
15
|
+
* [139.7005,35.6595] Shibuya
|
16
|
+
- Hachiko Mae
|
17
|
+
* [139.7030,35.6715] Harajuku
|
18
|
+
- Takeshita St.
|
19
|
+
}}
|
20
|
+
}}}
|
21
|
+
See [[PluginMap]] for example.
|
22
|
+
* Thanks
|
23
|
+
I use '[[Google Local|http://maps.google.com/]]' for the map.
|
24
|
+
Thank you very much.
|
25
|
+
"
|
26
|
+
}
|
27
|
+
|
28
|
+
def plg_map(clat, clng, mag=0)
|
29
|
+
# Prepare maplink div.
|
30
|
+
|
31
|
+
href = ".map?s=#{@req.sitename}&k=#{@req.base}"
|
32
|
+
fullhref = "#{href}&m=full"
|
33
|
+
|
34
|
+
#href = c_relative_to_root(href)
|
35
|
+
#fullhref = c_relative_to_root(fullhref)
|
36
|
+
href = "/#{href}"
|
37
|
+
fullhref = "/#{fullhref}"
|
38
|
+
|
39
|
+
div = [:div, {:class=>'maplink'},
|
40
|
+
[:iframe, {:src=>href,
|
41
|
+
:style=>'width:700px;height:400px;border:0;'}, ''],
|
42
|
+
[:br],
|
43
|
+
[:div, {:style=>'margin: 0 0 1em 0;'},
|
44
|
+
[:a, {:href=>fullhref, :style=>'font-size:x-small;'},
|
45
|
+
_('Show map in full screen.')]]]
|
46
|
+
content = yield
|
47
|
+
elements = c_res(content)
|
48
|
+
div += elements
|
49
|
+
return div
|
50
|
+
end
|
51
|
+
|
52
|
+
def pre_act_map
|
53
|
+
sitename = @req.query['s']
|
54
|
+
pagekey = @req.query['k']
|
55
|
+
mode = @req.query['m']
|
56
|
+
|
57
|
+
# Prepare site.
|
58
|
+
@site = @memory.farm.get_site(sitename)
|
59
|
+
if @site.nil?
|
60
|
+
@site = @memory.farm.get_top_site
|
61
|
+
return action_no_such_site(@req.sitename)
|
62
|
+
end
|
63
|
+
if ! @site.is_open?
|
64
|
+
c_require_member # IMPORTANT: Security check.
|
65
|
+
end
|
66
|
+
|
67
|
+
page = @site[pagekey]
|
68
|
+
c_nerror('No such page.') if page.nil?
|
69
|
+
plugin = get_first_plugin(page, 'map')
|
70
|
+
|
71
|
+
param = plugin[1][:param]
|
72
|
+
args = Action.plugin_parse_args(param)
|
73
|
+
clat = args.shift.to_f
|
74
|
+
clng = args.shift.to_f
|
75
|
+
mag = args.shift.to_i
|
76
|
+
|
77
|
+
content = plugin[2]
|
78
|
+
|
79
|
+
ar = []
|
80
|
+
ar << map_style
|
81
|
+
maparea = map_maparea(clat, clng, mag, content, mode)
|
82
|
+
ar << maparea
|
83
|
+
|
84
|
+
title = 'map'
|
85
|
+
c_plain(title){ar}
|
86
|
+
|
87
|
+
head = @res.body.get_path('/head')
|
88
|
+
head << map_initial_script
|
89
|
+
head << map_script(clat, clng, mag, content, mode)
|
90
|
+
|
91
|
+
body = @res.body.get_path('/body')
|
92
|
+
body[1][:onload] = 'qwikMakeMap();'
|
93
|
+
|
94
|
+
footer= @res.body.get_path("//div[@class='footer']")
|
95
|
+
footer.clear
|
96
|
+
|
97
|
+
if ! @config.test
|
98
|
+
map_make_page_utf8
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
def map_make_page_utf8
|
103
|
+
@res.body = @res.body.format_xml.page_to_xml
|
104
|
+
@res['Content-Type'] = "text/html; charset=#{Charset::UTF8}"
|
105
|
+
end
|
106
|
+
|
107
|
+
def get_first_plugin(page, method)
|
108
|
+
str = page.load
|
109
|
+
elements = c_parse(str)
|
110
|
+
elements.each {|element|
|
111
|
+
if element[0] == :plugin && element[1][:method] == method
|
112
|
+
return element
|
113
|
+
end
|
114
|
+
}
|
115
|
+
return nil
|
116
|
+
end
|
117
|
+
|
118
|
+
GOOGLE_MAPS_API_KEY_FILE = 'google-maps-api-key.txt'
|
119
|
+
|
120
|
+
def map_get_api_key
|
121
|
+
file = @config.etc_dir.path+GOOGLE_MAPS_API_KEY_FILE
|
122
|
+
return if ! file.exist?
|
123
|
+
return file.open {|f| f.gets }.chomp
|
124
|
+
end
|
125
|
+
|
126
|
+
def map_style
|
127
|
+
return [:style, '.header { display: none ! important; }
|
128
|
+
body { background: #fff; }']
|
129
|
+
end
|
130
|
+
|
131
|
+
def map_initial_script
|
132
|
+
key = map_get_api_key
|
133
|
+
#return if key.nil? # Fatal error.
|
134
|
+
key ||= '' # Ad hoc.
|
135
|
+
src = "http://maps.google.com/maps?file=api&v=1&key=#{key}"
|
136
|
+
return [:script, {:src=>src, :type=>'text/javascript'}, '']
|
137
|
+
end
|
138
|
+
|
139
|
+
def map_script(clat, clng, mag, content, mode='iframe')
|
140
|
+
maparea = []
|
141
|
+
|
142
|
+
# Prepare markers.
|
143
|
+
elements = c_parse(content)
|
144
|
+
|
145
|
+
markers = []
|
146
|
+
marker = nil
|
147
|
+
|
148
|
+
elements.each {|element|
|
149
|
+
if element[0] == :h2
|
150
|
+
marker = []
|
151
|
+
markers << marker
|
152
|
+
marker << element
|
153
|
+
else
|
154
|
+
if marker
|
155
|
+
marker << element
|
156
|
+
end
|
157
|
+
end
|
158
|
+
}
|
159
|
+
|
160
|
+
ms = []
|
161
|
+
markers.each {|marker|
|
162
|
+
h2 = marker[0]
|
163
|
+
if h2[1] == '[' && h2[3] == ']'
|
164
|
+
lat, lng = h2[2].split(',')
|
165
|
+
h2[1] = '' # Destruct headers.
|
166
|
+
h2[2] = ''
|
167
|
+
h2[3] = ''
|
168
|
+
ms << [lat, lng, marker]
|
169
|
+
end
|
170
|
+
}
|
171
|
+
|
172
|
+
marker_script = ''
|
173
|
+
ms.each {|lat, lng, marker|
|
174
|
+
s = marker.rb_format_xml(-1, -1)
|
175
|
+
s = s.sub(/\n/, '')
|
176
|
+
marker_script << "qwikSetMark(#{lat}, #{lng}, '#{s}');\n"
|
177
|
+
}
|
178
|
+
|
179
|
+
# Add script.
|
180
|
+
clat = clat.to_f
|
181
|
+
clng = clng.to_f
|
182
|
+
mag = mag.to_i
|
183
|
+
# You should set width for div element in the marker.
|
184
|
+
script = "
|
185
|
+
function qwikMakeMap() {
|
186
|
+
if (GBrowserIsCompatible()) {
|
187
|
+
// Define the function inside.
|
188
|
+
function qwikSetMark(lat, lng, body) {
|
189
|
+
var point = new GPoint(lng, lat);
|
190
|
+
var html=\"<div style='width:220px'>\"+body+\"</div>\";
|
191
|
+
var marker = new GMarker(point);
|
192
|
+
map.addOverlay(marker);
|
193
|
+
GEvent.addListener(marker, 'click', function() {
|
194
|
+
marker.openInfoWindowHtml(html);
|
195
|
+
});
|
196
|
+
marker.openInfoWindowHtml(html);
|
197
|
+
}
|
198
|
+
|
199
|
+
var map = new GMap(document.getElementById('map'));
|
200
|
+
map.addControl(new GLargeMapControl());
|
201
|
+
map.addControl(new GMapTypeControl());
|
202
|
+
map.centerAndZoom(new GPoint(#{clng}, #{clat}), #{mag});
|
203
|
+
GEvent.addListener(map, 'moveend', function() {
|
204
|
+
var center = map.getCenterLatLng();
|
205
|
+
var latLngStr = '* [' + center.y + ',' + center.x + '] ';
|
206
|
+
document.getElementById('message').innerHTML = latLngStr;
|
207
|
+
});
|
208
|
+
|
209
|
+
#{marker_script}
|
210
|
+
}
|
211
|
+
}
|
212
|
+
"
|
213
|
+
maparea << [:script, {:type=>'text/javascript'},
|
214
|
+
"\n//",
|
215
|
+
[:'![CDATA[', "\n\n"+script+"\n//"],
|
216
|
+
"\n"]
|
217
|
+
return maparea
|
218
|
+
end
|
219
|
+
|
220
|
+
def map_maparea(clat, clng, mag, content, mode='iframe')
|
221
|
+
maparea = [:div, {:class=>'maparea'}]
|
222
|
+
|
223
|
+
# Add initial script.
|
224
|
+
#maparea << map_initial_script
|
225
|
+
|
226
|
+
# Add <div id='map'></div>
|
227
|
+
style = 'width: 696px; height: 382px;'
|
228
|
+
style = 'width: 100%; height: 600px;' if mode == 'full'
|
229
|
+
maparea << [:div, {:id=>'map', :style=>style}, '']
|
230
|
+
maparea << [:div, {:id=>'message', :style=>'font-size:x-small;'}, '']
|
231
|
+
end
|
232
|
+
end
|
233
|
+
end
|
234
|
+
|
235
|
+
if $0 == __FILE__
|
236
|
+
require 'qwik/test-common'
|
237
|
+
require 'qwik/wabisabi-format-xml'
|
238
|
+
$test = true
|
239
|
+
end
|
240
|
+
|
241
|
+
if defined?($test) && $test
|
242
|
+
class TestActMap < Test::Unit::TestCase
|
243
|
+
include TestSession
|
244
|
+
|
245
|
+
TEST_MAP_CONTENT = '
|
246
|
+
{{map(139.7005, 35.6595, 3)
|
247
|
+
* [139.7005,35.6595] Shibuya
|
248
|
+
- Hachiko Mae
|
249
|
+
* [139.7030,35.6715] Harajuku
|
250
|
+
- Takeshita St.
|
251
|
+
}}
|
252
|
+
'
|
253
|
+
|
254
|
+
def test_all
|
255
|
+
t_add_user
|
256
|
+
|
257
|
+
page = @site.create_new
|
258
|
+
str = TEST_MAP_CONTENT
|
259
|
+
page.store(str)
|
260
|
+
res = session '/test/1.html'
|
261
|
+
|
262
|
+
ok_title '1'
|
263
|
+
w = res.body.get_path("//div[@class='maplink']")
|
264
|
+
eq [:div, {:class=>'maplink'},
|
265
|
+
[:iframe, {:src=>'/.map?s=test&k=1',
|
266
|
+
:style=>'width:700px;height:400px;border:0;'}, '']],
|
267
|
+
w[0..2]
|
268
|
+
|
269
|
+
res = session '/.map?s=test&k=1'
|
270
|
+
ok_title 'map'
|
271
|
+
w = res.body.get_path("//div[@class='maparea']")
|
272
|
+
end
|
273
|
+
|
274
|
+
def nutest_map
|
275
|
+
str = '
|
276
|
+
{{map(1, 2, 3, 400, 300)
|
277
|
+
* StoreA
|
278
|
+
,4,5
|
279
|
+
- List1
|
280
|
+
- http://example.com/StoreA
|
281
|
+
> CommentA
|
282
|
+
* StoreB
|
283
|
+
,6,7
|
284
|
+
{{file(StoreB.jpg)}}
|
285
|
+
- List2
|
286
|
+
- http://example.com/StoreB
|
287
|
+
> CommentB
|
288
|
+
}}
|
289
|
+
'
|
290
|
+
end
|
291
|
+
end
|
292
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# Copyright (C) 2003-2006 Kouichirou Eto, All rights reserved.
|
2
|
+
# This is free software with ABSOLUTELY NO WARRANTY.
|
3
|
+
# You can redistribute it and/or modify it under the terms of the GNU GPL 2.
|
4
|
+
|
5
|
+
$LOAD_PATH.unshift '..' unless $LOAD_PATH.include? '..'
|
6
|
+
|
7
|
+
module Qwik
|
8
|
+
class Action
|
9
|
+
def ext_md5
|
10
|
+
c_require_page_exist
|
11
|
+
c_set_status
|
12
|
+
c_set_no_cache
|
13
|
+
c_set_contenttype('text/plain')
|
14
|
+
c_set_body(@site[@req.base].get.md5hex)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
if $0 == __FILE__
|
20
|
+
require 'qwik/test-common'
|
21
|
+
$test = true
|
22
|
+
end
|
23
|
+
|
24
|
+
if defined?($test) && $test
|
25
|
+
class TestActMD5 < Test::Unit::TestCase
|
26
|
+
include TestSession
|
27
|
+
|
28
|
+
def test_all
|
29
|
+
t_add_user
|
30
|
+
|
31
|
+
page = @site.create_new
|
32
|
+
|
33
|
+
page.store ''
|
34
|
+
res = session '/test/1.md5'
|
35
|
+
eq 'd41d8cd98f00b204e9800998ecf8427e', res.body
|
36
|
+
|
37
|
+
page.store '*t'
|
38
|
+
res = session '/test/1.md5'
|
39
|
+
eq '713c3323a56a1024e3638a96c031cf91', res.body
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|