Codebase list yodl / dbc3278
Imported Upstream version 2.13.1 tony mancill 11 years ago
6 changed file(s) with 40 addition(s) and 40 deletion(s). Raw diff Collapse all Expand all
0 yodl (2.13.1)
1
2 * yodl2whatever no longer supports the --unique-output and --path
3 option. Instead, communication between yodl and yodlpost is handled
4 through temporary files created by mktemp(1). The temporary files will be
5 removed following the yodl conversion. The yodl2whatever script offers the
6 --intermediate=filename option to allow users to keep the intermediate
7 files.
8
09 yodl (2.12.2)
110
211 * TEMPORARY MODIFICATION: manual construction will not rebuild the yodl.pdf
4747 it() tt(--no-warnings):nl()
4848 By default the convertors call bf(yodl)(1) using the tt(-w) flag. The
4949 option tt(--no-warnings) suppresses this flag.
50 it() tt(--tmp=<path>):nl()
51 By default, the temporary file is written in the /tmp
52 directory. Specify an alternate directory using
53 --tmp = path-to-alternate-tmp-directory
54 it() tt(--unique-output): nl()
55 By default, yodl will use a temporary output file that
56 is rewritten at each new yodl-invokation. If that's not
57 what you want, specify the --unique-output flag, which
58 will use the process-id as part of the temporary output
59 file. This file is NOT removed when the yodl-conversion
60 fails.
50 it() tt(--intermediate=<filename>):nl()
51 By default, files used for the communication between yodl and yodlpost
52 are removed following the conversion. The
53 tt(--intermediate=<filename>) option may be provided to retain these
54 files, called tt(<filename>) and tt(<filename>.idx).
6155 )
6256
6357 manpagefiles()
Binary diff not shown
2424 error()
2525 {
2626 chat "$@"
27 if [ "${keep_intermediate}" != "1" ] ; then
28 rm -f ${intermediate}.idx ${intermediate}
29 fi
2730 exit 1
2831 }
2932
4548 Additional options:
4649 --no-warnings: By default, yodl will warn for suspected macro calls. To
4750 suppress these warnings, specify the --no-warnings flag
48 --tmp=<path>: By default, the temporary file is written in the /tmp
49 directory. Specify an alternate directory using
50 --tmp = path-to-alternate-tmp-directory
51 --unique-output: By default, yodl will use a temporary output file that
52 is rewritten at each new yodl-invokation. If that's not
53 what you want, specify the --unique-output flag, which
54 will use the process-id as part of the temporary output
55 file. This file is NOT removed when the yodl-conversion
56 fails.
51 --intermediate=<file>: Most yodl conversions require the Yodl
52 post-processor to process Yodl's output. The temporary file
53 used for this is removed by default. If it should be
54 retained then this option can be used to specify the name
55 of the intermediate file presented to yodlpost.
5756
5857 This converter supplies the name of the macrofile that suits the conversion,
5958 and makes sure that the output goes to the same name as the input file but
7675 ############################################################# Start of script.
7776
7877 # [ ! -x $YODL ] && echo "Yodl convertor ($YODL) missing" && exit 1
79
80 # define the default temporary directory
81 tmpdir=/tmp
8278
8379 # Do we have arguments at all?
8480 if [ -z "$1" ] ; then
9591 TEMP=`getopt -o D:d:ghi:I:kl:m:n:o:p:r:tVvWw \
9692 --long define:,definemacro:,help,include:,index:,keep-ws,live-data:\
9793 --long messages:,max-nested-files:,output:,preload:,max-replacements:\
98 --long trace,version,no-warnings,unique-output,verbose,warranty,warn\
99 --long tmp:\
94 --long trace,version,no-warnings,verbose,warranty,warn,intermediate\
10095 -- "$@"`
10196 else
10297 # Poor man's getopt. Only single-char flags supported.
116111 (--no-warnings)
117112 nowarn=1;
118113 ;;
119 (--unique-output)
120 unique=-$$;
121 echo Unique output: ${unique}
122 ;;
123 (--tmp)
124 tmpdir="$2"
125 shift
114 (--intermediate)
115 intermediate=$2
116 keep_intermediate=1
117 shift
118 echo Intermediate file: ${intermediate}
126119 ;;
127120 (-o|--output)
128121 output="$2"
159152 shift
160153 done
161154
162 [ "$nowarn" == "1" ] || optionlist="-w $optionlist"
155 [ "${keep_intermediate}" == "1" ] || intermediate=`mktemp yodlXXXXXXXXXX`
156
157 [ "${nowarn}" == "1" ] || optionlist="-w $optionlist"
163158
164159 # Determine destination format.
165160 dest=`IFS=2; set $base; echo $2`
191186 exit 1
192187
193188 # Run YODL
194 run $YODL $optionlist -o ${tmpdir}/yodl-${USER}${unique} $dest $*
189 run $YODL $optionlist -o ${intermediate} $dest $*
195190
196191 # See if there's a (need to use the) post-processor.
197 if [ -s ${tmpdir}/yodl-${USER}${unique}.idx ] ; then
198 run $YODLPOST ${tmpdir}/yodl-${USER}${unique}.idx \
199 ${tmpdir}/yodl-${USER}${unique} $output
192 if [ -s ${intermediate}.idx ] ; then
193 run $YODLPOST ${intermediate}.idx ${intermediate} $output
194 if [ "${keep_intermediate}" != "1" ] ; then
195 rm -f ${intermediate}.idx ${intermediate}
196 fi
200197 else
201198 chat "No post-processing required for this $FORMAT conversion"
202 run mv ${tmpdir}/yodl-${USER}${unique} $output
203 fi
199 run mv ${intermediate} $output
200 fi
00 /* Yodl version */
11 #ifndef TOPLEVEL_VERSION
2 #define TOPLEVEL_VERSION "2.12.2"
2 #define TOPLEVEL_VERSION "2.13.1"
33 #endif
44
55 #define YODL_YEARS "1996-2008"
Binary diff not shown