w3mrefe 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/COPYING +23 -0
- data/ChangeLog +3 -0
- data/README.ja +73 -0
- data/bin/CVS/Entries +2 -0
- data/bin/CVS/Repository +1 -0
- data/bin/CVS/Root +1 -0
- data/bin/CVS/Tag +1 -0
- data/bin/w3mrefe +24 -0
- data/cgi-bin/CVS/Entries +2 -0
- data/cgi-bin/CVS/Repository +1 -0
- data/cgi-bin/CVS/Root +1 -0
- data/cgi-bin/CVS/Tag +1 -0
- data/cgi-bin/w3mrefe2html.cgi +67 -0
- data/post-install.rb +6 -0
- metadata +56 -0
data/COPYING
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
Copyright (c)2003 TANAKA Shin-ya,
|
2
|
+
All rights reserved.
|
3
|
+
|
4
|
+
Redistribution and use in source and binary forms, with or without
|
5
|
+
modification, are permitted provided that the following conditions
|
6
|
+
are met:
|
7
|
+
1. Redistributions of source code must retain the above copyright
|
8
|
+
notice, this list of conditions and the following disclaimer.
|
9
|
+
2. Redistributions in binary form must reproduce the above copyright
|
10
|
+
notice, this list of conditions and the following disclaimer in the
|
11
|
+
documentation and/or other materials provided with the distribution.
|
12
|
+
|
13
|
+
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
14
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
15
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
16
|
+
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
17
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
18
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
19
|
+
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
20
|
+
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
21
|
+
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
22
|
+
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
23
|
+
SUCH DAMAGE.
|
data/ChangeLog
ADDED
data/README.ja
ADDED
@@ -0,0 +1,73 @@
|
|
1
|
+
w3mrefe�Ȥ�
|
2
|
+
===========
|
3
|
+
|
4
|
+
w3mrefe�ϡ�w3m�Υ�������CGI��Ȥä�ReFe������ġ���Ǥ���
|
5
|
+
w3mman(w3m��ɸ��ź��)��ReFe�ǤȻפäƤ���������С��ְܴۤ㤤
|
6
|
+
�ʤ��Ǥ���
|
7
|
+
���ޤ�ReFe�ν��Ϥ�less��ͳ���ɤ�Ǥ�������w3mrefe��Ȥ����Ȥ�
|
8
|
+
�ѥ��פȤ����ݤʤ��Ȥ�ͤ����˥ڡ������ͳ���ɤळ�Ȥ��Ǥ��ޤ���
|
9
|
+
|
10
|
+
ɬ�פʤ��
|
11
|
+
----------
|
12
|
+
|
13
|
+
w3mrefe����Ѥ���ˤϡ��ʲ��Υ��եȥ�������ɬ�פǤ���
|
14
|
+
|
15
|
+
- ruby-1.8�ʾ�
|
16
|
+
- w3m-0.5.1�ʾ�
|
17
|
+
- ReFe 0.8.0�ʾ�
|
18
|
+
|
19
|
+
* ReFe��Gems�Ǥ�Ȥ��������Ǥ���
|
20
|
+
(root��gems install refe��¹Ԥ���ȥ��ȡ���Ǥ��ޤ���)
|
21
|
+
|
22
|
+
���ȡ���
|
23
|
+
------------
|
24
|
+
|
25
|
+
���ޥ�ɥ饤��Ǽ��Τ褦���ǤäƤ���������
|
26
|
+
|
27
|
+
# gem install w3mrefe
|
28
|
+
# cd /path/to/gems/w3mrefe-x.y.z
|
29
|
+
|
30
|
+
������/path/to/gems�ˤ�gems���Ǽ����ǥ��쥯�ȥ����ꤷ�ޤ���
|
31
|
+
(�ͤδĶ��Ǥ�/usr/pkg/lib/ruby/gems/1.8/gems)
|
32
|
+
�ޤ�x.y.z�ˤ�w3mrefe�ΥС���������ꤷ�ޤ���
|
33
|
+
|
34
|
+
# ruby post-install.rb
|
35
|
+
|
36
|
+
����Ū�ʻȤ���
|
37
|
+
--------------
|
38
|
+
|
39
|
+
�ʲ��Τ褦�����Ϥ���ȼ�Ͽ����Ƥ��륯�饹������ɽ������ޤ���
|
40
|
+
|
41
|
+
$ w3mrefe
|
42
|
+
|
43
|
+
���ˡ���ե���ޥ˥奢��Υ���ȥ��ɽ������ˤϡ�
|
44
|
+
|
45
|
+
$ w3mrefe ��å�̾
|
46
|
+
$ w3mrefe ���饹̾
|
47
|
+
$ w3mrefe ���饹̾ ��å�̾
|
48
|
+
|
49
|
+
�褦�ϡ�refe���ޥ�ɤ�����w3mrefe���ޥ�ɤ�Ȥ��Ȥ������ȤǤ���
|
50
|
+
������å����ϡ�Ŭ���˥���֤������Ƥ���ޤ���
|
51
|
+
|
52
|
+
�������������ʵ�
|
53
|
+
----------------
|
54
|
+
|
55
|
+
�ʲ��Τ褦��shell�Υ����ꥢ������Ͽ���Ƥ����������Ǥ���
|
56
|
+
|
57
|
+
(sh��)
|
58
|
+
alias refe=w3mrefe
|
59
|
+
(csh��
|
60
|
+
alias refe w3mrefe
|
61
|
+
|
62
|
+
�饤����
|
63
|
+
----------
|
64
|
+
|
65
|
+
2-clause BSD�饤���Ǥ����ܺ٤ϥե�����COPYING�Ȥ��Ƥ���������
|
66
|
+
|
67
|
+
�ۡ���ڡ���
|
68
|
+
------------
|
69
|
+
|
70
|
+
http://rubyforge.org/projects/refe/
|
71
|
+
|
72
|
+
TANAKA Shin-ya (zstanaka@archer.livedoor.com)
|
73
|
+
http://d.hatena.ne.jp/ha-tan/
|
data/bin/CVS/Entries
ADDED
data/bin/CVS/Repository
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
w3mrefe/bin
|
data/bin/CVS/Root
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
:ext:s-tanaka@rubyforge.org:/var/cvs/refe
|
data/bin/CVS/Tag
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
NREL_1_0_0
|
data/bin/w3mrefe
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# -*- ruby -*-
|
3
|
+
# $Id: w3mrefe,v 1.1.1.1 2005/11/28 15:09:05 s-tanaka Exp $
|
4
|
+
|
5
|
+
require 'cgi'
|
6
|
+
|
7
|
+
module Gem
|
8
|
+
def Gem.full_gem_path(name)
|
9
|
+
return nil unless @loaded_specs
|
10
|
+
spec = @loaded_specs[name]
|
11
|
+
raise "not found gem: #{name}" unless spec
|
12
|
+
spec.full_gem_path
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
refe_args = CGI::escape(ARGV.join(' '))
|
17
|
+
full_gem_path = Gem.full_gem_path('w3mrefe')
|
18
|
+
if full_gem_path
|
19
|
+
uri = "file:///cgi-bin/w3mrefe2html.cgi?query=" + refe_args
|
20
|
+
exec 'w3m', '-o', "cgi_bin=#{full_gem_path}/cgi-bin", uri
|
21
|
+
else
|
22
|
+
uri = "file:///\$LIB/w3mrefe2html.cgi?mode=lib&query=" + refe_args
|
23
|
+
exec 'w3m', uri
|
24
|
+
end
|
data/cgi-bin/CVS/Entries
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
w3mrefe/cgi-bin
|
data/cgi-bin/CVS/Root
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
:ext:s-tanaka@rubyforge.org:/var/cvs/refe
|
data/cgi-bin/CVS/Tag
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
NREL_1_0_0
|
@@ -0,0 +1,67 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# -*- ruby -*-
|
3
|
+
# $Id: w3mrefe2html.cgi,v 1.1.1.1 2005/11/28 15:09:05 s-tanaka Exp $
|
4
|
+
|
5
|
+
require 'cgi'
|
6
|
+
|
7
|
+
def run_with_rpipe(*args)
|
8
|
+
io = IO.popen('-', 'r')
|
9
|
+
if io.nil?
|
10
|
+
exec(*args)
|
11
|
+
end
|
12
|
+
io
|
13
|
+
end
|
14
|
+
|
15
|
+
def convert_refe_output(input, mode)
|
16
|
+
uri_base = if mode == 'lib'
|
17
|
+
"file:///\$LIB/w3mrefe2html.cgi?mode=lib&query="
|
18
|
+
else
|
19
|
+
"file:///cgi-bin/w3mrefe2html.cgi?&query="
|
20
|
+
end
|
21
|
+
|
22
|
+
result = ''
|
23
|
+
classname = nil
|
24
|
+
first_f = true
|
25
|
+
link_f = false
|
26
|
+
sep_f = false
|
27
|
+
|
28
|
+
while line = input.gets
|
29
|
+
sep_f = false
|
30
|
+
if first_f
|
31
|
+
tokens = line.split(/\s+/)
|
32
|
+
if tokens.size > 1 and tokens[1] != '<'
|
33
|
+
link_f = true
|
34
|
+
end
|
35
|
+
first_f = false
|
36
|
+
end
|
37
|
+
|
38
|
+
case line
|
39
|
+
when /^====\s+(.+)\s+====$/
|
40
|
+
link_f = false
|
41
|
+
sep_f = true
|
42
|
+
classname = $1
|
43
|
+
when /^----\s+(.+)\s+----$/
|
44
|
+
link_f = true
|
45
|
+
sep_f = true
|
46
|
+
end
|
47
|
+
|
48
|
+
line = CGI::escapeHTML(line)
|
49
|
+
if not sep_f and link_f
|
50
|
+
line.gsub!(/[^\s]+/) do |matched|
|
51
|
+
refe_args = CGI::escape(classname ? "#{classname} #{matched}" : matched)
|
52
|
+
"<a href=#{uri_base}#{refe_args}>#{matched}</a>"
|
53
|
+
end
|
54
|
+
end
|
55
|
+
result << line
|
56
|
+
end
|
57
|
+
result
|
58
|
+
end
|
59
|
+
|
60
|
+
mode = CGI.new['mode']
|
61
|
+
query = CGI.new['query'].split
|
62
|
+
result = convert_refe_output(run_with_rpipe('refe', *query), mode)
|
63
|
+
|
64
|
+
puts 'Content-Type: text/html'
|
65
|
+
puts
|
66
|
+
puts '<html><head><title>w3mrefe</title></head><body><pre>'
|
67
|
+
puts "#{result}</pre></body></html>"
|
data/post-install.rb
ADDED
metadata
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
rubygems_version: 0.8.11
|
3
|
+
specification_version: 1
|
4
|
+
name: w3mrefe
|
5
|
+
version: !ruby/object:Gem::Version
|
6
|
+
version: 1.0.0
|
7
|
+
date: 2005-11-29 00:00:00 +09:00
|
8
|
+
summary: an interface to the on-line ruby reference manuals by w3m and refe.
|
9
|
+
require_paths:
|
10
|
+
- lib
|
11
|
+
email:
|
12
|
+
- zstanaka@archer.livedoor.com
|
13
|
+
homepage: http://rubyforge.org/projects/refe/
|
14
|
+
rubyforge_project:
|
15
|
+
description:
|
16
|
+
autorequire:
|
17
|
+
default_executable:
|
18
|
+
bindir: bin
|
19
|
+
has_rdoc: false
|
20
|
+
required_ruby_version: !ruby/object:Gem::Version::Requirement
|
21
|
+
requirements:
|
22
|
+
-
|
23
|
+
- ">"
|
24
|
+
- !ruby/object:Gem::Version
|
25
|
+
version: 0.0.0
|
26
|
+
version:
|
27
|
+
platform: ruby
|
28
|
+
signing_key:
|
29
|
+
cert_chain:
|
30
|
+
authors:
|
31
|
+
- TANAKA Shin-ya
|
32
|
+
files:
|
33
|
+
- bin/CVS
|
34
|
+
- bin/w3mrefe
|
35
|
+
- bin/CVS/Root
|
36
|
+
- bin/CVS/Repository
|
37
|
+
- bin/CVS/Entries
|
38
|
+
- bin/CVS/Tag
|
39
|
+
- cgi-bin/CVS
|
40
|
+
- cgi-bin/w3mrefe2html.cgi
|
41
|
+
- cgi-bin/CVS/Root
|
42
|
+
- cgi-bin/CVS/Repository
|
43
|
+
- cgi-bin/CVS/Entries
|
44
|
+
- cgi-bin/CVS/Tag
|
45
|
+
- ChangeLog
|
46
|
+
- COPYING
|
47
|
+
- README.ja
|
48
|
+
- post-install.rb
|
49
|
+
test_files: []
|
50
|
+
rdoc_options: []
|
51
|
+
extra_rdoc_files: []
|
52
|
+
executables:
|
53
|
+
- w3mrefe
|
54
|
+
extensions: []
|
55
|
+
requirements: []
|
56
|
+
dependencies: []
|