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,255 @@
|
|
1
|
+
# Copyright (C) 2009 AIST, 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
|
+
=begin
|
6
|
+
$LOAD_PATH.unshift '..' unless $LOAD_PATH.include? '..'
|
7
|
+
|
8
|
+
require 'qwik/act-backup'
|
9
|
+
|
10
|
+
module Qwik
|
11
|
+
class Action
|
12
|
+
def plg_rrefs
|
13
|
+
rrefs = @site.rrefs(@req.base)
|
14
|
+
wabisabi = []
|
15
|
+
if rrefs
|
16
|
+
w = []
|
17
|
+
rrefs.each{|key|
|
18
|
+
page = @site[key]
|
19
|
+
if page
|
20
|
+
w.push([:span, {:class => "rref"}, [:a, {:href => "#{key}.html"}, page.get_title]])
|
21
|
+
else
|
22
|
+
rrefs.delete(key)
|
23
|
+
end
|
24
|
+
}
|
25
|
+
if w.size > 0
|
26
|
+
wabisabi = [:div, {:class => "rrefs"}] + w
|
27
|
+
end
|
28
|
+
end
|
29
|
+
return wabisabi
|
30
|
+
end
|
31
|
+
|
32
|
+
private
|
33
|
+
def clear_rrefs(mykey)
|
34
|
+
@site.each {|page|
|
35
|
+
page.rrefs.delete(mykey) unless page.rrefs.nil?
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
def create_rrefs(mykey)
|
40
|
+
links = find_links_to_this_page(mykey)
|
41
|
+
@site.rrefs(mykey).put(links) if links.size > 0
|
42
|
+
end
|
43
|
+
|
44
|
+
def find_links_to_this_page(mykey)
|
45
|
+
links = []
|
46
|
+
@site.each {|page|
|
47
|
+
l = extract_wiki_links(page.get)
|
48
|
+
if l.include?(mykey)
|
49
|
+
links.push(page.key)
|
50
|
+
end
|
51
|
+
}
|
52
|
+
links
|
53
|
+
end
|
54
|
+
|
55
|
+
def update_rrefs
|
56
|
+
list = backup_list(@site,@req.base)
|
57
|
+
# new page already has two pages at this point
|
58
|
+
list = list.sort {|a,b| a[1] <=> b[1]}[-2..-1]
|
59
|
+
if list
|
60
|
+
links = list.map{|w|
|
61
|
+
extract_wiki_links(w[0])
|
62
|
+
}
|
63
|
+
|
64
|
+
new_links = links[1] - links[0]
|
65
|
+
deleted_links = links[0] - links[1]
|
66
|
+
|
67
|
+
update_links(new_links,"add")
|
68
|
+
update_links(deleted_links,"delete")
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
def update_links(links, method)
|
73
|
+
links.each {|key|
|
74
|
+
rrefs = @site.rrefs(key)
|
75
|
+
rrefs.send(method, @req.base) unless rrefs.nil?
|
76
|
+
}
|
77
|
+
end
|
78
|
+
|
79
|
+
def extract_wiki_links(wiki)
|
80
|
+
links = []
|
81
|
+
wabisabi = wiki_to_wabisabi(wiki)
|
82
|
+
wabisabi.each_tag(:a) {|e|
|
83
|
+
href = e.attr[:href]
|
84
|
+
if (!href.nil? and !href.empty?)
|
85
|
+
key = href_to_key(href)
|
86
|
+
links.push(key) if !key.nil?
|
87
|
+
end
|
88
|
+
}
|
89
|
+
return links
|
90
|
+
end
|
91
|
+
|
92
|
+
def wiki_to_wabisabi(wiki)
|
93
|
+
tokens = Qwik::TextTokenizer.tokenize(wiki)
|
94
|
+
return Qwik::TextParser.make_tree(tokens)
|
95
|
+
end
|
96
|
+
|
97
|
+
def href_to_key(href)
|
98
|
+
#fix me! this is from site-reslove.rb#resolve_ref
|
99
|
+
return nil if /^(?:http|https|ftp|file):\/\// =~ href
|
100
|
+
return nil if href.include?('?') # ignore command link
|
101
|
+
return nil if href[0] == ?/ # already resolved
|
102
|
+
return nil if /\.html\z/ !~ href # ignore not html file
|
103
|
+
key = href.sub(/\.html\z/, '')
|
104
|
+
page = @site.get_by_title(key)
|
105
|
+
if page && page.key != key
|
106
|
+
key = page.key
|
107
|
+
end
|
108
|
+
return key
|
109
|
+
end
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
113
|
+
if $0 == __FILE__
|
114
|
+
require 'qwik/test-common'
|
115
|
+
$test = true
|
116
|
+
end
|
117
|
+
|
118
|
+
if defined?($test) && $test
|
119
|
+
class TestActRRefs < Test::Unit::TestCase
|
120
|
+
include TestSession
|
121
|
+
|
122
|
+
def test_plg_rrefs
|
123
|
+
t_add_user
|
124
|
+
#test empty rrefs
|
125
|
+
ok_wi([],'{{rrefs}}')
|
126
|
+
|
127
|
+
page = @site['_PageAttribute']
|
128
|
+
page.store('{{rrefs}}')
|
129
|
+
|
130
|
+
## assertion for a new page
|
131
|
+
#create page contatins a link to page2
|
132
|
+
res = session('POST /test/.new?t=page1')
|
133
|
+
res = session('/test/page1.save?contents=%5b%5bpage2%5d%5d')
|
134
|
+
|
135
|
+
#create page2
|
136
|
+
res = session('POST /test/.new?t=page2')
|
137
|
+
res = session('/test/page2.save?contents=page2')
|
138
|
+
|
139
|
+
#load page2
|
140
|
+
res = session('/test/page2.html')
|
141
|
+
|
142
|
+
#check if page2 has a rref to page1
|
143
|
+
ok_xp([:div, {:class => "rrefs"}, [:span, {:class => "rref"}, [:a, {:href => "page1.html"}, "page1"]]],'//div[@class="rrefs"]/')
|
144
|
+
|
145
|
+
|
146
|
+
## assertion for adding a link to existing page
|
147
|
+
#ensure to differ backup epoch time of page2
|
148
|
+
sleep(1)
|
149
|
+
|
150
|
+
#modify page2 to add a link to page1
|
151
|
+
res = session('/test/page2.edit')
|
152
|
+
md5hex = session_md5(res.body)
|
153
|
+
res = session('/test/page2.save?contents=page2%5b%5bpage1%5d%5d&md5hex=' + md5hex)
|
154
|
+
ok_in(['Page is saved.'],'title')
|
155
|
+
|
156
|
+
#check if page1's rrefs has page2
|
157
|
+
# comment outed due to cache issue.
|
158
|
+
# ok_eq("page2" + $/, @site["page1"].rrefs.get)
|
159
|
+
|
160
|
+
#load page1
|
161
|
+
res = session('/test/page1.html')
|
162
|
+
|
163
|
+
#check if page1 has a rref to page2
|
164
|
+
ok_xp([:div, {:class => "rrefs"}, [:span, {:class => "rref"}, [:a, {:href => "page2.html"}, "page2"]]],'//div[@class="rrefs"]/')
|
165
|
+
|
166
|
+
## assetion for deleting a link to page
|
167
|
+
#ensure to differ backup epoch time of page2
|
168
|
+
sleep(1)
|
169
|
+
|
170
|
+
#modify page2 to delete a link to page1
|
171
|
+
res = session('/test/page2.edit')
|
172
|
+
md5hex = session_md5(res.body)
|
173
|
+
res = session('/test/page2.save?contents=page2&md5hex=' + md5hex)
|
174
|
+
ok_in(['Page is saved.'],'title')
|
175
|
+
|
176
|
+
#check if page1's rrefs has no content
|
177
|
+
# comment outed due to cache issue.
|
178
|
+
# ok_eq("",@site["page1"].rrefs.get)
|
179
|
+
|
180
|
+
## assetion for deleting page1
|
181
|
+
res = session('/test/page1.edit')
|
182
|
+
md5hex = session_md5(res.body)
|
183
|
+
res = session('/test/page1.save?contents=&md5hex=' + md5hex)
|
184
|
+
ok_in(['Page is deleted.'],'title')
|
185
|
+
|
186
|
+
#check if page2's rrefs has no content
|
187
|
+
# comment outed due to cache issue.
|
188
|
+
# ok_eq("",@site["page2"].rrefs.get)
|
189
|
+
end
|
190
|
+
|
191
|
+
#=begin
|
192
|
+
# check exclusive rrefs update
|
193
|
+
# this test takes too long to run as regression
|
194
|
+
# please uncomment when needed to test
|
195
|
+
def test_multi_pages_update
|
196
|
+
t_add_user
|
197
|
+
|
198
|
+
|
199
|
+
# number of pages to update at once.
|
200
|
+
# This number should be even.
|
201
|
+
# Adequate number is upto the test environment.
|
202
|
+
num = 300
|
203
|
+
|
204
|
+
#create pages0~num
|
205
|
+
0.upto(num){|i|
|
206
|
+
t = "page#{i}"
|
207
|
+
res = session("POST /test/.new?t=#{t}")
|
208
|
+
if ((i&0x1) == 0x1) #odd pages have a link to page0
|
209
|
+
res = session("/test/#{t}.save?contents=%5b%5bpage0%5d%5d")
|
210
|
+
else #even pages have no links
|
211
|
+
res = session("/test/#{t}.save?contents=#{t}")
|
212
|
+
end
|
213
|
+
}
|
214
|
+
|
215
|
+
#update page1~num
|
216
|
+
1.upto(num) {|i|
|
217
|
+
p = "page#{i}"
|
218
|
+
res = session("/test/#{p}.edit")
|
219
|
+
}
|
220
|
+
sleep(1)
|
221
|
+
|
222
|
+
ths = []
|
223
|
+
1.upto(num) {|i|
|
224
|
+
ths[i] = Thread.new {
|
225
|
+
p = "page#{i}"
|
226
|
+
if ((i&0x1) == 0x1) #odd pages: remove a link to page0
|
227
|
+
res = session("/test/#{p}.save?contents=page0")
|
228
|
+
else #even pages: add a link to page0
|
229
|
+
res = session("/test/#{p}.save?contents=%5b%5bpage0%5d%5d")
|
230
|
+
end
|
231
|
+
}
|
232
|
+
}
|
233
|
+
1.upto(num){|i|
|
234
|
+
ths[i].join
|
235
|
+
}
|
236
|
+
|
237
|
+
#check if page0's rrefs has num/2 pages
|
238
|
+
r = @site["page0"].rrefs.get.sort
|
239
|
+
ok_eq(num/2,r.to_a.size)
|
240
|
+
end
|
241
|
+
#=end
|
242
|
+
|
243
|
+
private
|
244
|
+
def session_md5(body)
|
245
|
+
md5hex = nil
|
246
|
+
body.each_tag(:input) {|e|
|
247
|
+
if e.attr[:name] == "md5hex"
|
248
|
+
md5hex = e.attr[:value]
|
249
|
+
end
|
250
|
+
}
|
251
|
+
return md5hex
|
252
|
+
end
|
253
|
+
end
|
254
|
+
end
|
255
|
+
=end
|
@@ -0,0 +1,116 @@
|
|
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
|
+
module Qwik
|
6
|
+
class Action
|
7
|
+
D_PluginRuby = {
|
8
|
+
:dt => 'Embed Ruby code plugin',
|
9
|
+
:dd => 'You can embed ruby code on pages.',
|
10
|
+
:dc => "* Examples
|
11
|
+
{{ruby
|
12
|
+
\"<b>hello</b>\"
|
13
|
+
}}
|
14
|
+
{{ruby
|
15
|
+
\"<b>hello</b>\"
|
16
|
+
}}
|
17
|
+
|
18
|
+
* enable_ruby
|
19
|
+
|
20
|
+
Please enable ruby plugin from 'config.txt'.
|
21
|
+
Ask for the administrator.
|
22
|
+
}}
|
23
|
+
"
|
24
|
+
}
|
25
|
+
|
26
|
+
def plg_ruby(*argv)
|
27
|
+
return [:p, "Ruby plugin is not enabled."] if ! @config.enable_ruby
|
28
|
+
|
29
|
+
return if ! block_given?
|
30
|
+
ruby_code = yield
|
31
|
+
|
32
|
+
require 'date'
|
33
|
+
|
34
|
+
th = Thread.new {
|
35
|
+
$SAFE = 4
|
36
|
+
eval(ruby_code)
|
37
|
+
}
|
38
|
+
result = th.value.to_s
|
39
|
+
wabisabi = HTree(result).to_wabisabi
|
40
|
+
return [:p, wabisabi]
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
if $0 == __FILE__
|
46
|
+
$LOAD_PATH.unshift '..' unless $LOAD_PATH.include? '..'
|
47
|
+
require 'qwik/test-common'
|
48
|
+
$test = true
|
49
|
+
end
|
50
|
+
|
51
|
+
if defined?($test) && $test
|
52
|
+
class TestActRuby < Test::Unit::TestCase
|
53
|
+
include TestSession
|
54
|
+
|
55
|
+
def test_plg_ruby
|
56
|
+
res = session
|
57
|
+
ok_wi [:p, "Ruby plugin is not enabled."],
|
58
|
+
"{{ruby
|
59
|
+
'hello'
|
60
|
+
}}"
|
61
|
+
|
62
|
+
@config[:enable_ruby] = true
|
63
|
+
|
64
|
+
ok_wi [], "{{ruby}}"
|
65
|
+
|
66
|
+
ok_wi [:p, ["hello"]],
|
67
|
+
"{{ruby
|
68
|
+
\"hello\"
|
69
|
+
}}"
|
70
|
+
|
71
|
+
ok_wi [:p, ["2"]],
|
72
|
+
"{{ruby
|
73
|
+
1 + 1
|
74
|
+
}}"
|
75
|
+
|
76
|
+
ok_wi [:p, ["11"]],
|
77
|
+
"{{ruby(1, 1)
|
78
|
+
argv[0] + argv[1]
|
79
|
+
}}"
|
80
|
+
|
81
|
+
ok_wi [:p, ["2"]],
|
82
|
+
"{{ruby(1, 1)
|
83
|
+
argv[0].to_i + argv[1].to_i
|
84
|
+
}}"
|
85
|
+
|
86
|
+
ok_wi [:p,
|
87
|
+
[[:pre,
|
88
|
+
"\nSun Mon Tue Wed Thu Fri Sat\n 1 2 3 4 \n 5 6 7 8 9 10 11 \n 12 13 14 15 16 17 18 \n 19 20 21 22 23 24 25 \n 26 27 28 29 30 31 \n"],
|
89
|
+
"\n"]],
|
90
|
+
'{{ruby(2007, 8)
|
91
|
+
year = argv[0].to_i
|
92
|
+
month = argv[1].to_i
|
93
|
+
|
94
|
+
str = ""
|
95
|
+
str << "<pre>\n"
|
96
|
+
str << Date::ABBR_DAYNAMES.join(" ")
|
97
|
+
str << "\n"
|
98
|
+
|
99
|
+
day = Date.new(year, month)
|
100
|
+
|
101
|
+
str << (" " * day.wday)
|
102
|
+
loop do
|
103
|
+
str << day.strftime(" %e ")
|
104
|
+
str << "\n" if day.wday == 6
|
105
|
+
day += 1
|
106
|
+
break if day.month != month
|
107
|
+
end
|
108
|
+
str << "\n"
|
109
|
+
str << "</pre>\n"
|
110
|
+
|
111
|
+
str
|
112
|
+
}}'
|
113
|
+
|
114
|
+
end
|
115
|
+
end
|
116
|
+
end
|
@@ -0,0 +1,170 @@
|
|
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
|
+
#
|
6
|
+
# This is a sample plugin for qwikWeb.
|
7
|
+
# If you'd like to check the details of qwikWeb plugin, please see URL below.
|
8
|
+
# http://qwik.jp/HowToMakePlugin.html
|
9
|
+
#
|
10
|
+
|
11
|
+
$LOAD_PATH.unshift '..' unless $LOAD_PATH.include? '..'
|
12
|
+
|
13
|
+
module Qwik
|
14
|
+
class Action
|
15
|
+
D_PluginSample = {
|
16
|
+
:dt => 'Sample plugins',
|
17
|
+
:dd => 'These are sample plugins.',
|
18
|
+
:dc => "* Example
|
19
|
+
You can show famous \"hello, world!\" string by this plugin.
|
20
|
+
|
21
|
+
As you know, this \"hello world\" plugin is an example to describe
|
22
|
+
how you can create your own plugin.
|
23
|
+
|
24
|
+
Please check this URL for detail.
|
25
|
+
http://qwik.jp/HowToMakePlugin.html
|
26
|
+
|
27
|
+
** hello world plugin
|
28
|
+
{{hello}}
|
29
|
+
{{hello}}
|
30
|
+
{{hello(\"qwik users\")}}
|
31
|
+
{{hello(\"qwik users\")}}
|
32
|
+
You can specify the target in the argument.
|
33
|
+
** hello world action
|
34
|
+
[[.hello]]
|
35
|
+
[[.hello]]
|
36
|
+
You can see a page with 'hello world' message.
|
37
|
+
** Monospace plugin
|
38
|
+
{{tt(\"This is a test.\")}}
|
39
|
+
{{tt(\"This is a test.\")}}
|
40
|
+
You can make the string as monotype font face.
|
41
|
+
|
42
|
+
** Quote plugin
|
43
|
+
{{quote
|
44
|
+
This is a text to quote.
|
45
|
+
}}
|
46
|
+
{{quote
|
47
|
+
This is a text to quote.
|
48
|
+
}}
|
49
|
+
You can make block quote of the string.
|
50
|
+
"
|
51
|
+
}
|
52
|
+
|
53
|
+
D_PluginSample_ja = {
|
54
|
+
:dt => 'サンプル・プラグイン',
|
55
|
+
:dd => 'プラグインのサンプルです。',
|
56
|
+
:dc => '
|
57
|
+
qwikWebのプラグインを自分で作ってみる際の参考となるプラグインを提供し
|
58
|
+
ています。このプラグインを改造して、自由に自分なりのプラグインを作って
|
59
|
+
みてください。
|
60
|
+
|
61
|
+
詳しくは、こちらのURLをごらんください。
|
62
|
+
http://qwik.jp/HowToMakePlugin.html
|
63
|
+
* 例
|
64
|
+
** ハローワールド・プラグイン
|
65
|
+
{{hello}}
|
66
|
+
{{hello}}
|
67
|
+
有名な「hello, world!」を画面に表示させることができます。
|
68
|
+
{{hello(\"qwik users\")}}
|
69
|
+
{{hello(\"qwik users\")}}
|
70
|
+
引数をとることもできます。
|
71
|
+
** ハローワールド・アクション
|
72
|
+
[[.hello]]
|
73
|
+
[[.hello]]
|
74
|
+
「hello, world!」と表示されます。
|
75
|
+
** 等幅プラグイン
|
76
|
+
{{tt(\"This is a test.\")}}
|
77
|
+
{{tt(\"This is a test.\")}}
|
78
|
+
等幅を指定します。
|
79
|
+
** 引用プラグイン
|
80
|
+
{{quote
|
81
|
+
This is a text to quote.
|
82
|
+
}}
|
83
|
+
{{quote
|
84
|
+
This is a text to quote.
|
85
|
+
}}
|
86
|
+
引用できます。
|
87
|
+
'
|
88
|
+
}
|
89
|
+
|
90
|
+
def plg_hello(target='world')
|
91
|
+
return [:strong, "hello, #{target}!"]
|
92
|
+
end
|
93
|
+
|
94
|
+
def plg_bhello
|
95
|
+
content = yield
|
96
|
+
content = content.map {|line|
|
97
|
+
"hello, #{line.chomp}!\n"
|
98
|
+
}.join
|
99
|
+
return [:pre, content]
|
100
|
+
end
|
101
|
+
|
102
|
+
def act_hello
|
103
|
+
c_notice('hello, world!') {
|
104
|
+
'hi, there.'
|
105
|
+
}
|
106
|
+
end
|
107
|
+
|
108
|
+
def plg_tt(text)
|
109
|
+
return [:tt, text]
|
110
|
+
end
|
111
|
+
|
112
|
+
def plg_quote
|
113
|
+
text = ''
|
114
|
+
text = yield if block_given?
|
115
|
+
ar = []
|
116
|
+
text.each {|line|
|
117
|
+
ar << line
|
118
|
+
ar << [:br]
|
119
|
+
}
|
120
|
+
bq = [:blockquote, [:p, {:style=>'font-size:smaller;'}, *ar]]
|
121
|
+
return bq
|
122
|
+
end
|
123
|
+
end
|
124
|
+
end
|
125
|
+
|
126
|
+
if $0 == __FILE__
|
127
|
+
require 'qwik/test-common'
|
128
|
+
$test = true
|
129
|
+
end
|
130
|
+
|
131
|
+
if defined?($test) && $test
|
132
|
+
class TestActSample < Test::Unit::TestCase
|
133
|
+
include TestSession
|
134
|
+
|
135
|
+
def test_plg_hello
|
136
|
+
ok_wi([:strong, 'hello, world!'], '{{hello}}')
|
137
|
+
ok_wi([:strong, 'hello, qwik!'], '{{hello(qwik)}}')
|
138
|
+
ok_wi [:pre, "hello, s!\nhello, t!\n"], '{{bhello
|
139
|
+
s
|
140
|
+
t
|
141
|
+
}}'
|
142
|
+
end
|
143
|
+
|
144
|
+
def test_act_hello
|
145
|
+
t_add_user
|
146
|
+
res = session('/test/.hello')
|
147
|
+
ok_title 'hello, world!'
|
148
|
+
ok_in(['hi, there.'], '//div[@class="section"]')
|
149
|
+
end
|
150
|
+
|
151
|
+
def test_plg_tt
|
152
|
+
ok_wi([:tt, 't'], '{{tt(t)}}')
|
153
|
+
end
|
154
|
+
|
155
|
+
def test_plg_quote
|
156
|
+
ok_wi([:blockquote, [:p, {:style=>'font-size:smaller;'}]],
|
157
|
+
'{{quote}}')
|
158
|
+
ok_wi([:blockquote, [:p, {:style=>'font-size:smaller;'}]],
|
159
|
+
"{{quote\n\n}}")
|
160
|
+
ok_wi([:blockquote, [:p, {:style=>'font-size:smaller;'}, "t\n", [:br]]],
|
161
|
+
"{{quote\nt\n}}")
|
162
|
+
ok_wi([:blockquote, [:p, {:style=>'font-size:smaller;'}, "t\n", [:br]]],
|
163
|
+
"{{quote\n\nt\n}}")
|
164
|
+
ok_wi([:blockquote, [:p, {:style=>'font-size:smaller;'},
|
165
|
+
"t1\n", [:br],
|
166
|
+
"t2\n", [:br]]],
|
167
|
+
"{{quote\nt1\nt2\n}}")
|
168
|
+
end
|
169
|
+
end
|
170
|
+
end
|