qwik2md 0.1.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/lib/qwik2md/version.rb +1 -1
  3. data/lib/qwik2md.rb +15 -0
  4. data/vendor/qwik/lib/qwik/act-archive.rb +1 -1
  5. data/vendor/qwik/lib/qwik/act-backup.rb +1 -1
  6. data/vendor/qwik/lib/qwik/act-basic.rb +0 -1
  7. data/vendor/qwik/lib/qwik/act-christel.rb +0 -1
  8. data/vendor/qwik/lib/qwik/act-code.rb +1 -1
  9. data/vendor/qwik/lib/qwik/act-comment.rb +1 -1
  10. data/vendor/qwik/lib/qwik/act-edit.rb +1 -1
  11. data/vendor/qwik/lib/qwik/act-files.rb +0 -1
  12. data/vendor/qwik/lib/qwik/act-getpass.rb +1 -1
  13. data/vendor/qwik/lib/qwik/act-keywords.rb +3 -3
  14. data/vendor/qwik/lib/qwik/act-login.rb +0 -1
  15. data/vendor/qwik/lib/qwik/act-mdlb.rb +1 -1
  16. data/vendor/qwik/lib/qwik/act-member.rb +1 -1
  17. data/vendor/qwik/lib/qwik/act-new.rb +1 -1
  18. data/vendor/qwik/lib/qwik/act-plan.rb +1 -1
  19. data/vendor/qwik/lib/qwik/act-povray.rb +1 -1
  20. data/vendor/qwik/lib/qwik/act-presen.rb +1 -1
  21. data/vendor/qwik/lib/qwik/act-ring.rb +2 -4
  22. data/vendor/qwik/lib/qwik/act-sitebackup.rb +1 -1
  23. data/vendor/qwik/lib/qwik/act-textarea.rb +1 -1
  24. data/vendor/qwik/lib/qwik/act-wema.rb +1 -1
  25. data/vendor/qwik/lib/qwik/act-wysiwyg.rb +1 -1
  26. data/vendor/qwik/lib/qwik/bench-format-xml.rb +1 -1
  27. data/vendor/qwik/lib/qwik/catalog-ja.rb +1 -1
  28. data/vendor/qwik/lib/qwik/catalog-ml-ja.rb +1 -1
  29. data/vendor/qwik/lib/qwik/description.rb +0 -1
  30. data/vendor/qwik/lib/qwik/farm.rb +1 -1
  31. data/vendor/qwik/lib/qwik/mail-body.rb +0 -1
  32. data/vendor/qwik/lib/qwik/mail-header.rb +4 -5
  33. data/vendor/qwik/lib/qwik/ml-processor.rb +1 -1
  34. data/vendor/qwik/lib/qwik/page-get.rb +1 -1
  35. data/vendor/qwik/lib/qwik/test-ms-japanese.rb +1 -1
  36. data/vendor/qwik/lib/qwik/test-ms-plan.rb +1 -1
  37. data/vendor/qwik/lib/qwik/test-submit-japanese.rb +1 -1
  38. data/vendor/qwik/lib/qwik/util-time.rb +0 -2
  39. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8669efca72740eede48e0438e05563fa10232a1c
4
- data.tar.gz: 5a1fdeae4caae6e519065901bef7ab0ef90720b6
3
+ metadata.gz: 3106526347f3ea2c05225be6df24e05292b86169
4
+ data.tar.gz: 4575f2c43c033351f79d3ac1f07e7cc0df7e3e6c
5
5
  SHA512:
6
- metadata.gz: a765293cff62986d46f51183f1b15f70ef7c098621e29bb27309e31e39e2682beb61d80a7dfa7ee8f031896e7c69b5669395ef25b4e508d1ba5cac3217884666
7
- data.tar.gz: 7092d20f821d1c579aae86ea852a09d84f3c37ee2ebfba4a58cd80368715b3c22d42834f36ebec1b443e0bccf7a6e983c65d9c7195196faa6631b3775b6ffa1e
6
+ metadata.gz: 96e6b6f0987accd4dbf92be60fc2375b101ad92e850958a7636d5e99e7fe40b317da34db066f4bccbee7b1288ae5b9974c7c78e6a751d2e4effb0ce16566c442
7
+ data.tar.gz: ea52c9a2cad57459dcd208f6969ae1d7cfb88d608303db7fd964c2a22d1e9b1954cb22e453a425b0cf9067cdaf38da0145abf798fa8bba4a795377f94d2f72f2
@@ -1,3 +1,3 @@
1
1
  module Qwik2md
2
- VERSION = "0.1.0"
2
+ VERSION = "1.0.0"
3
3
  end
data/lib/qwik2md.rb CHANGED
@@ -4,6 +4,12 @@ require "qwik/tokenizer"
4
4
  require "qwik/parser"
5
5
  require 'qwik/wabisabi-format-xml'
6
6
  require 'reverse_markdown'
7
+ require 'qwik/action'
8
+ require 'qwik/loadlib'
9
+
10
+ require 'ostruct'
11
+
12
+ Qwik::LoadLibrary.load_libs_here('qwik/act-*')
7
13
 
8
14
  module Qwik2md
9
15
  class << self
@@ -33,6 +39,15 @@ module Qwik2md
33
39
 
34
40
  tokens = Qwik::TextTokenizer.tokenize(str)
35
41
  tree = Qwik::TextParser.make_tree(tokens)
42
+ action = Qwik::Action.new
43
+ action.init(OpenStruct.new(test: true), nil, nil, nil)
44
+ action.instance_eval do
45
+ @site = Object.new
46
+ def @site.resolve_all_ref(tree)
47
+ tree
48
+ end
49
+ end
50
+ tree = action.resolve_all_plugin(tree)
36
51
  tree.format_xml
37
52
  end
38
53
  end
@@ -1,4 +1,4 @@
1
- # -*- coding: shift_jis -*-
1
+
2
2
  # Copyright (C) 2003-2006 Kouichirou Eto, All rights reserved.
3
3
  # This is free software with ABSOLUTELY NO WARRANTY.
4
4
  # You can redistribute it and/or modify it under the terms of the GNU GPL 2.
@@ -1,4 +1,4 @@
1
- # -*- coding: shift_jis -*-
1
+
2
2
  # Copyright (C) 2003-2006 Kouichirou Eto, All rights reserved.
3
3
  # This is free software with ABSOLUTELY NO WARRANTY.
4
4
  # You can redistribute it and/or modify it under the terms of the GNU GPL 2.
@@ -1,4 +1,3 @@
1
- # -*- coding: shift_jis -*-
2
1
  # Copyright (C) 2003-2006 Kouichirou Eto, All rights reserved.
3
2
  # This is free software with ABSOLUTELY NO WARRANTY.
4
3
  # You can redistribute it and/or modify it under the terms of the GNU GPL 2.
@@ -1,4 +1,3 @@
1
- # -*- coding: cp932 -*-
2
1
  # Copyright (C) 2003-2006 Kouichirou Eto, All rights reserved.
3
2
  # This is free software with ABSOLUTELY NO WARRANTY.
4
3
  # You can redistribute it and/or modify it under the terms of the GNU GPL 2.
@@ -1,4 +1,4 @@
1
- # -*- coding: shift_jis -*-
1
+
2
2
  # Copyright (C) 2003-2006 Kouichirou Eto, All rights reserved.
3
3
  # This is free software with ABSOLUTELY NO WARRANTY.
4
4
  # You can redistribute it and/or modify it under the terms of the GNU GPL 2.
@@ -1,4 +1,4 @@
1
- # -*- coding: shift_jis -*-
1
+
2
2
  # Copyright (C) 2003-2006 Kouichirou Eto, All rights reserved.
3
3
  # This is free software with ABSOLUTELY NO WARRANTY.
4
4
  # You can redistribute it and/or modify it under the terms of the GNU GPL 2.
@@ -307,7 +307,7 @@ if defined?($test) && $test
307
307
  ok_xp [:input, {:value=>'98bf7d8c15784f0a3d63204441e1e2aa',
308
308
  :type=>'hidden', :name=>'md5hex'}], '//input'
309
309
  ok_xp [:input, {:value=>'Save', :type=>'submit', :class=>'submit',
310
- :class=>'submit', :name=>'save'}], '//input[2]'
310
+ :name=>'save'}], '//input[2]'
311
311
  # ok_xp [:a, {:href=>'_SiteMenu.html'}, 'SiteMenu'],
312
312
  # '//div[@class='sidebar']//a'
313
313
  # ok_xp [:a, {:href=>'1.presen'}, 'Presentation mode'],
@@ -1,4 +1,3 @@
1
- # -*- coding: shift_jis -*-
2
1
  # Copyright (C) 2003-2006 Kouichirou Eto, All rights reserved.
3
2
  # This is free software with ABSOLUTELY NO WARRANTY.
4
3
  # You can redistribute it and/or modify it under the terms of the GNU GPL 2.
@@ -1,4 +1,4 @@
1
- # -*- coding: shift_jis -*-
1
+
2
2
  # Copyright (C) 2003-2006 Kouichirou Eto, All rights reserved.
3
3
  # This is free software with ABSOLUTELY NO WARRANTY.
4
4
  # You can redistribute it and/or modify it under the terms of the GNU GPL 2.
@@ -88,9 +88,9 @@ TextFormatページの一覧が表示されます。
88
88
  feature = n.getFeature.set_euc.to_sjis
89
89
  if ! surface.empty? &&
90
90
  RE_SJIS =~ surface &&
91
- /\A([ぁ-んー~]+)\z/s !~ surface &&
92
- /\A[.-→、。]/s !~ surface &&
93
- /\A[,←]/s !~ surface
91
+ /\A([ぁ-んー~]+)\z/ !~ surface &&
92
+ /\A[.→、。]/ !~ surface &&
93
+ /\A[,←]/ !~ surface
94
94
  # /\A[ 0-9→「」()、。]/s !~ surface
95
95
  nodes << [surface, feature]
96
96
  end
@@ -1,4 +1,3 @@
1
- # -*- coding: shift_jis -*-
2
1
  # Copyright (C) 2003-2006 Kouichirou Eto, All rights reserved.
3
2
  # This is free software with ABSOLUTELY NO WARRANTY.
4
3
  # You can redistribute it and/or modify it under the terms of the GNU GPL 2.
@@ -1,4 +1,4 @@
1
- # -*- coding: shift_jis -*-
1
+
2
2
  # Copyright (C) 2003-2006 Kouichirou Eto, All rights reserved.
3
3
  # This is free software with ABSOLUTELY NO WARRANTY.
4
4
  # You can redistribute it and/or modify it under the terms of the GNU GPL 2.
@@ -1,4 +1,4 @@
1
- # -*- coding: shift_jis -*-
1
+
2
2
  # Copyright (C) 2003-2006 Kouichirou Eto, All rights reserved.
3
3
  # This is free software with ABSOLUTELY NO WARRANTY.
4
4
  # You can redistribute it and/or modify it under the terms of the GNU GPL 2.
@@ -1,4 +1,4 @@
1
- # -*- coding: shift_jis -*-
1
+
2
2
  # Copyright (C) 2003-2006 Kouichirou Eto, All rights reserved.
3
3
  # This is free software with ABSOLUTELY NO WARRANTY.
4
4
  # You can redistribute it and/or modify it under the terms of the GNU GPL 2.
@@ -1,4 +1,4 @@
1
- # -*- coding: shift_jis -*-
1
+
2
2
  # Copyright (C) 2003-2006 Kouichirou Eto, All rights reserved.
3
3
  # This is free software with ABSOLUTELY NO WARRANTY.
4
4
  # You can redistribute it and/or modify it under the terms of the GNU GPL 2.
@@ -1,4 +1,4 @@
1
- # -*- coding: shift_jis -*-
1
+
2
2
  # Copyright (C) 2003-2006 Kouichirou Eto, All rights reserved.
3
3
  # This is free software with ABSOLUTELY NO WARRANTY.
4
4
  # You can redistribute it and/or modify it under the terms of the GNU GPL 2.
@@ -1,4 +1,4 @@
1
- # -*- coding: shift_jis -*-
1
+
2
2
  # Copyright (C) 2003-2006 Kouichirou Eto, All rights reserved.
3
3
  # This is free software with ABSOLUTELY NO WARRANTY.
4
4
  # You can redistribute it and/or modify it under the terms of the GNU GPL 2.
@@ -6,8 +6,6 @@
6
6
 
7
7
  $LOAD_PATH.unshift '..' unless $LOAD_PATH.include? '..'
8
8
 
9
- $KCODE = 's'
10
-
11
9
  module Qwik
12
10
  class Action
13
11
  NotUse_D_ExtRing = {
@@ -156,7 +154,7 @@ module Qwik
156
154
  return ring_invite_goback(href)
157
155
  end
158
156
 
159
- if guest_mails.to_s == 'guest@example.com'
157
+ if guest_mails.to_s == 'guest@example.com'
160
158
  return ring_invite_goback(href)
161
159
  end
162
160
 
@@ -618,7 +616,7 @@ http://ring.sfc.keio.ac.jp/.getpass?mail=#{guest_mail}
618
616
  if userpage.nil?
619
617
  return span << user
620
618
  end
621
-
619
+
622
620
  return span << [:a, {:href=>"#{userpage}.html"}, user]
623
621
  end
624
622
 
@@ -1,4 +1,4 @@
1
- # -*- coding: shift_jis -*-
1
+
2
2
  # Copyright (C) 2008 National Institute of
3
3
  # Advanced Industrial Science and Technology (AIST)
4
4
  # All rights reserved.
@@ -1,4 +1,4 @@
1
- # -*- coding: shift_jis -*-
1
+
2
2
  # Copyright (C) 2003-2006 Kouichirou Eto, All rights reserved.
3
3
  # This is free software with ABSOLUTELY NO WARRANTY.
4
4
  # You can redistribute it and/or modify it under the terms of the GNU GPL 2.
@@ -1,4 +1,4 @@
1
- # -*- coding: shift_jis -*-
1
+
2
2
  # Copyright (C) 2003-2006 Kouichirou Eto, All rights reserved.
3
3
  # This is free software with ABSOLUTELY NO WARRANTY.
4
4
  # You can redistribute it and/or modify it under the terms of the GNU GPL 2.
@@ -1,4 +1,4 @@
1
- # -*- coding: shift_jis -*-
1
+
2
2
  # Copyright (C) 2003-2006 Kouichirou Eto, All rights reserved.
3
3
  # This is free software with ABSOLUTELY NO WARRANTY.
4
4
  # You can redistribute it and/or modify it under the terms of the GNU GPL 2.
@@ -1,4 +1,4 @@
1
- # -*- coding: shift_jis -*-
1
+
2
2
  # Copyright (C) 2003-2006 Kouichirou Eto, All rights reserved.
3
3
  # This is free software with ABSOLUTELY NO WARRANTY.
4
4
  # You can redistribute it and/or modify it under the terms of the GNU GPL 2.
@@ -1,4 +1,4 @@
1
- # -*- coding: shift_jis -*-
1
+
2
2
  # Copyright (C) 2003-2006 Kouichirou Eto, All rights reserved.
3
3
  # This is free software with ABSOLUTELY NO WARRANTY.
4
4
  # You can redistribute it and/or modify it under the terms of the GNU GPL 2.
@@ -1,4 +1,4 @@
1
- # -*- coding: shift_jis -*-
1
+
2
2
  # Copyright (C) 2003-2006 Kouichirou Eto, All rights reserved.
3
3
  # This is free software with ABSOLUTELY NO WARRANTY.
4
4
  # You can redistribute it and/or modify it under the terms of the GNU GPL 2.
@@ -1,4 +1,3 @@
1
- # -*- coding: shift_jis -*-
2
1
  # Copyright (C) 2003-2006 Kouichirou Eto, All rights reserved.
3
2
  # This is free software with ABSOLUTELY NO WARRANTY.
4
3
  # You can redistribute it and/or modify it under the terms of the GNU GPL 2.
@@ -1,4 +1,4 @@
1
- # -*- coding: shift_jis -*-
1
+
2
2
  # Copyright (C) 2003-2006 Kouichirou Eto, All rights reserved.
3
3
  # This is free software with ABSOLUTELY NO WARRANTY.
4
4
  # You can redistribute it and/or modify it under the terms of the GNU GPL 2.
@@ -1,4 +1,3 @@
1
- # -*- coding: shift_jis -*-
2
1
  #
3
2
  # Copyright (C) 2002-2004 Satoru Takabayashi <satoru@namazu.org>
4
3
  # Copyright (C) 2003-2006 Kouichirou Eto
@@ -1,11 +1,10 @@
1
- # -*- coding: shift_jis -*-
2
1
  #
3
- # Copyright (C) 2002-2004 Satoru Takabayashi <satoru@namazu.org>
2
+ # Copyright (C) 2002-2004 Satoru Takabayashi <satoru@namazu.org>
4
3
  # Copyright (C) 2003-2006 Kouichirou Eto
5
4
  # All rights reserved.
6
5
  # This is free software with ABSOLUTELY NO WARRANTY.
7
6
  #
8
- # You can redistribute it and/or modify it under the terms of
7
+ # You can redistribute it and/or modify it under the terms of
9
8
  # the GNU General Public License version 2.
10
9
  #
11
10
 
@@ -101,7 +100,7 @@ module QuickML
101
100
 
102
101
  # ==================== Class methods.
103
102
  def self.collect_address (field)
104
- address_regex =
103
+ address_regex =
105
104
  /(("?)[-0-9a-zA-Z_.+?\/]+\2@[-0-9a-zA-Z]+\.[-0-9a-zA-Z.]+)/ #/
106
105
  addresses = []
107
106
  parts = Mail.remove_comment_in_field(field).split(',')
@@ -355,7 +354,7 @@ if defined?($test) && $test
355
354
  # test_add_recipient
356
355
  mail.add_recipient('b@e.com')
357
356
  ok_eq(false, mail.valid?)
358
-
357
+
359
358
  # test_clear_recipients
360
359
  mail.clear_recipients
361
360
 
@@ -1,4 +1,4 @@
1
- # -*- coding: shift_jis -*-
1
+
2
2
  #
3
3
  # Copyright (C) 2002-2004 Satoru Takabayashi <satoru@namazu.org>
4
4
  # Copyright (C) 2003-2006 Kouichirou Eto
@@ -1,4 +1,4 @@
1
- # -*- coding: shift_jis -*-
1
+
2
2
  # Copyright (C) 2003-2006 Kouichirou Eto, All rights reserved.
3
3
  # This is free software with ABSOLUTELY NO WARRANTY.
4
4
  # You can redistribute it and/or modify it under the terms of the GNU GPL 2.
@@ -1,4 +1,4 @@
1
- # -*- coding: shift_jis -*-
1
+
2
2
  # Copyright (C) 2003-2006 Kouichirou Eto, All rights reserved.
3
3
  # This is free software with ABSOLUTELY NO WARRANTY.
4
4
  # You can redistribute it and/or modify it under the terms of the GNU GPL 2.
@@ -1,4 +1,4 @@
1
- # -*- coding: shift_jis -*-
1
+
2
2
  # Copyright (C) 2003-2006 Kouichirou Eto, All rights reserved.
3
3
  # This is free software with ABSOLUTELY NO WARRANTY.
4
4
  # You can redistribute it and/or modify it under the terms of the GNU GPL 2.
@@ -1,4 +1,4 @@
1
- # -*- coding: shift_jis -*-
1
+
2
2
  # Copyright (C) 2003-2006 Kouichirou Eto, All rights reserved.
3
3
  # This is free software with ABSOLUTELY NO WARRANTY.
4
4
  # You can redistribute it and/or modify it under the terms of the GNU GPL 2.
@@ -2,8 +2,6 @@
2
2
  # This is free software with ABSOLUTELY NO WARRANTY.
3
3
  # You can redistribute it and/or modify it under the terms of the GNU GPL 2.
4
4
 
5
- require 'parsedate'
6
-
7
5
  class Time
8
6
  def md
9
7
  return strftime('%m-%d') # 01-01
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qwik2md
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fumiaki MATSUSHIMA