1ripperX plugin specification v0.1
2
3This document describes the way ripperX plugins work.
4
51. ripperX plugin?
6
7 ripperx plugin is just a program which interprets the output of various
8rippers/encoders into the form ripperX understands so that I don't have to
9mess with the source code of ripperX to add support for ripperA or encoderB.
10;-)
11
12
132. The way program/plugin/ripperX communicates.
14
15 ripperX will take care of the linkage among ripper/encoder, plugin and
16ripperX. The linkage will look like the following.
17
18                /-stdout-\ pty/tty          /-stdout-\ pty/tty
19 ripper/encoder-          ---------> plugin-          ---------> ripperX
20                \-stderr-/                  \-stderr-
21		                                     \
22						      -> default stderr
23
24Plugin can just read from stdin and write the result to stdout. Both stdout
25and stderr of ripper/encoder are redirected to stdin of plugin, and stderr of
26plugin is not modified.
27
28
293. Plugin arguments
30
31 When a plugin is invoked by ripperX, it will be given two arguments. The
32first one is the beginning sector of currently processed track, and the second
33argument is the length of currently processed track in sector. You can use
34this information to caculate the progress.
35
364. The format of plugin output.
37
38 The output of plugin consists of three parts - type, progress, msg. The type
39field tells ripperX what kind of msg it is sending. Available types are
40 i   ) P : normal reporting of progress w/ or w/o msg. P reporting must have
41 	   progress field. If it has a msg, it will be displayed in the status
42	   bar of ripperX.
43 ii  ) W : warning. If ripperX receives warning msg, it will display the msg
44 	   using dialog box but will not halt/abort current job. It must
45	   contain non-null msg field.
46 iii ) E : error. If ripperX receives error msg, it will display the msg using
47           dialog box and halts the job and asks the user if he/she wants to
48	   abort current job. It must contain non-null msg field.
49
50 The progress field tells ripperX how much the ripping/encoding has
51progressed. It is a floating point number between 0 and 1.
52 The msg field is described above.
53
54 The format looks like
55
56 [type progress "msg"]'\n'
57      |        |
58       \---------------> space
59 examples)
60
61 [P 0.12345 "----->            "]
62 [P 0.32321]
63 [W "Hey there."]
64 [E "Hello world!"]
65
66 Every reporting must be followed by a new-line character.
67
68
695. How often does a plugin have to print out the reporting?
70
71 Plugin should print out a reporting every 0.5 seconds(+- a little bit is just
72 fine) and also should print only one reporting at a time. Also plugins should
73 print nothing when the ripper/encoder is finished. Plugins can skip printing
74 report if it doesn't want to.
75
76==============================================================================
77					     ripperX plugin specification v0.1
78								    TeJun, Huh
79						     wineking@adam.kaist.ac.kr
80