root/trunk/nt/fiber.txt

Revision 3298, 9.0 kB (checked in by miyoshi, 4 years ago)

--

  • Property svn:eol-style set to native
Line 
1 ;; -*- Mode: text ; Coding: iso-2022-jp -*-
2
3 ; English document follows after Japanese document.
4
5
6     File Inspect and Broking End Resolver  -- fiber --
7
8              Copyright (C) 1997-2004  Shuichi Kitaguchi <kit@meadowy.org>
9
10
11 COPYRIGHT
12 ---------
13
14 This program is free software; you can redistribute it and/or modify
15 it under the terms of the GNU General Public License as published by
16 the Free Software Foundation; either versions 2, or (at your option)
17 any later version.
18
19 This program is distributed in the hope that it will be useful
20 but WITHOUT ANY WARRANTY; without even the implied warranty of
21 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22 GNU General Public License for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with fiber, see the file COPYING.  If not, write to the Free
26 Software Foundation Inc., 59 Temple Place - Suite 330, Boston,
27 MA 02111-1307, USA.
28
29
30 ======================== JAPANESE DOCUMENT ========================
31
32 $B$3$l$O2?$r$9$k$b$N(B?
33 -------------------
34
35   fiber $B$OBg$-$/$o$1$F(B 2 $B$D$N5!G=$r;}$C$F$$$^$9(B
36
37  o $B%U%!%$%k$NCf?H$rD4$Y$F$=$N<oN`$r7hDj$9$k(B
38  o Windows $B$N!V4XO"IU$1!W$rMQ$$$F%U%!%$%k$r<B9T$9$k(B
39
40   $BNc$($P!"(Bfoo_file $B$H$$$&Cf?H$,(B JPEG $B$N%U%!%$%k$,$"$C$?$H$7$^$9!#(B
41
42   > fiber foo_file
43
44   $B$H$9$k$H!"(Bfiber $B$O(B foo_file $B$r(B foo_file.jpg $B$K%3%T!<$7$?8e!"(B
45   foo_file.jpg $B$K4XO"IU$1$i$l$?%"%W%j%1!<%7%g%s$r<B9T$7$^$9(B($B8e$K$O(B
46   foo_file.jpg $B$H$$$&%U%!%$%k$,;D$j$^$9(B)$B!#(B
47
48   $B$D$^$j3HD%;R$,IU$$$F$$$J$$!"$b$7$/$O2?$J$N$+$o$+$i$J$$%U%!%$%k$b(B
49   fiber $B$r;H$($PE,@Z$J%"%W%j%1!<%7%g%s$G<B9T$G$-$k$o$1$G$9!#$b$A$m$s(B
50   fiber $B$bK|G=$G$O$J$$$N$G!"BP1~$G$-$F$$$J$$%U%!%$%k7A<0$O;3$[$I$"$j$^(B
51   $B$9$,(B($B8B$i$l$?$b$N$7$+BP1~$7$F$J$$$H$b8@$&(B)$B!#(B
52
53
54 $B;H$$J}(B
55 ------
56
57    > fiber [$B%*%W%7%g%s(B] <$B%U%!%$%k(B>
58
59   $B%*%W%7%g%s(B:
60       -e ext                  $B3HD%;R$r(B "ext" $B$@$H$_$J$9(B
61       -s                      $BF14|%b!<%I(B
62       -a ext=ident(,offset)   $B3HD%;R%G!<%?$r%l%8%9%H%j$KDI2C(B
63       -l                      $B@_Dj$H3HD%;R$N0lMwI=<((B
64       -r num                  $B3HD%;R%G!<%?$r%l%8%9%H%j$+$i:o=|(B
65       -i                      $B%l%8%9%H%j$N%G!<%?$r=i4|CM$KLa$9(B
66       -o Option={num,yes/no}  $B@_Dj%*%W%7%g%s(B
67  
68       $B@_Dj%*%W%7%g%s(B    |  $B@bL@(B ($B=i4|CM(B)
69      -------------------+----------------------------------------------------
70       ExtNum            |  fiber $B$,%5%]!<%H$9$k3HD%;R$N:GBgCM(B (64)
71       ExecuteUnknownExt |  $B%l%8%9%H%j$KEPO?$5$l$F$J$$3HD%;R$r<B9T$9$k(B (yes)
72       ExecuteURL        |  URL(ftp:,http:,...)$B$r<B9T$9$k(B (yes)
73       TrustExt          |  fiber $B$,H=CG$7$?$b$N$H%U%!%$%kL>$N3HD%;R$,0[$J$C$F(B
74                         |  $B$$$?>l9g!"%U%!%$%kL>$N3HD%;R$r?.MQ$9$k(B (yes)
75       OverrideExt       |  fiber $B$,CN$i$J$$3HD%;R$G$"$C$?>l9g!"(Bfiber $B$,H=CG(B
76                         |  $B$7$?3HD%;R$G>e=q$-$7$F<B9T$9$k(B (no)
77
78   $B%U%!%$%k(B:
79         $B!&3HD%;R$J$7%U%!%$%kL>(B
80         $B!&(BWindows $B$G4XO"IU$1$i$l$F$$$k!"3HD%;RIU$-%U%!%$%kL>(B
81         $B!&(BURL(http://..., ftp://...)
82  
83
84 $B<B9TNc(B
85 ------
86
87 1. $B3HD%;R$N;XDj(B (-e)
88
89     > fiber -e jpg foo.dat
90
91   $B$H$9$k$H!"(Bfiber $B$O(B foo.dat $B$,(B JPEG $B%U%!%$%k$G$"$k$H9M$(!"(Bfoo.dat $B$r(B
92   foo.dat.jpg $B$K%3%T!<$7$?8e!"(Bfoo.dat.jpg $B$r<B9T$7$^$9(B
93
94
95 2. $BF14|%b!<%I(B (-s)
96
97   ($BNc(B1) $BDL>o$N>l9g(B
98
99     > fiber foo.jpg
100
101     $B$9$0$K%W%m%s%W%H$KLa$C$F$-$^$9(B
102
103   ($BNc(B2) -s $B%*%W%7%g%sIU$-$N>l9g(B
104
105     > fiber -s foo
106
107      foo $B$r(B foo.ext $B$K%3%T!<$7$?8e!"<B9T$7$F$$$k%"%W%j%1!<%7%g%s$N=*N;(B
108      $B$rBT$C$F$+$i%W%m%s%W%H$KLa$C$F$-$^$9!#$^$?$3$N>l9g$O!"(Bfoo.ext $B$O(B
109      $B;D$i$:$K>C5n$5$l$^$9!#(B
110
111
112 3. $B3HD%;R%G!<%?$NDI2C(B (-a)
113
114    fiber $B$,<1JL$G$-$k3HD%;R$O!"%f!<%6$,<+M3$KDI2C$9$k$3$H$,$G$-$^$9!#(B
115    $BDI2C$9$k$K$O!"(B
116
117      > fiber -a $B3HD%;RL>(B=$B<1JL;R(B(,$B%*%U%;%C%HCM(B)
118
119    $B$N$h$&$K@_Dj$7$^$9!#%*%U%;%C%HCM$r;XDj$7$J$+$C$?>l9g$O(B 0 $B$K$J$j$^$9!#(B
120
121
122    ($BNc(B1) ".mid" $B$rDI2C$7$?$$>l9g(B
123
124      .mid $B%U%!%$%k$N%U%)!<%^%C%H$O!"(B
125
126        $B%U%!%$%k$N@hF,(B
127            |
128            V
129            0   1   2   3   4   5   6   7  ($B%P%$%H(B)
130          +---+---+---+---+---+---+---+---
131          | M | T | h | d | ? | ? | ? | ?  ...
132          +---+---+---+---+---+---+---+---
133
134     $B$H$J$C$F$$$k$N$G!"(B
135
136       > fiber -a mid=MThd
137
138     $B$b$7$/$O(B
139
140       > fiber -a mid=MThd,0
141
142     $B$H@_Dj$7$^$9(B
143
144
145    ($BNc(B2) ".wav" $B$rDI2C$7$?$$>l9g(B
146
147     .wav $B%U%!%$%k$N%U%)!<%^%C%H$O!"(B
148
149        $B%U%!%$%k$N@hF,(B
150            |
151            V
152            0   1   2   3   4   5   6   7   8   9   10  11  12  ($B%P%$%H(B)
153          +---+---+---+---+---+---+---+---+---+---+---+---+---
154          | ? | ? | ? | ? | ? | ? | ? | ? | W | A | V | E | ? ...
155          +---+---+---+---+---+---+---+---+---+---+---+---+---
156
157     $B$H$J$C$F$$$k$N$G!"(B
158
159       > fiber -a wav=WAVE,8
160
161     $B$H;XDj$7$^$9(B
162
163
164 4. $B@_Dj%*%W%7%g%s$NJQ99(B (-o)
165
166    ($BNc(B1) $B%5%]!<%H$9$k3HD%;R?t$r(B 128 $B$K$9$k(B
167
168      > fiber -o ExtNum=128
169
170    ($BNc(B2) fiber $B$,CN$i$J$$3HD%;R$N%U%!%$%k$r<B9T$7$J$$$h$&$K$9$k(B
171
172      > fiber -o ExecuteUnknownExt=no
173
174
175 $B$=$NB>(B
176 ------
177
178    o $B%l%8%9%H%j%-!<$N(B "HKEY_LOCAL_MACHINE\SOFTWARE\GNU\Fiber" $B$,B8:_$7$J$1$l$P!"(B
179      $B<+F0E*$K%-!<$,:n@.$5$l$F=i4|CM$,=q$-9~$^$l$^$9(B
180
181    o $B$b$C$HBt;3$N>pJs$,F@$?$$$J$i!"(Bfiber.c $B$r8+$^$7$g$&(B(^^;
182
183
184 ======================== ENGLISH DOCUMENT ========================
185
186 WHATS THIS?
187 -----------
188
189   Fiber has the following two facilities.
190
191 1. Inspect the specified file and decide its file type.
192 2. Execute a file by `File Association' provided by Windows.
193
194   For example, provided that "foo_file" is a JPEG file, this invocation:
195
196   > fiber foo_file
197
198   at first copies foo_file to foo_file.jpg, then executes a proper
199   application that is associated with the extention `jpg'
200   (foo_file.jpg remains as an aftereffect).
201
202   Thus fiber can execute a file which has no extensions.  Of course,
203   not all files can be executed by fiber because there are lots of
204   file formats that fiber still can not handle. ;-)
205
206
207 USAGE
208 -----
209
210    > fiber [option] <file>
211
212   option:
213           -e ext                  assume that the extention is "ext".
214           -s                      synchronous mode.
215           -a ext=ident(,offset)   add ext to database.
216           -l                      list options and database.
217           -r num                  remove ext indentified by num from database.
218           -i                      initialize database.
219           -o Option={num,yes/no}  set option.
220  
221     Option              |   Explanation.(default value)
222    ---------------------+------------------------------------------------
223     ExtNum              |   ext max numbers fiber supported
224     ExecuteUnknownExt   |   execute for unknown file ext.(yes)
225     ExecuteURL          |   execute URL(ftp:,http:,...).(yes)
226     TrustExt            |   trust ext that filename has.(yes)
227     OverrideExt         |   override ext if filename has unknown ext.(no)
228
229   file:
230           filename without ext.
231           files that Windows can ShellExecute(Ex) (with ext).
232           URL(http://...)
233  
234
235 EXAMPLES
236 --------
237
238 1. SPECIFYING FILE EXTENSION (-e)
239
240   > fiber -e jpg foo.dat
241
242   Fiber assumes foo.dat is a JPEG file,
243   copies foo.dat to foo.dat.jpg and executes foo.dat.jpg.
244
245
246 2. SYNCHRONOUS MODE (-s)
247
248   (ex.1) Without "-s" option:
249
250     > fiber foo.jpg
251
252    fiber returns to command prompt immediately.
253
254   (ex.2) However, with "-s" option
255
256     > fiber -s foo
257
258    fiber copies foo to foo.ext, executes foo.ext, waits until the invoked
259    execution finishes, and deletes foo.ext.
260
261
262 3. ADDING NEW EXTENSIONS (-a)
263
264    You can add new extensions to fiber as below:
265
266      > fiber -a extension_name=identification(,offset_value)
267
268    If offset_value is omitted, it is considered to be 0.
269
270    (ex.1) ".mid" file
271
272      Since .mid format is:
273
274        file's head
275            |
276            V
277            0   1   2   3   4   5   6   7  (bytes)
278          +---+---+---+---+---+---+---+---
279          | M | T | h | d | ? | ? | ? | ?  ...
280          +---+---+---+---+---+---+---+---
281
282     you should specify
283       > fiber -a mid=MThd
284     or
285       > fiber -a mid=MThd,0
286
287
288    (ex.2) ".wav" file
289
290     Since .wav format is:
291
292        file's head
293            |
294            V
295            0   1   2   3   4   5   6   7   8   9   10  11  12  (bytes)
296          +---+---+---+---+---+---+---+---+---+---+---+---+---
297          | ? | ? | ? | ? | ? | ? | ? | ? | W | A | V | E | ? ...
298          +---+---+---+---+---+---+---+---+---+---+---+---+---
299
300      you should specify
301       > fiber -a wav=WAVE,8
302
303
304 4. CHANGING OPTIONS (-o)
305
306    (ex.1) Set the number of supported files to 128.
307
308      > fiber -o ExtNum=128
309
310    (ex.2) Not execute files that have unknown extensions.
311
312      > fiber -o ExecuteUnknownExt=no
313
314
315 REMARKS
316 -------
317
318   o If the registry key "HKEY_LOCAL_MACHINE\SOFTWARE\GNU\Fiber"
319     does not exist, fiber creates it and writes initial values.
320
321   o For more information, see fiber.c :-)
322
323
324 ;; document ends here.
Note: See TracBrowser for help on using the browser.