Changes of Revision 3

tovid.changes Changed
x
 
1
@@ -1,4 +1,19 @@
2
 -------------------------------------------------------------------
3
+Wed Jul 27 21:30:30 UTC 2011 - pascal.bleser@opensuse.org
4
+
5
+- update to 0.34:
6
+  * a new GUI for making multiple titlesets with tovid
7
+  * includes many updates and fixes for changes in the backends like ffmpeg and
8
+    dvdauthor as well as numerous bugfixes
9
+  * new libavfilter features from ffmpeg have been implemented, so the
10
+    -quick-menu option now works again with a recent enough libavfilter and
11
+    ffmpeg (0.8)
12
+  * several new options have also been added, including the ability to use your
13
+    own arbitrary images for thumbnail links
14
+  * PNG is now used generally as an intermediary format instead of JPEG,
15
+    resulting in improved picture quality
16
+
17
+-------------------------------------------------------------------
18
 Sun Apr  3 00:09:03 UTC 2011 - pascal.bleser@opensuse.org
19
 
20
 - add Requires:binutils to fix runtime, thanks to Jeremy Dipietro for reporting
21
tovid.spec Changed
53
 
1
@@ -10,7 +10,7 @@
2
 
3
 Summary:        Video conversion and DVD authoring tools
4
 Name:           tovid
5
-Version:        0.33
6
+Version:        0.34
7
 Release:        0.pm.1
8
 Group:          Productivity/Multimedia/Video/Editors and Convertors
9
 License:        GNU General Public License version 2 or later (GPLv2 or later)
10
@@ -34,7 +34,6 @@
11
 Requires:       dvdauthor >= 0.6.0
12
 Requires:       ffmpeg
13
 Requires:       ImageMagick >= 6.0
14
-Requires:       licenses
15
 Requires:       lsdvd
16
 Requires:       mjpegtools
17
 Requires:       mkisofs
18
@@ -56,7 +55,6 @@
19
 BuildRequires:  dvdauthor >= 0.6.0
20
 BuildRequires:  ffmpeg
21
 BuildRequires:  ImageMagick >= 6.0
22
-BuildRequires:  licenses
23
 BuildRequires:  lsdvd
24
 BuildRequires:  mjpegtools
25
 BuildRequires:  mkisofs
26
@@ -92,12 +90,11 @@
27
 
28
 %__rm -f "%{buildroot}%{_usr}/lib/tovid/.install.log"
29
 
30
-%suse_update_desktop_file -r tovidgui AudioVideo AudioVideoEditing
31
+for x in tovidgui titleset-wizard; do
32
+    %suse_update_desktop_file -r "$x" AudioVideo AudioVideoEditing
33
+done
34
 
35
-h="%{_usr}/share/doc/licenses/md5/$(md5sum COPYING|cut -f1 -d" ")"
36
-[ -e "$h" ] && %__ln_s -f "$h" COPYING
37
-
38
-%fdupes -s %{buildroot}
39
+%fdupes -s "%{buildroot}"
40
 
41
 %clean
42
 %{?buildroot:%__rm -rf "%{buildroot}"}
43
@@ -110,7 +107,9 @@
44
 %{python_sitelib}/tovid-%{version}*
45
 %{_usr}/lib/tovid
46
 %{_datadir}/applications/tovidgui.desktop
47
+%{_datadir}/applications/titleset-wizard.desktop
48
 %{_datadir}/icons/*/*/apps/tovid.png
49
+%{_datadir}/icons/*/*/apps/titleset-wizard.png
50
 %{_datadir}/icons/*/scalable/apps/*.svg
51
 %doc %{_mandir}/man1/tovid.1%{ext_man}
52
 
53
tovid-0.33.tar.bz2/Makefile Deleted
1222
 
1
@@ -1,1220 +0,0 @@
2
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
3
-# Makefile.  Generated from Makefile.in by configure.
4
-
5
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
6
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
7
-# Inc.
8
-# This Makefile.in is free software; the Free Software Foundation
9
-# gives unlimited permission to copy and/or distribute it,
10
-# with or without modifications, as long as this notice is preserved.
11
-
12
-# This program is distributed in the hope that it will be useful,
13
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
14
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
15
-# PARTICULAR PURPOSE.
16
-
17
-
18
-
19
-# Process this file with automake to produce a Makefile.in
20
-
21
-# Project homepage: http://tovid.wikia.com
22
-#
23
-#
24
-# Copyright (C) 2005 tovid <http://tovid.wikia.com>
25
-#
26
-# This program is free software; you can redistribute it and/or
27
-# modify it under the terms of the GNU General Public License
28
-# as published by the Free Software Foundation; either
29
-# version 2 of the License, or (at your option) any later
30
-# version.
31
-#
32
-# This program is distributed in the hope that it will be useful,
33
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
34
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
35
-# GNU General Public License for more details.
36
-#
37
-# You should have received a copy of the GNU General Public License
38
-# along with this program; if not, write to the Free Software
39
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Or see:
40
-#
41
-#           http://www.gnu.org/licenses/gpl.txt
42
-
43
-
44
-
45
-pkgdatadir = $(datadir)/tovid
46
-pkgincludedir = $(includedir)/tovid
47
-pkglibdir = $(libdir)/tovid
48
-pkglibexecdir = $(libexecdir)/tovid
49
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
50
-install_sh_DATA = $(install_sh) -c -m 644
51
-install_sh_PROGRAM = $(install_sh) -c
52
-install_sh_SCRIPT = $(install_sh) -c
53
-INSTALL_HEADER = $(INSTALL_DATA)
54
-transform = $(program_transform_name)
55
-NORMAL_INSTALL = :
56
-PRE_INSTALL = :
57
-POST_INSTALL = :
58
-NORMAL_UNINSTALL = :
59
-PRE_UNINSTALL = :
60
-POST_UNINSTALL = :
61
-subdir = .
62
-DIST_COMMON = README $(am__configure_deps) $(dist_app_DATA) \
63
-   $(dist_icon128_DATA) $(dist_icon32_DATA) $(dist_icon48_DATA) \
64
-   $(dist_icon64_DATA) $(dist_iconSVG_DATA) \
65
-   $(pythonBACKEND_PYTHON) $(pythonGUIS_PYTHON) \
66
-   $(pythonLIBTOVID_PYTHON) $(pythonMETAGUI_PYTHON) \
67
-   $(pythonRENDER_PYTHON) $(pythonTEMPLATE_PYTHON) \
68
-   $(pythonUTIL_PYTHON) $(srcdir)/Makefile.am \
69
-   $(srcdir)/Makefile.in $(top_srcdir)/configure \
70
-   $(top_srcdir)/src/tovid-init.in AUTHORS COPYING ChangeLog \
71
-   INSTALL NEWS install-sh missing py-compile
72
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
73
-am__aclocal_m4_deps = $(top_srcdir)/configure.ac
74
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
75
-   $(ACLOCAL_M4)
76
-am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
77
- configure.lineno config.status.lineno
78
-mkinstalldirs = $(install_sh) -d
79
-CONFIG_CLEAN_FILES = src/tovid-init
80
-CONFIG_CLEAN_VPATH_FILES =
81
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
82
-am__vpath_adj = case $$p in \
83
-    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
84
-    *) f=$$p;; \
85
-  esac;
86
-am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
87
-am__install_max = 40
88
-am__nobase_strip_setup = \
89
-  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
90
-am__nobase_strip = \
91
-  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
92
-am__nobase_list = $(am__nobase_strip_setup); \
93
-  for p in $$list; do echo "$$p $$p"; done | \
94
-  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
95
-  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
96
-    if (++n[$$2] == $(am__install_max)) \
97
-      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
98
-    END { for (dir in files) print dir, files[dir] }'
99
-am__base_list = \
100
-  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
101
-  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
102
-am__installdirs = "$(DESTDIR)$(bindir)" \
103
-   "$(DESTDIR)$(pythonBACKENDdir)" "$(DESTDIR)$(pythonGUISdir)" \
104
-   "$(DESTDIR)$(pythonLIBTOVIDdir)" \
105
-   "$(DESTDIR)$(pythonMETAGUIdir)" "$(DESTDIR)$(pythonRENDERdir)" \
106
-   "$(DESTDIR)$(pythonTEMPLATEdir)" "$(DESTDIR)$(pythonUTILdir)" \
107
-   "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(appdir)" \
108
-   "$(DESTDIR)$(icon128dir)" "$(DESTDIR)$(icon32dir)" \
109
-   "$(DESTDIR)$(icon48dir)" "$(DESTDIR)$(icon64dir)" \
110
-   "$(DESTDIR)$(iconSVGdir)"
111
-SCRIPTS = $(bin_SCRIPTS)
112
-SOURCES =
113
-DIST_SOURCES =
114
-py_compile = $(top_srcdir)/py-compile
115
-man1dir = $(mandir)/man1
116
-NROFF = nroff
117
-MANS = $(man_MANS)
118
-DATA = $(dist_app_DATA) $(dist_icon128_DATA) $(dist_icon32_DATA) \
119
-   $(dist_icon48_DATA) $(dist_icon64_DATA) $(dist_iconSVG_DATA)
120
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
121
-distdir = $(PACKAGE)-$(VERSION)
122
-top_distdir = $(distdir)
123
-am__remove_distdir = \
124
-  { test ! -d "$(distdir)" \
125
-    || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
126
-         && rm -fr "$(distdir)"; }; }
127
-DIST_ARCHIVES = $(distdir).tar.gz
128
-GZIP_ENV = --best
129
-distuninstallcheck_listfiles = find . -type f -print
130
-distcleancheck_listfiles = find . -type f -print
131
-ACLOCAL = ${SHELL} /home/eric/tovid/tovid/missing --run aclocal-1.11
132
-AMTAR = ${SHELL} /home/eric/tovid/tovid/missing --run tar
133
-AUTOCONF = ${SHELL} /home/eric/tovid/tovid/missing --run autoconf
134
-AUTOHEADER = ${SHELL} /home/eric/tovid/tovid/missing --run autoheader
135
-AUTOMAKE = ${SHELL} /home/eric/tovid/tovid/missing --run automake-1.11
136
-AWK = gawk
137
-CYGPATH_W = echo
138
-DEFS = -DPACKAGE_NAME=\"tovid\" -DPACKAGE_TARNAME=\"tovid\" -DPACKAGE_VERSION=\"svn\" -DPACKAGE_STRING=\"tovid\ svn\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"tovid\" -DVERSION=\"svn\"
139
-ECHO_C = 
140
-ECHO_N = -n
141
-ECHO_T = 
142
-INSTALL = /usr/bin/install -c
143
-INSTALL_DATA = ${INSTALL} -m 644
144
-INSTALL_PROGRAM = ${INSTALL}
145
-INSTALL_SCRIPT = ${INSTALL}
146
-INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
147
-LIBOBJS = 
148
-LIBS = 
149
-LN_S = 
150
-LTLIBOBJS = 
151
-MAKEINFO = ${SHELL} /home/eric/tovid/tovid/missing --run makeinfo
152
-MKDIR_P = /bin/mkdir -p
153
-PACKAGE = tovid
154
-PACKAGE_BUGREPORT = 
155
-PACKAGE_NAME = tovid
156
-PACKAGE_STRING = tovid svn
157
-PACKAGE_TARNAME = tovid
158
-PACKAGE_VERSION = svn
159
-PATH_SEPARATOR = :
160
-PYTHON = /usr/bin/python
161
-PYTHON_EXEC_PREFIX = ${exec_prefix}
162
-PYTHON_PLATFORM = linux2
163
-PYTHON_PREFIX = ${prefix}
164
-PYTHON_VERSION = 2.6
165
-SET_MAKE = 
166
-SHELL = /bin/sh
167
-STRIP = 
168
-TXT2TAGS = :
169
-VERSION = svn-r3022
170
-abs_builddir = /home/eric/tovid/tovid
171
-abs_srcdir = /home/eric/tovid/tovid
172
-abs_top_builddir = /home/eric/tovid/tovid
173
-abs_top_srcdir = /home/eric/tovid/tovid
174
-am__leading_dot = .
175
-am__tar = ${AMTAR} chof - "$$tardir"
176
-am__untar = ${AMTAR} xf -
177
-
178
-# Override the default bindir, so the tovid executables are
179
-# installed to e.g. /usr/share/tovid/bin
180
-# FIXME: This is probably not the correct way to do it
181
-bindir = $(libdir)/tovid
182
-build_alias = 
183
-builddir = .
184
-datadir = ${datarootdir}
185
-datarootdir = ${prefix}/share
186
-docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
187
-dvidir = ${docdir}
188
-exec_prefix = ${prefix}
189
-host_alias = 
190
-htmldir = ${docdir}
191
-includedir = ${prefix}/include
192
-infodir = ${datarootdir}/info
193
-install_sh = ${SHELL} /home/eric/tovid/tovid/install-sh
194
-libdir = ${exec_prefix}/lib
195
-libexecdir = ${exec_prefix}/libexec
196
-localedir = ${datarootdir}/locale
197
-localstatedir = ${prefix}/var
198
-mandir = ${datarootdir}/man
199
-mkdir_p = /bin/mkdir -p
200
-oldincludedir = /usr/include
201
-pdfdir = ${docdir}
202
-pkgpyexecdir = ${pyexecdir}/tovid
203
-pkgpythondir = ${pythondir}/tovid
204
-prefix = /usr
205
-program_transform_name = s,x,x,
206
-psdir = ${docdir}
207
-pyexecdir = ${exec_prefix}/lib64/python2.6/site-packages
208
-pythondir = ${prefix}/lib64/python2.6/site-packages
209
-sbindir = ${exec_prefix}/sbin
210
-sharedstatedir = ${prefix}/com
211
-srcdir = .
212
-sysconfdir = ${prefix}/etc
213
-target_alias = 
214
-top_build_prefix = 
215
-top_builddir = .
216
-top_srcdir = .
217
-
218
-# List the source files for each shell script
219
-sh_bin = \
220
-   src/idvid \
221
-   src/makedvd \
222
-   src/makemenu \
223
-   src/makevcd \
224
-   src/makexml \
225
-   src/postproc \
226
-   src/todisc \
227
-   src/todisc-fade-routine \
228
-   src/makempg \
229
-   src/tovid-batch \
230
-   src/tovid-init \
231
-   src/tovid-interactive \
232
-   src/make_titlesets
233
-
234
-
235
-# List the source files for each python script
236
-py_bin = \
237
-   src/tovid \
238
-   src/todiscgui \
239
-   src/tovid-stats \
240
-   src/titleset-wizard
241
-
242
-
243
-# Specify the scripts to make and install.
244
-# The .gif is here because I can't be arsed to figure out the
245
-# Autohell way of doing it
246
-bin_SCRIPTS = \
247
-   $(sh_bin) \
248
-   $(py_bin) \
249
-   icons/tovid.gif
250
-
251
-
252
-# The manpages
253
-man_dir = docs/man
254
-man_src_dir = docs/src/en
255
-man_MANS = \
256
-   $(man_dir)/tovid.1
257
-
258
-src_MANS = \
259
-   $(man_src_dir)/tovid.t2t
260
-
261
-
262
-# Shared data: icons and .desktop files
263
-# Icons -- freedesktop.org scheme
264
-icon_top_dir = icons/hicolor
265
-icon_svg_dir = scalable/apps
266
-icon_128_dir = 128x128/apps
267
-icon_64_dir = 64x64/apps
268
-icon_48_dir = 48x48/apps
269
-icon_32_dir = 32x32/apps
270
-
271
-# Install directories, $(datadir) == $(prefix)/share
272
-icon_base_dir = $(datadir)/$(icon_top_dir)
273
-icon128dir = $(icon_base_dir)/$(icon_128_dir)
274
-icon64dir = $(icon_base_dir)/$(icon_64_dir)
275
-icon48dir = $(icon_base_dir)/$(icon_48_dir)
276
-icon32dir = $(icon_base_dir)/$(icon_32_dir)
277
-iconSVGdir = $(icon_base_dir)/$(icon_svg_dir)
278
-appdir = $(datadir)/applications
279
-
280
-# Distribute the data
281
-dist_icon128_DATA = $(icon_top_dir)/$(icon_128_dir)/tovid.png
282
-dist_icon64_DATA = $(icon_top_dir)/$(icon_64_dir)/tovid.png
283
-dist_icon48_DATA = $(icon_top_dir)/$(icon_48_dir)/tovid.png
284
-dist_icon32_DATA = $(icon_top_dir)/$(icon_32_dir)/tovid.png
285
-dist_iconSVG_DATA = $(icon_top_dir)/$(icon_svg_dir)/cd.svg \
286
-   $(icon_top_dir)/$(icon_svg_dir)/disc.svg \
287
-   $(icon_top_dir)/$(icon_svg_dir)/tovid.svg
288
-
289
-dist_app_DATA = \
290
-   tovidgui.desktop
291
-
292
-
293
-# Distribute the scripts and manpage source files
294
-# manpages are made and packaged in the dist-hook for tarball users which
295
-# prevents them from having to install txt2tags to make the mans, thus
296
-# they aren't listed here.
297
-#   NOTE: this is a bit of a hack. When 'make dist' is called, make puts
298
-#   the manpage source in the pre-tarball directory. After everything is
299
-#   finished, the dist-hook comes into play and fresh man pages are made.
300
-#   We're taking advangtage of this order (make will _always_ do the hook
301
-#   after the action, that's why it's a 'hook'!) to ensure that the derived
302
-#   .1 manpages are newer than the .t2t source files. If the man sources are
303
-#   removed from the distributed tarball, make will try to remake the .1 pages
304
-#   since it always executes rules for targets without prerequisites,
305
-#   thinking that it's a rule like clean: .
306
-EXTRA_DIST = \
307
-   $(bin_SCRIPTS) \
308
-   $(src_MANS) \
309
-   SENSE \
310
-   setup.py
311
-
312
-
313
-# Shared python libraries: libtovid and the gui
314
-# See lengthy comments in configure.ac
315
-# $(pythondir) is the "The directory name for the site-packages subdirectory
316
-# of the standard Python install tree." and is generated by configure.ac's
317
-# AM_PATH_PYTHON. Typically, this points to
318
-# $(prefix)/lib/pythonM.m/site-packages
319
-# $(prefix) generally defaults to /usr/local for ./configure
320
-# and "make install"
321
-
322
-# Specifying a module to install: use 'python'
323
-# 'python' works as a prefix of sorts: if you have files that need to be
324
-# installed into separate directories, use another python variable pair.
325
-# Say you want to install a python module in $(pythondir)/FOO , then
326
-# you'll need to define a pair of variables:
327
-#   (1) pythonFOO_PYTHON   which takes the python source files
328
-#   (2) pythonFOOdir       which points to where the module should be installed
329
-#                          (CAPS are not required, but helps readability)
330
-pythonLIBTOVID_PYTHON = libtovid/*.py
331
-pythonLIBTOVIDdir = $(pythondir)/libtovid
332
-# Submodules
333
-pythonGUIS_PYTHON = libtovid/guis/*.py
334
-pythonGUISdir = $(pythondir)/libtovid/guis
335
-pythonBACKEND_PYTHON = libtovid/backend/*.py
336
-pythonBACKENDdir = $(pythondir)/libtovid/backend
337
-pythonRENDER_PYTHON = libtovid/render/*.py
338
-pythonRENDERdir = $(pythondir)/libtovid/render
339
-pythonTEMPLATE_PYTHON = libtovid/template/*.py
340
-pythonTEMPLATEdir = $(pythondir)/libtovid/template
341
-pythonMETAGUI_PYTHON = libtovid/metagui/*.py
342
-pythonMETAGUIdir = $(pythondir)/libtovid/metagui
343
-pythonUTIL_PYTHON = libtovid/util/*.py
344
-pythonUTILdir = $(pythondir)/libtovid/util
345
-all: all-am
346
-
347
-.SUFFIXES:
348
-am--refresh:
349
-   @:
350
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
351
-   @for dep in $?; do \
352
-     case '$(am__configure_deps)' in \
353
-       *$$dep*) \
354
-         echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
355
-         $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
356
-       && exit 0; \
357
-         exit 1;; \
358
-     esac; \
359
-   done; \
360
-   echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
361
-   $(am__cd) $(top_srcdir) && \
362
-     $(AUTOMAKE) --gnu Makefile
363
-.PRECIOUS: Makefile
364
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
365
-   @case '$?' in \
366
-     *config.status*) \
367
-       echo ' $(SHELL) ./config.status'; \
368
-       $(SHELL) ./config.status;; \
369
-     *) \
370
-       echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
371
-       cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
372
-   esac;
373
-
374
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
375
-   $(SHELL) ./config.status --recheck
376
-
377
-$(top_srcdir)/configure:  $(am__configure_deps)
378
-   $(am__cd) $(srcdir) && $(AUTOCONF)
379
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
380
-   $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
381
-$(am__aclocal_m4_deps):
382
-src/tovid-init: $(top_builddir)/config.status $(top_srcdir)/src/tovid-init.in
383
-   cd $(top_builddir) && $(SHELL) ./config.status $@
384
-install-binSCRIPTS: $(bin_SCRIPTS)
385
-   @$(NORMAL_INSTALL)
386
-   test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
387
-   @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
388
-   for p in $$list; do \
389
-     if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
390
-     if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
391
-   done | \
392
-   sed -e 'p;s,.*/,,;n' \
393
-       -e 'h;s|.*|.|' \
394
-       -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
395
-   $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
396
-     { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
397
-       if ($$2 == $$4) { files[d] = files[d] " " $$1; \
398
-         if (++n[d] == $(am__install_max)) { \
399
-       print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
400
-       else { print "f", d "/" $$4, $$1 } } \
401
-     END { for (d in files) print "f", d, files[d] }' | \
402
-   while read type dir files; do \
403
-        if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
404
-        test -z "$$files" || { \
405
-          echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
406
-          $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
407
-        } \
408
-   ; done
409
-
410
-uninstall-binSCRIPTS:
411
-   @$(NORMAL_UNINSTALL)
412
-   @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
413
-   files=`for p in $$list; do echo "$$p"; done | \
414
-          sed -e 's,.*/,,;$(transform)'`; \
415
-   test -n "$$list" || exit 0; \
416
-   echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
417
-   cd "$(DESTDIR)$(bindir)" && rm -f $$files
418
-install-pythonBACKENDPYTHON: $(pythonBACKEND_PYTHON)
419
-   @$(NORMAL_INSTALL)
420
-   test -z "$(pythonBACKENDdir)" || $(MKDIR_P) "$(DESTDIR)$(pythonBACKENDdir)"
421
-   @list='$(pythonBACKEND_PYTHON)'; dlist=; list2=; test -n "$(pythonBACKENDdir)" || list=; \
422
-   for p in $$list; do \
423
-     if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
424
-     if test -f $$b$$p; then \
425
-       $(am__strip_dir) \
426
-       dlist="$$dlist $$f"; \
427
-       list2="$$list2 $$b$$p"; \
428
-     else :; fi; \
429
-   done; \
430
-   for file in $$list2; do echo $$file; done | $(am__base_list) | \
431
-   while read files; do \
432
-     echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pythonBACKENDdir)'"; \
433
-     $(INSTALL_DATA) $$files "$(DESTDIR)$(pythonBACKENDdir)" || exit $$?; \
434
-   done || exit $$?; \
435
-   if test -n "$$dlist"; then \
436
-     if test -z "$(DESTDIR)"; then \
437
-       PYTHON=$(PYTHON) $(py_compile) --basedir "$(pythonBACKENDdir)" $$dlist; \
438
-     else \
439
-       PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(pythonBACKENDdir)" $$dlist; \
440
-     fi; \
441
-   else :; fi
442
-
443
-uninstall-pythonBACKENDPYTHON:
444
-   @$(NORMAL_UNINSTALL)
445
-   @list='$(pythonBACKEND_PYTHON)'; test -n "$(pythonBACKENDdir)" || list=; \
446
-   files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
447
-   test -n "$$files" || exit 0; \
448
-   filesc=`echo "$$files" | sed 's|$$|c|'`; \
449
-   fileso=`echo "$$files" | sed 's|$$|o|'`; \
450
-   echo " ( cd '$(DESTDIR)$(pythonBACKENDdir)' && rm -f" $$files ")"; \
451
-   cd "$(DESTDIR)$(pythonBACKENDdir)" && rm -f $$files || exit $$?; \
452
-   echo " ( cd '$(DESTDIR)$(pythonBACKENDdir)' && rm -f" $$filesc ")"; \
453
-   cd "$(DESTDIR)$(pythonBACKENDdir)" && rm -f $$filesc || exit $$?; \
454
-   echo " ( cd '$(DESTDIR)$(pythonBACKENDdir)' && rm -f" $$fileso ")"; \
455
-   cd "$(DESTDIR)$(pythonBACKENDdir)" && rm -f $$fileso
456
-install-pythonGUISPYTHON: $(pythonGUIS_PYTHON)
457
-   @$(NORMAL_INSTALL)
458
-   test -z "$(pythonGUISdir)" || $(MKDIR_P) "$(DESTDIR)$(pythonGUISdir)"
459
-   @list='$(pythonGUIS_PYTHON)'; dlist=; list2=; test -n "$(pythonGUISdir)" || list=; \
460
-   for p in $$list; do \
461
-     if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
462
-     if test -f $$b$$p; then \
463
-       $(am__strip_dir) \
464
-       dlist="$$dlist $$f"; \
465
-       list2="$$list2 $$b$$p"; \
466
-     else :; fi; \
467
-   done; \
468
-   for file in $$list2; do echo $$file; done | $(am__base_list) | \
469
-   while read files; do \
470
-     echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pythonGUISdir)'"; \
471
-     $(INSTALL_DATA) $$files "$(DESTDIR)$(pythonGUISdir)" || exit $$?; \
472
-   done || exit $$?; \
473
-   if test -n "$$dlist"; then \
474
-     if test -z "$(DESTDIR)"; then \
475
-       PYTHON=$(PYTHON) $(py_compile) --basedir "$(pythonGUISdir)" $$dlist; \
476
-     else \
477
-       PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(pythonGUISdir)" $$dlist; \
478
-     fi; \
479
-   else :; fi
480
-
481
-uninstall-pythonGUISPYTHON:
482
-   @$(NORMAL_UNINSTALL)
483
-   @list='$(pythonGUIS_PYTHON)'; test -n "$(pythonGUISdir)" || list=; \
484
-   files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
485
-   test -n "$$files" || exit 0; \
486
-   filesc=`echo "$$files" | sed 's|$$|c|'`; \
487
-   fileso=`echo "$$files" | sed 's|$$|o|'`; \
488
-   echo " ( cd '$(DESTDIR)$(pythonGUISdir)' && rm -f" $$files ")"; \
489
-   cd "$(DESTDIR)$(pythonGUISdir)" && rm -f $$files || exit $$?; \
490
-   echo " ( cd '$(DESTDIR)$(pythonGUISdir)' && rm -f" $$filesc ")"; \
491
-   cd "$(DESTDIR)$(pythonGUISdir)" && rm -f $$filesc || exit $$?; \
492
-   echo " ( cd '$(DESTDIR)$(pythonGUISdir)' && rm -f" $$fileso ")"; \
493
-   cd "$(DESTDIR)$(pythonGUISdir)" && rm -f $$fileso
494
-install-pythonLIBTOVIDPYTHON: $(pythonLIBTOVID_PYTHON)
495
-   @$(NORMAL_INSTALL)
496
-   test -z "$(pythonLIBTOVIDdir)" || $(MKDIR_P) "$(DESTDIR)$(pythonLIBTOVIDdir)"
497
-   @list='$(pythonLIBTOVID_PYTHON)'; dlist=; list2=; test -n "$(pythonLIBTOVIDdir)" || list=; \
498
-   for p in $$list; do \
499
-     if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
500
-     if test -f $$b$$p; then \
501
-       $(am__strip_dir) \
502
-       dlist="$$dlist $$f"; \
503
-       list2="$$list2 $$b$$p"; \
504
-     else :; fi; \
505
-   done; \
506
-   for file in $$list2; do echo $$file; done | $(am__base_list) | \
507
-   while read files; do \
508
-     echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pythonLIBTOVIDdir)'"; \
509
-     $(INSTALL_DATA) $$files "$(DESTDIR)$(pythonLIBTOVIDdir)" || exit $$?; \
510
-   done || exit $$?; \
511
-   if test -n "$$dlist"; then \
512
-     if test -z "$(DESTDIR)"; then \
513
-       PYTHON=$(PYTHON) $(py_compile) --basedir "$(pythonLIBTOVIDdir)" $$dlist; \
514
-     else \
515
-       PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(pythonLIBTOVIDdir)" $$dlist; \
516
-     fi; \
517
-   else :; fi
518
-
519
-uninstall-pythonLIBTOVIDPYTHON:
520
-   @$(NORMAL_UNINSTALL)
521
-   @list='$(pythonLIBTOVID_PYTHON)'; test -n "$(pythonLIBTOVIDdir)" || list=; \
522
-   files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
523
-   test -n "$$files" || exit 0; \
524
-   filesc=`echo "$$files" | sed 's|$$|c|'`; \
525
-   fileso=`echo "$$files" | sed 's|$$|o|'`; \
526
-   echo " ( cd '$(DESTDIR)$(pythonLIBTOVIDdir)' && rm -f" $$files ")"; \
527
-   cd "$(DESTDIR)$(pythonLIBTOVIDdir)" && rm -f $$files || exit $$?; \
528
-   echo " ( cd '$(DESTDIR)$(pythonLIBTOVIDdir)' && rm -f" $$filesc ")"; \
529
-   cd "$(DESTDIR)$(pythonLIBTOVIDdir)" && rm -f $$filesc || exit $$?; \
530
-   echo " ( cd '$(DESTDIR)$(pythonLIBTOVIDdir)' && rm -f" $$fileso ")"; \
531
-   cd "$(DESTDIR)$(pythonLIBTOVIDdir)" && rm -f $$fileso
532
-install-pythonMETAGUIPYTHON: $(pythonMETAGUI_PYTHON)
533
-   @$(NORMAL_INSTALL)
534
-   test -z "$(pythonMETAGUIdir)" || $(MKDIR_P) "$(DESTDIR)$(pythonMETAGUIdir)"
535
-   @list='$(pythonMETAGUI_PYTHON)'; dlist=; list2=; test -n "$(pythonMETAGUIdir)" || list=; \
536
-   for p in $$list; do \
537
-     if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
538
-     if test -f $$b$$p; then \
539
-       $(am__strip_dir) \
540
-       dlist="$$dlist $$f"; \
541
-       list2="$$list2 $$b$$p"; \
542
-     else :; fi; \
543
-   done; \
544
-   for file in $$list2; do echo $$file; done | $(am__base_list) | \
545
-   while read files; do \
546
-     echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pythonMETAGUIdir)'"; \
547
-     $(INSTALL_DATA) $$files "$(DESTDIR)$(pythonMETAGUIdir)" || exit $$?; \
548
-   done || exit $$?; \
549
-   if test -n "$$dlist"; then \
550
-     if test -z "$(DESTDIR)"; then \
551
-       PYTHON=$(PYTHON) $(py_compile) --basedir "$(pythonMETAGUIdir)" $$dlist; \
552
-     else \
553
-       PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(pythonMETAGUIdir)" $$dlist; \
554
-     fi; \
555
-   else :; fi
556
-
557
-uninstall-pythonMETAGUIPYTHON:
558
-   @$(NORMAL_UNINSTALL)
559
-   @list='$(pythonMETAGUI_PYTHON)'; test -n "$(pythonMETAGUIdir)" || list=; \
560
-   files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
561
-   test -n "$$files" || exit 0; \
562
-   filesc=`echo "$$files" | sed 's|$$|c|'`; \
563
-   fileso=`echo "$$files" | sed 's|$$|o|'`; \
564
-   echo " ( cd '$(DESTDIR)$(pythonMETAGUIdir)' && rm -f" $$files ")"; \
565
-   cd "$(DESTDIR)$(pythonMETAGUIdir)" && rm -f $$files || exit $$?; \
566
-   echo " ( cd '$(DESTDIR)$(pythonMETAGUIdir)' && rm -f" $$filesc ")"; \
567
-   cd "$(DESTDIR)$(pythonMETAGUIdir)" && rm -f $$filesc || exit $$?; \
568
-   echo " ( cd '$(DESTDIR)$(pythonMETAGUIdir)' && rm -f" $$fileso ")"; \
569
-   cd "$(DESTDIR)$(pythonMETAGUIdir)" && rm -f $$fileso
570
-install-pythonRENDERPYTHON: $(pythonRENDER_PYTHON)
571
-   @$(NORMAL_INSTALL)
572
-   test -z "$(pythonRENDERdir)" || $(MKDIR_P) "$(DESTDIR)$(pythonRENDERdir)"
573
-   @list='$(pythonRENDER_PYTHON)'; dlist=; list2=; test -n "$(pythonRENDERdir)" || list=; \
574
-   for p in $$list; do \
575
-     if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
576
-     if test -f $$b$$p; then \
577
-       $(am__strip_dir) \
578
-       dlist="$$dlist $$f"; \
579
-       list2="$$list2 $$b$$p"; \
580
-     else :; fi; \
581
-   done; \
582
-   for file in $$list2; do echo $$file; done | $(am__base_list) | \
583
-   while read files; do \
584
-     echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pythonRENDERdir)'"; \
585
-     $(INSTALL_DATA) $$files "$(DESTDIR)$(pythonRENDERdir)" || exit $$?; \
586
-   done || exit $$?; \
587
-   if test -n "$$dlist"; then \
588
-     if test -z "$(DESTDIR)"; then \
589
-       PYTHON=$(PYTHON) $(py_compile) --basedir "$(pythonRENDERdir)" $$dlist; \
590
-     else \
591
-       PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(pythonRENDERdir)" $$dlist; \
592
-     fi; \
593
-   else :; fi
594
-
595
-uninstall-pythonRENDERPYTHON:
596
-   @$(NORMAL_UNINSTALL)
597
-   @list='$(pythonRENDER_PYTHON)'; test -n "$(pythonRENDERdir)" || list=; \
598
-   files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
599
-   test -n "$$files" || exit 0; \
600
-   filesc=`echo "$$files" | sed 's|$$|c|'`; \
601
-   fileso=`echo "$$files" | sed 's|$$|o|'`; \
602
-   echo " ( cd '$(DESTDIR)$(pythonRENDERdir)' && rm -f" $$files ")"; \
603
-   cd "$(DESTDIR)$(pythonRENDERdir)" && rm -f $$files || exit $$?; \
604
-   echo " ( cd '$(DESTDIR)$(pythonRENDERdir)' && rm -f" $$filesc ")"; \
605
-   cd "$(DESTDIR)$(pythonRENDERdir)" && rm -f $$filesc || exit $$?; \
606
-   echo " ( cd '$(DESTDIR)$(pythonRENDERdir)' && rm -f" $$fileso ")"; \
607
-   cd "$(DESTDIR)$(pythonRENDERdir)" && rm -f $$fileso
608
-install-pythonTEMPLATEPYTHON: $(pythonTEMPLATE_PYTHON)
609
-   @$(NORMAL_INSTALL)
610
-   test -z "$(pythonTEMPLATEdir)" || $(MKDIR_P) "$(DESTDIR)$(pythonTEMPLATEdir)"
611
-   @list='$(pythonTEMPLATE_PYTHON)'; dlist=; list2=; test -n "$(pythonTEMPLATEdir)" || list=; \
612
-   for p in $$list; do \
613
-     if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
614
-     if test -f $$b$$p; then \
615
-       $(am__strip_dir) \
616
-       dlist="$$dlist $$f"; \
617
-       list2="$$list2 $$b$$p"; \
618
-     else :; fi; \
619
-   done; \
620
-   for file in $$list2; do echo $$file; done | $(am__base_list) | \
621
-   while read files; do \
622
-     echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pythonTEMPLATEdir)'"; \
623
-     $(INSTALL_DATA) $$files "$(DESTDIR)$(pythonTEMPLATEdir)" || exit $$?; \
624
-   done || exit $$?; \
625
-   if test -n "$$dlist"; then \
626
-     if test -z "$(DESTDIR)"; then \
627
-       PYTHON=$(PYTHON) $(py_compile) --basedir "$(pythonTEMPLATEdir)" $$dlist; \
628
-     else \
629
-       PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(pythonTEMPLATEdir)" $$dlist; \
630
-     fi; \
631
-   else :; fi
632
-
633
-uninstall-pythonTEMPLATEPYTHON:
634
-   @$(NORMAL_UNINSTALL)
635
-   @list='$(pythonTEMPLATE_PYTHON)'; test -n "$(pythonTEMPLATEdir)" || list=; \
636
-   files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
637
-   test -n "$$files" || exit 0; \
638
-   filesc=`echo "$$files" | sed 's|$$|c|'`; \
639
-   fileso=`echo "$$files" | sed 's|$$|o|'`; \
640
-   echo " ( cd '$(DESTDIR)$(pythonTEMPLATEdir)' && rm -f" $$files ")"; \
641
-   cd "$(DESTDIR)$(pythonTEMPLATEdir)" && rm -f $$files || exit $$?; \
642
-   echo " ( cd '$(DESTDIR)$(pythonTEMPLATEdir)' && rm -f" $$filesc ")"; \
643
-   cd "$(DESTDIR)$(pythonTEMPLATEdir)" && rm -f $$filesc || exit $$?; \
644
-   echo " ( cd '$(DESTDIR)$(pythonTEMPLATEdir)' && rm -f" $$fileso ")"; \
645
-   cd "$(DESTDIR)$(pythonTEMPLATEdir)" && rm -f $$fileso
646
-install-pythonUTILPYTHON: $(pythonUTIL_PYTHON)
647
-   @$(NORMAL_INSTALL)
648
-   test -z "$(pythonUTILdir)" || $(MKDIR_P) "$(DESTDIR)$(pythonUTILdir)"
649
-   @list='$(pythonUTIL_PYTHON)'; dlist=; list2=; test -n "$(pythonUTILdir)" || list=; \
650
-   for p in $$list; do \
651
-     if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
652
-     if test -f $$b$$p; then \
653
-       $(am__strip_dir) \
654
-       dlist="$$dlist $$f"; \
655
-       list2="$$list2 $$b$$p"; \
656
-     else :; fi; \
657
-   done; \
658
-   for file in $$list2; do echo $$file; done | $(am__base_list) | \
659
-   while read files; do \
660
-     echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pythonUTILdir)'"; \
661
-     $(INSTALL_DATA) $$files "$(DESTDIR)$(pythonUTILdir)" || exit $$?; \
662
-   done || exit $$?; \
663
-   if test -n "$$dlist"; then \
664
-     if test -z "$(DESTDIR)"; then \
665
-       PYTHON=$(PYTHON) $(py_compile) --basedir "$(pythonUTILdir)" $$dlist; \
666
-     else \
667
-       PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(pythonUTILdir)" $$dlist; \
668
-     fi; \
669
-   else :; fi
670
-
671
-uninstall-pythonUTILPYTHON:
672
-   @$(NORMAL_UNINSTALL)
673
-   @list='$(pythonUTIL_PYTHON)'; test -n "$(pythonUTILdir)" || list=; \
674
-   files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
675
-   test -n "$$files" || exit 0; \
676
-   filesc=`echo "$$files" | sed 's|$$|c|'`; \
677
-   fileso=`echo "$$files" | sed 's|$$|o|'`; \
678
-   echo " ( cd '$(DESTDIR)$(pythonUTILdir)' && rm -f" $$files ")"; \
679
-   cd "$(DESTDIR)$(pythonUTILdir)" && rm -f $$files || exit $$?; \
680
-   echo " ( cd '$(DESTDIR)$(pythonUTILdir)' && rm -f" $$filesc ")"; \
681
-   cd "$(DESTDIR)$(pythonUTILdir)" && rm -f $$filesc || exit $$?; \
682
-   echo " ( cd '$(DESTDIR)$(pythonUTILdir)' && rm -f" $$fileso ")"; \
683
-   cd "$(DESTDIR)$(pythonUTILdir)" && rm -f $$fileso
684
-install-man1: $(man_MANS)
685
-   @$(NORMAL_INSTALL)
686
-   test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
687
-   @list=''; test -n "$(man1dir)" || exit 0; \
688
-   { for i in $$list; do echo "$$i"; done; \
689
-   l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
690
-     sed -n '/\.1[a-z]*$$/p'; \
691
-   } | while read p; do \
692
-     if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
693
-     echo "$$d$$p"; echo "$$p"; \
694
-   done | \
695
-   sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
696
-         -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
697
-   sed 'N;N;s,\n, ,g' | { \
698
-   list=; while read file base inst; do \
699
-     if test "$$base" = "$$inst"; then list="$$list $$file"; else \
700
-       echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
701
-       $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
702
-     fi; \
703
-   done; \
704
-   for i in $$list; do echo "$$i"; done | $(am__base_list) | \
705
-   while read files; do \
706
-     test -z "$$files" || { \
707
-       echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
708
-       $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
709
-   done; }
710
-
711
-uninstall-man1:
712
-   @$(NORMAL_UNINSTALL)
713
-   @list=''; test -n "$(man1dir)" || exit 0; \
714
-   files=`{ for i in $$list; do echo "$$i"; done; \
715
-   l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
716
-     sed -n '/\.1[a-z]*$$/p'; \
717
-   } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
718
-         -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
719
-   test -z "$$files" || { \
720
-     echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
721
-     cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
722
-install-dist_appDATA: $(dist_app_DATA)
723
-   @$(NORMAL_INSTALL)
724
-   test -z "$(appdir)" || $(MKDIR_P) "$(DESTDIR)$(appdir)"
725
-   @list='$(dist_app_DATA)'; test -n "$(appdir)" || list=; \
726
-   for p in $$list; do \
727
-     if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
728
-     echo "$$d$$p"; \
729
-   done | $(am__base_list) | \
730
-   while read files; do \
731
-     echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(appdir)'"; \
732
-     $(INSTALL_DATA) $$files "$(DESTDIR)$(appdir)" || exit $$?; \
733
-   done
734
-
735
-uninstall-dist_appDATA:
736
-   @$(NORMAL_UNINSTALL)
737
-   @list='$(dist_app_DATA)'; test -n "$(appdir)" || list=; \
738
-   files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
739
-   test -n "$$files" || exit 0; \
740
-   echo " ( cd '$(DESTDIR)$(appdir)' && rm -f" $$files ")"; \
741
-   cd "$(DESTDIR)$(appdir)" && rm -f $$files
742
-install-dist_icon128DATA: $(dist_icon128_DATA)
743
-   @$(NORMAL_INSTALL)
744
-   test -z "$(icon128dir)" || $(MKDIR_P) "$(DESTDIR)$(icon128dir)"
745
-   @list='$(dist_icon128_DATA)'; test -n "$(icon128dir)" || list=; \
746
-   for p in $$list; do \
747
-     if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
748
-     echo "$$d$$p"; \
749
-   done | $(am__base_list) | \
750
-   while read files; do \
751
-     echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(icon128dir)'"; \
752
-     $(INSTALL_DATA) $$files "$(DESTDIR)$(icon128dir)" || exit $$?; \
753
-   done
754
-
755
-uninstall-dist_icon128DATA:
756
-   @$(NORMAL_UNINSTALL)
757
-   @list='$(dist_icon128_DATA)'; test -n "$(icon128dir)" || list=; \
758
-   files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
759
-   test -n "$$files" || exit 0; \
760
-   echo " ( cd '$(DESTDIR)$(icon128dir)' && rm -f" $$files ")"; \
761
-   cd "$(DESTDIR)$(icon128dir)" && rm -f $$files
762
-install-dist_icon32DATA: $(dist_icon32_DATA)
763
-   @$(NORMAL_INSTALL)
764
-   test -z "$(icon32dir)" || $(MKDIR_P) "$(DESTDIR)$(icon32dir)"
765
-   @list='$(dist_icon32_DATA)'; test -n "$(icon32dir)" || list=; \
766
-   for p in $$list; do \
767
-     if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
768
-     echo "$$d$$p"; \
769
-   done | $(am__base_list) | \
770
-   while read files; do \
771
-     echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(icon32dir)'"; \
772
-     $(INSTALL_DATA) $$files "$(DESTDIR)$(icon32dir)" || exit $$?; \
773
-   done
774
-
775
-uninstall-dist_icon32DATA:
776
-   @$(NORMAL_UNINSTALL)
777
-   @list='$(dist_icon32_DATA)'; test -n "$(icon32dir)" || list=; \
778
-   files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
779
-   test -n "$$files" || exit 0; \
780
-   echo " ( cd '$(DESTDIR)$(icon32dir)' && rm -f" $$files ")"; \
781
-   cd "$(DESTDIR)$(icon32dir)" && rm -f $$files
782
-install-dist_icon48DATA: $(dist_icon48_DATA)
783
-   @$(NORMAL_INSTALL)
784
-   test -z "$(icon48dir)" || $(MKDIR_P) "$(DESTDIR)$(icon48dir)"
785
-   @list='$(dist_icon48_DATA)'; test -n "$(icon48dir)" || list=; \
786
-   for p in $$list; do \
787
-     if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
788
-     echo "$$d$$p"; \
789
-   done | $(am__base_list) | \
790
-   while read files; do \
791
-     echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(icon48dir)'"; \
792
-     $(INSTALL_DATA) $$files "$(DESTDIR)$(icon48dir)" || exit $$?; \
793
-   done
794
-
795
-uninstall-dist_icon48DATA:
796
-   @$(NORMAL_UNINSTALL)
797
-   @list='$(dist_icon48_DATA)'; test -n "$(icon48dir)" || list=; \
798
-   files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
799
-   test -n "$$files" || exit 0; \
800
-   echo " ( cd '$(DESTDIR)$(icon48dir)' && rm -f" $$files ")"; \
801
-   cd "$(DESTDIR)$(icon48dir)" && rm -f $$files
802
-install-dist_icon64DATA: $(dist_icon64_DATA)
803
-   @$(NORMAL_INSTALL)
804
-   test -z "$(icon64dir)" || $(MKDIR_P) "$(DESTDIR)$(icon64dir)"
805
-   @list='$(dist_icon64_DATA)'; test -n "$(icon64dir)" || list=; \
806
-   for p in $$list; do \
807
-     if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
808
-     echo "$$d$$p"; \
809
-   done | $(am__base_list) | \
810
-   while read files; do \
811
-     echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(icon64dir)'"; \
812
-     $(INSTALL_DATA) $$files "$(DESTDIR)$(icon64dir)" || exit $$?; \
813
-   done
814
-
815
-uninstall-dist_icon64DATA:
816
-   @$(NORMAL_UNINSTALL)
817
-   @list='$(dist_icon64_DATA)'; test -n "$(icon64dir)" || list=; \
818
-   files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
819
-   test -n "$$files" || exit 0; \
820
-   echo " ( cd '$(DESTDIR)$(icon64dir)' && rm -f" $$files ")"; \
821
-   cd "$(DESTDIR)$(icon64dir)" && rm -f $$files
822
-install-dist_iconSVGDATA: $(dist_iconSVG_DATA)
823
-   @$(NORMAL_INSTALL)
824
-   test -z "$(iconSVGdir)" || $(MKDIR_P) "$(DESTDIR)$(iconSVGdir)"
825
-   @list='$(dist_iconSVG_DATA)'; test -n "$(iconSVGdir)" || list=; \
826
-   for p in $$list; do \
827
-     if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
828
-     echo "$$d$$p"; \
829
-   done | $(am__base_list) | \
830
-   while read files; do \
831
-     echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(iconSVGdir)'"; \
832
-     $(INSTALL_DATA) $$files "$(DESTDIR)$(iconSVGdir)" || exit $$?; \
833
-   done
834
-
835
-uninstall-dist_iconSVGDATA:
836
-   @$(NORMAL_UNINSTALL)
837
-   @list='$(dist_iconSVG_DATA)'; test -n "$(iconSVGdir)" || list=; \
838
-   files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
839
-   test -n "$$files" || exit 0; \
840
-   echo " ( cd '$(DESTDIR)$(iconSVGdir)' && rm -f" $$files ")"; \
841
-   cd "$(DESTDIR)$(iconSVGdir)" && rm -f $$files
842
-tags: TAGS
843
-TAGS:
844
-
845
-ctags: CTAGS
846
-CTAGS:
847
-
848
-
849
-distdir: $(DISTFILES)
850
-   @list='$(MANS)'; if test -n "$$list"; then \
851
-     list=`for p in $$list; do \
852
-       if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
853
-       if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
854
-     if test -n "$$list" && \
855
-       grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
856
-       echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
857
-       grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/         /' >&2; \
858
-       echo "       to fix them, install help2man, remove and regenerate the man pages;" >&2; \
859
-       echo "       typically \`make maintainer-clean' will remove them" >&2; \
860
-       exit 1; \
861
-     else :; fi; \
862
-   else :; fi
863
-   $(am__remove_distdir)
864
-   test -d "$(distdir)" || mkdir "$(distdir)"
865
-   @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
866
-   topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
867
-   list='$(DISTFILES)'; \
868
-     dist_files=`for file in $$list; do echo $$file; done | \
869
-     sed -e "s|^$$srcdirstrip/||;t" \
870
-         -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
871
-   case $$dist_files in \
872
-     */*) $(MKDIR_P) `echo "$$dist_files" | \
873
-              sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
874
-              sort -u` ;; \
875
-   esac; \
876
-   for file in $$dist_files; do \
877
-     if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
878
-     if test -d $$d/$$file; then \
879
-       dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
880
-       if test -d "$(distdir)/$$file"; then \
881
-         find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
882
-       fi; \
883
-       if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
884
-         cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
885
-         find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
886
-       fi; \
887
-       cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
888
-     else \
889
-       test -f "$(distdir)/$$file" \
890
-       || cp -p $$d/$$file "$(distdir)/$$file" \
891
-       || exit 1; \
892
-     fi; \
893
-   done
894
-   $(MAKE) $(AM_MAKEFLAGS) \
895
-     top_distdir="$(top_distdir)" distdir="$(distdir)" \
896
-     dist-hook
897
-   -test -n "$(am__skip_mode_fix)" \
898
-   || find "$(distdir)" -type d ! -perm -755 \
899
-       -exec chmod u+rwx,go+rx {} \; -o \
900
-     ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
901
-     ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
902
-     ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
903
-   || chmod -R a+r "$(distdir)"
904
-dist-gzip: distdir
905
-   tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
906
-   $(am__remove_distdir)
907
-
908
-dist-bzip2: distdir
909
-   tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
910
-   $(am__remove_distdir)
911
-
912
-dist-lzma: distdir
913
-   tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
914
-   $(am__remove_distdir)
915
-
916
-dist-xz: distdir
917
-   tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
918
-   $(am__remove_distdir)
919
-
920
-dist-tarZ: distdir
921
-   tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
922
-   $(am__remove_distdir)
923
-
924
-dist-shar: distdir
925
-   shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
926
-   $(am__remove_distdir)
927
-
928
-dist-zip: distdir
929
-   -rm -f $(distdir).zip
930
-   zip -rq $(distdir).zip $(distdir)
931
-   $(am__remove_distdir)
932
-
933
-dist dist-all: distdir
934
-   tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
935
-   $(am__remove_distdir)
936
-
937
-# This target untars the dist file and tries a VPATH configuration.  Then
938
-# it guarantees that the distribution is self-contained by making another
939
-# tarfile.
940
-distcheck: dist
941
-   case '$(DIST_ARCHIVES)' in \
942
-   *.tar.gz*) \
943
-     GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
944
-   *.tar.bz2*) \
945
-     bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
946
-   *.tar.lzma*) \
947
-     lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
948
-   *.tar.xz*) \
949
-     xz -dc $(distdir).tar.xz | $(am__untar) ;;\
950
-   *.tar.Z*) \
951
-     uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
952
-   *.shar.gz*) \
953
-     GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
954
-   *.zip*) \
955
-     unzip $(distdir).zip ;;\
956
-   esac
957
-   chmod -R a-w $(distdir); chmod a+w $(distdir)
958
-   mkdir $(distdir)/_build
959
-   mkdir $(distdir)/_inst
960
-   chmod a-w $(distdir)
961
-   test -d $(distdir)/_build || exit 0; \
962
-   dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
963
-     && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
964
-     && am__cwd=`pwd` \
965
-     && $(am__cd) $(distdir)/_build \
966
-     && ../configure --srcdir=.. --prefix="$$dc_install_base" \
967
-       $(DISTCHECK_CONFIGURE_FLAGS) \
968
-     && $(MAKE) $(AM_MAKEFLAGS) \
969
-     && $(MAKE) $(AM_MAKEFLAGS) dvi \
970
-     && $(MAKE) $(AM_MAKEFLAGS) check \
971
-     && $(MAKE) $(AM_MAKEFLAGS) install \
972
-     && $(MAKE) $(AM_MAKEFLAGS) installcheck \
973
-     && $(MAKE) $(AM_MAKEFLAGS) uninstall \
974
-     && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
975
-           distuninstallcheck \
976
-     && chmod -R a-w "$$dc_install_base" \
977
-     && ({ \
978
-          (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
979
-          && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
980
-          && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
981
-          && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
982
-               distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
983
-         } || { rm -rf "$$dc_destdir"; exit 1; }) \
984
-     && rm -rf "$$dc_destdir" \
985
-     && $(MAKE) $(AM_MAKEFLAGS) dist \
986
-     && rm -rf $(DIST_ARCHIVES) \
987
-     && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
988
-     && cd "$$am__cwd" \
989
-     || exit 1
990
-   $(am__remove_distdir)
991
-   @(echo "$(distdir) archives ready for distribution: "; \
992
-     list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
993
-     sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
994
-distuninstallcheck:
995
-   @$(am__cd) '$(distuninstallcheck_dir)' \
996
-   && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
997
-      || { echo "ERROR: files left after uninstall:" ; \
998
-           if test -n "$(DESTDIR)"; then \
999
-             echo "  (check DESTDIR support)"; \
1000
-           fi ; \
1001
-           $(distuninstallcheck_listfiles) ; \
1002
-           exit 1; } >&2
1003
-distcleancheck: distclean
1004
-   @if test '$(srcdir)' = . ; then \
1005
-     echo "ERROR: distcleancheck can only run from a VPATH build" ; \
1006
-     exit 1 ; \
1007
-   fi
1008
-   @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
1009
-     || { echo "ERROR: files left in build directory after distclean:" ; \
1010
-          $(distcleancheck_listfiles) ; \
1011
-          exit 1; } >&2
1012
-check-am: all-am
1013
-check: check-am
1014
-all-am: Makefile $(SCRIPTS) $(MANS) $(DATA)
1015
-installdirs:
1016
-   for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pythonBACKENDdir)" "$(DESTDIR)$(pythonGUISdir)" "$(DESTDIR)$(pythonLIBTOVIDdir)" "$(DESTDIR)$(pythonMETAGUIdir)" "$(DESTDIR)$(pythonRENDERdir)" "$(DESTDIR)$(pythonTEMPLATEdir)" "$(DESTDIR)$(pythonUTILdir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(appdir)" "$(DESTDIR)$(icon128dir)" "$(DESTDIR)$(icon32dir)" "$(DESTDIR)$(icon48dir)" "$(DESTDIR)$(icon64dir)" "$(DESTDIR)$(iconSVGdir)"; do \
1017
-     test -z "$$dir" || $(MKDIR_P) "$$dir"; \
1018
-   done
1019
-install: install-am
1020
-install-exec: install-exec-am
1021
-install-data: install-data-am
1022
-uninstall: uninstall-am
1023
-
1024
-install-am: all-am
1025
-   @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
1026
-
1027
-installcheck: installcheck-am
1028
-install-strip:
1029
-   $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
1030
-     install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
1031
-     `test -z '$(STRIP)' || \
1032
-       echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
1033
-mostlyclean-generic:
1034
-
1035
-clean-generic:
1036
-
1037
-distclean-generic:
1038
-   -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
1039
-   -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
1040
-
1041
-maintainer-clean-generic:
1042
-   @echo "This command is intended for maintainers to use"
1043
-   @echo "it deletes files that may require special tools to rebuild."
1044
-clean: clean-am
1045
-
1046
-clean-am: clean-generic mostlyclean-am
1047
-
1048
-distclean: distclean-am
1049
-   -rm -f $(am__CONFIG_DISTCLEAN_FILES)
1050
-   -rm -f Makefile
1051
-distclean-am: clean-am distclean-generic
1052
-
1053
-dvi: dvi-am
1054
-
1055
-dvi-am:
1056
-
1057
-html: html-am
1058
-
1059
-html-am:
1060
-
1061
-info: info-am
1062
-
1063
-info-am:
1064
-
1065
-install-data-am: install-dist_appDATA install-dist_icon128DATA \
1066
-   install-dist_icon32DATA install-dist_icon48DATA \
1067
-   install-dist_icon64DATA install-dist_iconSVGDATA install-man \
1068
-   install-pythonBACKENDPYTHON install-pythonGUISPYTHON \
1069
-   install-pythonLIBTOVIDPYTHON install-pythonMETAGUIPYTHON \
1070
-   install-pythonRENDERPYTHON install-pythonTEMPLATEPYTHON \
1071
-   install-pythonUTILPYTHON
1072
-
1073
-install-dvi: install-dvi-am
1074
-
1075
-install-dvi-am:
1076
-
1077
-install-exec-am: install-binSCRIPTS
1078
-   @$(NORMAL_INSTALL)
1079
-   $(MAKE) $(AM_MAKEFLAGS) install-exec-hook
1080
-install-html: install-html-am
1081
-
1082
-install-html-am:
1083
-
1084
-install-info: install-info-am
1085
-
1086
-install-info-am:
1087
-
1088
-install-man: install-man1
1089
-
1090
-install-pdf: install-pdf-am
1091
-
1092
-install-pdf-am:
1093
-
1094
-install-ps: install-ps-am
1095
-
1096
-install-ps-am:
1097
-
1098
-installcheck-am:
1099
-
1100
-maintainer-clean: maintainer-clean-am
1101
-   -rm -f $(am__CONFIG_DISTCLEAN_FILES)
1102
-   -rm -rf $(top_srcdir)/autom4te.cache
1103
-   -rm -f Makefile
1104
-maintainer-clean-am: distclean-am maintainer-clean-generic
1105
-
1106
-mostlyclean: mostlyclean-am
1107
-
1108
-mostlyclean-am: mostlyclean-generic
1109
-
1110
-pdf: pdf-am
1111
-
1112
-pdf-am:
1113
-
1114
-ps: ps-am
1115
-
1116
-ps-am:
1117
-
1118
-uninstall-am: uninstall-binSCRIPTS uninstall-dist_appDATA \
1119
-   uninstall-dist_icon128DATA uninstall-dist_icon32DATA \
1120
-   uninstall-dist_icon48DATA uninstall-dist_icon64DATA \
1121
-   uninstall-dist_iconSVGDATA uninstall-man \
1122
-   uninstall-pythonBACKENDPYTHON uninstall-pythonGUISPYTHON \
1123
-   uninstall-pythonLIBTOVIDPYTHON uninstall-pythonMETAGUIPYTHON \
1124
-   uninstall-pythonRENDERPYTHON uninstall-pythonTEMPLATEPYTHON \
1125
-   uninstall-pythonUTILPYTHON
1126
-   @$(NORMAL_INSTALL)
1127
-   $(MAKE) $(AM_MAKEFLAGS) uninstall-hook
1128
-uninstall-man: uninstall-man1
1129
-
1130
-.MAKE: install-am install-exec-am install-strip uninstall-am
1131
-
1132
-.PHONY: all all-am am--refresh check check-am clean clean-generic dist \
1133
-   dist-all dist-bzip2 dist-gzip dist-hook dist-lzma dist-shar \
1134
-   dist-tarZ dist-xz dist-zip distcheck distclean \
1135
-   distclean-generic distcleancheck distdir distuninstallcheck \
1136
-   dvi dvi-am html html-am info info-am install install-am \
1137
-   install-binSCRIPTS install-data install-data-am \
1138
-   install-dist_appDATA install-dist_icon128DATA \
1139
-   install-dist_icon32DATA install-dist_icon48DATA \
1140
-   install-dist_icon64DATA install-dist_iconSVGDATA install-dvi \
1141
-   install-dvi-am install-exec install-exec-am install-exec-hook \
1142
-   install-html install-html-am install-info install-info-am \
1143
-   install-man install-man1 install-pdf install-pdf-am install-ps \
1144
-   install-ps-am install-pythonBACKENDPYTHON \
1145
-   install-pythonGUISPYTHON install-pythonLIBTOVIDPYTHON \
1146
-   install-pythonMETAGUIPYTHON install-pythonRENDERPYTHON \
1147
-   install-pythonTEMPLATEPYTHON install-pythonUTILPYTHON \
1148
-   install-strip installcheck installcheck-am installdirs \
1149
-   maintainer-clean maintainer-clean-generic mostlyclean \
1150
-   mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \
1151
-   uninstall-binSCRIPTS uninstall-dist_appDATA \
1152
-   uninstall-dist_icon128DATA uninstall-dist_icon32DATA \
1153
-   uninstall-dist_icon48DATA uninstall-dist_icon64DATA \
1154
-   uninstall-dist_iconSVGDATA uninstall-hook uninstall-man \
1155
-   uninstall-man1 uninstall-pythonBACKENDPYTHON \
1156
-   uninstall-pythonGUISPYTHON uninstall-pythonLIBTOVIDPYTHON \
1157
-   uninstall-pythonMETAGUIPYTHON uninstall-pythonRENDERPYTHON \
1158
-   uninstall-pythonTEMPLATEPYTHON uninstall-pythonUTILPYTHON
1159
-
1160
-
1161
-# Make the manpages for svn users (tarball users' man pages made in dist-hook)
1162
-#   This is a static pattern rule as seen on (TV!)
1163
-#   http://www.gnu.org/software/make/manual/make.html#Static-Pattern
1164
-$(man_MANS): $(man_dir)/%.1: $(man_src_dir)/%.t2t
1165
-   txt2tags -t man -i "$<" -o "$@"
1166
-
1167
-# src/tovid-init not needed b/c ./configure derives it from src/tovid-init.in
1168
-# make the output directory for the man pages, since t2t won't
1169
-dist-hook:
1170
-   rm -rvf $(top_distdir)/src/tovid-init
1171
-   mkdir $(top_distdir)/docs/man
1172
-
1173
-# Hook to create a symbolic link for the main 'tovid' script
1174
-# FIXME: $(LN_S) is supposed to work since AC_PROG_LN_S is in configure.ac,
1175
-# but it doesn't for whatever reason (evaluates to empty string).
1176
-# For now, using explicit `ln -s`
1177
-install-exec-hook:
1178
-   rm -fv "$(prefix)/bin/tovid"
1179
-   ln -s "$(DESTDIR)$(bindir)/tovid" "$(prefix)/bin/tovid"
1180
-
1181
-# After uninstalling tovid, remove the python module directories
1182
-uninstall-hook:
1183
-   rmdir $(pythonGUISdir)
1184
-   rmdir $(pythonBACKENDdir)
1185
-   rmdir $(pythonRENDERdir)
1186
-   rmdir $(pythonTEMPLATEdir)
1187
-   rmdir $(pythonMETAGUIdir)
1188
-   rmdir $(pythonUTILdir)
1189
-   rmdir $(pythonLIBTOVIDdir)
1190
-   rm $(prefix)/bin/tovid
1191
-
1192
-# A little fun :-)
1193
-sense:
1194
-   fold -w 78 -s SENSE | less
1195
-
1196
-# Allow only the bash scripts to be installed/uninstalled
1197
-# These were copied and modified from the Makefile after ./configure was
1198
-# run. A little quantum leaping :-)
1199
-install-bash: $(sh_bin)
1200
-   @$(NORMAL_INSTALL)
1201
-   test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
1202
-   @list='$(sh_bin)'; for p in $$list; do \
1203
-     if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
1204
-     if test -f $$d$$p; then \
1205
-       f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
1206
-       echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \
1207
-       $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \
1208
-     else :; fi; \
1209
-   done
1210
-
1211
-uninstall-bash:
1212
-   @$(NORMAL_UNINSTALL)
1213
-   @list='$(sh_bin)'; for p in $$list; do \
1214
-     f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
1215
-     echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
1216
-     rm -f "$(DESTDIR)$(bindir)/$$f"; \
1217
-   done
1218
-
1219
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
1220
-# Otherwise a system limit (for SysV at least) may be exceeded.
1221
-.NOEXPORT:
1222
tovid-0.33.tar.bz2/Makefile.am Deleted
210
 
1
@@ -1,208 +0,0 @@
2
-# Process this file with automake to produce a Makefile.in
3
-
4
-# Project homepage: http://tovid.wikia.com
5
-#
6
-#
7
-# Copyright (C) 2005 tovid <http://tovid.wikia.com>
8
-#
9
-# This program is free software; you can redistribute it and/or
10
-# modify it under the terms of the GNU General Public License
11
-# as published by the Free Software Foundation; either
12
-# version 2 of the License, or (at your option) any later
13
-# version.
14
-#
15
-# This program is distributed in the hope that it will be useful,
16
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
17
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
-# GNU General Public License for more details.
19
-#
20
-# You should have received a copy of the GNU General Public License
21
-# along with this program; if not, write to the Free Software
22
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Or see:
23
-#
24
-#           http://www.gnu.org/licenses/gpl.txt
25
-
26
-# List the source files for each shell script
27
-sh_bin = \
28
-   src/idvid \
29
-   src/makedvd \
30
-   src/makemenu \
31
-   src/makevcd \
32
-   src/makexml \
33
-   src/postproc \
34
-   src/todisc \
35
-   src/todisc-fade-routine \
36
-   src/makempg \
37
-   src/tovid-batch \
38
-   src/tovid-init \
39
-   src/tovid-interactive \
40
-   src/make_titlesets
41
-
42
-# List the source files for each python script
43
-py_bin = \
44
-   src/tovid \
45
-   src/todiscgui \
46
-   src/tovid-stats \
47
-   src/titleset-wizard
48
-
49
-# Override the default bindir, so the tovid executables are
50
-# installed to e.g. /usr/share/tovid/bin
51
-# FIXME: This is probably not the correct way to do it
52
-bindir = $(libdir)/tovid
53
-
54
-# Specify the scripts to make and install.
55
-# The .gif is here because I can't be arsed to figure out the
56
-# Autohell way of doing it
57
-bin_SCRIPTS = \
58
-   $(sh_bin) \
59
-   $(py_bin) \
60
-   icons/tovid.gif
61
-
62
-# The manpages
63
-man_dir = docs/man
64
-man_src_dir = docs/src/en
65
-man_MANS = \
66
-   $(man_dir)/tovid.1
67
-src_MANS = \
68
-   $(man_src_dir)/tovid.t2t
69
-
70
-# Make the manpages for svn users (tarball users' man pages made in dist-hook)
71
-#   This is a static pattern rule as seen on (TV!)
72
-#   http://www.gnu.org/software/make/manual/make.html#Static-Pattern
73
-$(man_MANS): $(man_dir)/%.1: $(man_src_dir)/%.t2t
74
-   txt2tags -t man -i "$<" -o "$@"
75
-
76
-# Shared data: icons and .desktop files
77
-# Icons -- freedesktop.org scheme
78
-icon_top_dir = icons/hicolor
79
-icon_svg_dir = scalable/apps
80
-icon_128_dir = 128x128/apps
81
-icon_64_dir = 64x64/apps
82
-icon_48_dir = 48x48/apps
83
-icon_32_dir = 32x32/apps
84
-
85
-# Install directories, $(datadir) == $(prefix)/share
86
-icon_base_dir = $(datadir)/$(icon_top_dir)
87
-icon128dir = $(icon_base_dir)/$(icon_128_dir)
88
-icon64dir = $(icon_base_dir)/$(icon_64_dir)
89
-icon48dir = $(icon_base_dir)/$(icon_48_dir)
90
-icon32dir = $(icon_base_dir)/$(icon_32_dir)
91
-iconSVGdir = $(icon_base_dir)/$(icon_svg_dir)
92
-appdir = $(datadir)/applications
93
-
94
-# Distribute the data
95
-dist_icon128_DATA = $(icon_top_dir)/$(icon_128_dir)/tovid.png
96
-dist_icon64_DATA = $(icon_top_dir)/$(icon_64_dir)/tovid.png
97
-dist_icon48_DATA = $(icon_top_dir)/$(icon_48_dir)/tovid.png
98
-dist_icon32_DATA = $(icon_top_dir)/$(icon_32_dir)/tovid.png
99
-dist_iconSVG_DATA = $(icon_top_dir)/$(icon_svg_dir)/cd.svg \
100
-   $(icon_top_dir)/$(icon_svg_dir)/disc.svg \
101
-   $(icon_top_dir)/$(icon_svg_dir)/tovid.svg
102
-dist_app_DATA = \
103
-   tovidgui.desktop
104
-
105
-
106
-# Distribute the scripts and manpage source files
107
-# manpages are made and packaged in the dist-hook for tarball users which
108
-# prevents them from having to install txt2tags to make the mans, thus
109
-# they aren't listed here.
110
-#   NOTE: this is a bit of a hack. When 'make dist' is called, make puts
111
-#   the manpage source in the pre-tarball directory. After everything is
112
-#   finished, the dist-hook comes into play and fresh man pages are made.
113
-#   We're taking advangtage of this order (make will _always_ do the hook
114
-#   after the action, that's why it's a 'hook'!) to ensure that the derived
115
-#   .1 manpages are newer than the .t2t source files. If the man sources are
116
-#   removed from the distributed tarball, make will try to remake the .1 pages
117
-#   since it always executes rules for targets without prerequisites,
118
-#   thinking that it's a rule like clean: .
119
-EXTRA_DIST = \
120
-   $(bin_SCRIPTS) \
121
-   $(src_MANS) \
122
-   SENSE \
123
-   setup.py
124
-
125
-# Shared python libraries: libtovid and the gui
126
-# See lengthy comments in configure.ac
127
-# $(pythondir) is the "The directory name for the site-packages subdirectory
128
-# of the standard Python install tree." and is generated by configure.ac's
129
-# AM_PATH_PYTHON. Typically, this points to
130
-# $(prefix)/lib/pythonM.m/site-packages
131
-# $(prefix) generally defaults to /usr/local for ./configure
132
-# and "make install"
133
-
134
-# Specifying a module to install: use 'python'
135
-# 'python' works as a prefix of sorts: if you have files that need to be
136
-# installed into separate directories, use another python variable pair.
137
-# Say you want to install a python module in $(pythondir)/FOO , then
138
-# you'll need to define a pair of variables:
139
-#   (1) pythonFOO_PYTHON   which takes the python source files
140
-#   (2) pythonFOOdir       which points to where the module should be installed
141
-#                          (CAPS are not required, but helps readability)
142
-pythonLIBTOVID_PYTHON  = libtovid/*.py
143
-pythonLIBTOVIDdir      = $(pythondir)/libtovid
144
-# Submodules
145
-pythonGUIS_PYTHON      = libtovid/guis/*.py
146
-pythonGUISdir          = $(pythondir)/libtovid/guis
147
-pythonBACKEND_PYTHON   = libtovid/backend/*.py
148
-pythonBACKENDdir       = $(pythondir)/libtovid/backend
149
-pythonRENDER_PYTHON    = libtovid/render/*.py
150
-pythonRENDERdir        = $(pythondir)/libtovid/render
151
-pythonTEMPLATE_PYTHON  = libtovid/template/*.py
152
-pythonTEMPLATEdir      = $(pythondir)/libtovid/template
153
-pythonMETAGUI_PYTHON   = libtovid/metagui/*.py
154
-pythonMETAGUIdir       = $(pythondir)/libtovid/metagui
155
-pythonUTIL_PYTHON      = libtovid/util/*.py
156
-pythonUTILdir          = $(pythondir)/libtovid/util
157
-
158
-# src/tovid-init not needed b/c ./configure derives it from src/tovid-init.in
159
-# make the output directory for the man pages, since t2t won't
160
-dist-hook:
161
-   rm -rvf $(top_distdir)/src/tovid-init
162
-   mkdir $(top_distdir)/docs/man
163
-
164
-# Hook to create a symbolic link for the main 'tovid' script
165
-# FIXME: $(LN_S) is supposed to work since AC_PROG_LN_S is in configure.ac,
166
-# but it doesn't for whatever reason (evaluates to empty string).
167
-# For now, using explicit `ln -s`
168
-install-exec-hook:
169
-   rm -fv "$(prefix)/bin/tovid"
170
-   ln -s "$(DESTDIR)$(bindir)/tovid" "$(prefix)/bin/tovid"
171
-
172
-# After uninstalling tovid, remove the python module directories
173
-uninstall-hook:
174
-   rmdir $(pythonGUISdir)
175
-   rmdir $(pythonBACKENDdir)
176
-   rmdir $(pythonRENDERdir)
177
-   rmdir $(pythonTEMPLATEdir)
178
-   rmdir $(pythonMETAGUIdir)
179
-   rmdir $(pythonUTILdir)
180
-   rmdir $(pythonLIBTOVIDdir)
181
-   rm $(prefix)/bin/tovid
182
-
183
-# A little fun :-)
184
-sense:
185
-   fold -w 78 -s SENSE | less
186
-
187
-# Allow only the bash scripts to be installed/uninstalled
188
-# These were copied and modified from the Makefile after ./configure was
189
-# run. A little quantum leaping :-)
190
-install-bash: $(sh_bin)
191
-   @$(NORMAL_INSTALL)
192
-   test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
193
-   @list='$(sh_bin)'; for p in $$list; do \
194
-     if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
195
-     if test -f $$d$$p; then \
196
-       f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
197
-       echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \
198
-       $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \
199
-     else :; fi; \
200
-   done
201
-
202
-uninstall-bash:
203
-   @$(NORMAL_UNINSTALL)
204
-   @list='$(sh_bin)'; for p in $$list; do \
205
-     f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
206
-     echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
207
-     rm -f "$(DESTDIR)$(bindir)/$$f"; \
208
-   done
209
-
210
tovid-0.33.tar.bz2/Makefile.in Deleted
1222
 
1
@@ -1,1220 +0,0 @@
2
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
3
-# @configure_input@
4
-
5
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
6
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
7
-# Inc.
8
-# This Makefile.in is free software; the Free Software Foundation
9
-# gives unlimited permission to copy and/or distribute it,
10
-# with or without modifications, as long as this notice is preserved.
11
-
12
-# This program is distributed in the hope that it will be useful,
13
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
14
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
15
-# PARTICULAR PURPOSE.
16
-
17
-@SET_MAKE@
18
-
19
-# Process this file with automake to produce a Makefile.in
20
-
21
-# Project homepage: http://tovid.wikia.com
22
-#
23
-#
24
-# Copyright (C) 2005 tovid <http://tovid.wikia.com>
25
-#
26
-# This program is free software; you can redistribute it and/or
27
-# modify it under the terms of the GNU General Public License
28
-# as published by the Free Software Foundation; either
29
-# version 2 of the License, or (at your option) any later
30
-# version.
31
-#
32
-# This program is distributed in the hope that it will be useful,
33
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
34
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
35
-# GNU General Public License for more details.
36
-#
37
-# You should have received a copy of the GNU General Public License
38
-# along with this program; if not, write to the Free Software
39
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Or see:
40
-#
41
-#           http://www.gnu.org/licenses/gpl.txt
42
-
43
-
44
-VPATH = @srcdir@
45
-pkgdatadir = $(datadir)/@PACKAGE@
46
-pkgincludedir = $(includedir)/@PACKAGE@
47
-pkglibdir = $(libdir)/@PACKAGE@
48
-pkglibexecdir = $(libexecdir)/@PACKAGE@
49
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
50
-install_sh_DATA = $(install_sh) -c -m 644
51
-install_sh_PROGRAM = $(install_sh) -c
52
-install_sh_SCRIPT = $(install_sh) -c
53
-INSTALL_HEADER = $(INSTALL_DATA)
54
-transform = $(program_transform_name)
55
-NORMAL_INSTALL = :
56
-PRE_INSTALL = :
57
-POST_INSTALL = :
58
-NORMAL_UNINSTALL = :
59
-PRE_UNINSTALL = :
60
-POST_UNINSTALL = :
61
-subdir = .
62
-DIST_COMMON = README $(am__configure_deps) $(dist_app_DATA) \
63
-   $(dist_icon128_DATA) $(dist_icon32_DATA) $(dist_icon48_DATA) \
64
-   $(dist_icon64_DATA) $(dist_iconSVG_DATA) \
65
-   $(pythonBACKEND_PYTHON) $(pythonGUIS_PYTHON) \
66
-   $(pythonLIBTOVID_PYTHON) $(pythonMETAGUI_PYTHON) \
67
-   $(pythonRENDER_PYTHON) $(pythonTEMPLATE_PYTHON) \
68
-   $(pythonUTIL_PYTHON) $(srcdir)/Makefile.am \
69
-   $(srcdir)/Makefile.in $(top_srcdir)/configure \
70
-   $(top_srcdir)/src/tovid-init.in AUTHORS COPYING ChangeLog \
71
-   INSTALL NEWS install-sh missing py-compile
72
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
73
-am__aclocal_m4_deps = $(top_srcdir)/configure.ac
74
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
75
-   $(ACLOCAL_M4)
76
-am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
77
- configure.lineno config.status.lineno
78
-mkinstalldirs = $(install_sh) -d
79
-CONFIG_CLEAN_FILES = src/tovid-init
80
-CONFIG_CLEAN_VPATH_FILES =
81
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
82
-am__vpath_adj = case $$p in \
83
-    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
84
-    *) f=$$p;; \
85
-  esac;
86
-am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
87
-am__install_max = 40
88
-am__nobase_strip_setup = \
89
-  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
90
-am__nobase_strip = \
91
-  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
92
-am__nobase_list = $(am__nobase_strip_setup); \
93
-  for p in $$list; do echo "$$p $$p"; done | \
94
-  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
95
-  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
96
-    if (++n[$$2] == $(am__install_max)) \
97
-      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
98
-    END { for (dir in files) print dir, files[dir] }'
99
-am__base_list = \
100
-  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
101
-  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
102
-am__installdirs = "$(DESTDIR)$(bindir)" \
103
-   "$(DESTDIR)$(pythonBACKENDdir)" "$(DESTDIR)$(pythonGUISdir)" \
104
-   "$(DESTDIR)$(pythonLIBTOVIDdir)" \
105
-   "$(DESTDIR)$(pythonMETAGUIdir)" "$(DESTDIR)$(pythonRENDERdir)" \
106
-   "$(DESTDIR)$(pythonTEMPLATEdir)" "$(DESTDIR)$(pythonUTILdir)" \
107
-   "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(appdir)" \
108
-   "$(DESTDIR)$(icon128dir)" "$(DESTDIR)$(icon32dir)" \
109
-   "$(DESTDIR)$(icon48dir)" "$(DESTDIR)$(icon64dir)" \
110
-   "$(DESTDIR)$(iconSVGdir)"
111
-SCRIPTS = $(bin_SCRIPTS)
112
-SOURCES =
113
-DIST_SOURCES =
114
-py_compile = $(top_srcdir)/py-compile
115
-man1dir = $(mandir)/man1
116
-NROFF = nroff
117
-MANS = $(man_MANS)
118
-DATA = $(dist_app_DATA) $(dist_icon128_DATA) $(dist_icon32_DATA) \
119
-   $(dist_icon48_DATA) $(dist_icon64_DATA) $(dist_iconSVG_DATA)
120
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
121
-distdir = $(PACKAGE)-$(VERSION)
122
-top_distdir = $(distdir)
123
-am__remove_distdir = \
124
-  { test ! -d "$(distdir)" \
125
-    || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
126
-         && rm -fr "$(distdir)"; }; }
127
-DIST_ARCHIVES = $(distdir).tar.gz
128
-GZIP_ENV = --best
129
-distuninstallcheck_listfiles = find . -type f -print
130
-distcleancheck_listfiles = find . -type f -print
131
-ACLOCAL = @ACLOCAL@
132
-AMTAR = @AMTAR@
133
-AUTOCONF = @AUTOCONF@
134
-AUTOHEADER = @AUTOHEADER@
135
-AUTOMAKE = @AUTOMAKE@
136
-AWK = @AWK@
137
-CYGPATH_W = @CYGPATH_W@
138
-DEFS = @DEFS@
139
-ECHO_C = @ECHO_C@
140
-ECHO_N = @ECHO_N@
141
-ECHO_T = @ECHO_T@
142
-INSTALL = @INSTALL@
143
-INSTALL_DATA = @INSTALL_DATA@
144
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
145
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
146
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
147
-LIBOBJS = @LIBOBJS@
148
-LIBS = @LIBS@
149
-LN_S = @LN_S@
150
-LTLIBOBJS = @LTLIBOBJS@
151
-MAKEINFO = @MAKEINFO@
152
-MKDIR_P = @MKDIR_P@
153
-PACKAGE = @PACKAGE@
154
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
155
-PACKAGE_NAME = @PACKAGE_NAME@
156
-PACKAGE_STRING = @PACKAGE_STRING@
157
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
158
-PACKAGE_VERSION = @PACKAGE_VERSION@
159
-PATH_SEPARATOR = @PATH_SEPARATOR@
160
-PYTHON = @PYTHON@
161
-PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
162
-PYTHON_PLATFORM = @PYTHON_PLATFORM@
163
-PYTHON_PREFIX = @PYTHON_PREFIX@
164
-PYTHON_VERSION = @PYTHON_VERSION@
165
-SET_MAKE = @SET_MAKE@
166
-SHELL = @SHELL@
167
-STRIP = @STRIP@
168
-TXT2TAGS = @TXT2TAGS@
169
-VERSION = @VERSION@
170
-abs_builddir = @abs_builddir@
171
-abs_srcdir = @abs_srcdir@
172
-abs_top_builddir = @abs_top_builddir@
173
-abs_top_srcdir = @abs_top_srcdir@
174
-am__leading_dot = @am__leading_dot@
175
-am__tar = @am__tar@
176
-am__untar = @am__untar@
177
-
178
-# Override the default bindir, so the tovid executables are
179
-# installed to e.g. /usr/share/tovid/bin
180
-# FIXME: This is probably not the correct way to do it
181
-bindir = $(libdir)/tovid
182
-build_alias = @build_alias@
183
-builddir = @builddir@
184
-datadir = @datadir@
185
-datarootdir = @datarootdir@
186
-docdir = @docdir@
187
-dvidir = @dvidir@
188
-exec_prefix = @exec_prefix@
189
-host_alias = @host_alias@
190
-htmldir = @htmldir@
191
-includedir = @includedir@
192
-infodir = @infodir@
193
-install_sh = @install_sh@
194
-libdir = @libdir@
195
-libexecdir = @libexecdir@
196
-localedir = @localedir@
197
-localstatedir = @localstatedir@
198
-mandir = @mandir@
199
-mkdir_p = @mkdir_p@
200
-oldincludedir = @oldincludedir@
201
-pdfdir = @pdfdir@
202
-pkgpyexecdir = @pkgpyexecdir@
203
-pkgpythondir = @pkgpythondir@
204
-prefix = @prefix@
205
-program_transform_name = @program_transform_name@
206
-psdir = @psdir@
207
-pyexecdir = @pyexecdir@
208
-pythondir = @pythondir@
209
-sbindir = @sbindir@
210
-sharedstatedir = @sharedstatedir@
211
-srcdir = @srcdir@
212
-sysconfdir = @sysconfdir@
213
-target_alias = @target_alias@
214
-top_build_prefix = @top_build_prefix@
215
-top_builddir = @top_builddir@
216
-top_srcdir = @top_srcdir@
217
-
218
-# List the source files for each shell script
219
-sh_bin = \
220
-   src/idvid \
221
-   src/makedvd \
222
-   src/makemenu \
223
-   src/makevcd \
224
-   src/makexml \
225
-   src/postproc \
226
-   src/todisc \
227
-   src/todisc-fade-routine \
228
-   src/makempg \
229
-   src/tovid-batch \
230
-   src/tovid-init \
231
-   src/tovid-interactive \
232
-   src/make_titlesets
233
-
234
-
235
-# List the source files for each python script
236
-py_bin = \
237
-   src/tovid \
238
-   src/todiscgui \
239
-   src/tovid-stats \
240
-   src/titleset-wizard
241
-
242
-
243
-# Specify the scripts to make and install.
244
-# The .gif is here because I can't be arsed to figure out the
245
-# Autohell way of doing it
246
-bin_SCRIPTS = \
247
-   $(sh_bin) \
248
-   $(py_bin) \
249
-   icons/tovid.gif
250
-
251
-
252
-# The manpages
253
-man_dir = docs/man
254
-man_src_dir = docs/src/en
255
-man_MANS = \
256
-   $(man_dir)/tovid.1
257
-
258
-src_MANS = \
259
-   $(man_src_dir)/tovid.t2t
260
-
261
-
262
-# Shared data: icons and .desktop files
263
-# Icons -- freedesktop.org scheme
264
-icon_top_dir = icons/hicolor
265
-icon_svg_dir = scalable/apps
266
-icon_128_dir = 128x128/apps
267
-icon_64_dir = 64x64/apps
268
-icon_48_dir = 48x48/apps
269
-icon_32_dir = 32x32/apps
270
-
271
-# Install directories, $(datadir) == $(prefix)/share
272
-icon_base_dir = $(datadir)/$(icon_top_dir)
273
-icon128dir = $(icon_base_dir)/$(icon_128_dir)
274
-icon64dir = $(icon_base_dir)/$(icon_64_dir)
275
-icon48dir = $(icon_base_dir)/$(icon_48_dir)
276
-icon32dir = $(icon_base_dir)/$(icon_32_dir)
277
-iconSVGdir = $(icon_base_dir)/$(icon_svg_dir)
278
-appdir = $(datadir)/applications
279
-
280
-# Distribute the data
281
-dist_icon128_DATA = $(icon_top_dir)/$(icon_128_dir)/tovid.png
282
-dist_icon64_DATA = $(icon_top_dir)/$(icon_64_dir)/tovid.png
283
-dist_icon48_DATA = $(icon_top_dir)/$(icon_48_dir)/tovid.png
284
-dist_icon32_DATA = $(icon_top_dir)/$(icon_32_dir)/tovid.png
285
-dist_iconSVG_DATA = $(icon_top_dir)/$(icon_svg_dir)/cd.svg \
286
-   $(icon_top_dir)/$(icon_svg_dir)/disc.svg \
287
-   $(icon_top_dir)/$(icon_svg_dir)/tovid.svg
288
-
289
-dist_app_DATA = \
290
-   tovidgui.desktop
291
-
292
-
293
-# Distribute the scripts and manpage source files
294
-# manpages are made and packaged in the dist-hook for tarball users which
295
-# prevents them from having to install txt2tags to make the mans, thus
296
-# they aren't listed here.
297
-#   NOTE: this is a bit of a hack. When 'make dist' is called, make puts
298
-#   the manpage source in the pre-tarball directory. After everything is
299
-#   finished, the dist-hook comes into play and fresh man pages are made.
300
-#   We're taking advangtage of this order (make will _always_ do the hook
301
-#   after the action, that's why it's a 'hook'!) to ensure that the derived
302
-#   .1 manpages are newer than the .t2t source files. If the man sources are
303
-#   removed from the distributed tarball, make will try to remake the .1 pages
304
-#   since it always executes rules for targets without prerequisites,
305
-#   thinking that it's a rule like clean: .
306
-EXTRA_DIST = \
307
-   $(bin_SCRIPTS) \
308
-   $(src_MANS) \
309
-   SENSE \
310
-   setup.py
311
-
312
-
313
-# Shared python libraries: libtovid and the gui
314
-# See lengthy comments in configure.ac
315
-# $(pythondir) is the "The directory name for the site-packages subdirectory
316
-# of the standard Python install tree." and is generated by configure.ac's
317
-# AM_PATH_PYTHON. Typically, this points to
318
-# $(prefix)/lib/pythonM.m/site-packages
319
-# $(prefix) generally defaults to /usr/local for ./configure
320
-# and "make install"
321
-
322
-# Specifying a module to install: use 'python'
323
-# 'python' works as a prefix of sorts: if you have files that need to be
324
-# installed into separate directories, use another python variable pair.
325
-# Say you want to install a python module in $(pythondir)/FOO , then
326
-# you'll need to define a pair of variables:
327
-#   (1) pythonFOO_PYTHON   which takes the python source files
328
-#   (2) pythonFOOdir       which points to where the module should be installed
329
-#                          (CAPS are not required, but helps readability)
330
-pythonLIBTOVID_PYTHON = libtovid/*.py
331
-pythonLIBTOVIDdir = $(pythondir)/libtovid
332
-# Submodules
333
-pythonGUIS_PYTHON = libtovid/guis/*.py
334
-pythonGUISdir = $(pythondir)/libtovid/guis
335
-pythonBACKEND_PYTHON = libtovid/backend/*.py
336
-pythonBACKENDdir = $(pythondir)/libtovid/backend
337
-pythonRENDER_PYTHON = libtovid/render/*.py
338
-pythonRENDERdir = $(pythondir)/libtovid/render
339
-pythonTEMPLATE_PYTHON = libtovid/template/*.py
340
-pythonTEMPLATEdir = $(pythondir)/libtovid/template
341
-pythonMETAGUI_PYTHON = libtovid/metagui/*.py
342
-pythonMETAGUIdir = $(pythondir)/libtovid/metagui
343
-pythonUTIL_PYTHON = libtovid/util/*.py
344
-pythonUTILdir = $(pythondir)/libtovid/util
345
-all: all-am
346
-
347
-.SUFFIXES:
348
-am--refresh:
349
-   @:
350
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
351
-   @for dep in $?; do \
352
-     case '$(am__configure_deps)' in \
353
-       *$$dep*) \
354
-         echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
355
-         $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
356
-       && exit 0; \
357
-         exit 1;; \
358
-     esac; \
359
-   done; \
360
-   echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
361
-   $(am__cd) $(top_srcdir) && \
362
-     $(AUTOMAKE) --gnu Makefile
363
-.PRECIOUS: Makefile
364
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
365
-   @case '$?' in \
366
-     *config.status*) \
367
-       echo ' $(SHELL) ./config.status'; \
368
-       $(SHELL) ./config.status;; \
369
-     *) \
370
-       echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
371
-       cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
372
-   esac;
373
-
374
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
375
-   $(SHELL) ./config.status --recheck
376
-
377
-$(top_srcdir)/configure:  $(am__configure_deps)
378
-   $(am__cd) $(srcdir) && $(AUTOCONF)
379
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
380
-   $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
381
-$(am__aclocal_m4_deps):
382
-src/tovid-init: $(top_builddir)/config.status $(top_srcdir)/src/tovid-init.in
383
-   cd $(top_builddir) && $(SHELL) ./config.status $@
384
-install-binSCRIPTS: $(bin_SCRIPTS)
385
-   @$(NORMAL_INSTALL)
386
-   test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
387
-   @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
388
-   for p in $$list; do \
389
-     if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
390
-     if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
391
-   done | \
392
-   sed -e 'p;s,.*/,,;n' \
393
-       -e 'h;s|.*|.|' \
394
-       -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
395
-   $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
396
-     { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
397
-       if ($$2 == $$4) { files[d] = files[d] " " $$1; \
398
-         if (++n[d] == $(am__install_max)) { \
399
-       print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
400
-       else { print "f", d "/" $$4, $$1 } } \
401
-     END { for (d in files) print "f", d, files[d] }' | \
402
-   while read type dir files; do \
403
-        if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
404
-        test -z "$$files" || { \
405
-          echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
406
-          $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
407
-        } \
408
-   ; done
409
-
410
-uninstall-binSCRIPTS:
411
-   @$(NORMAL_UNINSTALL)
412
-   @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
413
-   files=`for p in $$list; do echo "$$p"; done | \
414
-          sed -e 's,.*/,,;$(transform)'`; \
415
-   test -n "$$list" || exit 0; \
416
-   echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
417
-   cd "$(DESTDIR)$(bindir)" && rm -f $$files
418
-install-pythonBACKENDPYTHON: $(pythonBACKEND_PYTHON)
419
-   @$(NORMAL_INSTALL)
420
-   test -z "$(pythonBACKENDdir)" || $(MKDIR_P) "$(DESTDIR)$(pythonBACKENDdir)"
421
-   @list='$(pythonBACKEND_PYTHON)'; dlist=; list2=; test -n "$(pythonBACKENDdir)" || list=; \
422
-   for p in $$list; do \
423
-     if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
424
-     if test -f $$b$$p; then \
425
-       $(am__strip_dir) \
426
-       dlist="$$dlist $$f"; \
427
-       list2="$$list2 $$b$$p"; \
428
-     else :; fi; \
429
-   done; \
430
-   for file in $$list2; do echo $$file; done | $(am__base_list) | \
431
-   while read files; do \
432
-     echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pythonBACKENDdir)'"; \
433
-     $(INSTALL_DATA) $$files "$(DESTDIR)$(pythonBACKENDdir)" || exit $$?; \
434
-   done || exit $$?; \
435
-   if test -n "$$dlist"; then \
436
-     if test -z "$(DESTDIR)"; then \
437
-       PYTHON=$(PYTHON) $(py_compile) --basedir "$(pythonBACKENDdir)" $$dlist; \
438
-     else \
439
-       PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(pythonBACKENDdir)" $$dlist; \
440
-     fi; \
441
-   else :; fi
442
-
443
-uninstall-pythonBACKENDPYTHON:
444
-   @$(NORMAL_UNINSTALL)
445
-   @list='$(pythonBACKEND_PYTHON)'; test -n "$(pythonBACKENDdir)" || list=; \
446
-   files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
447
-   test -n "$$files" || exit 0; \
448
-   filesc=`echo "$$files" | sed 's|$$|c|'`; \
449
-   fileso=`echo "$$files" | sed 's|$$|o|'`; \
450
-   echo " ( cd '$(DESTDIR)$(pythonBACKENDdir)' && rm -f" $$files ")"; \
451
-   cd "$(DESTDIR)$(pythonBACKENDdir)" && rm -f $$files || exit $$?; \
452
-   echo " ( cd '$(DESTDIR)$(pythonBACKENDdir)' && rm -f" $$filesc ")"; \
453
-   cd "$(DESTDIR)$(pythonBACKENDdir)" && rm -f $$filesc || exit $$?; \
454
-   echo " ( cd '$(DESTDIR)$(pythonBACKENDdir)' && rm -f" $$fileso ")"; \
455
-   cd "$(DESTDIR)$(pythonBACKENDdir)" && rm -f $$fileso
456
-install-pythonGUISPYTHON: $(pythonGUIS_PYTHON)
457
-   @$(NORMAL_INSTALL)
458
-   test -z "$(pythonGUISdir)" || $(MKDIR_P) "$(DESTDIR)$(pythonGUISdir)"
459
-   @list='$(pythonGUIS_PYTHON)'; dlist=; list2=; test -n "$(pythonGUISdir)" || list=; \
460
-   for p in $$list; do \
461
-     if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
462
-     if test -f $$b$$p; then \
463
-       $(am__strip_dir) \
464
-       dlist="$$dlist $$f"; \
465
-       list2="$$list2 $$b$$p"; \
466
-     else :; fi; \
467
-   done; \
468
-   for file in $$list2; do echo $$file; done | $(am__base_list) | \
469
-   while read files; do \
470
-     echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pythonGUISdir)'"; \
471
-     $(INSTALL_DATA) $$files "$(DESTDIR)$(pythonGUISdir)" || exit $$?; \
472
-   done || exit $$?; \
473
-   if test -n "$$dlist"; then \
474
-     if test -z "$(DESTDIR)"; then \
475
-       PYTHON=$(PYTHON) $(py_compile) --basedir "$(pythonGUISdir)" $$dlist; \
476
-     else \
477
-       PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(pythonGUISdir)" $$dlist; \
478
-     fi; \
479
-   else :; fi
480
-
481
-uninstall-pythonGUISPYTHON:
482
-   @$(NORMAL_UNINSTALL)
483
-   @list='$(pythonGUIS_PYTHON)'; test -n "$(pythonGUISdir)" || list=; \
484
-   files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
485
-   test -n "$$files" || exit 0; \
486
-   filesc=`echo "$$files" | sed 's|$$|c|'`; \
487
-   fileso=`echo "$$files" | sed 's|$$|o|'`; \
488
-   echo " ( cd '$(DESTDIR)$(pythonGUISdir)' && rm -f" $$files ")"; \
489
-   cd "$(DESTDIR)$(pythonGUISdir)" && rm -f $$files || exit $$?; \
490
-   echo " ( cd '$(DESTDIR)$(pythonGUISdir)' && rm -f" $$filesc ")"; \
491
-   cd "$(DESTDIR)$(pythonGUISdir)" && rm -f $$filesc || exit $$?; \
492
-   echo " ( cd '$(DESTDIR)$(pythonGUISdir)' && rm -f" $$fileso ")"; \
493
-   cd "$(DESTDIR)$(pythonGUISdir)" && rm -f $$fileso
494
-install-pythonLIBTOVIDPYTHON: $(pythonLIBTOVID_PYTHON)
495
-   @$(NORMAL_INSTALL)
496
-   test -z "$(pythonLIBTOVIDdir)" || $(MKDIR_P) "$(DESTDIR)$(pythonLIBTOVIDdir)"
497
-   @list='$(pythonLIBTOVID_PYTHON)'; dlist=; list2=; test -n "$(pythonLIBTOVIDdir)" || list=; \
498
-   for p in $$list; do \
499
-     if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
500
-     if test -f $$b$$p; then \
501
-       $(am__strip_dir) \
502
-       dlist="$$dlist $$f"; \
503
-       list2="$$list2 $$b$$p"; \
504
-     else :; fi; \
505
-   done; \
506
-   for file in $$list2; do echo $$file; done | $(am__base_list) | \
507
-   while read files; do \
508
-     echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pythonLIBTOVIDdir)'"; \
509
-     $(INSTALL_DATA) $$files "$(DESTDIR)$(pythonLIBTOVIDdir)" || exit $$?; \
510
-   done || exit $$?; \
511
-   if test -n "$$dlist"; then \
512
-     if test -z "$(DESTDIR)"; then \
513
-       PYTHON=$(PYTHON) $(py_compile) --basedir "$(pythonLIBTOVIDdir)" $$dlist; \
514
-     else \
515
-       PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(pythonLIBTOVIDdir)" $$dlist; \
516
-     fi; \
517
-   else :; fi
518
-
519
-uninstall-pythonLIBTOVIDPYTHON:
520
-   @$(NORMAL_UNINSTALL)
521
-   @list='$(pythonLIBTOVID_PYTHON)'; test -n "$(pythonLIBTOVIDdir)" || list=; \
522
-   files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
523
-   test -n "$$files" || exit 0; \
524
-   filesc=`echo "$$files" | sed 's|$$|c|'`; \
525
-   fileso=`echo "$$files" | sed 's|$$|o|'`; \
526
-   echo " ( cd '$(DESTDIR)$(pythonLIBTOVIDdir)' && rm -f" $$files ")"; \
527
-   cd "$(DESTDIR)$(pythonLIBTOVIDdir)" && rm -f $$files || exit $$?; \
528
-   echo " ( cd '$(DESTDIR)$(pythonLIBTOVIDdir)' && rm -f" $$filesc ")"; \
529
-   cd "$(DESTDIR)$(pythonLIBTOVIDdir)" && rm -f $$filesc || exit $$?; \
530
-   echo " ( cd '$(DESTDIR)$(pythonLIBTOVIDdir)' && rm -f" $$fileso ")"; \
531
-   cd "$(DESTDIR)$(pythonLIBTOVIDdir)" && rm -f $$fileso
532
-install-pythonMETAGUIPYTHON: $(pythonMETAGUI_PYTHON)
533
-   @$(NORMAL_INSTALL)
534
-   test -z "$(pythonMETAGUIdir)" || $(MKDIR_P) "$(DESTDIR)$(pythonMETAGUIdir)"
535
-   @list='$(pythonMETAGUI_PYTHON)'; dlist=; list2=; test -n "$(pythonMETAGUIdir)" || list=; \
536
-   for p in $$list; do \
537
-     if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
538
-     if test -f $$b$$p; then \
539
-       $(am__strip_dir) \
540
-       dlist="$$dlist $$f"; \
541
-       list2="$$list2 $$b$$p"; \
542
-     else :; fi; \
543
-   done; \
544
-   for file in $$list2; do echo $$file; done | $(am__base_list) | \
545
-   while read files; do \
546
-     echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pythonMETAGUIdir)'"; \
547
-     $(INSTALL_DATA) $$files "$(DESTDIR)$(pythonMETAGUIdir)" || exit $$?; \
548
-   done || exit $$?; \
549
-   if test -n "$$dlist"; then \
550
-     if test -z "$(DESTDIR)"; then \
551
-       PYTHON=$(PYTHON) $(py_compile) --basedir "$(pythonMETAGUIdir)" $$dlist; \
552
-     else \
553
-       PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(pythonMETAGUIdir)" $$dlist; \
554
-     fi; \
555
-   else :; fi
556
-
557
-uninstall-pythonMETAGUIPYTHON:
558
-   @$(NORMAL_UNINSTALL)
559
-   @list='$(pythonMETAGUI_PYTHON)'; test -n "$(pythonMETAGUIdir)" || list=; \
560
-   files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
561
-   test -n "$$files" || exit 0; \
562
-   filesc=`echo "$$files" | sed 's|$$|c|'`; \
563
-   fileso=`echo "$$files" | sed 's|$$|o|'`; \
564
-   echo " ( cd '$(DESTDIR)$(pythonMETAGUIdir)' && rm -f" $$files ")"; \
565
-   cd "$(DESTDIR)$(pythonMETAGUIdir)" && rm -f $$files || exit $$?; \
566
-   echo " ( cd '$(DESTDIR)$(pythonMETAGUIdir)' && rm -f" $$filesc ")"; \
567
-   cd "$(DESTDIR)$(pythonMETAGUIdir)" && rm -f $$filesc || exit $$?; \
568
-   echo " ( cd '$(DESTDIR)$(pythonMETAGUIdir)' && rm -f" $$fileso ")"; \
569
-   cd "$(DESTDIR)$(pythonMETAGUIdir)" && rm -f $$fileso
570
-install-pythonRENDERPYTHON: $(pythonRENDER_PYTHON)
571
-   @$(NORMAL_INSTALL)
572
-   test -z "$(pythonRENDERdir)" || $(MKDIR_P) "$(DESTDIR)$(pythonRENDERdir)"
573
-   @list='$(pythonRENDER_PYTHON)'; dlist=; list2=; test -n "$(pythonRENDERdir)" || list=; \
574
-   for p in $$list; do \
575
-     if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
576
-     if test -f $$b$$p; then \
577
-       $(am__strip_dir) \
578
-       dlist="$$dlist $$f"; \
579
-       list2="$$list2 $$b$$p"; \
580
-     else :; fi; \
581
-   done; \
582
-   for file in $$list2; do echo $$file; done | $(am__base_list) | \
583
-   while read files; do \
584
-     echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pythonRENDERdir)'"; \
585
-     $(INSTALL_DATA) $$files "$(DESTDIR)$(pythonRENDERdir)" || exit $$?; \
586
-   done || exit $$?; \
587
-   if test -n "$$dlist"; then \
588
-     if test -z "$(DESTDIR)"; then \
589
-       PYTHON=$(PYTHON) $(py_compile) --basedir "$(pythonRENDERdir)" $$dlist; \
590
-     else \
591
-       PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(pythonRENDERdir)" $$dlist; \
592
-     fi; \
593
-   else :; fi
594
-
595
-uninstall-pythonRENDERPYTHON:
596
-   @$(NORMAL_UNINSTALL)
597
-   @list='$(pythonRENDER_PYTHON)'; test -n "$(pythonRENDERdir)" || list=; \
598
-   files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
599
-   test -n "$$files" || exit 0; \
600
-   filesc=`echo "$$files" | sed 's|$$|c|'`; \
601
-   fileso=`echo "$$files" | sed 's|$$|o|'`; \
602
-   echo " ( cd '$(DESTDIR)$(pythonRENDERdir)' && rm -f" $$files ")"; \
603
-   cd "$(DESTDIR)$(pythonRENDERdir)" && rm -f $$files || exit $$?; \
604
-   echo " ( cd '$(DESTDIR)$(pythonRENDERdir)' && rm -f" $$filesc ")"; \
605
-   cd "$(DESTDIR)$(pythonRENDERdir)" && rm -f $$filesc || exit $$?; \
606
-   echo " ( cd '$(DESTDIR)$(pythonRENDERdir)' && rm -f" $$fileso ")"; \
607
-   cd "$(DESTDIR)$(pythonRENDERdir)" && rm -f $$fileso
608
-install-pythonTEMPLATEPYTHON: $(pythonTEMPLATE_PYTHON)
609
-   @$(NORMAL_INSTALL)
610
-   test -z "$(pythonTEMPLATEdir)" || $(MKDIR_P) "$(DESTDIR)$(pythonTEMPLATEdir)"
611
-   @list='$(pythonTEMPLATE_PYTHON)'; dlist=; list2=; test -n "$(pythonTEMPLATEdir)" || list=; \
612
-   for p in $$list; do \
613
-     if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
614
-     if test -f $$b$$p; then \
615
-       $(am__strip_dir) \
616
-       dlist="$$dlist $$f"; \
617
-       list2="$$list2 $$b$$p"; \
618
-     else :; fi; \
619
-   done; \
620
-   for file in $$list2; do echo $$file; done | $(am__base_list) | \
621
-   while read files; do \
622
-     echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pythonTEMPLATEdir)'"; \
623
-     $(INSTALL_DATA) $$files "$(DESTDIR)$(pythonTEMPLATEdir)" || exit $$?; \
624
-   done || exit $$?; \
625
-   if test -n "$$dlist"; then \
626
-     if test -z "$(DESTDIR)"; then \
627
-       PYTHON=$(PYTHON) $(py_compile) --basedir "$(pythonTEMPLATEdir)" $$dlist; \
628
-     else \
629
-       PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(pythonTEMPLATEdir)" $$dlist; \
630
-     fi; \
631
-   else :; fi
632
-
633
-uninstall-pythonTEMPLATEPYTHON:
634
-   @$(NORMAL_UNINSTALL)
635
-   @list='$(pythonTEMPLATE_PYTHON)'; test -n "$(pythonTEMPLATEdir)" || list=; \
636
-   files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
637
-   test -n "$$files" || exit 0; \
638
-   filesc=`echo "$$files" | sed 's|$$|c|'`; \
639
-   fileso=`echo "$$files" | sed 's|$$|o|'`; \
640
-   echo " ( cd '$(DESTDIR)$(pythonTEMPLATEdir)' && rm -f" $$files ")"; \
641
-   cd "$(DESTDIR)$(pythonTEMPLATEdir)" && rm -f $$files || exit $$?; \
642
-   echo " ( cd '$(DESTDIR)$(pythonTEMPLATEdir)' && rm -f" $$filesc ")"; \
643
-   cd "$(DESTDIR)$(pythonTEMPLATEdir)" && rm -f $$filesc || exit $$?; \
644
-   echo " ( cd '$(DESTDIR)$(pythonTEMPLATEdir)' && rm -f" $$fileso ")"; \
645
-   cd "$(DESTDIR)$(pythonTEMPLATEdir)" && rm -f $$fileso
646
-install-pythonUTILPYTHON: $(pythonUTIL_PYTHON)
647
-   @$(NORMAL_INSTALL)
648
-   test -z "$(pythonUTILdir)" || $(MKDIR_P) "$(DESTDIR)$(pythonUTILdir)"
649
-   @list='$(pythonUTIL_PYTHON)'; dlist=; list2=; test -n "$(pythonUTILdir)" || list=; \
650
-   for p in $$list; do \
651
-     if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
652
-     if test -f $$b$$p; then \
653
-       $(am__strip_dir) \
654
-       dlist="$$dlist $$f"; \
655
-       list2="$$list2 $$b$$p"; \
656
-     else :; fi; \
657
-   done; \
658
-   for file in $$list2; do echo $$file; done | $(am__base_list) | \
659
-   while read files; do \
660
-     echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pythonUTILdir)'"; \
661
-     $(INSTALL_DATA) $$files "$(DESTDIR)$(pythonUTILdir)" || exit $$?; \
662
-   done || exit $$?; \
663
-   if test -n "$$dlist"; then \
664
-     if test -z "$(DESTDIR)"; then \
665
-       PYTHON=$(PYTHON) $(py_compile) --basedir "$(pythonUTILdir)" $$dlist; \
666
-     else \
667
-       PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(pythonUTILdir)" $$dlist; \
668
-     fi; \
669
-   else :; fi
670
-
671
-uninstall-pythonUTILPYTHON:
672
-   @$(NORMAL_UNINSTALL)
673
-   @list='$(pythonUTIL_PYTHON)'; test -n "$(pythonUTILdir)" || list=; \
674
-   files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
675
-   test -n "$$files" || exit 0; \
676
-   filesc=`echo "$$files" | sed 's|$$|c|'`; \
677
-   fileso=`echo "$$files" | sed 's|$$|o|'`; \
678
-   echo " ( cd '$(DESTDIR)$(pythonUTILdir)' && rm -f" $$files ")"; \
679
-   cd "$(DESTDIR)$(pythonUTILdir)" && rm -f $$files || exit $$?; \
680
-   echo " ( cd '$(DESTDIR)$(pythonUTILdir)' && rm -f" $$filesc ")"; \
681
-   cd "$(DESTDIR)$(pythonUTILdir)" && rm -f $$filesc || exit $$?; \
682
-   echo " ( cd '$(DESTDIR)$(pythonUTILdir)' && rm -f" $$fileso ")"; \
683
-   cd "$(DESTDIR)$(pythonUTILdir)" && rm -f $$fileso
684
-install-man1: $(man_MANS)
685
-   @$(NORMAL_INSTALL)
686
-   test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
687
-   @list=''; test -n "$(man1dir)" || exit 0; \
688
-   { for i in $$list; do echo "$$i"; done; \
689
-   l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
690
-     sed -n '/\.1[a-z]*$$/p'; \
691
-   } | while read p; do \
692
-     if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
693
-     echo "$$d$$p"; echo "$$p"; \
694
-   done | \
695
-   sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
696
-         -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
697
-   sed 'N;N;s,\n, ,g' | { \
698
-   list=; while read file base inst; do \
699
-     if test "$$base" = "$$inst"; then list="$$list $$file"; else \
700
-       echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
701
-       $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
702
-     fi; \
703
-   done; \
704
-   for i in $$list; do echo "$$i"; done | $(am__base_list) | \
705
-   while read files; do \
706
-     test -z "$$files" || { \
707
-       echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
708
-       $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
709
-   done; }
710
-
711
-uninstall-man1:
712
-   @$(NORMAL_UNINSTALL)
713
-   @list=''; test -n "$(man1dir)" || exit 0; \
714
-   files=`{ for i in $$list; do echo "$$i"; done; \
715
-   l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
716
-     sed -n '/\.1[a-z]*$$/p'; \
717
-   } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
718
-         -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
719
-   test -z "$$files" || { \
720
-     echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
721
-     cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
722
-install-dist_appDATA: $(dist_app_DATA)
723
-   @$(NORMAL_INSTALL)
724
-   test -z "$(appdir)" || $(MKDIR_P) "$(DESTDIR)$(appdir)"
725
-   @list='$(dist_app_DATA)'; test -n "$(appdir)" || list=; \
726
-   for p in $$list; do \
727
-     if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
728
-     echo "$$d$$p"; \
729
-   done | $(am__base_list) | \
730
-   while read files; do \
731
-     echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(appdir)'"; \
732
-     $(INSTALL_DATA) $$files "$(DESTDIR)$(appdir)" || exit $$?; \
733
-   done
734
-
735
-uninstall-dist_appDATA:
736
-   @$(NORMAL_UNINSTALL)
737
-   @list='$(dist_app_DATA)'; test -n "$(appdir)" || list=; \
738
-   files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
739
-   test -n "$$files" || exit 0; \
740
-   echo " ( cd '$(DESTDIR)$(appdir)' && rm -f" $$files ")"; \
741
-   cd "$(DESTDIR)$(appdir)" && rm -f $$files
742
-install-dist_icon128DATA: $(dist_icon128_DATA)
743
-   @$(NORMAL_INSTALL)
744
-   test -z "$(icon128dir)" || $(MKDIR_P) "$(DESTDIR)$(icon128dir)"
745
-   @list='$(dist_icon128_DATA)'; test -n "$(icon128dir)" || list=; \
746
-   for p in $$list; do \
747
-     if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
748
-     echo "$$d$$p"; \
749
-   done | $(am__base_list) | \
750
-   while read files; do \
751
-     echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(icon128dir)'"; \
752
-     $(INSTALL_DATA) $$files "$(DESTDIR)$(icon128dir)" || exit $$?; \
753
-   done
754
-
755
-uninstall-dist_icon128DATA:
756
-   @$(NORMAL_UNINSTALL)
757
-   @list='$(dist_icon128_DATA)'; test -n "$(icon128dir)" || list=; \
758
-   files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
759
-   test -n "$$files" || exit 0; \
760
-   echo " ( cd '$(DESTDIR)$(icon128dir)' && rm -f" $$files ")"; \
761
-   cd "$(DESTDIR)$(icon128dir)" && rm -f $$files
762
-install-dist_icon32DATA: $(dist_icon32_DATA)
763
-   @$(NORMAL_INSTALL)
764
-   test -z "$(icon32dir)" || $(MKDIR_P) "$(DESTDIR)$(icon32dir)"
765
-   @list='$(dist_icon32_DATA)'; test -n "$(icon32dir)" || list=; \
766
-   for p in $$list; do \
767
-     if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
768
-     echo "$$d$$p"; \
769
-   done | $(am__base_list) | \
770
-   while read files; do \
771
-     echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(icon32dir)'"; \
772
-     $(INSTALL_DATA) $$files "$(DESTDIR)$(icon32dir)" || exit $$?; \
773
-   done
774
-
775
-uninstall-dist_icon32DATA:
776
-   @$(NORMAL_UNINSTALL)
777
-   @list='$(dist_icon32_DATA)'; test -n "$(icon32dir)" || list=; \
778
-   files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
779
-   test -n "$$files" || exit 0; \
780
-   echo " ( cd '$(DESTDIR)$(icon32dir)' && rm -f" $$files ")"; \
781
-   cd "$(DESTDIR)$(icon32dir)" && rm -f $$files
782
-install-dist_icon48DATA: $(dist_icon48_DATA)
783
-   @$(NORMAL_INSTALL)
784
-   test -z "$(icon48dir)" || $(MKDIR_P) "$(DESTDIR)$(icon48dir)"
785
-   @list='$(dist_icon48_DATA)'; test -n "$(icon48dir)" || list=; \
786
-   for p in $$list; do \
787
-     if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
788
-     echo "$$d$$p"; \
789
-   done | $(am__base_list) | \
790
-   while read files; do \
791
-     echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(icon48dir)'"; \
792
-     $(INSTALL_DATA) $$files "$(DESTDIR)$(icon48dir)" || exit $$?; \
793
-   done
794
-
795
-uninstall-dist_icon48DATA:
796
-   @$(NORMAL_UNINSTALL)
797
-   @list='$(dist_icon48_DATA)'; test -n "$(icon48dir)" || list=; \
798
-   files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
799
-   test -n "$$files" || exit 0; \
800
-   echo " ( cd '$(DESTDIR)$(icon48dir)' && rm -f" $$files ")"; \
801
-   cd "$(DESTDIR)$(icon48dir)" && rm -f $$files
802
-install-dist_icon64DATA: $(dist_icon64_DATA)
803
-   @$(NORMAL_INSTALL)
804
-   test -z "$(icon64dir)" || $(MKDIR_P) "$(DESTDIR)$(icon64dir)"
805
-   @list='$(dist_icon64_DATA)'; test -n "$(icon64dir)" || list=; \
806
-   for p in $$list; do \
807
-     if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
808
-     echo "$$d$$p"; \
809
-   done | $(am__base_list) | \
810
-   while read files; do \
811
-     echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(icon64dir)'"; \
812
-     $(INSTALL_DATA) $$files "$(DESTDIR)$(icon64dir)" || exit $$?; \
813
-   done
814
-
815
-uninstall-dist_icon64DATA:
816
-   @$(NORMAL_UNINSTALL)
817
-   @list='$(dist_icon64_DATA)'; test -n "$(icon64dir)" || list=; \
818
-   files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
819
-   test -n "$$files" || exit 0; \
820
-   echo " ( cd '$(DESTDIR)$(icon64dir)' && rm -f" $$files ")"; \
821
-   cd "$(DESTDIR)$(icon64dir)" && rm -f $$files
822
-install-dist_iconSVGDATA: $(dist_iconSVG_DATA)
823
-   @$(NORMAL_INSTALL)
824
-   test -z "$(iconSVGdir)" || $(MKDIR_P) "$(DESTDIR)$(iconSVGdir)"
825
-   @list='$(dist_iconSVG_DATA)'; test -n "$(iconSVGdir)" || list=; \
826
-   for p in $$list; do \
827
-     if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
828
-     echo "$$d$$p"; \
829
-   done | $(am__base_list) | \
830
-   while read files; do \
831
-     echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(iconSVGdir)'"; \
832
-     $(INSTALL_DATA) $$files "$(DESTDIR)$(iconSVGdir)" || exit $$?; \
833
-   done
834
-
835
-uninstall-dist_iconSVGDATA:
836
-   @$(NORMAL_UNINSTALL)
837
-   @list='$(dist_iconSVG_DATA)'; test -n "$(iconSVGdir)" || list=; \
838
-   files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
839
-   test -n "$$files" || exit 0; \
840
-   echo " ( cd '$(DESTDIR)$(iconSVGdir)' && rm -f" $$files ")"; \
841
-   cd "$(DESTDIR)$(iconSVGdir)" && rm -f $$files
842
-tags: TAGS
843
-TAGS:
844
-
845
-ctags: CTAGS
846
-CTAGS:
847
-
848
-
849
-distdir: $(DISTFILES)
850
-   @list='$(MANS)'; if test -n "$$list"; then \
851
-     list=`for p in $$list; do \
852
-       if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
853
-       if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
854
-     if test -n "$$list" && \
855
-       grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
856
-       echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
857
-       grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/         /' >&2; \
858
-       echo "       to fix them, install help2man, remove and regenerate the man pages;" >&2; \
859
-       echo "       typically \`make maintainer-clean' will remove them" >&2; \
860
-       exit 1; \
861
-     else :; fi; \
862
-   else :; fi
863
-   $(am__remove_distdir)
864
-   test -d "$(distdir)" || mkdir "$(distdir)"
865
-   @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
866
-   topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
867
-   list='$(DISTFILES)'; \
868
-     dist_files=`for file in $$list; do echo $$file; done | \
869
-     sed -e "s|^$$srcdirstrip/||;t" \
870
-         -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
871
-   case $$dist_files in \
872
-     */*) $(MKDIR_P) `echo "$$dist_files" | \
873
-              sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
874
-              sort -u` ;; \
875
-   esac; \
876
-   for file in $$dist_files; do \
877
-     if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
878
-     if test -d $$d/$$file; then \
879
-       dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
880
-       if test -d "$(distdir)/$$file"; then \
881
-         find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
882
-       fi; \
883
-       if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
884
-         cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
885
-         find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
886
-       fi; \
887
-       cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
888
-     else \
889
-       test -f "$(distdir)/$$file" \
890
-       || cp -p $$d/$$file "$(distdir)/$$file" \
891
-       || exit 1; \
892
-     fi; \
893
-   done
894
-   $(MAKE) $(AM_MAKEFLAGS) \
895
-     top_distdir="$(top_distdir)" distdir="$(distdir)" \
896
-     dist-hook
897
-   -test -n "$(am__skip_mode_fix)" \
898
-   || find "$(distdir)" -type d ! -perm -755 \
899
-       -exec chmod u+rwx,go+rx {} \; -o \
900
-     ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
901
-     ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
902
-     ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
903
-   || chmod -R a+r "$(distdir)"
904
-dist-gzip: distdir
905
-   tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
906
-   $(am__remove_distdir)
907
-
908
-dist-bzip2: distdir
909
-   tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
910
-   $(am__remove_distdir)
911
-
912
-dist-lzma: distdir
913
-   tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
914
-   $(am__remove_distdir)
915
-
916
-dist-xz: distdir
917
-   tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
918
-   $(am__remove_distdir)
919
-
920
-dist-tarZ: distdir
921
-   tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
922
-   $(am__remove_distdir)
923
-
924
-dist-shar: distdir
925
-   shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
926
-   $(am__remove_distdir)
927
-
928
-dist-zip: distdir
929
-   -rm -f $(distdir).zip
930
-   zip -rq $(distdir).zip $(distdir)
931
-   $(am__remove_distdir)
932
-
933
-dist dist-all: distdir
934
-   tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
935
-   $(am__remove_distdir)
936
-
937
-# This target untars the dist file and tries a VPATH configuration.  Then
938
-# it guarantees that the distribution is self-contained by making another
939
-# tarfile.
940
-distcheck: dist
941
-   case '$(DIST_ARCHIVES)' in \
942
-   *.tar.gz*) \
943
-     GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
944
-   *.tar.bz2*) \
945
-     bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
946
-   *.tar.lzma*) \
947
-     lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
948
-   *.tar.xz*) \
949
-     xz -dc $(distdir).tar.xz | $(am__untar) ;;\
950
-   *.tar.Z*) \
951
-     uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
952
-   *.shar.gz*) \
953
-     GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
954
-   *.zip*) \
955
-     unzip $(distdir).zip ;;\
956
-   esac
957
-   chmod -R a-w $(distdir); chmod a+w $(distdir)
958
-   mkdir $(distdir)/_build
959
-   mkdir $(distdir)/_inst
960
-   chmod a-w $(distdir)
961
-   test -d $(distdir)/_build || exit 0; \
962
-   dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
963
-     && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
964
-     && am__cwd=`pwd` \
965
-     && $(am__cd) $(distdir)/_build \
966
-     && ../configure --srcdir=.. --prefix="$$dc_install_base" \
967
-       $(DISTCHECK_CONFIGURE_FLAGS) \
968
-     && $(MAKE) $(AM_MAKEFLAGS) \
969
-     && $(MAKE) $(AM_MAKEFLAGS) dvi \
970
-     && $(MAKE) $(AM_MAKEFLAGS) check \
971
-     && $(MAKE) $(AM_MAKEFLAGS) install \
972
-     && $(MAKE) $(AM_MAKEFLAGS) installcheck \
973
-     && $(MAKE) $(AM_MAKEFLAGS) uninstall \
974
-     && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
975
-           distuninstallcheck \
976
-     && chmod -R a-w "$$dc_install_base" \
977
-     && ({ \
978
-          (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
979
-          && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
980
-          && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
981
-          && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
982
-               distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
983
-         } || { rm -rf "$$dc_destdir"; exit 1; }) \
984
-     && rm -rf "$$dc_destdir" \
985
-     && $(MAKE) $(AM_MAKEFLAGS) dist \
986
-     && rm -rf $(DIST_ARCHIVES) \
987
-     && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
988
-     && cd "$$am__cwd" \
989
-     || exit 1
990
-   $(am__remove_distdir)
991
-   @(echo "$(distdir) archives ready for distribution: "; \
992
-     list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
993
-     sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
994
-distuninstallcheck:
995
-   @$(am__cd) '$(distuninstallcheck_dir)' \
996
-   && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
997
-      || { echo "ERROR: files left after uninstall:" ; \
998
-           if test -n "$(DESTDIR)"; then \
999
-             echo "  (check DESTDIR support)"; \
1000
-           fi ; \
1001
-           $(distuninstallcheck_listfiles) ; \
1002
-           exit 1; } >&2
1003
-distcleancheck: distclean
1004
-   @if test '$(srcdir)' = . ; then \
1005
-     echo "ERROR: distcleancheck can only run from a VPATH build" ; \
1006
-     exit 1 ; \
1007
-   fi
1008
-   @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
1009
-     || { echo "ERROR: files left in build directory after distclean:" ; \
1010
-          $(distcleancheck_listfiles) ; \
1011
-          exit 1; } >&2
1012
-check-am: all-am
1013
-check: check-am
1014
-all-am: Makefile $(SCRIPTS) $(MANS) $(DATA)
1015
-installdirs:
1016
-   for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pythonBACKENDdir)" "$(DESTDIR)$(pythonGUISdir)" "$(DESTDIR)$(pythonLIBTOVIDdir)" "$(DESTDIR)$(pythonMETAGUIdir)" "$(DESTDIR)$(pythonRENDERdir)" "$(DESTDIR)$(pythonTEMPLATEdir)" "$(DESTDIR)$(pythonUTILdir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(appdir)" "$(DESTDIR)$(icon128dir)" "$(DESTDIR)$(icon32dir)" "$(DESTDIR)$(icon48dir)" "$(DESTDIR)$(icon64dir)" "$(DESTDIR)$(iconSVGdir)"; do \
1017
-     test -z "$$dir" || $(MKDIR_P) "$$dir"; \
1018
-   done
1019
-install: install-am
1020
-install-exec: install-exec-am
1021
-install-data: install-data-am
1022
-uninstall: uninstall-am
1023
-
1024
-install-am: all-am
1025
-   @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
1026
-
1027
-installcheck: installcheck-am
1028
-install-strip:
1029
-   $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
1030
-     install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
1031
-     `test -z '$(STRIP)' || \
1032
-       echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
1033
-mostlyclean-generic:
1034
-
1035
-clean-generic:
1036
-
1037
-distclean-generic:
1038
-   -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
1039
-   -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
1040
-
1041
-maintainer-clean-generic:
1042
-   @echo "This command is intended for maintainers to use"
1043
-   @echo "it deletes files that may require special tools to rebuild."
1044
-clean: clean-am
1045
-
1046
-clean-am: clean-generic mostlyclean-am
1047
-
1048
-distclean: distclean-am
1049
-   -rm -f $(am__CONFIG_DISTCLEAN_FILES)
1050
-   -rm -f Makefile
1051
-distclean-am: clean-am distclean-generic
1052
-
1053
-dvi: dvi-am
1054
-
1055
-dvi-am:
1056
-
1057
-html: html-am
1058
-
1059
-html-am:
1060
-
1061
-info: info-am
1062
-
1063
-info-am:
1064
-
1065
-install-data-am: install-dist_appDATA install-dist_icon128DATA \
1066
-   install-dist_icon32DATA install-dist_icon48DATA \
1067
-   install-dist_icon64DATA install-dist_iconSVGDATA install-man \
1068
-   install-pythonBACKENDPYTHON install-pythonGUISPYTHON \
1069
-   install-pythonLIBTOVIDPYTHON install-pythonMETAGUIPYTHON \
1070
-   install-pythonRENDERPYTHON install-pythonTEMPLATEPYTHON \
1071
-   install-pythonUTILPYTHON
1072
-
1073
-install-dvi: install-dvi-am
1074
-
1075
-install-dvi-am:
1076
-
1077
-install-exec-am: install-binSCRIPTS
1078
-   @$(NORMAL_INSTALL)
1079
-   $(MAKE) $(AM_MAKEFLAGS) install-exec-hook
1080
-install-html: install-html-am
1081
-
1082
-install-html-am:
1083
-
1084
-install-info: install-info-am
1085
-
1086
-install-info-am:
1087
-
1088
-install-man: install-man1
1089
-
1090
-install-pdf: install-pdf-am
1091
-
1092
-install-pdf-am:
1093
-
1094
-install-ps: install-ps-am
1095
-
1096
-install-ps-am:
1097
-
1098
-installcheck-am:
1099
-
1100
-maintainer-clean: maintainer-clean-am
1101
-   -rm -f $(am__CONFIG_DISTCLEAN_FILES)
1102
-   -rm -rf $(top_srcdir)/autom4te.cache
1103
-   -rm -f Makefile
1104
-maintainer-clean-am: distclean-am maintainer-clean-generic
1105
-
1106
-mostlyclean: mostlyclean-am
1107
-
1108
-mostlyclean-am: mostlyclean-generic
1109
-
1110
-pdf: pdf-am
1111
-
1112
-pdf-am:
1113
-
1114
-ps: ps-am
1115
-
1116
-ps-am:
1117
-
1118
-uninstall-am: uninstall-binSCRIPTS uninstall-dist_appDATA \
1119
-   uninstall-dist_icon128DATA uninstall-dist_icon32DATA \
1120
-   uninstall-dist_icon48DATA uninstall-dist_icon64DATA \
1121
-   uninstall-dist_iconSVGDATA uninstall-man \
1122
-   uninstall-pythonBACKENDPYTHON uninstall-pythonGUISPYTHON \
1123
-   uninstall-pythonLIBTOVIDPYTHON uninstall-pythonMETAGUIPYTHON \
1124
-   uninstall-pythonRENDERPYTHON uninstall-pythonTEMPLATEPYTHON \
1125
-   uninstall-pythonUTILPYTHON
1126
-   @$(NORMAL_INSTALL)
1127
-   $(MAKE) $(AM_MAKEFLAGS) uninstall-hook
1128
-uninstall-man: uninstall-man1
1129
-
1130
-.MAKE: install-am install-exec-am install-strip uninstall-am
1131
-
1132
-.PHONY: all all-am am--refresh check check-am clean clean-generic dist \
1133
-   dist-all dist-bzip2 dist-gzip dist-hook dist-lzma dist-shar \
1134
-   dist-tarZ dist-xz dist-zip distcheck distclean \
1135
-   distclean-generic distcleancheck distdir distuninstallcheck \
1136
-   dvi dvi-am html html-am info info-am install install-am \
1137
-   install-binSCRIPTS install-data install-data-am \
1138
-   install-dist_appDATA install-dist_icon128DATA \
1139
-   install-dist_icon32DATA install-dist_icon48DATA \
1140
-   install-dist_icon64DATA install-dist_iconSVGDATA install-dvi \
1141
-   install-dvi-am install-exec install-exec-am install-exec-hook \
1142
-   install-html install-html-am install-info install-info-am \
1143
-   install-man install-man1 install-pdf install-pdf-am install-ps \
1144
-   install-ps-am install-pythonBACKENDPYTHON \
1145
-   install-pythonGUISPYTHON install-pythonLIBTOVIDPYTHON \
1146
-   install-pythonMETAGUIPYTHON install-pythonRENDERPYTHON \
1147
-   install-pythonTEMPLATEPYTHON install-pythonUTILPYTHON \
1148
-   install-strip installcheck installcheck-am installdirs \
1149
-   maintainer-clean maintainer-clean-generic mostlyclean \
1150
-   mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \
1151
-   uninstall-binSCRIPTS uninstall-dist_appDATA \
1152
-   uninstall-dist_icon128DATA uninstall-dist_icon32DATA \
1153
-   uninstall-dist_icon48DATA uninstall-dist_icon64DATA \
1154
-   uninstall-dist_iconSVGDATA uninstall-hook uninstall-man \
1155
-   uninstall-man1 uninstall-pythonBACKENDPYTHON \
1156
-   uninstall-pythonGUISPYTHON uninstall-pythonLIBTOVIDPYTHON \
1157
-   uninstall-pythonMETAGUIPYTHON uninstall-pythonRENDERPYTHON \
1158
-   uninstall-pythonTEMPLATEPYTHON uninstall-pythonUTILPYTHON
1159
-
1160
-
1161
-# Make the manpages for svn users (tarball users' man pages made in dist-hook)
1162
-#   This is a static pattern rule as seen on (TV!)
1163
-#   http://www.gnu.org/software/make/manual/make.html#Static-Pattern
1164
-$(man_MANS): $(man_dir)/%.1: $(man_src_dir)/%.t2t
1165
-   txt2tags -t man -i "$<" -o "$@"
1166
-
1167
-# src/tovid-init not needed b/c ./configure derives it from src/tovid-init.in
1168
-# make the output directory for the man pages, since t2t won't
1169
-dist-hook:
1170
-   rm -rvf $(top_distdir)/src/tovid-init
1171
-   mkdir $(top_distdir)/docs/man
1172
-
1173
-# Hook to create a symbolic link for the main 'tovid' script
1174
-# FIXME: $(LN_S) is supposed to work since AC_PROG_LN_S is in configure.ac,
1175
-# but it doesn't for whatever reason (evaluates to empty string).
1176
-# For now, using explicit `ln -s`
1177
-install-exec-hook:
1178
-   rm -fv "$(prefix)/bin/tovid"
1179
-   ln -s "$(DESTDIR)$(bindir)/tovid" "$(prefix)/bin/tovid"
1180
-
1181
-# After uninstalling tovid, remove the python module directories
1182
-uninstall-hook:
1183
-   rmdir $(pythonGUISdir)
1184
-   rmdir $(pythonBACKENDdir)
1185
-   rmdir $(pythonRENDERdir)
1186
-   rmdir $(pythonTEMPLATEdir)
1187
-   rmdir $(pythonMETAGUIdir)
1188
-   rmdir $(pythonUTILdir)
1189
-   rmdir $(pythonLIBTOVIDdir)
1190
-   rm $(prefix)/bin/tovid
1191
-
1192
-# A little fun :-)
1193
-sense:
1194
-   fold -w 78 -s SENSE | less
1195
-
1196
-# Allow only the bash scripts to be installed/uninstalled
1197
-# These were copied and modified from the Makefile after ./configure was
1198
-# run. A little quantum leaping :-)
1199
-install-bash: $(sh_bin)
1200
-   @$(NORMAL_INSTALL)
1201
-   test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
1202
-   @list='$(sh_bin)'; for p in $$list; do \
1203
-     if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
1204
-     if test -f $$d$$p; then \
1205
-       f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
1206
-       echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \
1207
-       $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \
1208
-     else :; fi; \
1209
-   done
1210
-
1211
-uninstall-bash:
1212
-   @$(NORMAL_UNINSTALL)
1213
-   @list='$(sh_bin)'; for p in $$list; do \
1214
-     f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
1215
-     echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
1216
-     rm -f "$(DESTDIR)$(bindir)/$$f"; \
1217
-   done
1218
-
1219
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
1220
-# Otherwise a system limit (for SysV at least) may be exceeded.
1221
-.NOEXPORT:
1222
tovid-0.33.tar.bz2/SENSE Deleted
30
 
1
@@ -1,28 +0,0 @@
2
-Master Foo once said to a visiting programmer: "There is more Unix-nature in one line of shell script than there is in ten thousand lines of C."
3
-
4
-The programmer, who was very proud of his mastery of C, said: "How can this be? C is the language in which the very kernel of Unix is implemented!"
5
-
6
-Master Foo replied: "That is so. Nevertheless, there is more Unix-nature in one line of shell script than there is in ten thousand lines of C."
7
-
8
-The programmer grew distressed. "But through the C language we experience the enlightenment of the Patriarch Ritchie! We become as one with the operating system and the machine, reaping matchless performance!"
9
-
10
-Master Foo replied: "All that you say is true. But there is still more Unix-nature in one line of shell script than there is in ten thousand lines of C."
11
-
12
-The programmer scoffed at Master Foo and rose to depart. But Master Foo nodded to his student Nubi, who wrote a line of shell script on a nearby whiteboard, and said: "Master programmer, consider this pipeline. Implemented in pure C, would it not span ten thousand lines?"
13
-
14
-The programmer muttered through his beard, contemplating what Nubi had written. Finally he agreed that it was so.
15
-
16
-"And how many hours would you require to implement and debug that C program?" asked Nubi.
17
-
18
-"Many," admitted the visiting programmer. "But only a fool would spend the time to do that when so many more worthy tasks await him."
19
-
20
-"And who better understands the Unix-nature?" Master Foo asked. "Is it he who writes the ten thousand lines, or he who, perceiving the emptiness of the task, gains merit by not coding?"
21
-
22
-Upon hearing this, the programmer was enlightened.
23
-
24
-         -- http://www.catb.org/~esr/writings/unix-koans/ten-thousand.html
25
-
26
-What happens when you have ten thousand lines of shell script (like tovid)?
27
-
28
-(q to quit)
29
-
30
tovid-0.33.tar.bz2/aclocal.m4 Deleted
825
 
1
@@ -1,823 +0,0 @@
2
-# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
3
-
4
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
5
-# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
6
-# This file is free software; the Free Software Foundation
7
-# gives unlimited permission to copy and/or distribute it,
8
-# with or without modifications, as long as this notice is preserved.
9
-
10
-# This program is distributed in the hope that it will be useful,
11
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13
-# PARTICULAR PURPOSE.
14
-
15
-m4_ifndef([AC_AUTOCONF_VERSION],
16
-  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
17
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],,
18
-[m4_warning([this file was generated for autoconf 2.63.
19
-You have another version of autoconf.  It may work, but is not guaranteed to.
20
-If you have problems, you may need to regenerate the build system entirely.
21
-To do so, use the procedure documented by the package, typically `autoreconf'.])])
22
-
23
-# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
24
-#
25
-# This file is free software; the Free Software Foundation
26
-# gives unlimited permission to copy and/or distribute it,
27
-# with or without modifications, as long as this notice is preserved.
28
-
29
-# AM_AUTOMAKE_VERSION(VERSION)
30
-# ----------------------------
31
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
32
-# generated from the m4 files accompanying Automake X.Y.
33
-# (This private macro should not be called outside this file.)
34
-AC_DEFUN([AM_AUTOMAKE_VERSION],
35
-[am__api_version='1.11'
36
-dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
37
-dnl require some minimum version.  Point them to the right macro.
38
-m4_if([$1], [1.11.1], [],
39
-      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
40
-])
41
-
42
-# _AM_AUTOCONF_VERSION(VERSION)
43
-# -----------------------------
44
-# aclocal traces this macro to find the Autoconf version.
45
-# This is a private macro too.  Using m4_define simplifies
46
-# the logic in aclocal, which can simply ignore this definition.
47
-m4_define([_AM_AUTOCONF_VERSION], [])
48
-
49
-# AM_SET_CURRENT_AUTOMAKE_VERSION
50
-# -------------------------------
51
-# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
52
-# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
53
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
54
-[AM_AUTOMAKE_VERSION([1.11.1])dnl
55
-m4_ifndef([AC_AUTOCONF_VERSION],
56
-  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
57
-_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
58
-
59
-# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
60
-
61
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
62
-#
63
-# This file is free software; the Free Software Foundation
64
-# gives unlimited permission to copy and/or distribute it,
65
-# with or without modifications, as long as this notice is preserved.
66
-
67
-# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
68
-# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
69
-# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
70
-#
71
-# Of course, Automake must honor this variable whenever it calls a
72
-# tool from the auxiliary directory.  The problem is that $srcdir (and
73
-# therefore $ac_aux_dir as well) can be either absolute or relative,
74
-# depending on how configure is run.  This is pretty annoying, since
75
-# it makes $ac_aux_dir quite unusable in subdirectories: in the top
76
-# source directory, any form will work fine, but in subdirectories a
77
-# relative path needs to be adjusted first.
78
-#
79
-# $ac_aux_dir/missing
80
-#    fails when called from a subdirectory if $ac_aux_dir is relative
81
-# $top_srcdir/$ac_aux_dir/missing
82
-#    fails if $ac_aux_dir is absolute,
83
-#    fails when called from a subdirectory in a VPATH build with
84
-#          a relative $ac_aux_dir
85
-#
86
-# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
87
-# are both prefixed by $srcdir.  In an in-source build this is usually
88
-# harmless because $srcdir is `.', but things will broke when you
89
-# start a VPATH build or use an absolute $srcdir.
90
-#
91
-# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
92
-# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
93
-#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
94
-# and then we would define $MISSING as
95
-#   MISSING="\${SHELL} $am_aux_dir/missing"
96
-# This will work as long as MISSING is not called from configure, because
97
-# unfortunately $(top_srcdir) has no meaning in configure.
98
-# However there are other variables, like CC, which are often used in
99
-# configure, and could therefore not use this "fixed" $ac_aux_dir.
100
-#
101
-# Another solution, used here, is to always expand $ac_aux_dir to an
102
-# absolute PATH.  The drawback is that using absolute paths prevent a
103
-# configured tree to be moved without reconfiguration.
104
-
105
-AC_DEFUN([AM_AUX_DIR_EXPAND],
106
-[dnl Rely on autoconf to set up CDPATH properly.
107
-AC_PREREQ([2.50])dnl
108
-# expand $ac_aux_dir to an absolute path
109
-am_aux_dir=`cd $ac_aux_dir && pwd`
110
-])
111
-
112
-# Do all the work for Automake.                             -*- Autoconf -*-
113
-
114
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
115
-# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
116
-#
117
-# This file is free software; the Free Software Foundation
118
-# gives unlimited permission to copy and/or distribute it,
119
-# with or without modifications, as long as this notice is preserved.
120
-
121
-# serial 16
122
-
123
-# This macro actually does too much.  Some checks are only needed if
124
-# your package does certain things.  But this isn't really a big deal.
125
-
126
-# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
127
-# AM_INIT_AUTOMAKE([OPTIONS])
128
-# -----------------------------------------------
129
-# The call with PACKAGE and VERSION arguments is the old style
130
-# call (pre autoconf-2.50), which is being phased out.  PACKAGE
131
-# and VERSION should now be passed to AC_INIT and removed from
132
-# the call to AM_INIT_AUTOMAKE.
133
-# We support both call styles for the transition.  After
134
-# the next Automake release, Autoconf can make the AC_INIT
135
-# arguments mandatory, and then we can depend on a new Autoconf
136
-# release and drop the old call support.
137
-AC_DEFUN([AM_INIT_AUTOMAKE],
138
-[AC_PREREQ([2.62])dnl
139
-dnl Autoconf wants to disallow AM_ names.  We explicitly allow
140
-dnl the ones we care about.
141
-m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
142
-AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
143
-AC_REQUIRE([AC_PROG_INSTALL])dnl
144
-if test "`cd $srcdir && pwd`" != "`pwd`"; then
145
-  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
146
-  # is not polluted with repeated "-I."
147
-  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
148
-  # test to see if srcdir already configured
149
-  if test -f $srcdir/config.status; then
150
-    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
151
-  fi
152
-fi
153
-
154
-# test whether we have cygpath
155
-if test -z "$CYGPATH_W"; then
156
-  if (cygpath --version) >/dev/null 2>/dev/null; then
157
-    CYGPATH_W='cygpath -w'
158
-  else
159
-    CYGPATH_W=echo
160
-  fi
161
-fi
162
-AC_SUBST([CYGPATH_W])
163
-
164
-# Define the identity of the package.
165
-dnl Distinguish between old-style and new-style calls.
166
-m4_ifval([$2],
167
-[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
168
- AC_SUBST([PACKAGE], [$1])dnl
169
- AC_SUBST([VERSION], [$2])],
170
-[_AM_SET_OPTIONS([$1])dnl
171
-dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
172
-m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
173
-  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
174
- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
175
- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
176
-
177
-_AM_IF_OPTION([no-define],,
178
-[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
179
- AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
180
-
181
-# Some tools Automake needs.
182
-AC_REQUIRE([AM_SANITY_CHECK])dnl
183
-AC_REQUIRE([AC_ARG_PROGRAM])dnl
184
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
185
-AM_MISSING_PROG(AUTOCONF, autoconf)
186
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
187
-AM_MISSING_PROG(AUTOHEADER, autoheader)
188
-AM_MISSING_PROG(MAKEINFO, makeinfo)
189
-AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
190
-AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
191
-AC_REQUIRE([AM_PROG_MKDIR_P])dnl
192
-# We need awk for the "check" target.  The system "awk" is bad on
193
-# some platforms.
194
-AC_REQUIRE([AC_PROG_AWK])dnl
195
-AC_REQUIRE([AC_PROG_MAKE_SET])dnl
196
-AC_REQUIRE([AM_SET_LEADING_DOT])dnl
197
-_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
198
-         [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
199
-                [_AM_PROG_TAR([v7])])])
200
-_AM_IF_OPTION([no-dependencies],,
201
-[AC_PROVIDE_IFELSE([AC_PROG_CC],
202
-         [_AM_DEPENDENCIES(CC)],
203
-         [define([AC_PROG_CC],
204
-             defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
205
-AC_PROVIDE_IFELSE([AC_PROG_CXX],
206
-         [_AM_DEPENDENCIES(CXX)],
207
-         [define([AC_PROG_CXX],
208
-             defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
209
-AC_PROVIDE_IFELSE([AC_PROG_OBJC],
210
-         [_AM_DEPENDENCIES(OBJC)],
211
-         [define([AC_PROG_OBJC],
212
-             defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
213
-])
214
-_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
215
-dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
216
-dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
217
-dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
218
-AC_CONFIG_COMMANDS_PRE(dnl
219
-[m4_provide_if([_AM_COMPILER_EXEEXT],
220
-  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
221
-])
222
-
223
-dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
224
-dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
225
-dnl mangled by Autoconf and run in a shell conditional statement.
226
-m4_define([_AC_COMPILER_EXEEXT],
227
-m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
228
-
229
-
230
-# When config.status generates a header, we must update the stamp-h file.
231
-# This file resides in the same directory as the config header
232
-# that is generated.  The stamp files are numbered to have different names.
233
-
234
-# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
235
-# loop where config.status creates the headers, so we can generate
236
-# our stamp files there.
237
-AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
238
-[# Compute $1's index in $config_headers.
239
-_am_arg=$1
240
-_am_stamp_count=1
241
-for _am_header in $config_headers :; do
242
-  case $_am_header in
243
-    $_am_arg | $_am_arg:* )
244
-      break ;;
245
-    * )
246
-      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
247
-  esac
248
-done
249
-echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
250
-
251
-# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
252
-#
253
-# This file is free software; the Free Software Foundation
254
-# gives unlimited permission to copy and/or distribute it,
255
-# with or without modifications, as long as this notice is preserved.
256
-
257
-# AM_PROG_INSTALL_SH
258
-# ------------------
259
-# Define $install_sh.
260
-AC_DEFUN([AM_PROG_INSTALL_SH],
261
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
262
-if test x"${install_sh}" != xset; then
263
-  case $am_aux_dir in
264
-  *\ * | *\    *)
265
-    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
266
-  *)
267
-    install_sh="\${SHELL} $am_aux_dir/install-sh"
268
-  esac
269
-fi
270
-AC_SUBST(install_sh)])
271
-
272
-# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
273
-#
274
-# This file is free software; the Free Software Foundation
275
-# gives unlimited permission to copy and/or distribute it,
276
-# with or without modifications, as long as this notice is preserved.
277
-
278
-# serial 2
279
-
280
-# Check whether the underlying file-system supports filenames
281
-# with a leading dot.  For instance MS-DOS doesn't.
282
-AC_DEFUN([AM_SET_LEADING_DOT],
283
-[rm -rf .tst 2>/dev/null
284
-mkdir .tst 2>/dev/null
285
-if test -d .tst; then
286
-  am__leading_dot=.
287
-else
288
-  am__leading_dot=_
289
-fi
290
-rmdir .tst 2>/dev/null
291
-AC_SUBST([am__leading_dot])])
292
-
293
-# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
294
-
295
-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
296
-# Free Software Foundation, Inc.
297
-#
298
-# This file is free software; the Free Software Foundation
299
-# gives unlimited permission to copy and/or distribute it,
300
-# with or without modifications, as long as this notice is preserved.
301
-
302
-# serial 6
303
-
304
-# AM_MISSING_PROG(NAME, PROGRAM)
305
-# ------------------------------
306
-AC_DEFUN([AM_MISSING_PROG],
307
-[AC_REQUIRE([AM_MISSING_HAS_RUN])
308
-$1=${$1-"${am_missing_run}$2"}
309
-AC_SUBST($1)])
310
-
311
-
312
-# AM_MISSING_HAS_RUN
313
-# ------------------
314
-# Define MISSING if not defined so far and test if it supports --run.
315
-# If it does, set am_missing_run to use it, otherwise, to nothing.
316
-AC_DEFUN([AM_MISSING_HAS_RUN],
317
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
318
-AC_REQUIRE_AUX_FILE([missing])dnl
319
-if test x"${MISSING+set}" != xset; then
320
-  case $am_aux_dir in
321
-  *\ * | *\    *)
322
-    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
323
-  *)
324
-    MISSING="\${SHELL} $am_aux_dir/missing" ;;
325
-  esac
326
-fi
327
-# Use eval to expand $SHELL
328
-if eval "$MISSING --run true"; then
329
-  am_missing_run="$MISSING --run "
330
-else
331
-  am_missing_run=
332
-  AC_MSG_WARN([`missing' script is too old or missing])
333
-fi
334
-])
335
-
336
-# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
337
-#
338
-# This file is free software; the Free Software Foundation
339
-# gives unlimited permission to copy and/or distribute it,
340
-# with or without modifications, as long as this notice is preserved.
341
-
342
-# AM_PROG_MKDIR_P
343
-# ---------------
344
-# Check for `mkdir -p'.
345
-AC_DEFUN([AM_PROG_MKDIR_P],
346
-[AC_PREREQ([2.60])dnl
347
-AC_REQUIRE([AC_PROG_MKDIR_P])dnl
348
-dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
349
-dnl while keeping a definition of mkdir_p for backward compatibility.
350
-dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
351
-dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
352
-dnl Makefile.ins that do not define MKDIR_P, so we do our own
353
-dnl adjustment using top_builddir (which is defined more often than
354
-dnl MKDIR_P).
355
-AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
356
-case $mkdir_p in
357
-  [[\\/$]]* | ?:[[\\/]]*) ;;
358
-  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
359
-esac
360
-])
361
-
362
-# Helper functions for option handling.                     -*- Autoconf -*-
363
-
364
-# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
365
-#
366
-# This file is free software; the Free Software Foundation
367
-# gives unlimited permission to copy and/or distribute it,
368
-# with or without modifications, as long as this notice is preserved.
369
-
370
-# serial 4
371
-
372
-# _AM_MANGLE_OPTION(NAME)
373
-# -----------------------
374
-AC_DEFUN([_AM_MANGLE_OPTION],
375
-[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
376
-
377
-# _AM_SET_OPTION(NAME)
378
-# ------------------------------
379
-# Set option NAME.  Presently that only means defining a flag for this option.
380
-AC_DEFUN([_AM_SET_OPTION],
381
-[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
382
-
383
-# _AM_SET_OPTIONS(OPTIONS)
384
-# ----------------------------------
385
-# OPTIONS is a space-separated list of Automake options.
386
-AC_DEFUN([_AM_SET_OPTIONS],
387
-[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
388
-
389
-# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
390
-# -------------------------------------------
391
-# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
392
-AC_DEFUN([_AM_IF_OPTION],
393
-[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
394
-
395
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009
396
-# Free Software Foundation, Inc.
397
-#
398
-# This file is free software; the Free Software Foundation
399
-# gives unlimited permission to copy and/or distribute it,
400
-# with or without modifications, as long as this notice is preserved.
401
-
402
-# AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
403
-# ---------------------------------------------------------------------------
404
-# Adds support for distributing Python modules and packages.  To
405
-# install modules, copy them to $(pythondir), using the python_PYTHON
406
-# automake variable.  To install a package with the same name as the
407
-# automake package, install to $(pkgpythondir), or use the
408
-# pkgpython_PYTHON automake variable.
409
-#
410
-# The variables $(pyexecdir) and $(pkgpyexecdir) are provided as
411
-# locations to install python extension modules (shared libraries).
412
-# Another macro is required to find the appropriate flags to compile
413
-# extension modules.
414
-#
415
-# If your package is configured with a different prefix to python,
416
-# users will have to add the install directory to the PYTHONPATH
417
-# environment variable, or create a .pth file (see the python
418
-# documentation for details).
419
-#
420
-# If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will
421
-# cause an error if the version of python installed on the system
422
-# doesn't meet the requirement.  MINIMUM-VERSION should consist of
423
-# numbers and dots only.
424
-AC_DEFUN([AM_PATH_PYTHON],
425
- [
426
-  dnl Find a Python interpreter.  Python versions prior to 2.0 are not
427
-  dnl supported. (2.0 was released on October 16, 2000).
428
-  m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
429
-                    [python python2 python3 python3.0 python2.5 python2.4 python2.3 python2.2 dnl
430
-python2.1 python2.0])
431
-
432
-  m4_if([$1],[],[
433
-    dnl No version check is needed.
434
-    # Find any Python interpreter.
435
-    if test -z "$PYTHON"; then
436
-      AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :)
437
-    fi
438
-    am_display_PYTHON=python
439
-  ], [
440
-    dnl A version check is needed.
441
-    if test -n "$PYTHON"; then
442
-      # If the user set $PYTHON, use it and don't search something else.
443
-      AC_MSG_CHECKING([whether $PYTHON version >= $1])
444
-      AM_PYTHON_CHECK_VERSION([$PYTHON], [$1],
445
-                 [AC_MSG_RESULT(yes)],
446
-                 [AC_MSG_ERROR(too old)])
447
-      am_display_PYTHON=$PYTHON
448
-    else
449
-      # Otherwise, try each interpreter until we find one that satisfies
450
-      # VERSION.
451
-      AC_CACHE_CHECK([for a Python interpreter with version >= $1],
452
-   [am_cv_pathless_PYTHON],[
453
-   for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do
454
-     test "$am_cv_pathless_PYTHON" = none && break
455
-     AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break])
456
-   done])
457
-      # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
458
-      if test "$am_cv_pathless_PYTHON" = none; then
459
-   PYTHON=:
460
-      else
461
-        AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON])
462
-      fi
463
-      am_display_PYTHON=$am_cv_pathless_PYTHON
464
-    fi
465
-  ])
466
-
467
-  if test "$PYTHON" = :; then
468
-  dnl Run any user-specified action, or abort.
469
-    m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])])
470
-  else
471
-
472
-  dnl Query Python for its version number.  Getting [:3] seems to be
473
-  dnl the best way to do this; it's what "site.py" does in the standard
474
-  dnl library.
475
-
476
-  AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version],
477
-    [am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`])
478
-  AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
479
-
480
-  dnl Use the values of $prefix and $exec_prefix for the corresponding
481
-  dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX.  These are made
482
-  dnl distinct variables so they can be overridden if need be.  However,
483
-  dnl general consensus is that you shouldn't need this ability.
484
-
485
-  AC_SUBST([PYTHON_PREFIX], ['${prefix}'])
486
-  AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}'])
487
-
488
-  dnl At times (like when building shared libraries) you may want
489
-  dnl to know which OS platform Python thinks this is.
490
-
491
-  AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform],
492
-    [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`])
493
-  AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform])
494
-
495
-
496
-  dnl Set up 4 directories:
497
-
498
-  dnl pythondir -- where to install python scripts.  This is the
499
-  dnl   site-packages directory, not the python standard library
500
-  dnl   directory like in previous automake betas.  This behavior
501
-  dnl   is more consistent with lispdir.m4 for example.
502
-  dnl Query distutils for this directory.  distutils does not exist in
503
-  dnl Python 1.5, so we fall back to the hardcoded directory if it
504
-  dnl doesn't work.
505
-  AC_CACHE_CHECK([for $am_display_PYTHON script directory],
506
-    [am_cv_python_pythondir],
507
-    [if test "x$prefix" = xNONE
508
-     then
509
-       am_py_prefix=$ac_default_prefix
510
-     else
511
-       am_py_prefix=$prefix
512
-     fi
513
-     am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null ||
514
-     echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`
515
-     case $am_cv_python_pythondir in
516
-     $am_py_prefix*)
517
-       am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
518
-       am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"`
519
-       ;;
520
-     *)
521
-       case $am_py_prefix in
522
-         /usr|/System*) ;;
523
-         *)
524
-     am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages
525
-     ;;
526
-       esac
527
-       ;;
528
-     esac
529
-    ])
530
-  AC_SUBST([pythondir], [$am_cv_python_pythondir])
531
-
532
-  dnl pkgpythondir -- $PACKAGE directory under pythondir.  Was
533
-  dnl   PYTHON_SITE_PACKAGE in previous betas, but this naming is
534
-  dnl   more consistent with the rest of automake.
535
-
536
-  AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE])
537
-
538
-  dnl pyexecdir -- directory for installing python extension modules
539
-  dnl   (shared libraries)
540
-  dnl Query distutils for this directory.  distutils does not exist in
541
-  dnl Python 1.5, so we fall back to the hardcoded directory if it
542
-  dnl doesn't work.
543
-  AC_CACHE_CHECK([for $am_display_PYTHON extension module directory],
544
-    [am_cv_python_pyexecdir],
545
-    [if test "x$exec_prefix" = xNONE
546
-     then
547
-       am_py_exec_prefix=$am_py_prefix
548
-     else
549
-       am_py_exec_prefix=$exec_prefix
550
-     fi
551
-     am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null ||
552
-     echo "$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages"`
553
-     case $am_cv_python_pyexecdir in
554
-     $am_py_exec_prefix*)
555
-       am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
556
-       am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"`
557
-       ;;
558
-     *)
559
-       case $am_py_exec_prefix in
560
-         /usr|/System*) ;;
561
-         *)
562
-      am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages
563
-      ;;
564
-       esac
565
-       ;;
566
-     esac
567
-    ])
568
-  AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir])
569
-
570
-  dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE)
571
-
572
-  AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE])
573
-
574
-  dnl Run any user-specified action.
575
-  $2
576
-  fi
577
-
578
-])
579
-
580
-
581
-# AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
582
-# ---------------------------------------------------------------------------
583
-# Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION.
584
-# Run ACTION-IF-FALSE otherwise.
585
-# This test uses sys.hexversion instead of the string equivalent (first
586
-# word of sys.version), in order to cope with versions such as 2.2c1.
587
-# This supports Python 2.0 or higher. (2.0 was released on October 16, 2000).
588
-AC_DEFUN([AM_PYTHON_CHECK_VERSION],
589
- [prog="import sys
590
-# split strings by '.' and convert to numeric.  Append some zeros
591
-# because we need at least 4 digits for the hex conversion.
592
-# map returns an iterator in Python 3.0 and a list in 2.x
593
-minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]]
594
-minverhex = 0
595
-# xrange is not present in Python 3.0 and range returns an iterator
596
-for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]]
597
-sys.exit(sys.hexversion < minverhex)"
598
-  AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
599
-
600
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
601
-#
602
-# This file is free software; the Free Software Foundation
603
-# gives unlimited permission to copy and/or distribute it,
604
-# with or without modifications, as long as this notice is preserved.
605
-
606
-# AM_RUN_LOG(COMMAND)
607
-# -------------------
608
-# Run COMMAND, save the exit status in ac_status, and log it.
609
-# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
610
-AC_DEFUN([AM_RUN_LOG],
611
-[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
612
-   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
613
-   ac_status=$?
614
-   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
615
-   (exit $ac_status); }])
616
-
617
-# Check to make sure that the build environment is sane.    -*- Autoconf -*-
618
-
619
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
620
-# Free Software Foundation, Inc.
621
-#
622
-# This file is free software; the Free Software Foundation
623
-# gives unlimited permission to copy and/or distribute it,
624
-# with or without modifications, as long as this notice is preserved.
625
-
626
-# serial 5
627
-
628
-# AM_SANITY_CHECK
629
-# ---------------
630
-AC_DEFUN([AM_SANITY_CHECK],
631
-[AC_MSG_CHECKING([whether build environment is sane])
632
-# Just in case
633
-sleep 1
634
-echo timestamp > conftest.file
635
-# Reject unsafe characters in $srcdir or the absolute working directory
636
-# name.  Accept space and tab only in the latter.
637
-am_lf='
638
-'
639
-case `pwd` in
640
-  *[[\\\"\#\$\&\'\`$am_lf]]*)
641
-    AC_MSG_ERROR([unsafe absolute working directory name]);;
642
-esac
643
-case $srcdir in
644
-  *[[\\\"\#\$\&\'\`$am_lf\ \   ]]*)
645
-    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
646
-esac
647
-
648
-# Do `set' in a subshell so we don't clobber the current shell's
649
-# arguments.  Must try -L first in case configure is actually a
650
-# symlink; some systems play weird games with the mod time of symlinks
651
-# (eg FreeBSD returns the mod time of the symlink's containing
652
-# directory).
653
-if (
654
-   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
655
-   if test "$[*]" = "X"; then
656
-      # -L didn't work.
657
-      set X `ls -t "$srcdir/configure" conftest.file`
658
-   fi
659
-   rm -f conftest.file
660
-   if test "$[*]" != "X $srcdir/configure conftest.file" \
661
-      && test "$[*]" != "X conftest.file $srcdir/configure"; then
662
-
663
-      # If neither matched, then we have a broken ls.  This can happen
664
-      # if, for instance, CONFIG_SHELL is bash and it inherits a
665
-      # broken ls alias from the environment.  This has actually
666
-      # happened.  Such a system could not be considered "sane".
667
-      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
668
-alias in your environment])
669
-   fi
670
-
671
-   test "$[2]" = conftest.file
672
-   )
673
-then
674
-   # Ok.
675
-   :
676
-else
677
-   AC_MSG_ERROR([newly created file is older than distributed files!
678
-Check your system clock])
679
-fi
680
-AC_MSG_RESULT(yes)])
681
-
682
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
683
-#
684
-# This file is free software; the Free Software Foundation
685
-# gives unlimited permission to copy and/or distribute it,
686
-# with or without modifications, as long as this notice is preserved.
687
-
688
-# AM_PROG_INSTALL_STRIP
689
-# ---------------------
690
-# One issue with vendor `install' (even GNU) is that you can't
691
-# specify the program used to strip binaries.  This is especially
692
-# annoying in cross-compiling environments, where the build's strip
693
-# is unlikely to handle the host's binaries.
694
-# Fortunately install-sh will honor a STRIPPROG variable, so we
695
-# always use install-sh in `make install-strip', and initialize
696
-# STRIPPROG with the value of the STRIP variable (set by the user).
697
-AC_DEFUN([AM_PROG_INSTALL_STRIP],
698
-[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
699
-# Installed binaries are usually stripped using `strip' when the user
700
-# run `make install-strip'.  However `strip' might not be the right
701
-# tool to use in cross-compilation environments, therefore Automake
702
-# will honor the `STRIP' environment variable to overrule this program.
703
-dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
704
-if test "$cross_compiling" != no; then
705
-  AC_CHECK_TOOL([STRIP], [strip], :)
706
-fi
707
-INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
708
-AC_SUBST([INSTALL_STRIP_PROGRAM])])
709
-
710
-# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
711
-#
712
-# This file is free software; the Free Software Foundation
713
-# gives unlimited permission to copy and/or distribute it,
714
-# with or without modifications, as long as this notice is preserved.
715
-
716
-# serial 2
717
-
718
-# _AM_SUBST_NOTMAKE(VARIABLE)
719
-# ---------------------------
720
-# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
721
-# This macro is traced by Automake.
722
-AC_DEFUN([_AM_SUBST_NOTMAKE])
723
-
724
-# AM_SUBST_NOTMAKE(VARIABLE)
725
-# ---------------------------
726
-# Public sister of _AM_SUBST_NOTMAKE.
727
-AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
728
-
729
-# Check how to create a tarball.                            -*- Autoconf -*-
730
-
731
-# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
732
-#
733
-# This file is free software; the Free Software Foundation
734
-# gives unlimited permission to copy and/or distribute it,
735
-# with or without modifications, as long as this notice is preserved.
736
-
737
-# serial 2
738
-
739
-# _AM_PROG_TAR(FORMAT)
740
-# --------------------
741
-# Check how to create a tarball in format FORMAT.
742
-# FORMAT should be one of `v7', `ustar', or `pax'.
743
-#
744
-# Substitute a variable $(am__tar) that is a command
745
-# writing to stdout a FORMAT-tarball containing the directory
746
-# $tardir.
747
-#     tardir=directory && $(am__tar) > result.tar
748
-#
749
-# Substitute a variable $(am__untar) that extract such
750
-# a tarball read from stdin.
751
-#     $(am__untar) < result.tar
752
-AC_DEFUN([_AM_PROG_TAR],
753
-[# Always define AMTAR for backward compatibility.
754
-AM_MISSING_PROG([AMTAR], [tar])
755
-m4_if([$1], [v7],
756
-     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
757
-     [m4_case([$1], [ustar],, [pax],,
758
-              [m4_fatal([Unknown tar format])])
759
-AC_MSG_CHECKING([how to create a $1 tar archive])
760
-# Loop over all known methods to create a tar archive until one works.
761
-_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
762
-_am_tools=${am_cv_prog_tar_$1-$_am_tools}
763
-# Do not fold the above two line into one, because Tru64 sh and
764
-# Solaris sh will not grok spaces in the rhs of `-'.
765
-for _am_tool in $_am_tools
766
-do
767
-  case $_am_tool in
768
-  gnutar)
769
-    for _am_tar in tar gnutar gtar;
770
-    do
771
-      AM_RUN_LOG([$_am_tar --version]) && break
772
-    done
773
-    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
774
-    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
775
-    am__untar="$_am_tar -xf -"
776
-    ;;
777
-  plaintar)
778
-    # Must skip GNU tar: if it does not support --format= it doesn't create
779
-    # ustar tarball either.
780
-    (tar --version) >/dev/null 2>&1 && continue
781
-    am__tar='tar chf - "$$tardir"'
782
-    am__tar_='tar chf - "$tardir"'
783
-    am__untar='tar xf -'
784
-    ;;
785
-  pax)
786
-    am__tar='pax -L -x $1 -w "$$tardir"'
787
-    am__tar_='pax -L -x $1 -w "$tardir"'
788
-    am__untar='pax -r'
789
-    ;;
790
-  cpio)
791
-    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
792
-    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
793
-    am__untar='cpio -i -H $1 -d'
794
-    ;;
795
-  none)
796
-    am__tar=false
797
-    am__tar_=false
798
-    am__untar=false
799
-    ;;
800
-  esac
801
-
802
-  # If the value was cached, stop now.  We just wanted to have am__tar
803
-  # and am__untar set.
804
-  test -n "${am_cv_prog_tar_$1}" && break
805
-
806
-  # tar/untar a dummy directory, and stop if the command works
807
-  rm -rf conftest.dir
808
-  mkdir conftest.dir
809
-  echo GrepMe > conftest.dir/file
810
-  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
811
-  rm -rf conftest.dir
812
-  if test -s conftest.tar; then
813
-    AM_RUN_LOG([$am__untar <conftest.tar])
814
-    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
815
-  fi
816
-done
817
-rm -rf conftest.dir
818
-
819
-AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
820
-AC_MSG_RESULT([$am_cv_prog_tar_$1])])
821
-AC_SUBST([am__tar])
822
-AC_SUBST([am__untar])
823
-]) # _AM_PROG_TAR
824
-
825
tovid-0.33.tar.bz2/configure Deleted
3854
 
1
@@ -1,3851 +0,0 @@
2
-#! /bin/sh
3
-# Guess values for system-dependent variables and create Makefiles.
4
-# Generated by GNU Autoconf 2.63 for tovid svn.
5
-#
6
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
7
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
8
-# This configure script is free software; the Free Software Foundation
9
-# gives unlimited permission to copy, distribute and modify it.
10
-## --------------------- ##
11
-## M4sh Initialization.  ##
12
-## --------------------- ##
13
-
14
-# Be more Bourne compatible
15
-DUALCASE=1; export DUALCASE # for MKS sh
16
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17
-  emulate sh
18
-  NULLCMD=:
19
-  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
20
-  # is contrary to our usage.  Disable this feature.
21
-  alias -g '${1+"$@"}'='"$@"'
22
-  setopt NO_GLOB_SUBST
23
-else
24
-  case `(set -o) 2>/dev/null` in
25
-  *posix*) set -o posix ;;
26
-esac
27
-
28
-fi
29
-
30
-
31
-
32
-
33
-# PATH needs CR
34
-# Avoid depending upon Character Ranges.
35
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
36
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
37
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
38
-as_cr_digits='0123456789'
39
-as_cr_alnum=$as_cr_Letters$as_cr_digits
40
-
41
-as_nl='
42
-'
43
-export as_nl
44
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
45
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
46
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
47
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
48
-if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
49
-  as_echo='printf %s\n'
50
-  as_echo_n='printf %s'
51
-else
52
-  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
53
-    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
54
-    as_echo_n='/usr/ucb/echo -n'
55
-  else
56
-    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
57
-    as_echo_n_body='eval
58
-      arg=$1;
59
-      case $arg in
60
-      *"$as_nl"*)
61
-   expr "X$arg" : "X\\(.*\\)$as_nl";
62
-   arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
63
-      esac;
64
-      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
65
-    '
66
-    export as_echo_n_body
67
-    as_echo_n='sh -c $as_echo_n_body as_echo'
68
-  fi
69
-  export as_echo_body
70
-  as_echo='sh -c $as_echo_body as_echo'
71
-fi
72
-
73
-# The user is always right.
74
-if test "${PATH_SEPARATOR+set}" != set; then
75
-  PATH_SEPARATOR=:
76
-  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
77
-    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
78
-      PATH_SEPARATOR=';'
79
-  }
80
-fi
81
-
82
-# Support unset when possible.
83
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
84
-  as_unset=unset
85
-else
86
-  as_unset=false
87
-fi
88
-
89
-
90
-# IFS
91
-# We need space, tab and new line, in precisely that order.  Quoting is
92
-# there to prevent editors from complaining about space-tab.
93
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
94
-# splitting by setting IFS to empty value.)
95
-IFS=" ""   $as_nl"
96
-
97
-# Find who we are.  Look in the path if we contain no directory separator.
98
-case $0 in
99
-  *[\\/]* ) as_myself=$0 ;;
100
-  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
101
-for as_dir in $PATH
102
-do
103
-  IFS=$as_save_IFS
104
-  test -z "$as_dir" && as_dir=.
105
-  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
106
-done
107
-IFS=$as_save_IFS
108
-
109
-     ;;
110
-esac
111
-# We did not find ourselves, most probably we were run as `sh COMMAND'
112
-# in which case we are not to be found in the path.
113
-if test "x$as_myself" = x; then
114
-  as_myself=$0
115
-fi
116
-if test ! -f "$as_myself"; then
117
-  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
118
-  { (exit 1); exit 1; }
119
-fi
120
-
121
-# Work around bugs in pre-3.0 UWIN ksh.
122
-for as_var in ENV MAIL MAILPATH
123
-do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
124
-done
125
-PS1='$ '
126
-PS2='> '
127
-PS4='+ '
128
-
129
-# NLS nuisances.
130
-LC_ALL=C
131
-export LC_ALL
132
-LANGUAGE=C
133
-export LANGUAGE
134
-
135
-# Required to use basename.
136
-if expr a : '\(a\)' >/dev/null 2>&1 &&
137
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
138
-  as_expr=expr
139
-else
140
-  as_expr=false
141
-fi
142
-
143
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
144
-  as_basename=basename
145
-else
146
-  as_basename=false
147
-fi
148
-
149
-
150
-# Name of the executable.
151
-as_me=`$as_basename -- "$0" ||
152
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
153
-    X"$0" : 'X\(//\)$' \| \
154
-    X"$0" : 'X\(/\)' \| . 2>/dev/null ||
155
-$as_echo X/"$0" |
156
-    sed '/^.*\/\([^/][^/]*\)\/*$/{
157
-       s//\1/
158
-       q
159
-     }
160
-     /^X\/\(\/\/\)$/{
161
-       s//\1/
162
-       q
163
-     }
164
-     /^X\/\(\/\).*/{
165
-       s//\1/
166
-       q
167
-     }
168
-     s/.*/./; q'`
169
-
170
-# CDPATH.
171
-$as_unset CDPATH
172
-
173
-
174
-if test "x$CONFIG_SHELL" = x; then
175
-  if (eval ":") 2>/dev/null; then
176
-  as_have_required=yes
177
-else
178
-  as_have_required=no
179
-fi
180
-
181
-  if test $as_have_required = yes &&    (eval ":
182
-(as_func_return () {
183
-  (exit \$1)
184
-}
185
-as_func_success () {
186
-  as_func_return 0
187
-}
188
-as_func_failure () {
189
-  as_func_return 1
190
-}
191
-as_func_ret_success () {
192
-  return 0
193
-}
194
-as_func_ret_failure () {
195
-  return 1
196
-}
197
-
198
-exitcode=0
199
-if as_func_success; then
200
-  :
201
-else
202
-  exitcode=1
203
-  echo as_func_success failed.
204
-fi
205
-
206
-if as_func_failure; then
207
-  exitcode=1
208
-  echo as_func_failure succeeded.
209
-fi
210
-
211
-if as_func_ret_success; then
212
-  :
213
-else
214
-  exitcode=1
215
-  echo as_func_ret_success failed.
216
-fi
217
-
218
-if as_func_ret_failure; then
219
-  exitcode=1
220
-  echo as_func_ret_failure succeeded.
221
-fi
222
-
223
-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
224
-  :
225
-else
226
-  exitcode=1
227
-  echo positional parameters were not saved.
228
-fi
229
-
230
-test \$exitcode = 0) || { (exit 1); exit 1; }
231
-
232
-(
233
-  as_lineno_1=\$LINENO
234
-  as_lineno_2=\$LINENO
235
-  test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
236
-  test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
237
-") 2> /dev/null; then
238
-  :
239
-else
240
-  as_candidate_shells=
241
-    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
242
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
243
-do
244
-  IFS=$as_save_IFS
245
-  test -z "$as_dir" && as_dir=.
246
-  case $as_dir in
247
-    /*)
248
-      for as_base in sh bash ksh sh5; do
249
-        as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
250
-      done;;
251
-       esac
252
-done
253
-IFS=$as_save_IFS
254
-
255
-
256
-      for as_shell in $as_candidate_shells $SHELL; do
257
-    # Try only shells that exist, to save several forks.
258
-    if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
259
-       { ("$as_shell") 2> /dev/null <<\_ASEOF
260
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
261
-  emulate sh
262
-  NULLCMD=:
263
-  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
264
-  # is contrary to our usage.  Disable this feature.
265
-  alias -g '${1+"$@"}'='"$@"'
266
-  setopt NO_GLOB_SUBST
267
-else
268
-  case `(set -o) 2>/dev/null` in
269
-  *posix*) set -o posix ;;
270
-esac
271
-
272
-fi
273
-
274
-
275
-:
276
-_ASEOF
277
-}; then
278
-  CONFIG_SHELL=$as_shell
279
-          as_have_required=yes
280
-          if { "$as_shell" 2> /dev/null <<\_ASEOF
281
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
282
-  emulate sh
283
-  NULLCMD=:
284
-  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
285
-  # is contrary to our usage.  Disable this feature.
286
-  alias -g '${1+"$@"}'='"$@"'
287
-  setopt NO_GLOB_SUBST
288
-else
289
-  case `(set -o) 2>/dev/null` in
290
-  *posix*) set -o posix ;;
291
-esac
292
-
293
-fi
294
-
295
-
296
-:
297
-(as_func_return () {
298
-  (exit $1)
299
-}
300
-as_func_success () {
301
-  as_func_return 0
302
-}
303
-as_func_failure () {
304
-  as_func_return 1
305
-}
306
-as_func_ret_success () {
307
-  return 0
308
-}
309
-as_func_ret_failure () {
310
-  return 1
311
-}
312
-
313
-exitcode=0
314
-if as_func_success; then
315
-  :
316
-else
317
-  exitcode=1
318
-  echo as_func_success failed.
319
-fi
320
-
321
-if as_func_failure; then
322
-  exitcode=1
323
-  echo as_func_failure succeeded.
324
-fi
325
-
326
-if as_func_ret_success; then
327
-  :
328
-else
329
-  exitcode=1
330
-  echo as_func_ret_success failed.
331
-fi
332
-
333
-if as_func_ret_failure; then
334
-  exitcode=1
335
-  echo as_func_ret_failure succeeded.
336
-fi
337
-
338
-if ( set x; as_func_ret_success y && test x = "$1" ); then
339
-  :
340
-else
341
-  exitcode=1
342
-  echo positional parameters were not saved.
343
-fi
344
-
345
-test $exitcode = 0) || { (exit 1); exit 1; }
346
-
347
-(
348
-  as_lineno_1=$LINENO
349
-  as_lineno_2=$LINENO
350
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
351
-  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
352
-
353
-_ASEOF
354
-}; then
355
-  break
356
-fi
357
-
358
-fi
359
-
360
-      done
361
-
362
-      if test "x$CONFIG_SHELL" != x; then
363
-  for as_var in BASH_ENV ENV
364
-   do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
365
-   done
366
-   export CONFIG_SHELL
367
-   exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
368
-fi
369
-
370
-
371
-    if test $as_have_required = no; then
372
-  echo This script requires a shell more modern than all the
373
-      echo shells that I found on your system.  Please install a
374
-      echo modern shell, or manually run the script under such a
375
-      echo shell if you do have one.
376
-      { (exit 1); exit 1; }
377
-fi
378
-
379
-
380
-fi
381
-
382
-fi
383
-
384
-
385
-
386
-(eval "as_func_return () {
387
-  (exit \$1)
388
-}
389
-as_func_success () {
390
-  as_func_return 0
391
-}
392
-as_func_failure () {
393
-  as_func_return 1
394
-}
395
-as_func_ret_success () {
396
-  return 0
397
-}
398
-as_func_ret_failure () {
399
-  return 1
400
-}
401
-
402
-exitcode=0
403
-if as_func_success; then
404
-  :
405
-else
406
-  exitcode=1
407
-  echo as_func_success failed.
408
-fi
409
-
410
-if as_func_failure; then
411
-  exitcode=1
412
-  echo as_func_failure succeeded.
413
-fi
414
-
415
-if as_func_ret_success; then
416
-  :
417
-else
418
-  exitcode=1
419
-  echo as_func_ret_success failed.
420
-fi
421
-
422
-if as_func_ret_failure; then
423
-  exitcode=1
424
-  echo as_func_ret_failure succeeded.
425
-fi
426
-
427
-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
428
-  :
429
-else
430
-  exitcode=1
431
-  echo positional parameters were not saved.
432
-fi
433
-
434
-test \$exitcode = 0") || {
435
-  echo No shell found that supports shell functions.
436
-  echo Please tell bug-autoconf@gnu.org about your system,
437
-  echo including any error possibly output before this message.
438
-  echo This can help us improve future autoconf versions.
439
-  echo Configuration will now proceed without shell functions.
440
-}
441
-
442
-
443
-
444
-  as_lineno_1=$LINENO
445
-  as_lineno_2=$LINENO
446
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
447
-  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
448
-
449
-  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
450
-  # uniformly replaced by the line number.  The first 'sed' inserts a
451
-  # line-number line after each line using $LINENO; the second 'sed'
452
-  # does the real work.  The second script uses 'N' to pair each
453
-  # line-number line with the line containing $LINENO, and appends
454
-  # trailing '-' during substitution so that $LINENO is not a special
455
-  # case at line end.
456
-  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
457
-  # scripts with optimization help from Paolo Bonzini.  Blame Lee
458
-  # E. McMahon (1931-1989) for sed's syntax.  :-)
459
-  sed -n '
460
-    p
461
-    /[$]LINENO/=
462
-  ' <$as_myself |
463
-    sed '
464
-      s/[$]LINENO.*/&-/
465
-      t lineno
466
-      b
467
-      :lineno
468
-      N
469
-      :loop
470
-      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
471
-      t loop
472
-      s/-\n.*//
473
-    ' >$as_me.lineno &&
474
-  chmod +x "$as_me.lineno" ||
475
-    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
476
-   { (exit 1); exit 1; }; }
477
-
478
-  # Don't try to exec as it changes $[0], causing all sort of problems
479
-  # (the dirname of $[0] is not the place where we might find the
480
-  # original and so on.  Autoconf is especially sensitive to this).
481
-  . "./$as_me.lineno"
482
-  # Exit status is that of the last command.
483
-  exit
484
-}
485
-
486
-
487
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
488
-  as_dirname=dirname
489
-else
490
-  as_dirname=false
491
-fi
492
-
493
-ECHO_C= ECHO_N= ECHO_T=
494
-case `echo -n x` in
495
--n*)
496
-  case `echo 'x\c'` in
497
-  *c*) ECHO_T='    ';; # ECHO_T is single tab character.
498
-  *)   ECHO_C='\c';;
499
-  esac;;
500
-*)
501
-  ECHO_N='-n';;
502
-esac
503
-if expr a : '\(a\)' >/dev/null 2>&1 &&
504
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
505
-  as_expr=expr
506
-else
507
-  as_expr=false
508
-fi
509
-
510
-rm -f conf$$ conf$$.exe conf$$.file
511
-if test -d conf$$.dir; then
512
-  rm -f conf$$.dir/conf$$.file
513
-else
514
-  rm -f conf$$.dir
515
-  mkdir conf$$.dir 2>/dev/null
516
-fi
517
-if (echo >conf$$.file) 2>/dev/null; then
518
-  if ln -s conf$$.file conf$$ 2>/dev/null; then
519
-    as_ln_s='ln -s'
520
-    # ... but there are two gotchas:
521
-    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
522
-    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
523
-    # In both cases, we have to default to `cp -p'.
524
-    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
525
-      as_ln_s='cp -p'
526
-  elif ln conf$$.file conf$$ 2>/dev/null; then
527
-    as_ln_s=ln
528
-  else
529
-    as_ln_s='cp -p'
530
-  fi
531
-else
532
-  as_ln_s='cp -p'
533
-fi
534
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
535
-rmdir conf$$.dir 2>/dev/null
536
-
537
-if mkdir -p . 2>/dev/null; then
538
-  as_mkdir_p=:
539
-else
540
-  test -d ./-p && rmdir ./-p
541
-  as_mkdir_p=false
542
-fi
543
-
544
-if test -x / >/dev/null 2>&1; then
545
-  as_test_x='test -x'
546
-else
547
-  if ls -dL / >/dev/null 2>&1; then
548
-    as_ls_L_option=L
549
-  else
550
-    as_ls_L_option=
551
-  fi
552
-  as_test_x='
553
-    eval sh -c '\''
554
-      if test -d "$1"; then
555
-   test -d "$1/.";
556
-      else
557
-   case $1 in
558
-   -*)set "./$1";;
559
-   esac;
560
-   case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
561
-   ???[sx]*):;;*)false;;esac;fi
562
-    '\'' sh
563
-  '
564
-fi
565
-as_executable_p=$as_test_x
566
-
567
-# Sed expression to map a string onto a valid CPP name.
568
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
569
-
570
-# Sed expression to map a string onto a valid variable name.
571
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
572
-
573
-
574
-
575
-exec 7<&0 </dev/null 6>&1
576
-
577
-# Name of the host.
578
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
579
-# so uname gets run too.
580
-ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
581
-
582
-#
583
-# Initializations.
584
-#
585
-ac_default_prefix=/usr/local
586
-ac_clean_files=
587
-ac_config_libobj_dir=.
588
-LIBOBJS=
589
-cross_compiling=no
590
-subdirs=
591
-MFLAGS=
592
-MAKEFLAGS=
593
-SHELL=${CONFIG_SHELL-/bin/sh}
594
-
595
-# Identity of this package.
596
-PACKAGE_NAME='tovid'
597
-PACKAGE_TARNAME='tovid'
598
-PACKAGE_VERSION='svn'
599
-PACKAGE_STRING='tovid svn'
600
-PACKAGE_BUGREPORT=''
601
-
602
-ac_unique_file="src/tovid"
603
-ac_subst_vars='LN_S
604
-LTLIBOBJS
605
-LIBOBJS
606
-pkgpyexecdir
607
-pyexecdir
608
-pkgpythondir
609
-pythondir
610
-PYTHON_PLATFORM
611
-PYTHON_EXEC_PREFIX
612
-PYTHON_PREFIX
613
-PYTHON_VERSION
614
-PYTHON
615
-TXT2TAGS
616
-am__untar
617
-am__tar
618
-AMTAR
619
-am__leading_dot
620
-SET_MAKE
621
-AWK
622
-mkdir_p
623
-MKDIR_P
624
-INSTALL_STRIP_PROGRAM
625
-STRIP
626
-install_sh
627
-MAKEINFO
628
-AUTOHEADER
629
-AUTOMAKE
630
-AUTOCONF
631
-ACLOCAL
632
-VERSION
633
-PACKAGE
634
-CYGPATH_W
635
-am__isrc
636
-INSTALL_DATA
637
-INSTALL_SCRIPT
638
-INSTALL_PROGRAM
639
-target_alias
640
-host_alias
641
-build_alias
642
-LIBS
643
-ECHO_T
644
-ECHO_N
645
-ECHO_C
646
-DEFS
647
-mandir
648
-localedir
649
-libdir
650
-psdir
651
-pdfdir
652
-dvidir
653
-htmldir
654
-infodir
655
-docdir
656
-oldincludedir
657
-includedir
658
-localstatedir
659
-sharedstatedir
660
-sysconfdir
661
-datadir
662
-datarootdir
663
-libexecdir
664
-sbindir
665
-bindir
666
-program_transform_name
667
-prefix
668
-exec_prefix
669
-PACKAGE_BUGREPORT
670
-PACKAGE_STRING
671
-PACKAGE_VERSION
672
-PACKAGE_TARNAME
673
-PACKAGE_NAME
674
-PATH_SEPARATOR
675
-SHELL'
676
-ac_subst_files=''
677
-ac_user_opts='
678
-enable_option_checking
679
-'
680
-      ac_precious_vars='build_alias
681
-host_alias
682
-target_alias'
683
-
684
-
685
-# Initialize some variables set by options.
686
-ac_init_help=
687
-ac_init_version=false
688
-ac_unrecognized_opts=
689
-ac_unrecognized_sep=
690
-# The variables have the same names as the options, with
691
-# dashes changed to underlines.
692
-cache_file=/dev/null
693
-exec_prefix=NONE
694
-no_create=
695
-no_recursion=
696
-prefix=NONE
697
-program_prefix=NONE
698
-program_suffix=NONE
699
-program_transform_name=s,x,x,
700
-silent=
701
-site=
702
-srcdir=
703
-verbose=
704
-x_includes=NONE
705
-x_libraries=NONE
706
-
707
-# Installation directory options.
708
-# These are left unexpanded so users can "make install exec_prefix=/foo"
709
-# and all the variables that are supposed to be based on exec_prefix
710
-# by default will actually change.
711
-# Use braces instead of parens because sh, perl, etc. also accept them.
712
-# (The list follows the same order as the GNU Coding Standards.)
713
-bindir='${exec_prefix}/bin'
714
-sbindir='${exec_prefix}/sbin'
715
-libexecdir='${exec_prefix}/libexec'
716
-datarootdir='${prefix}/share'
717
-datadir='${datarootdir}'
718
-sysconfdir='${prefix}/etc'
719
-sharedstatedir='${prefix}/com'
720
-localstatedir='${prefix}/var'
721
-includedir='${prefix}/include'
722
-oldincludedir='/usr/include'
723
-docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
724
-infodir='${datarootdir}/info'
725
-htmldir='${docdir}'
726
-dvidir='${docdir}'
727
-pdfdir='${docdir}'
728
-psdir='${docdir}'
729
-libdir='${exec_prefix}/lib'
730
-localedir='${datarootdir}/locale'
731
-mandir='${datarootdir}/man'
732
-
733
-ac_prev=
734
-ac_dashdash=
735
-for ac_option
736
-do
737
-  # If the previous option needs an argument, assign it.
738
-  if test -n "$ac_prev"; then
739
-    eval $ac_prev=\$ac_option
740
-    ac_prev=
741
-    continue
742
-  fi
743
-
744
-  case $ac_option in
745
-  *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
746
-  *)   ac_optarg=yes ;;
747
-  esac
748
-
749
-  # Accept the important Cygnus configure options, so we can diagnose typos.
750
-
751
-  case $ac_dashdash$ac_option in
752
-  --)
753
-    ac_dashdash=yes ;;
754
-
755
-  -bindir | --bindir | --bindi | --bind | --bin | --bi)
756
-    ac_prev=bindir ;;
757
-  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
758
-    bindir=$ac_optarg ;;
759
-
760
-  -build | --build | --buil | --bui | --bu)
761
-    ac_prev=build_alias ;;
762
-  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
763
-    build_alias=$ac_optarg ;;
764
-
765
-  -cache-file | --cache-file | --cache-fil | --cache-fi \
766
-  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
767
-    ac_prev=cache_file ;;
768
-  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
769
-  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
770
-    cache_file=$ac_optarg ;;
771
-
772
-  --config-cache | -C)
773
-    cache_file=config.cache ;;
774
-
775
-  -datadir | --datadir | --datadi | --datad)
776
-    ac_prev=datadir ;;
777
-  -datadir=* | --datadir=* | --datadi=* | --datad=*)
778
-    datadir=$ac_optarg ;;
779
-
780
-  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
781
-  | --dataroo | --dataro | --datar)
782
-    ac_prev=datarootdir ;;
783
-  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
784
-  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
785
-    datarootdir=$ac_optarg ;;
786
-
787
-  -disable-* | --disable-*)
788
-    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
789
-    # Reject names that are not valid shell variable names.
790
-    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
791
-      { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
792
-   { (exit 1); exit 1; }; }
793
-    ac_useropt_orig=$ac_useropt
794
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
795
-    case $ac_user_opts in
796
-      *"
797
-"enable_$ac_useropt"
798
-"*) ;;
799
-      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
800
-    ac_unrecognized_sep=', ';;
801
-    esac
802
-    eval enable_$ac_useropt=no ;;
803
-
804
-  -docdir | --docdir | --docdi | --doc | --do)
805
-    ac_prev=docdir ;;
806
-  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
807
-    docdir=$ac_optarg ;;
808
-
809
-  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
810
-    ac_prev=dvidir ;;
811
-  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
812
-    dvidir=$ac_optarg ;;
813
-
814
-  -enable-* | --enable-*)
815
-    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
816
-    # Reject names that are not valid shell variable names.
817
-    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
818
-      { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
819
-   { (exit 1); exit 1; }; }
820
-    ac_useropt_orig=$ac_useropt
821
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
822
-    case $ac_user_opts in
823
-      *"
824
-"enable_$ac_useropt"
825
-"*) ;;
826
-      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
827
-    ac_unrecognized_sep=', ';;
828
-    esac
829
-    eval enable_$ac_useropt=\$ac_optarg ;;
830
-
831
-  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
832
-  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
833
-  | --exec | --exe | --ex)
834
-    ac_prev=exec_prefix ;;
835
-  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
836
-  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
837
-  | --exec=* | --exe=* | --ex=*)
838
-    exec_prefix=$ac_optarg ;;
839
-
840
-  -gas | --gas | --ga | --g)
841
-    # Obsolete; use --with-gas.
842
-    with_gas=yes ;;
843
-
844
-  -help | --help | --hel | --he | -h)
845
-    ac_init_help=long ;;
846
-  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
847
-    ac_init_help=recursive ;;
848
-  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
849
-    ac_init_help=short ;;
850
-
851
-  -host | --host | --hos | --ho)
852
-    ac_prev=host_alias ;;
853
-  -host=* | --host=* | --hos=* | --ho=*)
854
-    host_alias=$ac_optarg ;;
855
-
856
-  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
857
-    ac_prev=htmldir ;;
858
-  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
859
-  | --ht=*)
860
-    htmldir=$ac_optarg ;;
861
-
862
-  -includedir | --includedir | --includedi | --included | --include \
863
-  | --includ | --inclu | --incl | --inc)
864
-    ac_prev=includedir ;;
865
-  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
866
-  | --includ=* | --inclu=* | --incl=* | --inc=*)
867
-    includedir=$ac_optarg ;;
868
-
869
-  -infodir | --infodir | --infodi | --infod | --info | --inf)
870
-    ac_prev=infodir ;;
871
-  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
872
-    infodir=$ac_optarg ;;
873
-
874
-  -libdir | --libdir | --libdi | --libd)
875
-    ac_prev=libdir ;;
876
-  -libdir=* | --libdir=* | --libdi=* | --libd=*)
877
-    libdir=$ac_optarg ;;
878
-
879
-  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
880
-  | --libexe | --libex | --libe)
881
-    ac_prev=libexecdir ;;
882
-  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
883
-  | --libexe=* | --libex=* | --libe=*)
884
-    libexecdir=$ac_optarg ;;
885
-
886
-  -localedir | --localedir | --localedi | --localed | --locale)
887
-    ac_prev=localedir ;;
888
-  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
889
-    localedir=$ac_optarg ;;
890
-
891
-  -localstatedir | --localstatedir | --localstatedi | --localstated \
892
-  | --localstate | --localstat | --localsta | --localst | --locals)
893
-    ac_prev=localstatedir ;;
894
-  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
895
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
896
-    localstatedir=$ac_optarg ;;
897
-
898
-  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
899
-    ac_prev=mandir ;;
900
-  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
901
-    mandir=$ac_optarg ;;
902
-
903
-  -nfp | --nfp | --nf)
904
-    # Obsolete; use --without-fp.
905
-    with_fp=no ;;
906
-
907
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
908
-  | --no-cr | --no-c | -n)
909
-    no_create=yes ;;
910
-
911
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
912
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
913
-    no_recursion=yes ;;
914
-
915
-  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
916
-  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
917
-  | --oldin | --oldi | --old | --ol | --o)
918
-    ac_prev=oldincludedir ;;
919
-  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
920
-  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
921
-  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
922
-    oldincludedir=$ac_optarg ;;
923
-
924
-  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
925
-    ac_prev=prefix ;;
926
-  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
927
-    prefix=$ac_optarg ;;
928
-
929
-  -program-prefix | --program-prefix | --program-prefi | --program-pref \
930
-  | --program-pre | --program-pr | --program-p)
931
-    ac_prev=program_prefix ;;
932
-  -program-prefix=* | --program-prefix=* | --program-prefi=* \
933
-  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
934
-    program_prefix=$ac_optarg ;;
935
-
936
-  -program-suffix | --program-suffix | --program-suffi | --program-suff \
937
-  | --program-suf | --program-su | --program-s)
938
-    ac_prev=program_suffix ;;
939
-  -program-suffix=* | --program-suffix=* | --program-suffi=* \
940
-  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
941
-    program_suffix=$ac_optarg ;;
942
-
943
-  -program-transform-name | --program-transform-name \
944
-  | --program-transform-nam | --program-transform-na \
945
-  | --program-transform-n | --program-transform- \
946
-  | --program-transform | --program-transfor \
947
-  | --program-transfo | --program-transf \
948
-  | --program-trans | --program-tran \
949
-  | --progr-tra | --program-tr | --program-t)
950
-    ac_prev=program_transform_name ;;
951
-  -program-transform-name=* | --program-transform-name=* \
952
-  | --program-transform-nam=* | --program-transform-na=* \
953
-  | --program-transform-n=* | --program-transform-=* \
954
-  | --program-transform=* | --program-transfor=* \
955
-  | --program-transfo=* | --program-transf=* \
956
-  | --program-trans=* | --program-tran=* \
957
-  | --progr-tra=* | --program-tr=* | --program-t=*)
958
-    program_transform_name=$ac_optarg ;;
959
-
960
-  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
961
-    ac_prev=pdfdir ;;
962
-  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
963
-    pdfdir=$ac_optarg ;;
964
-
965
-  -psdir | --psdir | --psdi | --psd | --ps)
966
-    ac_prev=psdir ;;
967
-  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
968
-    psdir=$ac_optarg ;;
969
-
970
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
971
-  | -silent | --silent | --silen | --sile | --sil)
972
-    silent=yes ;;
973
-
974
-  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
975
-    ac_prev=sbindir ;;
976
-  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
977
-  | --sbi=* | --sb=*)
978
-    sbindir=$ac_optarg ;;
979
-
980
-  -sharedstatedir | --sharedstatedir | --sharedstatedi \
981
-  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
982
-  | --sharedst | --shareds | --shared | --share | --shar \
983
-  | --sha | --sh)
984
-    ac_prev=sharedstatedir ;;
985
-  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
986
-  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
987
-  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
988
-  | --sha=* | --sh=*)
989
-    sharedstatedir=$ac_optarg ;;
990
-
991
-  -site | --site | --sit)
992
-    ac_prev=site ;;
993
-  -site=* | --site=* | --sit=*)
994
-    site=$ac_optarg ;;
995
-
996
-  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
997
-    ac_prev=srcdir ;;
998
-  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
999
-    srcdir=$ac_optarg ;;
1000
-
1001
-  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1002
-  | --syscon | --sysco | --sysc | --sys | --sy)
1003
-    ac_prev=sysconfdir ;;
1004
-  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1005
-  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1006
-    sysconfdir=$ac_optarg ;;
1007
-
1008
-  -target | --target | --targe | --targ | --tar | --ta | --t)
1009
-    ac_prev=target_alias ;;
1010
-  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1011
-    target_alias=$ac_optarg ;;
1012
-
1013
-  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1014
-    verbose=yes ;;
1015
-
1016
-  -version | --version | --versio | --versi | --vers | -V)
1017
-    ac_init_version=: ;;
1018
-
1019
-  -with-* | --with-*)
1020
-    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1021
-    # Reject names that are not valid shell variable names.
1022
-    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1023
-      { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
1024
-   { (exit 1); exit 1; }; }
1025
-    ac_useropt_orig=$ac_useropt
1026
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1027
-    case $ac_user_opts in
1028
-      *"
1029
-"with_$ac_useropt"
1030
-"*) ;;
1031
-      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1032
-    ac_unrecognized_sep=', ';;
1033
-    esac
1034
-    eval with_$ac_useropt=\$ac_optarg ;;
1035
-
1036
-  -without-* | --without-*)
1037
-    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1038
-    # Reject names that are not valid shell variable names.
1039
-    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1040
-      { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
1041
-   { (exit 1); exit 1; }; }
1042
-    ac_useropt_orig=$ac_useropt
1043
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1044
-    case $ac_user_opts in
1045
-      *"
1046
-"with_$ac_useropt"
1047
-"*) ;;
1048
-      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1049
-    ac_unrecognized_sep=', ';;
1050
-    esac
1051
-    eval with_$ac_useropt=no ;;
1052
-
1053
-  --x)
1054
-    # Obsolete; use --with-x.
1055
-    with_x=yes ;;
1056
-
1057
-  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1058
-  | --x-incl | --x-inc | --x-in | --x-i)
1059
-    ac_prev=x_includes ;;
1060
-  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1061
-  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1062
-    x_includes=$ac_optarg ;;
1063
-
1064
-  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1065
-  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1066
-    ac_prev=x_libraries ;;
1067
-  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1068
-  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1069
-    x_libraries=$ac_optarg ;;
1070
-
1071
-  -*) { $as_echo "$as_me: error: unrecognized option: $ac_option
1072
-Try \`$0 --help' for more information." >&2
1073
-   { (exit 1); exit 1; }; }
1074
-    ;;
1075
-
1076
-  *=*)
1077
-    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1078
-    # Reject names that are not valid shell variable names.
1079
-    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1080
-      { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1081
-   { (exit 1); exit 1; }; }
1082
-    eval $ac_envvar=\$ac_optarg
1083
-    export $ac_envvar ;;
1084
-
1085
-  *)
1086
-    # FIXME: should be removed in autoconf 3.0.
1087
-    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1088
-    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1089
-      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1090
-    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1091
-    ;;
1092
-
1093
-  esac
1094
-done
1095
-
1096
-if test -n "$ac_prev"; then
1097
-  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1098
-  { $as_echo "$as_me: error: missing argument to $ac_option" >&2
1099
-   { (exit 1); exit 1; }; }
1100
-fi
1101
-
1102
-if test -n "$ac_unrecognized_opts"; then
1103
-  case $enable_option_checking in
1104
-    no) ;;
1105
-    fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2
1106
-   { (exit 1); exit 1; }; } ;;
1107
-    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1108
-  esac
1109
-fi
1110
-
1111
-# Check all directory arguments for consistency.
1112
-for ac_var in  exec_prefix prefix bindir sbindir libexecdir datarootdir \
1113
-       datadir sysconfdir sharedstatedir localstatedir includedir \
1114
-       oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1115
-       libdir localedir mandir
1116
-do
1117
-  eval ac_val=\$$ac_var
1118
-  # Remove trailing slashes.
1119
-  case $ac_val in
1120
-    */ )
1121
-      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1122
-      eval $ac_var=\$ac_val;;
1123
-  esac
1124
-  # Be sure to have absolute directory names.
1125
-  case $ac_val in
1126
-    [\\/$]* | ?:[\\/]* )  continue;;
1127
-    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1128
-  esac
1129
-  { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1130
-   { (exit 1); exit 1; }; }
1131
-done
1132
-
1133
-# There might be people who depend on the old broken behavior: `$host'
1134
-# used to hold the argument of --host etc.
1135
-# FIXME: To remove some day.
1136
-build=$build_alias
1137
-host=$host_alias
1138
-target=$target_alias
1139
-
1140
-# FIXME: To remove some day.
1141
-if test "x$host_alias" != x; then
1142
-  if test "x$build_alias" = x; then
1143
-    cross_compiling=maybe
1144
-    $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1145
-    If a cross compiler is detected then cross compile mode will be used." >&2
1146
-  elif test "x$build_alias" != "x$host_alias"; then
1147
-    cross_compiling=yes
1148
-  fi
1149
-fi
1150
-
1151
-ac_tool_prefix=
1152
-test -n "$host_alias" && ac_tool_prefix=$host_alias-
1153
-
1154
-test "$silent" = yes && exec 6>/dev/null
1155
-
1156
-
1157
-ac_pwd=`pwd` && test -n "$ac_pwd" &&
1158
-ac_ls_di=`ls -di .` &&
1159
-ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1160
-  { $as_echo "$as_me: error: working directory cannot be determined" >&2
1161
-   { (exit 1); exit 1; }; }
1162
-test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1163
-  { $as_echo "$as_me: error: pwd does not report name of working directory" >&2
1164
-   { (exit 1); exit 1; }; }
1165
-
1166
-
1167
-# Find the source files, if location was not specified.
1168
-if test -z "$srcdir"; then
1169
-  ac_srcdir_defaulted=yes
1170
-  # Try the directory containing this script, then the parent directory.
1171
-  ac_confdir=`$as_dirname -- "$as_myself" ||
1172
-$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1173
-    X"$as_myself" : 'X\(//\)[^/]' \| \
1174
-    X"$as_myself" : 'X\(//\)$' \| \
1175
-    X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1176
-$as_echo X"$as_myself" |
1177
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1178
-       s//\1/
1179
-       q
1180
-     }
1181
-     /^X\(\/\/\)[^/].*/{
1182
-       s//\1/
1183
-       q
1184
-     }
1185
-     /^X\(\/\/\)$/{
1186
-       s//\1/
1187
-       q
1188
-     }
1189
-     /^X\(\/\).*/{
1190
-       s//\1/
1191
-       q
1192
-     }
1193
-     s/.*/./; q'`
1194
-  srcdir=$ac_confdir
1195
-  if test ! -r "$srcdir/$ac_unique_file"; then
1196
-    srcdir=..
1197
-  fi
1198
-else
1199
-  ac_srcdir_defaulted=no
1200
-fi
1201
-if test ! -r "$srcdir/$ac_unique_file"; then
1202
-  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1203
-  { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
1204
-   { (exit 1); exit 1; }; }
1205
-fi
1206
-ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1207
-ac_abs_confdir=`(
1208
-   cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2
1209
-   { (exit 1); exit 1; }; }
1210
-   pwd)`
1211
-# When building in place, set srcdir=.
1212
-if test "$ac_abs_confdir" = "$ac_pwd"; then
1213
-  srcdir=.
1214
-fi
1215
-# Remove unnecessary trailing slashes from srcdir.
1216
-# Double slashes in file names in object file debugging info
1217
-# mess up M-x gdb in Emacs.
1218
-case $srcdir in
1219
-*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1220
-esac
1221
-for ac_var in $ac_precious_vars; do
1222
-  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1223
-  eval ac_env_${ac_var}_value=\$${ac_var}
1224
-  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1225
-  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1226
-done
1227
-
1228
-#
1229
-# Report the --help message.
1230
-#
1231
-if test "$ac_init_help" = "long"; then
1232
-  # Omit some internal or obsolete options to make the list less imposing.
1233
-  # This message is too long to be a string in the A/UX 3.1 sh.
1234
-  cat <<_ACEOF
1235
-\`configure' configures tovid svn to adapt to many kinds of systems.
1236
-
1237
-Usage: $0 [OPTION]... [VAR=VALUE]...
1238
-
1239
-To assign environment variables (e.g., CC, CFLAGS...), specify them as
1240
-VAR=VALUE.  See below for descriptions of some of the useful variables.
1241
-
1242
-Defaults for the options are specified in brackets.
1243
-
1244
-Configuration:
1245
-  -h, --help              display this help and exit
1246
-      --help=short        display options specific to this package
1247
-      --help=recursive    display the short help of all the included packages
1248
-  -V, --version           display version information and exit
1249
-  -q, --quiet, --silent   do not print \`checking...' messages
1250
-      --cache-file=FILE   cache test results in FILE [disabled]
1251
-  -C, --config-cache      alias for \`--cache-file=config.cache'
1252
-  -n, --no-create         do not create output files
1253
-      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1254
-
1255
-Installation directories:
1256
-  --prefix=PREFIX         install architecture-independent files in PREFIX
1257
-                          [$ac_default_prefix]
1258
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1259
-                          [PREFIX]
1260
-
1261
-By default, \`make install' will install all the files in
1262
-\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1263
-an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1264
-for instance \`--prefix=\$HOME'.
1265
-
1266
-For better control, use the options below.
1267
-
1268
-Fine tuning of the installation directories:
1269
-  --bindir=DIR            user executables [EPREFIX/bin]
1270
-  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1271
-  --libexecdir=DIR        program executables [EPREFIX/libexec]
1272
-  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1273
-  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1274
-  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1275
-  --libdir=DIR            object code libraries [EPREFIX/lib]
1276
-  --includedir=DIR        C header files [PREFIX/include]
1277
-  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1278
-  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1279
-  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1280
-  --infodir=DIR           info documentation [DATAROOTDIR/info]
1281
-  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1282
-  --mandir=DIR            man documentation [DATAROOTDIR/man]
1283
-  --docdir=DIR            documentation root [DATAROOTDIR/doc/tovid]
1284
-  --htmldir=DIR           html documentation [DOCDIR]
1285
-  --dvidir=DIR            dvi documentation [DOCDIR]
1286
-  --pdfdir=DIR            pdf documentation [DOCDIR]
1287
-  --psdir=DIR             ps documentation [DOCDIR]
1288
-_ACEOF
1289
-
1290
-  cat <<\_ACEOF
1291
-
1292
-Program names:
1293
-  --program-prefix=PREFIX            prepend PREFIX to installed program names
1294
-  --program-suffix=SUFFIX            append SUFFIX to installed program names
1295
-  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
1296
-_ACEOF
1297
-fi
1298
-
1299
-if test -n "$ac_init_help"; then
1300
-  case $ac_init_help in
1301
-     short | recursive ) echo "Configuration of tovid svn:";;
1302
-   esac
1303
-  cat <<\_ACEOF
1304
-
1305
-_ACEOF
1306
-ac_status=$?
1307
-fi
1308
-
1309
-if test "$ac_init_help" = "recursive"; then
1310
-  # If there are subdirs, report their specific --help.
1311
-  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1312
-    test -d "$ac_dir" ||
1313
-      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1314
-      continue
1315
-    ac_builddir=.
1316
-
1317
-case "$ac_dir" in
1318
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1319
-*)
1320
-  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1321
-  # A ".." for each directory in $ac_dir_suffix.
1322
-  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1323
-  case $ac_top_builddir_sub in
1324
-  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1325
-  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1326
-  esac ;;
1327
-esac
1328
-ac_abs_top_builddir=$ac_pwd
1329
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
1330
-# for backward compatibility:
1331
-ac_top_builddir=$ac_top_build_prefix
1332
-
1333
-case $srcdir in
1334
-  .)  # We are building in place.
1335
-    ac_srcdir=.
1336
-    ac_top_srcdir=$ac_top_builddir_sub
1337
-    ac_abs_top_srcdir=$ac_pwd ;;
1338
-  [\\/]* | ?:[\\/]* )  # Absolute name.
1339
-    ac_srcdir=$srcdir$ac_dir_suffix;
1340
-    ac_top_srcdir=$srcdir
1341
-    ac_abs_top_srcdir=$srcdir ;;
1342
-  *) # Relative name.
1343
-    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1344
-    ac_top_srcdir=$ac_top_build_prefix$srcdir
1345
-    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1346
-esac
1347
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1348
-
1349
-    cd "$ac_dir" || { ac_status=$?; continue; }
1350
-    # Check for guested configure.
1351
-    if test -f "$ac_srcdir/configure.gnu"; then
1352
-      echo &&
1353
-      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1354
-    elif test -f "$ac_srcdir/configure"; then
1355
-      echo &&
1356
-      $SHELL "$ac_srcdir/configure" --help=recursive
1357
-    else
1358
-      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1359
-    fi || ac_status=$?
1360
-    cd "$ac_pwd" || { ac_status=$?; break; }
1361
-  done
1362
-fi
1363
-
1364
-test -n "$ac_init_help" && exit $ac_status
1365
-if $ac_init_version; then
1366
-  cat <<\_ACEOF
1367
-tovid configure svn
1368
-generated by GNU Autoconf 2.63
1369
-
1370
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
1371
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
1372
-This configure script is free software; the Free Software Foundation
1373
-gives unlimited permission to copy, distribute and modify it.
1374
-_ACEOF
1375
-  exit
1376
-fi
1377
-cat >config.log <<_ACEOF
1378
-This file contains any messages produced by compilers while
1379
-running configure, to aid debugging if configure makes a mistake.
1380
-
1381
-It was created by tovid $as_me svn, which was
1382
-generated by GNU Autoconf 2.63.  Invocation command line was
1383
-
1384
-  $ $0 $@
1385
-
1386
-_ACEOF
1387
-exec 5>>config.log
1388
-{
1389
-cat <<_ASUNAME
1390
-## --------- ##
1391
-## Platform. ##
1392
-## --------- ##
1393
-
1394
-hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1395
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
1396
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
1397
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
1398
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
1399
-
1400
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1401
-/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1402
-
1403
-/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1404
-/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1405
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1406
-/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1407
-/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1408
-/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1409
-/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1410
-
1411
-_ASUNAME
1412
-
1413
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1414
-for as_dir in $PATH
1415
-do
1416
-  IFS=$as_save_IFS
1417
-  test -z "$as_dir" && as_dir=.
1418
-  $as_echo "PATH: $as_dir"
1419
-done
1420
-IFS=$as_save_IFS
1421
-
1422
-} >&5
1423
-
1424
-cat >&5 <<_ACEOF
1425
-
1426
-
1427
-## ----------- ##
1428
-## Core tests. ##
1429
-## ----------- ##
1430
-
1431
-_ACEOF
1432
-
1433
-
1434
-# Keep a trace of the command line.
1435
-# Strip out --no-create and --no-recursion so they do not pile up.
1436
-# Strip out --silent because we don't want to record it for future runs.
1437
-# Also quote any args containing shell meta-characters.
1438
-# Make two passes to allow for proper duplicate-argument suppression.
1439
-ac_configure_args=
1440
-ac_configure_args0=
1441
-ac_configure_args1=
1442
-ac_must_keep_next=false
1443
-for ac_pass in 1 2
1444
-do
1445
-  for ac_arg
1446
-  do
1447
-    case $ac_arg in
1448
-    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1449
-    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1450
-    | -silent | --silent | --silen | --sile | --sil)
1451
-      continue ;;
1452
-    *\'*)
1453
-      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1454
-    esac
1455
-    case $ac_pass in
1456
-    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1457
-    2)
1458
-      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1459
-      if test $ac_must_keep_next = true; then
1460
-   ac_must_keep_next=false # Got value, back to normal.
1461
-      else
1462
-   case $ac_arg in
1463
-     *=* | --config-cache | -C | -disable-* | --disable-* \
1464
-     | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1465
-     | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1466
-     | -with-* | --with-* | -without-* | --without-* | --x)
1467
-       case "$ac_configure_args0 " in
1468
-         "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1469
-       esac
1470
-       ;;
1471
-     -* ) ac_must_keep_next=true ;;
1472
-   esac
1473
-      fi
1474
-      ac_configure_args="$ac_configure_args '$ac_arg'"
1475
-      ;;
1476
-    esac
1477
-  done
1478
-done
1479
-$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1480
-$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1481
-
1482
-# When interrupted or exit'd, cleanup temporary files, and complete
1483
-# config.log.  We remove comments because anyway the quotes in there
1484
-# would cause problems or look ugly.
1485
-# WARNING: Use '\'' to represent an apostrophe within the trap.
1486
-# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1487
-trap 'exit_status=$?
1488
-  # Save into config.log some information that might help in debugging.
1489
-  {
1490
-    echo
1491
-
1492
-    cat <<\_ASBOX
1493
-## ---------------- ##
1494
-## Cache variables. ##
1495
-## ---------------- ##
1496
-_ASBOX
1497
-    echo
1498
-    # The following way of writing the cache mishandles newlines in values,
1499
-(
1500
-  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1501
-    eval ac_val=\$$ac_var
1502
-    case $ac_val in #(
1503
-    *${as_nl}*)
1504
-      case $ac_var in #(
1505
-      *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
1506
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
1507
-      esac
1508
-      case $ac_var in #(
1509
-      _ | IFS | as_nl) ;; #(
1510
-      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
1511
-      *) $as_unset $ac_var ;;
1512
-      esac ;;
1513
-    esac
1514
-  done
1515
-  (set) 2>&1 |
1516
-    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1517
-    *${as_nl}ac_space=\ *)
1518
-      sed -n \
1519
-   "s/'\''/'\''\\\\'\'''\''/g;
1520
-     s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1521
-      ;; #(
1522
-    *)
1523
-      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1524
-      ;;
1525
-    esac |
1526
-    sort
1527
-)
1528
-    echo
1529
-
1530
-    cat <<\_ASBOX
1531
-## ----------------- ##
1532
-## Output variables. ##
1533
-## ----------------- ##
1534
-_ASBOX
1535
-    echo
1536
-    for ac_var in $ac_subst_vars
1537
-    do
1538
-      eval ac_val=\$$ac_var
1539
-      case $ac_val in
1540
-      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1541
-      esac
1542
-      $as_echo "$ac_var='\''$ac_val'\''"
1543
-    done | sort
1544
-    echo
1545
-
1546
-    if test -n "$ac_subst_files"; then
1547
-      cat <<\_ASBOX
1548
-## ------------------- ##
1549
-## File substitutions. ##
1550
-## ------------------- ##
1551
-_ASBOX
1552
-      echo
1553
-      for ac_var in $ac_subst_files
1554
-      do
1555
-   eval ac_val=\$$ac_var
1556
-   case $ac_val in
1557
-   *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1558
-   esac
1559
-   $as_echo "$ac_var='\''$ac_val'\''"
1560
-      done | sort
1561
-      echo
1562
-    fi
1563
-
1564
-    if test -s confdefs.h; then
1565
-      cat <<\_ASBOX
1566
-## ----------- ##
1567
-## confdefs.h. ##
1568
-## ----------- ##
1569
-_ASBOX
1570
-      echo
1571
-      cat confdefs.h
1572
-      echo
1573
-    fi
1574
-    test "$ac_signal" != 0 &&
1575
-      $as_echo "$as_me: caught signal $ac_signal"
1576
-    $as_echo "$as_me: exit $exit_status"
1577
-  } >&5
1578
-  rm -f core *.core core.conftest.* &&
1579
-    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
1580
-    exit $exit_status
1581
-' 0
1582
-for ac_signal in 1 2 13 15; do
1583
-  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1584
-done
1585
-ac_signal=0
1586
-
1587
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
1588
-rm -f -r conftest* confdefs.h
1589
-
1590
-# Predefined preprocessor variables.
1591
-
1592
-cat >>confdefs.h <<_ACEOF
1593
-#define PACKAGE_NAME "$PACKAGE_NAME"
1594
-_ACEOF
1595
-
1596
-
1597
-cat >>confdefs.h <<_ACEOF
1598
-#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1599
-_ACEOF
1600
-
1601
-
1602
-cat >>confdefs.h <<_ACEOF
1603
-#define PACKAGE_VERSION "$PACKAGE_VERSION"
1604
-_ACEOF
1605
-
1606
-
1607
-cat >>confdefs.h <<_ACEOF
1608
-#define PACKAGE_STRING "$PACKAGE_STRING"
1609
-_ACEOF
1610
-
1611
-
1612
-cat >>confdefs.h <<_ACEOF
1613
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1614
-_ACEOF
1615
-
1616
-
1617
-# Let the site file select an alternate cache file if it wants to.
1618
-# Prefer an explicitly selected file to automatically selected ones.
1619
-ac_site_file1=NONE
1620
-ac_site_file2=NONE
1621
-if test -n "$CONFIG_SITE"; then
1622
-  ac_site_file1=$CONFIG_SITE
1623
-elif test "x$prefix" != xNONE; then
1624
-  ac_site_file1=$prefix/share/config.site
1625
-  ac_site_file2=$prefix/etc/config.site
1626
-else
1627
-  ac_site_file1=$ac_default_prefix/share/config.site
1628
-  ac_site_file2=$ac_default_prefix/etc/config.site
1629
-fi
1630
-for ac_site_file in "$ac_site_file1" "$ac_site_file2"
1631
-do
1632
-  test "x$ac_site_file" = xNONE && continue
1633
-  if test -r "$ac_site_file"; then
1634
-    { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1635
-$as_echo "$as_me: loading site script $ac_site_file" >&6;}
1636
-    sed 's/^/| /' "$ac_site_file" >&5
1637
-    . "$ac_site_file"
1638
-  fi
1639
-done
1640
-
1641
-if test -r "$cache_file"; then
1642
-  # Some versions of bash will fail to source /dev/null (special
1643
-  # files actually), so we avoid doing that.
1644
-  if test -f "$cache_file"; then
1645
-    { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5
1646
-$as_echo "$as_me: loading cache $cache_file" >&6;}
1647
-    case $cache_file in
1648
-      [\\/]* | ?:[\\/]* ) . "$cache_file";;
1649
-      *)                      . "./$cache_file";;
1650
-    esac
1651
-  fi
1652
-else
1653
-  { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
1654
-$as_echo "$as_me: creating cache $cache_file" >&6;}
1655
-  >$cache_file
1656
-fi
1657
-
1658
-# Check that the precious variables saved in the cache have kept the same
1659
-# value.
1660
-ac_cache_corrupted=false
1661
-for ac_var in $ac_precious_vars; do
1662
-  eval ac_old_set=\$ac_cv_env_${ac_var}_set
1663
-  eval ac_new_set=\$ac_env_${ac_var}_set
1664
-  eval ac_old_val=\$ac_cv_env_${ac_var}_value
1665
-  eval ac_new_val=\$ac_env_${ac_var}_value
1666
-  case $ac_old_set,$ac_new_set in
1667
-    set,)
1668
-      { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1669
-$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1670
-      ac_cache_corrupted=: ;;
1671
-    ,set)
1672
-      { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1673
-$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1674
-      ac_cache_corrupted=: ;;
1675
-    ,);;
1676
-    *)
1677
-      if test "x$ac_old_val" != "x$ac_new_val"; then
1678
-   # differences in whitespace do not lead to failure.
1679
-   ac_old_val_w=`echo x $ac_old_val`
1680
-   ac_new_val_w=`echo x $ac_new_val`
1681
-   if test "$ac_old_val_w" != "$ac_new_val_w"; then
1682
-     { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1683
-$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1684
-     ac_cache_corrupted=:
1685
-   else
1686
-     { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
1687
-$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
1688
-     eval $ac_var=\$ac_old_val
1689
-   fi
1690
-   { $as_echo "$as_me:$LINENO:   former value:  \`$ac_old_val'" >&5
1691
-$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
1692
-   { $as_echo "$as_me:$LINENO:   current value: \`$ac_new_val'" >&5
1693
-$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
1694
-      fi;;
1695
-  esac
1696
-  # Pass precious variables to config.status.
1697
-  if test "$ac_new_set" = set; then
1698
-    case $ac_new_val in
1699
-    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1700
-    *) ac_arg=$ac_var=$ac_new_val ;;
1701
-    esac
1702
-    case " $ac_configure_args " in
1703
-      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1704
-      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1705
-    esac
1706
-  fi
1707
-done
1708
-if $ac_cache_corrupted; then
1709
-  { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1710
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1711
-  { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1712
-$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1713
-  { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1714
-$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1715
-   { (exit 1); exit 1; }; }
1716
-fi
1717
-
1718
-
1719
-
1720
-
1721
-
1722
-
1723
-
1724
-
1725
-
1726
-
1727
-
1728
-
1729
-
1730
-
1731
-
1732
-
1733
-
1734
-
1735
-
1736
-
1737
-
1738
-
1739
-
1740
-
1741
-
1742
-ac_ext=c
1743
-ac_cpp='$CPP $CPPFLAGS'
1744
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1745
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1746
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
1747
-
1748
-
1749
-
1750
-
1751
-# Require minimum versions of the autotools
1752
-
1753
-am__api_version='1.11'
1754
-
1755
-ac_aux_dir=
1756
-for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
1757
-  if test -f "$ac_dir/install-sh"; then
1758
-    ac_aux_dir=$ac_dir
1759
-    ac_install_sh="$ac_aux_dir/install-sh -c"
1760
-    break
1761
-  elif test -f "$ac_dir/install.sh"; then
1762
-    ac_aux_dir=$ac_dir
1763
-    ac_install_sh="$ac_aux_dir/install.sh -c"
1764
-    break
1765
-  elif test -f "$ac_dir/shtool"; then
1766
-    ac_aux_dir=$ac_dir
1767
-    ac_install_sh="$ac_aux_dir/shtool install -c"
1768
-    break
1769
-  fi
1770
-done
1771
-if test -z "$ac_aux_dir"; then
1772
-  { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
1773
-$as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
1774
-   { (exit 1); exit 1; }; }
1775
-fi
1776
-
1777
-# These three variables are undocumented and unsupported,
1778
-# and are intended to be withdrawn in a future Autoconf release.
1779
-# They can cause serious problems if a builder's source tree is in a directory
1780
-# whose full name contains unusual characters.
1781
-ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
1782
-ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
1783
-ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
1784
-
1785
-
1786
-# Find a good install program.  We prefer a C program (faster),
1787
-# so one script is as good as another.  But avoid the broken or
1788
-# incompatible versions:
1789
-# SysV /etc/install, /usr/sbin/install
1790
-# SunOS /usr/etc/install
1791
-# IRIX /sbin/install
1792
-# AIX /bin/install
1793
-# AmigaOS /C/install, which installs bootblocks on floppy discs
1794
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1795
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
1796
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1797
-# OS/2's system install, which has a completely different semantic
1798
-# ./install, which can be erroneously created by make from ./install.sh.
1799
-# Reject install programs that cannot install multiple files.
1800
-{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
1801
-$as_echo_n "checking for a BSD-compatible install... " >&6; }
1802
-if test -z "$INSTALL"; then
1803
-if test "${ac_cv_path_install+set}" = set; then
1804
-  $as_echo_n "(cached) " >&6
1805
-else
1806
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1807
-for as_dir in $PATH
1808
-do
1809
-  IFS=$as_save_IFS
1810
-  test -z "$as_dir" && as_dir=.
1811
-  # Account for people who put trailing slashes in PATH elements.
1812
-case $as_dir/ in
1813
-  ./ | .// | /cC/* | \
1814
-  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
1815
-  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
1816
-  /usr/ucb/* ) ;;
1817
-  *)
1818
-    # OSF1 and SCO ODT 3.0 have their own names for install.
1819
-    # Don't use installbsd from OSF since it installs stuff as root
1820
-    # by default.
1821
-    for ac_prog in ginstall scoinst install; do
1822
-      for ac_exec_ext in '' $ac_executable_extensions; do
1823
-   if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
1824
-     if test $ac_prog = install &&
1825
-       grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
1826
-       # AIX install.  It has an incompatible calling convention.
1827
-       :
1828
-     elif test $ac_prog = install &&
1829
-       grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
1830
-       # program-specific install script used by HP pwplus--don't use.
1831
-       :
1832
-     else
1833
-       rm -rf conftest.one conftest.two conftest.dir
1834
-       echo one > conftest.one
1835
-       echo two > conftest.two
1836
-       mkdir conftest.dir
1837
-       if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
1838
-         test -s conftest.one && test -s conftest.two &&
1839
-         test -s conftest.dir/conftest.one &&
1840
-         test -s conftest.dir/conftest.two
1841
-       then
1842
-         ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
1843
-         break 3
1844
-       fi
1845
-     fi
1846
-   fi
1847
-      done
1848
-    done
1849
-    ;;
1850
-esac
1851
-
1852
-done
1853
-IFS=$as_save_IFS
1854
-
1855
-rm -rf conftest.one conftest.two conftest.dir
1856
-
1857
-fi
1858
-  if test "${ac_cv_path_install+set}" = set; then
1859
-    INSTALL=$ac_cv_path_install
1860
-  else
1861
-    # As a last resort, use the slow shell script.  Don't cache a
1862
-    # value for INSTALL within a source directory, because that will
1863
-    # break other packages using the cache if that directory is
1864
-    # removed, or if the value is a relative name.
1865
-    INSTALL=$ac_install_sh
1866
-  fi
1867
-fi
1868
-{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
1869
-$as_echo "$INSTALL" >&6; }
1870
-
1871
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1872
-# It thinks the first close brace ends the variable substitution.
1873
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1874
-
1875
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1876
-
1877
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1878
-
1879
-{ $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5
1880
-$as_echo_n "checking whether build environment is sane... " >&6; }
1881
-# Just in case
1882
-sleep 1
1883
-echo timestamp > conftest.file
1884
-# Reject unsafe characters in $srcdir or the absolute working directory
1885
-# name.  Accept space and tab only in the latter.
1886
-am_lf='
1887
-'
1888
-case `pwd` in
1889
-  *[\\\"\#\$\&\'\`$am_lf]*)
1890
-    { { $as_echo "$as_me:$LINENO: error: unsafe absolute working directory name" >&5
1891
-$as_echo "$as_me: error: unsafe absolute working directory name" >&2;}
1892
-   { (exit 1); exit 1; }; };;
1893
-esac
1894
-case $srcdir in
1895
-  *[\\\"\#\$\&\'\`$am_lf\ \    ]*)
1896
-    { { $as_echo "$as_me:$LINENO: error: unsafe srcdir value: \`$srcdir'" >&5
1897
-$as_echo "$as_me: error: unsafe srcdir value: \`$srcdir'" >&2;}
1898
-   { (exit 1); exit 1; }; };;
1899
-esac
1900
-
1901
-# Do `set' in a subshell so we don't clobber the current shell's
1902
-# arguments.  Must try -L first in case configure is actually a
1903
-# symlink; some systems play weird games with the mod time of symlinks
1904
-# (eg FreeBSD returns the mod time of the symlink's containing
1905
-# directory).
1906
-if (
1907
-   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1908
-   if test "$*" = "X"; then
1909
-      # -L didn't work.
1910
-      set X `ls -t "$srcdir/configure" conftest.file`
1911
-   fi
1912
-   rm -f conftest.file
1913
-   if test "$*" != "X $srcdir/configure conftest.file" \
1914
-      && test "$*" != "X conftest.file $srcdir/configure"; then
1915
-
1916
-      # If neither matched, then we have a broken ls.  This can happen
1917
-      # if, for instance, CONFIG_SHELL is bash and it inherits a
1918
-      # broken ls alias from the environment.  This has actually
1919
-      # happened.  Such a system could not be considered "sane".
1920
-      { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
1921
-alias in your environment" >&5
1922
-$as_echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
1923
-alias in your environment" >&2;}
1924
-   { (exit 1); exit 1; }; }
1925
-   fi
1926
-
1927
-   test "$2" = conftest.file
1928
-   )
1929
-then
1930
-   # Ok.
1931
-   :
1932
-else
1933
-   { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files!
1934
-Check your system clock" >&5
1935
-$as_echo "$as_me: error: newly created file is older than distributed files!
1936
-Check your system clock" >&2;}
1937
-   { (exit 1); exit 1; }; }
1938
-fi
1939
-{ $as_echo "$as_me:$LINENO: result: yes" >&5
1940
-$as_echo "yes" >&6; }
1941
-test "$program_prefix" != NONE &&
1942
-  program_transform_name="s&^&$program_prefix&;$program_transform_name"
1943
-# Use a double $ so make ignores it.
1944
-test "$program_suffix" != NONE &&
1945
-  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
1946
-# Double any \ or $.
1947
-# By default was `s,x,x', remove it if useless.
1948
-ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
1949
-program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
1950
-
1951
-# expand $ac_aux_dir to an absolute path
1952
-am_aux_dir=`cd $ac_aux_dir && pwd`
1953
-
1954
-if test x"${MISSING+set}" != xset; then
1955
-  case $am_aux_dir in
1956
-  *\ * | *\    *)
1957
-    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
1958
-  *)
1959
-    MISSING="\${SHELL} $am_aux_dir/missing" ;;
1960
-  esac
1961
-fi
1962
-# Use eval to expand $SHELL
1963
-if eval "$MISSING --run true"; then
1964
-  am_missing_run="$MISSING --run "
1965
-else
1966
-  am_missing_run=
1967
-  { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
1968
-$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
1969
-fi
1970
-
1971
-if test x"${install_sh}" != xset; then
1972
-  case $am_aux_dir in
1973
-  *\ * | *\    *)
1974
-    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
1975
-  *)
1976
-    install_sh="\${SHELL} $am_aux_dir/install-sh"
1977
-  esac
1978
-fi
1979
-
1980
-# Installed binaries are usually stripped using `strip' when the user
1981
-# run `make install-strip'.  However `strip' might not be the right
1982
-# tool to use in cross-compilation environments, therefore Automake
1983
-# will honor the `STRIP' environment variable to overrule this program.
1984
-if test "$cross_compiling" != no; then
1985
-  if test -n "$ac_tool_prefix"; then
1986
-  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
1987
-set dummy ${ac_tool_prefix}strip; ac_word=$2
1988
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
1989
-$as_echo_n "checking for $ac_word... " >&6; }
1990
-if test "${ac_cv_prog_STRIP+set}" = set; then
1991
-  $as_echo_n "(cached) " >&6
1992
-else
1993
-  if test -n "$STRIP"; then
1994
-  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
1995
-else
1996
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1997
-for as_dir in $PATH
1998
-do
1999
-  IFS=$as_save_IFS
2000
-  test -z "$as_dir" && as_dir=.
2001
-  for ac_exec_ext in '' $ac_executable_extensions; do
2002
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2003
-    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
2004
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2005
-    break 2
2006
-  fi
2007
-done
2008
-done
2009
-IFS=$as_save_IFS
2010
-
2011
-fi
2012
-fi
2013
-STRIP=$ac_cv_prog_STRIP
2014
-if test -n "$STRIP"; then
2015
-  { $as_echo "$as_me:$LINENO: result: $STRIP" >&5
2016
-$as_echo "$STRIP" >&6; }
2017
-else
2018
-  { $as_echo "$as_me:$LINENO: result: no" >&5
2019
-$as_echo "no" >&6; }
2020
-fi
2021
-
2022
-
2023
-fi
2024
-if test -z "$ac_cv_prog_STRIP"; then
2025
-  ac_ct_STRIP=$STRIP
2026
-  # Extract the first word of "strip", so it can be a program name with args.
2027
-set dummy strip; ac_word=$2
2028
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2029
-$as_echo_n "checking for $ac_word... " >&6; }
2030
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
2031
-  $as_echo_n "(cached) " >&6
2032
-else
2033
-  if test -n "$ac_ct_STRIP"; then
2034
-  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
2035
-else
2036
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2037
-for as_dir in $PATH
2038
-do
2039
-  IFS=$as_save_IFS
2040
-  test -z "$as_dir" && as_dir=.
2041
-  for ac_exec_ext in '' $ac_executable_extensions; do
2042
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2043
-    ac_cv_prog_ac_ct_STRIP="strip"
2044
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2045
-    break 2
2046
-  fi
2047
-done
2048
-done
2049
-IFS=$as_save_IFS
2050
-
2051
-fi
2052
-fi
2053
-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
2054
-if test -n "$ac_ct_STRIP"; then
2055
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
2056
-$as_echo "$ac_ct_STRIP" >&6; }
2057
-else
2058
-  { $as_echo "$as_me:$LINENO: result: no" >&5
2059
-$as_echo "no" >&6; }
2060
-fi
2061
-
2062
-  if test "x$ac_ct_STRIP" = x; then
2063
-    STRIP=":"
2064
-  else
2065
-    case $cross_compiling:$ac_tool_warned in
2066
-yes:)
2067
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
2068
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2069
-ac_tool_warned=yes ;;
2070
-esac
2071
-    STRIP=$ac_ct_STRIP
2072
-  fi
2073
-else
2074
-  STRIP="$ac_cv_prog_STRIP"
2075
-fi
2076
-
2077
-fi
2078
-INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
2079
-
2080
-{ $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
2081
-$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
2082
-if test -z "$MKDIR_P"; then
2083
-  if test "${ac_cv_path_mkdir+set}" = set; then
2084
-  $as_echo_n "(cached) " >&6
2085
-else
2086
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2087
-for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
2088
-do
2089
-  IFS=$as_save_IFS
2090
-  test -z "$as_dir" && as_dir=.
2091
-  for ac_prog in mkdir gmkdir; do
2092
-    for ac_exec_ext in '' $ac_executable_extensions; do
2093
-      { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
2094
-      case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
2095
-        'mkdir (GNU coreutils) '* | \
2096
-        'mkdir (coreutils) '* | \
2097
-        'mkdir (fileutils) '4.1*)
2098
-          ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
2099
-          break 3;;
2100
-      esac
2101
-    done
2102
-       done
2103
-done
2104
-IFS=$as_save_IFS
2105
-
2106
-fi
2107
-
2108
-  if test "${ac_cv_path_mkdir+set}" = set; then
2109
-    MKDIR_P="$ac_cv_path_mkdir -p"
2110
-  else
2111
-    # As a last resort, use the slow shell script.  Don't cache a
2112
-    # value for MKDIR_P within a source directory, because that will
2113
-    # break other packages using the cache if that directory is
2114
-    # removed, or if the value is a relative name.
2115
-    test -d ./--version && rmdir ./--version
2116
-    MKDIR_P="$ac_install_sh -d"
2117
-  fi
2118
-fi
2119
-{ $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5
2120
-$as_echo "$MKDIR_P" >&6; }
2121
-
2122
-mkdir_p="$MKDIR_P"
2123
-case $mkdir_p in
2124
-  [\\/$]* | ?:[\\/]*) ;;
2125
-  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
2126
-esac
2127
-
2128
-for ac_prog in gawk mawk nawk awk
2129
-do
2130
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
2131
-set dummy $ac_prog; ac_word=$2
2132
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2133
-$as_echo_n "checking for $ac_word... " >&6; }
2134
-if test "${ac_cv_prog_AWK+set}" = set; then
2135
-  $as_echo_n "(cached) " >&6
2136
-else
2137
-  if test -n "$AWK"; then
2138
-  ac_cv_prog_AWK="$AWK" # Let the user override the test.
2139
-else
2140
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2141
-for as_dir in $PATH
2142
-do
2143
-  IFS=$as_save_IFS
2144
-  test -z "$as_dir" && as_dir=.
2145
-  for ac_exec_ext in '' $ac_executable_extensions; do
2146
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2147
-    ac_cv_prog_AWK="$ac_prog"
2148
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2149
-    break 2
2150
-  fi
2151
-done
2152
-done
2153
-IFS=$as_save_IFS
2154
-
2155
-fi
2156
-fi
2157
-AWK=$ac_cv_prog_AWK
2158
-if test -n "$AWK"; then
2159
-  { $as_echo "$as_me:$LINENO: result: $AWK" >&5
2160
-$as_echo "$AWK" >&6; }
2161
-else
2162
-  { $as_echo "$as_me:$LINENO: result: no" >&5
2163
-$as_echo "no" >&6; }
2164
-fi
2165
-
2166
-
2167
-  test -n "$AWK" && break
2168
-done
2169
-
2170
-{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
2171
-$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
2172
-set x ${MAKE-make}
2173
-ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
2174
-if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
2175
-  $as_echo_n "(cached) " >&6
2176
-else
2177
-  cat >conftest.make <<\_ACEOF
2178
-SHELL = /bin/sh
2179
-all:
2180
-   @echo '@@@%%%=$(MAKE)=@@@%%%'
2181
-_ACEOF
2182
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2183
-case `${MAKE-make} -f conftest.make 2>/dev/null` in
2184
-  *@@@%%%=?*=@@@%%%*)
2185
-    eval ac_cv_prog_make_${ac_make}_set=yes;;
2186
-  *)
2187
-    eval ac_cv_prog_make_${ac_make}_set=no;;
2188
-esac
2189
-rm -f conftest.make
2190
-fi
2191
-if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
2192
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
2193
-$as_echo "yes" >&6; }
2194
-  SET_MAKE=
2195
-else
2196
-  { $as_echo "$as_me:$LINENO: result: no" >&5
2197
-$as_echo "no" >&6; }
2198
-  SET_MAKE="MAKE=${MAKE-make}"
2199
-fi
2200
-
2201
-rm -rf .tst 2>/dev/null
2202
-mkdir .tst 2>/dev/null
2203
-if test -d .tst; then
2204
-  am__leading_dot=.
2205
-else
2206
-  am__leading_dot=_
2207
-fi
2208
-rmdir .tst 2>/dev/null
2209
-
2210
-if test "`cd $srcdir && pwd`" != "`pwd`"; then
2211
-  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
2212
-  # is not polluted with repeated "-I."
2213
-  am__isrc=' -I$(srcdir)'
2214
-  # test to see if srcdir already configured
2215
-  if test -f $srcdir/config.status; then
2216
-    { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
2217
-$as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
2218
-   { (exit 1); exit 1; }; }
2219
-  fi
2220
-fi
2221
-
2222
-# test whether we have cygpath
2223
-if test -z "$CYGPATH_W"; then
2224
-  if (cygpath --version) >/dev/null 2>/dev/null; then
2225
-    CYGPATH_W='cygpath -w'
2226
-  else
2227
-    CYGPATH_W=echo
2228
-  fi
2229
-fi
2230
-
2231
-
2232
-# Define the identity of the package.
2233
- PACKAGE='tovid'
2234
- VERSION='svn'
2235
-
2236
-
2237
-cat >>confdefs.h <<_ACEOF
2238
-#define PACKAGE "$PACKAGE"
2239
-_ACEOF
2240
-
2241
-
2242
-cat >>confdefs.h <<_ACEOF
2243
-#define VERSION "$VERSION"
2244
-_ACEOF
2245
-
2246
-# Some tools Automake needs.
2247
-
2248
-ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
2249
-
2250
-
2251
-AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
2252
-
2253
-
2254
-AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
2255
-
2256
-
2257
-AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
2258
-
2259
-
2260
-MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
2261
-
2262
-# We need awk for the "check" target.  The system "awk" is bad on
2263
-# some platforms.
2264
-# Always define AMTAR for backward compatibility.
2265
-
2266
-AMTAR=${AMTAR-"${am_missing_run}tar"}
2267
-
2268
-am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
2269
-
2270
-
2271
-
2272
-
2273
-
2274
-
2275
-
2276
-
2277
-
2278
-# ******************************************************************************
2279
-# ******************************************************************************
2280
-#
2281
-#
2282
-# CHECK FOR DEPENDENCIES
2283
-#
2284
-#
2285
-# ******************************************************************************
2286
-# ******************************************************************************
2287
-
2288
-# The only 'compile time' dependency we have is txt2tags, which is used to
2289
-# build the man pages.
2290
-# Extract the first word of "txt2tags", so it can be a program name with args.
2291
-set dummy txt2tags; ac_word=$2
2292
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2293
-$as_echo_n "checking for $ac_word... " >&6; }
2294
-if test "${ac_cv_prog_TXT2TAGS+set}" = set; then
2295
-  $as_echo_n "(cached) " >&6
2296
-else
2297
-  if test -n "$TXT2TAGS"; then
2298
-  ac_cv_prog_TXT2TAGS="$TXT2TAGS" # Let the user override the test.
2299
-else
2300
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2301
-for as_dir in $PATH
2302
-do
2303
-  IFS=$as_save_IFS
2304
-  test -z "$as_dir" && as_dir=.
2305
-  for ac_exec_ext in '' $ac_executable_extensions; do
2306
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2307
-    ac_cv_prog_TXT2TAGS=":"
2308
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2309
-    break 2
2310
-  fi
2311
-done
2312
-done
2313
-IFS=$as_save_IFS
2314
-
2315
-  test -z "$ac_cv_prog_TXT2TAGS" && ac_cv_prog_TXT2TAGS="false"
2316
-fi
2317
-fi
2318
-TXT2TAGS=$ac_cv_prog_TXT2TAGS
2319
-if test -n "$TXT2TAGS"; then
2320
-  { $as_echo "$as_me:$LINENO: result: $TXT2TAGS" >&5
2321
-$as_echo "$TXT2TAGS" >&6; }
2322
-else
2323
-  { $as_echo "$as_me:$LINENO: result: no" >&5
2324
-$as_echo "no" >&6; }
2325
-fi
2326
-
2327
-
2328
-if ! $TXT2TAGS; then
2329
-    { { $as_echo "$as_me:$LINENO: error:
2330
-
2331
- ERROR:
2332
-
2333
- txt2tags cannot be found on your system, but tovid needs it to build
2334
- the man pages. Please install txt2tags (http://txt2tags.sf.net) and
2335
- run ./configure again. Thanks!
2336
-
2337
-     -- http://tovid.wikia.com
2338
-" >&5
2339
-$as_echo "$as_me: error:
2340
-
2341
- ERROR:
2342
-
2343
- txt2tags cannot be found on your system, but tovid needs it to build
2344
- the man pages. Please install txt2tags (http://txt2tags.sf.net) and
2345
- run ./configure again. Thanks!
2346
-
2347
-     -- http://tovid.wikia.com
2348
-" >&2;}
2349
-   { (exit 1); exit 1; }; }
2350
-fi
2351
-
2352
-# All run-time dependencies are checked in tovid-init now. In addition to being
2353
-# the Correct Way to do things, it makes packaging much easier for deb|rpm|???
2354
-# maintainers.
2355
-
2356
-# ******************************************************************************
2357
-# Python
2358
-# ******************************************************************************
2359
-# As seen on http://sources.redhat.com/automake/automake.html#Python
2360
-# AM_PATH_PYTHON sets many vars, including $(pythondir), which is the directory
2361
-# name for the site-packages subdirectory of the standard Python install tree;
2362
-# and $(pyexecdir), which is the directory where Python extension modules
2363
-# (shared libraries) should be installed.
2364
-
2365
-# For example, on friedrij's woody debian system
2366
-# $(pythondir) = ${prefix}/lib/python2.3/site-packages
2367
-# $(pyexecdir) = ${exec_prefix}/lib/python2.3/site-packages
2368
-
2369
-# From the autoconf manual, available in anything _but_ html (uf, fsf) from
2370
-# http://www.gnu.org/software/autoconf/manual/index.html
2371
-# $(prefix) is "The common installation prefix for all files. If $(exec_prefix)
2372
-# is defined to a different value, prefix is used only for architecture-
2373
-# independent files."
2374
-# $(exec_prefix) is "The installation prefix for architecture-dependent files.
2375
-# By default it's the same as $(prefix). You should avoid installing anything
2376
-# directly to $(exec_prefix). However, the default value for directories
2377
-# containing architecture-dependent files should be relative to $(exec_prefix)."
2378
-
2379
-# The GNU Coding Standards, available in html (yosh) from
2380
-# (http://www.gnu.org/prep/standards/standards.html#Directory-Variables),
2381
-# clarifies the difference between $(prefix) and $(exec_prefix): "Generally,
2382
-# $(exec_prefix) is used for directories that contain machine-specific files
2383
-# (such as executables and subroutine libraries), while $(prefix) is used
2384
-# directly for other directories."
2385
-
2386
-# So, this dev thinks we need $(pythondir) and some 'enlightened' python
2387
-# scripts, as pointed out by
2388
-# http://sources.redhat.com/automake/automake.html#Hard_002dCoded-Install-Paths
2389
-# If you do [use $(pythondir) or $(pyexecdir)], then:
2390
-#    * root users can install your package with the same --prefix as Python (you
2391
-#      get the behavior of the previous attempt - eg /usr/lib/python-2.3/...)
2392
-#    * non-root users can install your package too, they will have the extension
2393
-#      module in a place that is not searched by Python but they can work around
2394
-#      this using environment variables (and if you installed scripts that use
2395
-#      this shared library, it's easy to tell Python were to look in the
2396
-#      beginning of your script, so the script works in both cases).
2397
-
2398
-# Using pythondir_PYTHON for libtovid will install it to
2399
-# ${prefix}/lib/python2.3/site-packages (for example)
2400
-# and the pytovid suite (left as bin_SCRIPTS, so that they are installed as
2401
-# executables and not byte-compiled like python_PYTHON would do) will need to be
2402
-# told how to look for libtovid.
2403
-
2404
-
2405
-
2406
-
2407
-
2408
-        if test -n "$PYTHON"; then
2409
-      # If the user set $PYTHON, use it and don't search something else.
2410
-      { $as_echo "$as_me:$LINENO: checking whether $PYTHON version >= 2.4" >&5
2411
-$as_echo_n "checking whether $PYTHON version >= 2.4... " >&6; }
2412
-      prog="import sys
2413
-# split strings by '.' and convert to numeric.  Append some zeros
2414
-# because we need at least 4 digits for the hex conversion.
2415
-# map returns an iterator in Python 3.0 and a list in 2.x
2416
-minver = list(map(int, '2.4'.split('.'))) + [0, 0, 0]
2417
-minverhex = 0
2418
-# xrange is not present in Python 3.0 and range returns an iterator
2419
-for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i]
2420
-sys.exit(sys.hexversion < minverhex)"
2421
-  if { echo "$as_me:$LINENO: $PYTHON -c "$prog"" >&5
2422
-   ($PYTHON -c "$prog") >&5 2>&5
2423
-   ac_status=$?
2424
-   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2425
-   (exit $ac_status); }; then
2426
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
2427
-$as_echo "yes" >&6; }
2428
-else
2429
-  { { $as_echo "$as_me:$LINENO: error: too old" >&5
2430
-$as_echo "$as_me: error: too old" >&2;}
2431
-   { (exit 1); exit 1; }; }
2432
-fi
2433
-
2434
-      am_display_PYTHON=$PYTHON
2435
-    else
2436
-      # Otherwise, try each interpreter until we find one that satisfies
2437
-      # VERSION.
2438
-      { $as_echo "$as_me:$LINENO: checking for a Python interpreter with version >= 2.4" >&5
2439
-$as_echo_n "checking for a Python interpreter with version >= 2.4... " >&6; }
2440
-if test "${am_cv_pathless_PYTHON+set}" = set; then
2441
-  $as_echo_n "(cached) " >&6
2442
-else
2443
-
2444
-   for am_cv_pathless_PYTHON in python python2 python3 python3.0 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 none; do
2445
-     test "$am_cv_pathless_PYTHON" = none && break
2446
-     prog="import sys
2447
-# split strings by '.' and convert to numeric.  Append some zeros
2448
-# because we need at least 4 digits for the hex conversion.
2449
-# map returns an iterator in Python 3.0 and a list in 2.x
2450
-minver = list(map(int, '2.4'.split('.'))) + [0, 0, 0]
2451
-minverhex = 0
2452
-# xrange is not present in Python 3.0 and range returns an iterator
2453
-for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i]
2454
-sys.exit(sys.hexversion < minverhex)"
2455
-  if { echo "$as_me:$LINENO: $am_cv_pathless_PYTHON -c "$prog"" >&5
2456
-   ($am_cv_pathless_PYTHON -c "$prog") >&5 2>&5
2457
-   ac_status=$?
2458
-   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2459
-   (exit $ac_status); }; then
2460
-  break
2461
-fi
2462
-
2463
-   done
2464
-fi
2465
-{ $as_echo "$as_me:$LINENO: result: $am_cv_pathless_PYTHON" >&5
2466
-$as_echo "$am_cv_pathless_PYTHON" >&6; }
2467
-      # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
2468
-      if test "$am_cv_pathless_PYTHON" = none; then
2469
-   PYTHON=:
2470
-      else
2471
-        # Extract the first word of "$am_cv_pathless_PYTHON", so it can be a program name with args.
2472
-set dummy $am_cv_pathless_PYTHON; ac_word=$2
2473
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2474
-$as_echo_n "checking for $ac_word... " >&6; }
2475
-if test "${ac_cv_path_PYTHON+set}" = set; then
2476
-  $as_echo_n "(cached) " >&6
2477
-else
2478
-  case $PYTHON in
2479
-  [\\/]* | ?:[\\/]*)
2480
-  ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
2481
-  ;;
2482
-  *)
2483
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2484
-for as_dir in $PATH
2485
-do
2486
-  IFS=$as_save_IFS
2487
-  test -z "$as_dir" && as_dir=.
2488
-  for ac_exec_ext in '' $ac_executable_extensions; do
2489
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2490
-    ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
2491
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2492
-    break 2
2493
-  fi
2494
-done
2495
-done
2496
-IFS=$as_save_IFS
2497
-
2498
-  ;;
2499
-esac
2500
-fi
2501
-PYTHON=$ac_cv_path_PYTHON
2502
-if test -n "$PYTHON"; then
2503
-  { $as_echo "$as_me:$LINENO: result: $PYTHON" >&5
2504
-$as_echo "$PYTHON" >&6; }
2505
-else
2506
-  { $as_echo "$as_me:$LINENO: result: no" >&5
2507
-$as_echo "no" >&6; }
2508
-fi
2509
-
2510
-
2511
-      fi
2512
-      am_display_PYTHON=$am_cv_pathless_PYTHON
2513
-    fi
2514
-
2515
-
2516
-  if test "$PYTHON" = :; then
2517
-      { { $as_echo "$as_me:$LINENO: error: no suitable Python interpreter found" >&5
2518
-$as_echo "$as_me: error: no suitable Python interpreter found" >&2;}
2519
-   { (exit 1); exit 1; }; }
2520
-  else
2521
-
2522
-
2523
-  { $as_echo "$as_me:$LINENO: checking for $am_display_PYTHON version" >&5
2524
-$as_echo_n "checking for $am_display_PYTHON version... " >&6; }
2525
-if test "${am_cv_python_version+set}" = set; then
2526
-  $as_echo_n "(cached) " >&6
2527
-else
2528
-  am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"`
2529
-fi
2530
-{ $as_echo "$as_me:$LINENO: result: $am_cv_python_version" >&5
2531
-$as_echo "$am_cv_python_version" >&6; }
2532
-  PYTHON_VERSION=$am_cv_python_version
2533
-
2534
-
2535
-
2536
-  PYTHON_PREFIX='${prefix}'
2537
-
2538
-  PYTHON_EXEC_PREFIX='${exec_prefix}'
2539
-
2540
-
2541
-
2542
-  { $as_echo "$as_me:$LINENO: checking for $am_display_PYTHON platform" >&5
2543
-$as_echo_n "checking for $am_display_PYTHON platform... " >&6; }
2544
-if test "${am_cv_python_platform+set}" = set; then
2545
-  $as_echo_n "(cached) " >&6
2546
-else
2547
-  am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`
2548
-fi
2549
-{ $as_echo "$as_me:$LINENO: result: $am_cv_python_platform" >&5
2550
-$as_echo "$am_cv_python_platform" >&6; }
2551
-  PYTHON_PLATFORM=$am_cv_python_platform
2552
-
2553
-
2554
-
2555
-
2556
-                { $as_echo "$as_me:$LINENO: checking for $am_display_PYTHON script directory" >&5
2557
-$as_echo_n "checking for $am_display_PYTHON script directory... " >&6; }
2558
-if test "${am_cv_python_pythondir+set}" = set; then
2559
-  $as_echo_n "(cached) " >&6
2560
-else
2561
-  if test "x$prefix" = xNONE
2562
-     then
2563
-       am_py_prefix=$ac_default_prefix
2564
-     else
2565
-       am_py_prefix=$prefix
2566
-     fi
2567
-     am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null ||
2568
-     echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`
2569
-     case $am_cv_python_pythondir in
2570
-     $am_py_prefix*)
2571
-       am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
2572
-       am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"`
2573
-       ;;
2574
-     *)
2575
-       case $am_py_prefix in
2576
-         /usr|/System*) ;;
2577
-         *)
2578
-     am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages
2579
-     ;;
2580
-       esac
2581
-       ;;
2582
-     esac
2583
-
2584
-fi
2585
-{ $as_echo "$as_me:$LINENO: result: $am_cv_python_pythondir" >&5
2586
-$as_echo "$am_cv_python_pythondir" >&6; }
2587
-  pythondir=$am_cv_python_pythondir
2588
-
2589
-
2590
-
2591
-  pkgpythondir=\${pythondir}/$PACKAGE
2592
-
2593
-
2594
-            { $as_echo "$as_me:$LINENO: checking for $am_display_PYTHON extension module directory" >&5
2595
-$as_echo_n "checking for $am_display_PYTHON extension module directory... " >&6; }
2596
-if test "${am_cv_python_pyexecdir+set}" = set; then
2597
-  $as_echo_n "(cached) " >&6
2598
-else
2599
-  if test "x$exec_prefix" = xNONE
2600
-     then
2601
-       am_py_exec_prefix=$am_py_prefix
2602
-     else
2603
-       am_py_exec_prefix=$exec_prefix
2604
-     fi
2605
-     am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null ||
2606
-     echo "$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages"`
2607
-     case $am_cv_python_pyexecdir in
2608
-     $am_py_exec_prefix*)
2609
-       am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
2610
-       am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"`
2611
-       ;;
2612
-     *)
2613
-       case $am_py_exec_prefix in
2614
-         /usr|/System*) ;;
2615
-         *)
2616
-      am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages
2617
-      ;;
2618
-       esac
2619
-       ;;
2620
-     esac
2621
-
2622
-fi
2623
-{ $as_echo "$as_me:$LINENO: result: $am_cv_python_pyexecdir" >&5
2624
-$as_echo "$am_cv_python_pyexecdir" >&6; }
2625
-  pyexecdir=$am_cv_python_pyexecdir
2626
-
2627
-
2628
-
2629
-  pkgpyexecdir=\${pyexecdir}/$PACKAGE
2630
-
2631
-
2632
-
2633
-  fi
2634
-
2635
-
2636
-
2637
-# Attempt to inform user that their pyton installation won't work
2638
-#   with the default prefix (/usr/local)
2639
-USER_PYTHON_PATH=$(python -c "import sys; print sys.path")
2640
-PYTHON_LOCAL=$(echo $USER_PYTHON_PATH | awk -F ',' '{ for (f=1; f<=NF; f++) {print $f}; }' | grep local | tr -d "' ")
2641
-
2642
-if test -z $PYTHON_LOCAL && test x"$prefix" == "xNONE"; then
2643
-    { { $as_echo "$as_me:$LINENO: error:
2644
-
2645
-    ERROR:
2646
-
2647
-    It looks like your python installation doesn't look in /usr/local for
2648
-    python modules. tovid installs a few modules on your system, and if
2649
-    python can't find them, then tovid won't work!
2650
-
2651
-    Please try:  ./configure --prefix=/usr
2652
-
2653
-    to install tovid in a place where python will look for modules. Thanks!
2654
-
2655
-        -- http://tovid.wikia.com
2656
-    " >&5
2657
-$as_echo "$as_me: error:
2658
-
2659
-    ERROR:
2660
-
2661
-    It looks like your python installation doesn't look in /usr/local for
2662
-    python modules. tovid installs a few modules on your system, and if
2663
-    python can't find them, then tovid won't work!
2664
-
2665
-    Please try:  ./configure --prefix=/usr
2666
-
2667
-    to install tovid in a place where python will look for modules. Thanks!
2668
-
2669
-        -- http://tovid.wikia.com
2670
-    " >&2;}
2671
-   { (exit 1); exit 1; }; }
2672
-fi
2673
-
2674
-
2675
-# Check to see if this is a svn checkout and set version to revision number
2676
-if test "$PACKAGE_VERSION" = "svn" && test -e bootstrap; then
2677
-     VERSION="svn-r$(svn info bootstrap | grep Revision | awk '{print $2}')"
2678
-fi
2679
-
2680
-ac_config_files="$ac_config_files Makefile src/tovid-init"
2681
-
2682
-cat >confcache <<\_ACEOF
2683
-# This file is a shell script that caches the results of configure
2684
-# tests run on this system so they can be shared between configure
2685
-# scripts and configure runs, see configure's option --config-cache.
2686
-# It is not useful on other systems.  If it contains results you don't
2687
-# want to keep, you may remove or edit it.
2688
-#
2689
-# config.status only pays attention to the cache file if you give it
2690
-# the --recheck option to rerun configure.
2691
-#
2692
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
2693
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
2694
-# following values.
2695
-
2696
-_ACEOF
2697
-
2698
-# The following way of writing the cache mishandles newlines in values,
2699
-# but we know of no workaround that is simple, portable, and efficient.
2700
-# So, we kill variables containing newlines.
2701
-# Ultrix sh set writes to stderr and can't be redirected directly,
2702
-# and sets the high bit in the cache file unless we assign to the vars.
2703
-(
2704
-  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
2705
-    eval ac_val=\$$ac_var
2706
-    case $ac_val in #(
2707
-    *${as_nl}*)
2708
-      case $ac_var in #(
2709
-      *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
2710
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2711
-      esac
2712
-      case $ac_var in #(
2713
-      _ | IFS | as_nl) ;; #(
2714
-      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2715
-      *) $as_unset $ac_var ;;
2716
-      esac ;;
2717
-    esac
2718
-  done
2719
-
2720
-  (set) 2>&1 |
2721
-    case $as_nl`(ac_space=' '; set) 2>&1` in #(
2722
-    *${as_nl}ac_space=\ *)
2723
-      # `set' does not quote correctly, so add quotes (double-quote
2724
-      # substitution turns \\\\ into \\, and sed turns \\ into \).
2725
-      sed -n \
2726
-   "s/'/'\\\\''/g;
2727
-     s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
2728
-      ;; #(
2729
-    *)
2730
-      # `set' quotes correctly as required by POSIX, so do not add quotes.
2731
-      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2732
-      ;;
2733
-    esac |
2734
-    sort
2735
-) |
2736
-  sed '
2737
-     /^ac_cv_env_/b end
2738
-     t clear
2739
-     :clear
2740
-     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
2741
-     t end
2742
-     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
2743
-     :end' >>confcache
2744
-if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
2745
-  if test -w "$cache_file"; then
2746
-    test "x$cache_file" != "x/dev/null" &&
2747
-      { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
2748
-$as_echo "$as_me: updating cache $cache_file" >&6;}
2749
-    cat confcache >$cache_file
2750
-  else
2751
-    { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
2752
-$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
2753
-  fi
2754
-fi
2755
-rm -f confcache
2756
-
2757
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
2758
-# Let make expand exec_prefix.
2759
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2760
-
2761
-# Transform confdefs.h into DEFS.
2762
-# Protect against shell expansion while executing Makefile rules.
2763
-# Protect against Makefile macro expansion.
2764
-#
2765
-# If the first sed substitution is executed (which looks for macros that
2766
-# take arguments), then branch to the quote section.  Otherwise,
2767
-# look for a macro that doesn't take arguments.
2768
-ac_script='
2769
-:mline
2770
-/\\$/{
2771
- N
2772
- s,\\\n,,
2773
- b mline
2774
-}
2775
-t clear
2776
-:clear
2777
-s/^[    ]*#[    ]*define[   ][  ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\)/-D\1=\2/g
2778
-t quote
2779
-s/^[    ]*#[    ]*define[   ][  ]*\([^  ][^     ]*\)[   ]*\(.*\)/-D\1=\2/g
2780
-t quote
2781
-b any
2782
-:quote
2783
-s/[     `~#$^&*(){}\\|;'\''"<>?]/\\&/g
2784
-s/\[/\\&/g
2785
-s/\]/\\&/g
2786
-s/\$/$$/g
2787
-H
2788
-:any
2789
-${
2790
-   g
2791
-   s/^\n//
2792
-   s/\n/ /g
2793
-   p
2794
-}
2795
-'
2796
-DEFS=`sed -n "$ac_script" confdefs.h`
2797
-
2798
-
2799
-ac_libobjs=
2800
-ac_ltlibobjs=
2801
-for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
2802
-  # 1. Remove the extension, and $U if already installed.
2803
-  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
2804
-  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
2805
-  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
2806
-  #    will be set to the directory where LIBOBJS objects are built.
2807
-  ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
2808
-  ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
2809
-done
2810
-LIBOBJS=$ac_libobjs
2811
-
2812
-LTLIBOBJS=$ac_ltlibobjs
2813
-
2814
-
2815
-
2816
-
2817
-: ${CONFIG_STATUS=./config.status}
2818
-ac_write_fail=0
2819
-ac_clean_files_save=$ac_clean_files
2820
-ac_clean_files="$ac_clean_files $CONFIG_STATUS"
2821
-{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
2822
-$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
2823
-cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
2824
-#! $SHELL
2825
-# Generated by $as_me.
2826
-# Run this file to recreate the current configuration.
2827
-# Compiler output produced by configure, useful for debugging
2828
-# configure, is in config.log if it exists.
2829
-
2830
-debug=false
2831
-ac_cs_recheck=false
2832
-ac_cs_silent=false
2833
-SHELL=\${CONFIG_SHELL-$SHELL}
2834
-_ACEOF
2835
-
2836
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
2837
-## --------------------- ##
2838
-## M4sh Initialization.  ##
2839
-## --------------------- ##
2840
-
2841
-# Be more Bourne compatible
2842
-DUALCASE=1; export DUALCASE # for MKS sh
2843
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
2844
-  emulate sh
2845
-  NULLCMD=:
2846
-  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
2847
-  # is contrary to our usage.  Disable this feature.
2848
-  alias -g '${1+"$@"}'='"$@"'
2849
-  setopt NO_GLOB_SUBST
2850
-else
2851
-  case `(set -o) 2>/dev/null` in
2852
-  *posix*) set -o posix ;;
2853
-esac
2854
-
2855
-fi
2856
-
2857
-
2858
-
2859
-
2860
-# PATH needs CR
2861
-# Avoid depending upon Character Ranges.
2862
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
2863
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
2864
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
2865
-as_cr_digits='0123456789'
2866
-as_cr_alnum=$as_cr_Letters$as_cr_digits
2867
-
2868
-as_nl='
2869
-'
2870
-export as_nl
2871
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
2872
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
2873
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
2874
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
2875
-if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
2876
-  as_echo='printf %s\n'
2877
-  as_echo_n='printf %s'
2878
-else
2879
-  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
2880
-    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
2881
-    as_echo_n='/usr/ucb/echo -n'
2882
-  else
2883
-    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
2884
-    as_echo_n_body='eval
2885
-      arg=$1;
2886
-      case $arg in
2887
-      *"$as_nl"*)
2888
-   expr "X$arg" : "X\\(.*\\)$as_nl";
2889
-   arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
2890
-      esac;
2891
-      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
2892
-    '
2893
-    export as_echo_n_body
2894
-    as_echo_n='sh -c $as_echo_n_body as_echo'
2895
-  fi
2896
-  export as_echo_body
2897
-  as_echo='sh -c $as_echo_body as_echo'
2898
-fi
2899
-
2900
-# The user is always right.
2901
-if test "${PATH_SEPARATOR+set}" != set; then
2902
-  PATH_SEPARATOR=:
2903
-  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
2904
-    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
2905
-      PATH_SEPARATOR=';'
2906
-  }
2907
-fi
2908
-
2909
-# Support unset when possible.
2910
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
2911
-  as_unset=unset
2912
-else
2913
-  as_unset=false
2914
-fi
2915
-
2916
-
2917
-# IFS
2918
-# We need space, tab and new line, in precisely that order.  Quoting is
2919
-# there to prevent editors from complaining about space-tab.
2920
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
2921
-# splitting by setting IFS to empty value.)
2922
-IFS=" ""   $as_nl"
2923
-
2924
-# Find who we are.  Look in the path if we contain no directory separator.
2925
-case $0 in
2926
-  *[\\/]* ) as_myself=$0 ;;
2927
-  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2928
-for as_dir in $PATH
2929
-do
2930
-  IFS=$as_save_IFS
2931
-  test -z "$as_dir" && as_dir=.
2932
-  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
2933
-done
2934
-IFS=$as_save_IFS
2935
-
2936
-     ;;
2937
-esac
2938
-# We did not find ourselves, most probably we were run as `sh COMMAND'
2939
-# in which case we are not to be found in the path.
2940
-if test "x$as_myself" = x; then
2941
-  as_myself=$0
2942
-fi
2943
-if test ! -f "$as_myself"; then
2944
-  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
2945
-  { (exit 1); exit 1; }
2946
-fi
2947
-
2948
-# Work around bugs in pre-3.0 UWIN ksh.
2949
-for as_var in ENV MAIL MAILPATH
2950
-do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
2951
-done
2952
-PS1='$ '
2953
-PS2='> '
2954
-PS4='+ '
2955
-
2956
-# NLS nuisances.
2957
-LC_ALL=C
2958
-export LC_ALL
2959
-LANGUAGE=C
2960
-export LANGUAGE
2961
-
2962
-# Required to use basename.
2963
-if expr a : '\(a\)' >/dev/null 2>&1 &&
2964
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
2965
-  as_expr=expr
2966
-else
2967
-  as_expr=false
2968
-fi
2969
-
2970
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
2971
-  as_basename=basename
2972
-else
2973
-  as_basename=false
2974
-fi
2975
-
2976
-
2977
-# Name of the executable.
2978
-as_me=`$as_basename -- "$0" ||
2979
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
2980
-    X"$0" : 'X\(//\)$' \| \
2981
-    X"$0" : 'X\(/\)' \| . 2>/dev/null ||
2982
-$as_echo X/"$0" |
2983
-    sed '/^.*\/\([^/][^/]*\)\/*$/{
2984
-       s//\1/
2985
-       q
2986
-     }
2987
-     /^X\/\(\/\/\)$/{
2988
-       s//\1/
2989
-       q
2990
-     }
2991
-     /^X\/\(\/\).*/{
2992
-       s//\1/
2993
-       q
2994
-     }
2995
-     s/.*/./; q'`
2996
-
2997
-# CDPATH.
2998
-$as_unset CDPATH
2999
-
3000
-
3001
-
3002
-  as_lineno_1=$LINENO
3003
-  as_lineno_2=$LINENO
3004
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
3005
-  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
3006
-
3007
-  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
3008
-  # uniformly replaced by the line number.  The first 'sed' inserts a
3009
-  # line-number line after each line using $LINENO; the second 'sed'
3010
-  # does the real work.  The second script uses 'N' to pair each
3011
-  # line-number line with the line containing $LINENO, and appends
3012
-  # trailing '-' during substitution so that $LINENO is not a special
3013
-  # case at line end.
3014
-  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
3015
-  # scripts with optimization help from Paolo Bonzini.  Blame Lee
3016
-  # E. McMahon (1931-1989) for sed's syntax.  :-)
3017
-  sed -n '
3018
-    p
3019
-    /[$]LINENO/=
3020
-  ' <$as_myself |
3021
-    sed '
3022
-      s/[$]LINENO.*/&-/
3023
-      t lineno
3024
-      b
3025
-      :lineno
3026
-      N
3027
-      :loop
3028
-      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
3029
-      t loop
3030
-      s/-\n.*//
3031
-    ' >$as_me.lineno &&
3032
-  chmod +x "$as_me.lineno" ||
3033
-    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
3034
-   { (exit 1); exit 1; }; }
3035
-
3036
-  # Don't try to exec as it changes $[0], causing all sort of problems
3037
-  # (the dirname of $[0] is not the place where we might find the
3038
-  # original and so on.  Autoconf is especially sensitive to this).
3039
-  . "./$as_me.lineno"
3040
-  # Exit status is that of the last command.
3041
-  exit
3042
-}
3043
-
3044
-
3045
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
3046
-  as_dirname=dirname
3047
-else
3048
-  as_dirname=false
3049
-fi
3050
-
3051
-ECHO_C= ECHO_N= ECHO_T=
3052
-case `echo -n x` in
3053
--n*)
3054
-  case `echo 'x\c'` in
3055
-  *c*) ECHO_T='    ';; # ECHO_T is single tab character.
3056
-  *)   ECHO_C='\c';;
3057
-  esac;;
3058
-*)
3059
-  ECHO_N='-n';;
3060
-esac
3061
-if expr a : '\(a\)' >/dev/null 2>&1 &&
3062
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
3063
-  as_expr=expr
3064
-else
3065
-  as_expr=false
3066
-fi
3067
-
3068
-rm -f conf$$ conf$$.exe conf$$.file
3069
-if test -d conf$$.dir; then
3070
-  rm -f conf$$.dir/conf$$.file
3071
-else
3072
-  rm -f conf$$.dir
3073
-  mkdir conf$$.dir 2>/dev/null
3074
-fi
3075
-if (echo >conf$$.file) 2>/dev/null; then
3076
-  if ln -s conf$$.file conf$$ 2>/dev/null; then
3077
-    as_ln_s='ln -s'
3078
-    # ... but there are two gotchas:
3079
-    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
3080
-    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
3081
-    # In both cases, we have to default to `cp -p'.
3082
-    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
3083
-      as_ln_s='cp -p'
3084
-  elif ln conf$$.file conf$$ 2>/dev/null; then
3085
-    as_ln_s=ln
3086
-  else
3087
-    as_ln_s='cp -p'
3088
-  fi
3089
-else
3090
-  as_ln_s='cp -p'
3091
-fi
3092
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
3093
-rmdir conf$$.dir 2>/dev/null
3094
-
3095
-if mkdir -p . 2>/dev/null; then
3096
-  as_mkdir_p=:
3097
-else
3098
-  test -d ./-p && rmdir ./-p
3099
-  as_mkdir_p=false
3100
-fi
3101
-
3102
-if test -x / >/dev/null 2>&1; then
3103
-  as_test_x='test -x'
3104
-else
3105
-  if ls -dL / >/dev/null 2>&1; then
3106
-    as_ls_L_option=L
3107
-  else
3108
-    as_ls_L_option=
3109
-  fi
3110
-  as_test_x='
3111
-    eval sh -c '\''
3112
-      if test -d "$1"; then
3113
-   test -d "$1/.";
3114
-      else
3115
-   case $1 in
3116
-   -*)set "./$1";;
3117
-   esac;
3118
-   case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
3119
-   ???[sx]*):;;*)false;;esac;fi
3120
-    '\'' sh
3121
-  '
3122
-fi
3123
-as_executable_p=$as_test_x
3124
-
3125
-# Sed expression to map a string onto a valid CPP name.
3126
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
3127
-
3128
-# Sed expression to map a string onto a valid variable name.
3129
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
3130
-
3131
-
3132
-exec 6>&1
3133
-
3134
-# Save the log message, to keep $[0] and so on meaningful, and to
3135
-# report actual input values of CONFIG_FILES etc. instead of their
3136
-# values after options handling.
3137
-ac_log="
3138
-This file was extended by tovid $as_me svn, which was
3139
-generated by GNU Autoconf 2.63.  Invocation command line was
3140
-
3141
-  CONFIG_FILES    = $CONFIG_FILES
3142
-  CONFIG_HEADERS  = $CONFIG_HEADERS
3143
-  CONFIG_LINKS    = $CONFIG_LINKS
3144
-  CONFIG_COMMANDS = $CONFIG_COMMANDS
3145
-  $ $0 $@
3146
-
3147
-on `(hostname || uname -n) 2>/dev/null | sed 1q`
3148
-"
3149
-
3150
-_ACEOF
3151
-
3152
-case $ac_config_files in *"
3153
-"*) set x $ac_config_files; shift; ac_config_files=$*;;
3154
-esac
3155
-
3156
-
3157
-
3158
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
3159
-# Files that config.status was made for.
3160
-config_files="$ac_config_files"
3161
-
3162
-_ACEOF
3163
-
3164
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
3165
-ac_cs_usage="\
3166
-\`$as_me' instantiates files from templates according to the
3167
-current configuration.
3168
-
3169
-Usage: $0 [OPTION]... [FILE]...
3170
-
3171
-  -h, --help       print this help, then exit
3172
-  -V, --version    print version number and configuration settings, then exit
3173
-  -q, --quiet, --silent
3174
-                   do not print progress messages
3175
-  -d, --debug      don't remove temporary files
3176
-      --recheck    update $as_me by reconfiguring in the same conditions
3177
-      --file=FILE[:TEMPLATE]
3178
-                   instantiate the configuration file FILE
3179
-
3180
-Configuration files:
3181
-$config_files
3182
-
3183
-Report bugs to <bug-autoconf@gnu.org>."
3184
-
3185
-_ACEOF
3186
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
3187
-ac_cs_version="\\
3188
-tovid config.status svn
3189
-configured by $0, generated by GNU Autoconf 2.63,
3190
-  with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
3191
-
3192
-Copyright (C) 2008 Free Software Foundation, Inc.
3193
-This config.status script is free software; the Free Software Foundation
3194
-gives unlimited permission to copy, distribute and modify it."
3195
-
3196
-ac_pwd='$ac_pwd'
3197
-srcdir='$srcdir'
3198
-INSTALL='$INSTALL'
3199
-MKDIR_P='$MKDIR_P'
3200
-AWK='$AWK'
3201
-test -n "\$AWK" || AWK=awk
3202
-_ACEOF
3203
-
3204
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
3205
-# The default lists apply if the user does not specify any file.
3206
-ac_need_defaults=:
3207
-while test $# != 0
3208
-do
3209
-  case $1 in
3210
-  --*=*)
3211
-    ac_option=`expr "X$1" : 'X\([^=]*\)='`
3212
-    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
3213
-    ac_shift=:
3214
-    ;;
3215
-  *)
3216
-    ac_option=$1
3217
-    ac_optarg=$2
3218
-    ac_shift=shift
3219
-    ;;
3220
-  esac
3221
-
3222
-  case $ac_option in
3223
-  # Handling of the options.
3224
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3225
-    ac_cs_recheck=: ;;
3226
-  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
3227
-    $as_echo "$ac_cs_version"; exit ;;
3228
-  --debug | --debu | --deb | --de | --d | -d )
3229
-    debug=: ;;
3230
-  --file | --fil | --fi | --f )
3231
-    $ac_shift
3232
-    case $ac_optarg in
3233
-    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
3234
-    esac
3235
-    CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
3236
-    ac_need_defaults=false;;
3237
-  --he | --h |  --help | --hel | -h )
3238
-    $as_echo "$ac_cs_usage"; exit ;;
3239
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3240
-  | -silent | --silent | --silen | --sile | --sil | --si | --s)
3241
-    ac_cs_silent=: ;;
3242
-
3243
-  # This is an error.
3244
-  -*) { $as_echo "$as_me: error: unrecognized option: $1
3245
-Try \`$0 --help' for more information." >&2
3246
-   { (exit 1); exit 1; }; } ;;
3247
-
3248
-  *) ac_config_targets="$ac_config_targets $1"
3249
-     ac_need_defaults=false ;;
3250
-
3251
-  esac
3252
-  shift
3253
-done
3254
-
3255
-ac_configure_extra_args=
3256
-
3257
-if $ac_cs_silent; then
3258
-  exec 6>/dev/null
3259
-  ac_configure_extra_args="$ac_configure_extra_args --silent"
3260
-fi
3261
-
3262
-_ACEOF
3263
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
3264
-if \$ac_cs_recheck; then
3265
-  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
3266
-  shift
3267
-  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
3268
-  CONFIG_SHELL='$SHELL'
3269
-  export CONFIG_SHELL
3270
-  exec "\$@"
3271
-fi
3272
-
3273
-_ACEOF
3274
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
3275
-exec 5>>config.log
3276
-{
3277
-  echo
3278
-  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
3279
-## Running $as_me. ##
3280
-_ASBOX
3281
-  $as_echo "$ac_log"
3282
-} >&5
3283
-
3284
-_ACEOF
3285
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
3286
-_ACEOF
3287
-
3288
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
3289
-
3290
-# Handling of arguments.
3291
-for ac_config_target in $ac_config_targets
3292
-do
3293
-  case $ac_config_target in
3294
-    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
3295
-    "src/tovid-init") CONFIG_FILES="$CONFIG_FILES src/tovid-init" ;;
3296
-
3297
-  *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
3298
-$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
3299
-   { (exit 1); exit 1; }; };;
3300
-  esac
3301
-done
3302
-
3303
-
3304
-# If the user did not use the arguments to specify the items to instantiate,
3305
-# then the envvar interface is used.  Set only those that are not.
3306
-# We use the long form for the default assignment because of an extremely
3307
-# bizarre bug on SunOS 4.1.3.
3308
-if $ac_need_defaults; then
3309
-  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
3310
-fi
3311
-
3312
-# Have a temporary directory for convenience.  Make it in the build tree
3313
-# simply because there is no reason against having it here, and in addition,
3314
-# creating and moving files from /tmp can sometimes cause problems.
3315
-# Hook for its removal unless debugging.
3316
-# Note that there is a small window in which the directory will not be cleaned:
3317
-# after its creation but before its name has been assigned to `$tmp'.
3318
-$debug ||
3319
-{
3320
-  tmp=
3321
-  trap 'exit_status=$?
3322
-  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
3323
-' 0
3324
-  trap '{ (exit 1); exit 1; }' 1 2 13 15
3325
-}
3326
-# Create a (secure) tmp directory for tmp files.
3327
-
3328
-{
3329
-  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
3330
-  test -n "$tmp" && test -d "$tmp"
3331
-}  ||
3332
-{
3333
-  tmp=./conf$$-$RANDOM
3334
-  (umask 077 && mkdir "$tmp")
3335
-} ||
3336
-{
3337
-   $as_echo "$as_me: cannot create a temporary directory in ." >&2
3338
-   { (exit 1); exit 1; }
3339
-}
3340
-
3341
-# Set up the scripts for CONFIG_FILES section.
3342
-# No need to generate them if there are no CONFIG_FILES.
3343
-# This happens for instance with `./config.status config.h'.
3344
-if test -n "$CONFIG_FILES"; then
3345
-
3346
-
3347
-ac_cr='
3348
'
3349
-ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
3350
-if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
3351
-  ac_cs_awk_cr='\\r'
3352
-else
3353
-  ac_cs_awk_cr=$ac_cr
3354
-fi
3355
-
3356
-echo 'BEGIN {' >"$tmp/subs1.awk" &&
3357
-_ACEOF
3358
-
3359
-
3360
-{
3361
-  echo "cat >conf$$subs.awk <<_ACEOF" &&
3362
-  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
3363
-  echo "_ACEOF"
3364
-} >conf$$subs.sh ||
3365
-  { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
3366
-$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
3367
-   { (exit 1); exit 1; }; }
3368
-ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
3369
-ac_delim='%!_!# '
3370
-for ac_last_try in false false false false false :; do
3371
-  . ./conf$$subs.sh ||
3372
-    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
3373
-$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
3374
-   { (exit 1); exit 1; }; }
3375
-
3376
-  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
3377
-  if test $ac_delim_n = $ac_delim_num; then
3378
-    break
3379
-  elif $ac_last_try; then
3380
-    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
3381
-$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
3382
-   { (exit 1); exit 1; }; }
3383
-  else
3384
-    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
3385
-  fi
3386
-done
3387
-rm -f conf$$subs.sh
3388
-
3389
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
3390
-cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
3391
-_ACEOF
3392
-sed -n '
3393
-h
3394
-s/^/S["/; s/!.*/"]=/
3395
-p
3396
-g
3397
-s/^[^!]*!//
3398
-:repl
3399
-t repl
3400
-s/'"$ac_delim"'$//
3401
-t delim
3402
-:nl
3403
-h
3404
-s/\(.\{148\}\).*/\1/
3405
-t more1
3406
-s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
3407
-p
3408
-n
3409
-b repl
3410
-:more1
3411
-s/["\\]/\\&/g; s/^/"/; s/$/"\\/
3412
-p
3413
-g
3414
-s/.\{148\}//
3415
-t nl
3416
-:delim
3417
-h
3418
-s/\(.\{148\}\).*/\1/
3419
-t more2
3420
-s/["\\]/\\&/g; s/^/"/; s/$/"/
3421
-p
3422
-b
3423
-:more2
3424
-s/["\\]/\\&/g; s/^/"/; s/$/"\\/
3425
-p
3426
-g
3427
-s/.\{148\}//
3428
-t delim
3429
-' <conf$$subs.awk | sed '
3430
-/^[^""]/{
3431
-  N
3432
-  s/\n//
3433
-}
3434
-' >>$CONFIG_STATUS || ac_write_fail=1
3435
-rm -f conf$$subs.awk
3436
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
3437
-_ACAWK
3438
-cat >>"\$tmp/subs1.awk" <<_ACAWK &&
3439
-  for (key in S) S_is_set[key] = 1
3440
-  FS = "&#x7;"
3441
-
3442
-}
3443
-{
3444
-  line = $ 0
3445
-  nfields = split(line, field, "@")
3446
-  substed = 0
3447
-  len = length(field[1])
3448
-  for (i = 2; i < nfields; i++) {
3449
-    key = field[i]
3450
-    keylen = length(key)
3451
-    if (S_is_set[key]) {
3452
-      value = S[key]
3453
-      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
3454
-      len += length(value) + length(field[++i])
3455
-      substed = 1
3456
-    } else
3457
-      len += 1 + keylen
3458
-  }
3459
-
3460
-  print line
3461
-}
3462
-
3463
-_ACAWK
3464
-_ACEOF
3465
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
3466
-if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
3467
-  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
3468
-else
3469
-  cat
3470
-fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
3471
-  || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
3472
-$as_echo "$as_me: error: could not setup config files machinery" >&2;}
3473
-   { (exit 1); exit 1; }; }
3474
-_ACEOF
3475
-
3476
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
3477
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
3478
-# trailing colons and then remove the whole line if VPATH becomes empty
3479
-# (actually we leave an empty line to preserve line numbers).
3480
-if test "x$srcdir" = x.; then
3481
-  ac_vpsub='/^[     ]*VPATH[    ]*=/{
3482
-s/:*\$(srcdir):*/:/
3483
-s/:*\${srcdir}:*/:/
3484
-s/:*@srcdir@:*/:/
3485
-s/^\([^=]*=[    ]*\):*/\1/
3486
-s/:*$//
3487
-s/^[^=]*=[  ]*$//
3488
-}'
3489
-fi
3490
-
3491
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
3492
-fi # test -n "$CONFIG_FILES"
3493
-
3494
-
3495
-eval set X "  :F $CONFIG_FILES      "
3496
-shift
3497
-for ac_tag
3498
-do
3499
-  case $ac_tag in
3500
-  :[FHLC]) ac_mode=$ac_tag; continue;;
3501
-  esac
3502
-  case $ac_mode$ac_tag in
3503
-  :[FHL]*:*);;
3504
-  :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
3505
-$as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
3506
-   { (exit 1); exit 1; }; };;
3507
-  :[FH]-) ac_tag=-:-;;
3508
-  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
3509
-  esac
3510
-  ac_save_IFS=$IFS
3511
-  IFS=:
3512
-  set x $ac_tag
3513
-  IFS=$ac_save_IFS
3514
-  shift
3515
-  ac_file=$1
3516
-  shift
3517
-
3518
-  case $ac_mode in
3519
-  :L) ac_source=$1;;
3520
-  :[FH])
3521
-    ac_file_inputs=
3522
-    for ac_f
3523
-    do
3524
-      case $ac_f in
3525
-      -) ac_f="$tmp/stdin";;
3526
-      *) # Look for the file first in the build tree, then in the source tree
3527
-    # (if the path is not absolute).  The absolute path cannot be DOS-style,
3528
-    # because $ac_f cannot contain `:'.
3529
-    test -f "$ac_f" ||
3530
-      case $ac_f in
3531
-      [\\/$]*) false;;
3532
-      *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
3533
-      esac ||
3534
-      { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
3535
-$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
3536
-   { (exit 1); exit 1; }; };;
3537
-      esac
3538
-      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
3539
-      ac_file_inputs="$ac_file_inputs '$ac_f'"
3540
-    done
3541
-
3542
-    # Let's still pretend it is `configure' which instantiates (i.e., don't
3543
-    # use $as_me), people would be surprised to read:
3544
-    #    /* config.h.  Generated by config.status.  */
3545
-    configure_input='Generated from '`
3546
-     $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
3547
-   `' by configure.'
3548
-    if test x"$ac_file" != x-; then
3549
-      configure_input="$ac_file.  $configure_input"
3550
-      { $as_echo "$as_me:$LINENO: creating $ac_file" >&5
3551
-$as_echo "$as_me: creating $ac_file" >&6;}
3552
-    fi
3553
-    # Neutralize special characters interpreted by sed in replacement strings.
3554
-    case $configure_input in #(
3555
-    *\&* | *\|* | *\\* )
3556
-       ac_sed_conf_input=`$as_echo "$configure_input" |
3557
-       sed 's/[\\\\&|]/\\\\&/g'`;; #(
3558
-    *) ac_sed_conf_input=$configure_input;;
3559
-    esac
3560
-
3561
-    case $ac_tag in
3562
-    *:-:* | *:-) cat >"$tmp/stdin" \
3563
-      || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
3564
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
3565
-   { (exit 1); exit 1; }; } ;;
3566
-    esac
3567
-    ;;
3568
-  esac
3569
-
3570
-  ac_dir=`$as_dirname -- "$ac_file" ||
3571
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
3572
-    X"$ac_file" : 'X\(//\)[^/]' \| \
3573
-    X"$ac_file" : 'X\(//\)$' \| \
3574
-    X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
3575
-$as_echo X"$ac_file" |
3576
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
3577
-       s//\1/
3578
-       q
3579
-     }
3580
-     /^X\(\/\/\)[^/].*/{
3581
-       s//\1/
3582
-       q
3583
-     }
3584
-     /^X\(\/\/\)$/{
3585
-       s//\1/
3586
-       q
3587
-     }
3588
-     /^X\(\/\).*/{
3589
-       s//\1/
3590
-       q
3591
-     }
3592
-     s/.*/./; q'`
3593
-  { as_dir="$ac_dir"
3594
-  case $as_dir in #(
3595
-  -*) as_dir=./$as_dir;;
3596
-  esac
3597
-  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
3598
-    as_dirs=
3599
-    while :; do
3600
-      case $as_dir in #(
3601
-      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
3602
-      *) as_qdir=$as_dir;;
3603
-      esac
3604
-      as_dirs="'$as_qdir' $as_dirs"
3605
-      as_dir=`$as_dirname -- "$as_dir" ||
3606
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
3607
-    X"$as_dir" : 'X\(//\)[^/]' \| \
3608
-    X"$as_dir" : 'X\(//\)$' \| \
3609
-    X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
3610
-$as_echo X"$as_dir" |
3611
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
3612
-       s//\1/
3613
-       q
3614
-     }
3615
-     /^X\(\/\/\)[^/].*/{
3616
-       s//\1/
3617
-       q
3618
-     }
3619
-     /^X\(\/\/\)$/{
3620
-       s//\1/
3621
-       q
3622
-     }
3623
-     /^X\(\/\).*/{
3624
-       s//\1/
3625
-       q
3626
-     }
3627
-     s/.*/./; q'`
3628
-      test -d "$as_dir" && break
3629
-    done
3630
-    test -z "$as_dirs" || eval "mkdir $as_dirs"
3631
-  } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
3632
-$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
3633
-   { (exit 1); exit 1; }; }; }
3634
-  ac_builddir=.
3635
-
3636
-case "$ac_dir" in
3637
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
3638
-*)
3639
-  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
3640
-  # A ".." for each directory in $ac_dir_suffix.
3641
-  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
3642
-  case $ac_top_builddir_sub in
3643
-  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
3644
-  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
3645
-  esac ;;
3646
-esac
3647
-ac_abs_top_builddir=$ac_pwd
3648
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
3649
-# for backward compatibility:
3650
-ac_top_builddir=$ac_top_build_prefix
3651
-
3652
-case $srcdir in
3653
-  .)  # We are building in place.
3654
-    ac_srcdir=.
3655
-    ac_top_srcdir=$ac_top_builddir_sub
3656
-    ac_abs_top_srcdir=$ac_pwd ;;
3657
-  [\\/]* | ?:[\\/]* )  # Absolute name.
3658
-    ac_srcdir=$srcdir$ac_dir_suffix;
3659
-    ac_top_srcdir=$srcdir
3660
-    ac_abs_top_srcdir=$srcdir ;;
3661
-  *) # Relative name.
3662
-    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
3663
-    ac_top_srcdir=$ac_top_build_prefix$srcdir
3664
-    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
3665
-esac
3666
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
3667
-
3668
-
3669
-  case $ac_mode in
3670
-  :F)
3671
-  #
3672
-  # CONFIG_FILE
3673
-  #
3674
-
3675
-  case $INSTALL in
3676
-  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
3677
-  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
3678
-  esac
3679
-  ac_MKDIR_P=$MKDIR_P
3680
-  case $MKDIR_P in
3681
-  [\\/$]* | ?:[\\/]* ) ;;
3682
-  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
3683
-  esac
3684
-_ACEOF
3685
-
3686
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
3687
-# If the template does not know about datarootdir, expand it.
3688
-# FIXME: This hack should be removed a few years after 2.60.
3689
-ac_datarootdir_hack=; ac_datarootdir_seen=
3690
-
3691
-ac_sed_dataroot='
3692
-/datarootdir/ {
3693
-  p
3694
-  q
3695
-}
3696
-/@datadir@/p
3697
-/@docdir@/p
3698
-/@infodir@/p
3699
-/@localedir@/p
3700
-/@mandir@/p
3701
-'
3702
-case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
3703
-*datarootdir*) ac_datarootdir_seen=yes;;
3704
-*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
3705
-  { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
3706
-$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
3707
-_ACEOF
3708
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
3709
-  ac_datarootdir_hack='
3710
-  s&@datadir@&$datadir&g
3711
-  s&@docdir@&$docdir&g
3712
-  s&@infodir@&$infodir&g
3713
-  s&@localedir@&$localedir&g
3714
-  s&@mandir@&$mandir&g
3715
-    s&\\\${datarootdir}&$datarootdir&g' ;;
3716
-esac
3717
-_ACEOF
3718
-
3719
-# Neutralize VPATH when `$srcdir' = `.'.
3720
-# Shell code in configure.ac might set extrasub.
3721
-# FIXME: do we really want to maintain this feature?
3722
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
3723
-ac_sed_extra="$ac_vpsub
3724
-$extrasub
3725
-_ACEOF
3726
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
3727
-:t
3728
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
3729
-s|@configure_input@|$ac_sed_conf_input|;t t
3730
-s&@top_builddir@&$ac_top_builddir_sub&;t t
3731
-s&@top_build_prefix@&$ac_top_build_prefix&;t t
3732
-s&@srcdir@&$ac_srcdir&;t t
3733
-s&@abs_srcdir@&$ac_abs_srcdir&;t t
3734
-s&@top_srcdir@&$ac_top_srcdir&;t t
3735
-s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
3736
-s&@builddir@&$ac_builddir&;t t
3737
-s&@abs_builddir@&$ac_abs_builddir&;t t
3738
-s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
3739
-s&@INSTALL@&$ac_INSTALL&;t t
3740
-s&@MKDIR_P@&$ac_MKDIR_P&;t t
3741
-$ac_datarootdir_hack
3742
-"
3743
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
3744
-  || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
3745
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
3746
-   { (exit 1); exit 1; }; }
3747
-
3748
-test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
3749
-  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
3750
-  { ac_out=`sed -n '/^[     ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
3751
-  { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
3752
-which seems to be undefined.  Please make sure it is defined." >&5
3753
-$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
3754
-which seems to be undefined.  Please make sure it is defined." >&2;}
3755
-
3756
-  rm -f "$tmp/stdin"
3757
-  case $ac_file in
3758
-  -) cat "$tmp/out" && rm -f "$tmp/out";;
3759
-  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
3760
-  esac \
3761
-  || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
3762
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
3763
-   { (exit 1); exit 1; }; }
3764
- ;;
3765
-
3766
-
3767
-
3768
-  esac
3769
-
3770
-done # for ac_tag
3771
-
3772
-
3773
-{ (exit 0); exit 0; }
3774
-_ACEOF
3775
-chmod +x $CONFIG_STATUS
3776
-ac_clean_files=$ac_clean_files_save
3777
-
3778
-test $ac_write_fail = 0 ||
3779
-  { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
3780
-$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
3781
-   { (exit 1); exit 1; }; }
3782
-
3783
-
3784
-# configure is writing to config.log, and then calls config.status.
3785
-# config.status does its own redirection, appending to config.log.
3786
-# Unfortunately, on DOS this fails, as config.log is still kept open
3787
-# by configure, so config.status won't be able to write to it; its
3788
-# output is simply discarded.  So we exec the FD to /dev/null,
3789
-# effectively closing config.log, so it can be properly (re)opened and
3790
-# appended to by config.status.  When coming back to configure, we
3791
-# need to make the FD available again.
3792
-if test "$no_create" != yes; then
3793
-  ac_cs_success=:
3794
-  ac_config_status_args=
3795
-  test "$silent" = yes &&
3796
-    ac_config_status_args="$ac_config_status_args --quiet"
3797
-  exec 5>/dev/null
3798
-  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
3799
-  exec 5>>config.log
3800
-  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
3801
-  # would make configure fail if this is the last instruction.
3802
-  $ac_cs_success || { (exit 1); exit 1; }
3803
-fi
3804
-if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
3805
-  { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
3806
-$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
3807
-fi
3808
-
3809
-
3810
-# Enable symbolic links for automake
3811
-{ $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5
3812
-$as_echo_n "checking whether ln -s works... " >&6; }
3813
-LN_S=$as_ln_s
3814
-if test "$LN_S" = "ln -s"; then
3815
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
3816
-$as_echo "yes" >&6; }
3817
-else
3818
-  { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5
3819
-$as_echo "no, using $LN_S" >&6; }
3820
-fi
3821
-
3822
-
3823
-
3824
-# ******************************************************************************
3825
-# ******************************************************************************
3826
-#
3827
-# PRETTY SUMMARY
3828
-#
3829
-# ******************************************************************************
3830
-# ******************************************************************************
3831
-
3832
-# Works for all distros
3833
-INSTALL_COMMAND="su -c \"make install\""
3834
-
3835
-# but *buntu users are used to
3836
-if $(cat /proc/version | grep -iq buntu); then
3837
-    INSTALL_COMMAND="sudo make install"
3838
-fi
3839
-
3840
-{ $as_echo "$as_me:$LINENO:
3841
-
3842
-
3843
- You may now type '$INSTALL_COMMAND' to compile and install tovid.
3844
-
3845
-   (or you can try to 'make sense' of it all...)
3846
- " >&5
3847
-$as_echo "$as_me:
3848
-
3849
-
3850
- You may now type '$INSTALL_COMMAND' to compile and install tovid.
3851
-
3852
-   (or you can try to 'make sense' of it all...)
3853
- " >&6;}
3854
tovid-0.33.tar.bz2/configure.ac Deleted
189
 
1
@@ -1,187 +0,0 @@
2
-# Process this file with autoconf to produce a configure script.
3
-# Autoconf documentation:
4
-#     http://www.gnu.org/software/autoconf/manual/index.html
5
-
6
-# Project homepage: http://tovid.wikia.com
7
-#
8
-#
9
-# Copyright (C) 2005 tovid <http://tovid.wikia.com>
10
-#
11
-# This program is free software; you can redistribute it and/or
12
-# modify it under the terms of the GNU General Public License
13
-# as published by the Free Software Foundation; either
14
-# version 2 of the License, or (at your option) any later
15
-# version.
16
-#
17
-# This program is distributed in the hope that it will be useful,
18
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
19
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20
-# GNU General Public License for more details.
21
-#
22
-# You should have received a copy of the GNU General Public License
23
-# along with this program; if not, write to the Free Software
24
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Or see:
25
-#
26
-#           http://www.gnu.org/licenses/gpl.txt
27
-
28
-# ******************************************************************************
29
-# ******************************************************************************
30
-#
31
-#
32
-# INIT
33
-#
34
-#
35
-# ******************************************************************************
36
-# ******************************************************************************
37
-
38
-# The first arugment sets the package name, the second sets the package version.
39
-# eg [tovid], [0.40] would yield a tovid-0.40.tar.gz after "$ make dist"
40
-# the version number is also substituted into tovid-init.in
41
-AC_INIT([tovid], [svn])
42
-AC_CONFIG_SRCDIR([src/tovid])
43
-
44
-# Require minimum versions of the autotools
45
-AC_PREREQ(2.5)
46
-AM_INIT_AUTOMAKE([1.11])
47
-
48
-
49
-
50
-
51
-# ******************************************************************************
52
-# ******************************************************************************
53
-#
54
-#
55
-# CHECK FOR DEPENDENCIES
56
-#
57
-#
58
-# ******************************************************************************
59
-# ******************************************************************************
60
-
61
-# The only 'compile time' dependency we have is txt2tags, which is used to
62
-# build the man pages.
63
-AC_CHECK_PROG(TXT2TAGS, [txt2tags], [:], [false])
64
-if ! $TXT2TAGS; then
65
-    AC_MSG_ERROR([
66
-
67
- ERROR:
68
-
69
- txt2tags cannot be found on your system, but tovid needs it to build
70
- the man pages. Please install txt2tags (http://txt2tags.sf.net) and
71
- run ./configure again. Thanks!
72
-
73
-     -- http://tovid.wikia.com
74
-])
75
-fi
76
-
77
-# All run-time dependencies are checked in tovid-init now. In addition to being
78
-# the Correct Way to do things, it makes packaging much easier for deb|rpm|???
79
-# maintainers.
80
-
81
-# ******************************************************************************
82
-# Python
83
-# ******************************************************************************
84
-# As seen on http://sources.redhat.com/automake/automake.html#Python
85
-# AM_PATH_PYTHON sets many vars, including $(pythondir), which is the directory
86
-# name for the site-packages subdirectory of the standard Python install tree;
87
-# and $(pyexecdir), which is the directory where Python extension modules
88
-# (shared libraries) should be installed.
89
-
90
-# For example, on friedrij's woody debian system
91
-# $(pythondir) = ${prefix}/lib/python2.3/site-packages
92
-# $(pyexecdir) = ${exec_prefix}/lib/python2.3/site-packages
93
-
94
-# From the autoconf manual, available in anything _but_ html (uf, fsf) from
95
-# http://www.gnu.org/software/autoconf/manual/index.html
96
-# $(prefix) is "The common installation prefix for all files. If $(exec_prefix)
97
-# is defined to a different value, prefix is used only for architecture-
98
-# independent files."
99
-# $(exec_prefix) is "The installation prefix for architecture-dependent files.
100
-# By default it's the same as $(prefix). You should avoid installing anything
101
-# directly to $(exec_prefix). However, the default value for directories
102
-# containing architecture-dependent files should be relative to $(exec_prefix)."
103
-
104
-# The GNU Coding Standards, available in html (yosh) from
105
-# (http://www.gnu.org/prep/standards/standards.html#Directory-Variables),
106
-# clarifies the difference between $(prefix) and $(exec_prefix): "Generally,
107
-# $(exec_prefix) is used for directories that contain machine-specific files
108
-# (such as executables and subroutine libraries), while $(prefix) is used
109
-# directly for other directories."
110
-
111
-# So, this dev thinks we need $(pythondir) and some 'enlightened' python
112
-# scripts, as pointed out by
113
-# http://sources.redhat.com/automake/automake.html#Hard_002dCoded-Install-Paths
114
-# If you do [use $(pythondir) or $(pyexecdir)], then:
115
-#    * root users can install your package with the same --prefix as Python (you
116
-#      get the behavior of the previous attempt - eg /usr/lib/python-2.3/...)
117
-#    * non-root users can install your package too, they will have the extension
118
-#      module in a place that is not searched by Python but they can work around
119
-#      this using environment variables (and if you installed scripts that use
120
-#      this shared library, it's easy to tell Python were to look in the
121
-#      beginning of your script, so the script works in both cases).
122
-
123
-# Using pythondir_PYTHON for libtovid will install it to
124
-# ${prefix}/lib/python2.3/site-packages (for example)
125
-# and the pytovid suite (left as bin_SCRIPTS, so that they are installed as
126
-# executables and not byte-compiled like python_PYTHON would do) will need to be
127
-# told how to look for libtovid.
128
-
129
-AM_PATH_PYTHON(2.4)
130
-
131
-# Attempt to inform user that their pyton installation won't work
132
-#   with the default prefix (/usr/local)
133
-USER_PYTHON_PATH=$(python -c "import sys; print sys.path")
134
-PYTHON_LOCAL=$(echo $USER_PYTHON_PATH | awk -F ',' '{ for (f=1; f<=NF; f++) {print $f}; }' | grep local | tr -d "' ")
135
-
136
-if test -z $PYTHON_LOCAL && test x"$prefix" == "xNONE"; then
137
-    AC_MSG_ERROR([
138
-
139
-    ERROR:
140
-
141
-    It looks like your python installation doesn't look in /usr/local for
142
-    python modules. tovid installs a few modules on your system, and if
143
-    python can't find them, then tovid won't work!
144
-
145
-    Please try:  ./configure --prefix=/usr
146
-
147
-    to install tovid in a place where python will look for modules. Thanks!
148
-
149
-        -- http://tovid.wikia.com
150
-    ])
151
-fi
152
-
153
-
154
-# Check to see if this is a svn checkout and set version to revision number
155
-if test "$PACKAGE_VERSION" = "svn" && test -e bootstrap; then
156
-     VERSION="svn-r$(svn info bootstrap | grep Revision | awk '{print $2}')"
157
-fi
158
-
159
-AC_CONFIG_FILES([Makefile src/tovid-init])
160
-AC_OUTPUT
161
-
162
-# Enable symbolic links for automake
163
-AC_PROG_LN_S
164
-
165
-
166
-# ******************************************************************************
167
-# ******************************************************************************
168
-#
169
-# PRETTY SUMMARY
170
-#
171
-# ******************************************************************************
172
-# ******************************************************************************
173
-
174
-# Works for all distros
175
-INSTALL_COMMAND="su -c \"make install\""
176
-
177
-# but *buntu users are used to
178
-if $(cat /proc/version | grep -iq buntu); then
179
-    INSTALL_COMMAND="sudo make install"
180
-fi
181
-
182
-AC_MSG_NOTICE([
183
-
184
-
185
- You may now type '$INSTALL_COMMAND' to compile and install tovid.
186
-
187
-   (or you can try to 'make sense' of it all...)
188
- ])
189
tovid-0.33.tar.bz2/docs/clean Deleted
68
 
1
@@ -1,66 +0,0 @@
2
-#! /bin/sh
3
-
4
-CSS=`cat << 'EOF'
5
-<link rel="stylesheet" href="tovid_style.css" type="text\/css">
6
-EOF`
7
-
8
-ALTCSS=`cat << 'EOF'
9
-  <link rel="stylesheet" href="tovid_style.css" media="screen" type="text/css" title="Default">
10
-  <link rel="stylesheet" href="tovid_print.css" media="print" type="text/css">
11
-  <link rel="alternate stylesheet" href="tovid_print.css" media="screen" title="Printer-friendly">
12
-EOF`
13
-
14
-NAVMENU=`cat << 'EOF'
15
-  <ul id="navmenu">
16
-    <li><a href="toc.html">Site map</a></li>
17
-
18
-    <li><a href="http://sourceforge.net/projects/tovid">Get tovid</a></li>
19
-
20
-    <li class="menuparent">
21
-      <a href="#">Help</a>
22
-
23
-      <ul>
24
-        <li><a href="howto.html">howto</a></li>
25
-        <li><a href="faq.html">FAQ</a></li>
26
-        <li><a href="irc://irc.freenode.net/tovid">IRC channel</a></li>
27
-        <li><a href="http://www.createphpbb.com/phpbb/tovid.html">forum</a></li>
28
-        <li><a href="http://lists.sourceforge.net/lists/listinfo/tovid-users">user mailing list</a></li>
29
-      </ul>
30
-    </li>
31
-
32
-    <li class="menuparent">
33
-      <a href="manpages.html">Manpages</a>
34
-      <ul>
35
-        <li><a href="tovid.html">tovid</a></li>
36
-        <li><a href="idvid.html">idvid</a></li>
37
-        <li><a href="makemenu.html">makemenu</a></li>
38
-        <li><a href="makexml.html">makexml</a></li>
39
-        <li><a href="makedvd.html">makedvd</a></li>
40
-        <li><a href="postproc.html">postproc</a></li>
41
-        <li><a href="dvrequant.html">dvrequant</a></li>
42
-      </ul>
43
-    </li>
44
-
45
-    <li class="menuparent">
46
-      <a href="#">Language</a>
47
-      <ul>
48
-        <li><a href="fr/">Français</a></li>
49
-        <li><a href="es/">Español</a></li>
50
-      </ul>
51
-    </li>
52
-
53
-  </ul>
54
-EOF`
55
-
56
-# Replace css with altcss in all HTML files
57
-
58
-FILES="*.html"
59
-for FILE in $FILES; do
60
-    head -n 10 $FILE > $FILE.tmp
61
-    echo $"$ALTCSS" >> $FILE.tmp
62
-    cat $FILE | sed -n '12,/alink[^>]*\>/p' >> $FILE.tmp
63
-    echo $"$NAVMENU" >> $FILE.tmp
64
-    cat $FILE | sed -n '/div class="navheader"/,$p' >> $FILE.tmp
65
-    mv -v $FILE.tmp $FILE
66
-done
67
-
68
tovid-0.33.tar.bz2/docs/docmake Deleted
146
 
1
@@ -1,144 +0,0 @@
2
-#! /usr/bin/env python
3
-# -*- coding: utf-8 -*-
4
-
5
-"""Quick-and-dirty 'make' tool for building tovid documentation."""
6
-
7
-import os
8
-import sys
9
-import glob
10
-import libtovid
11
-from libtovid import gui
12
-# Get mypydoc
13
-import mypydoc
14
-
15
-# Directories are relative to the docmake script
16
-base_dir = os.path.dirname(sys.argv[0])
17
-
18
-# Directory containing .t2t doc sources
19
-source_dir = os.path.abspath(base_dir + '/src')
20
-# Directory to save output in
21
-dest_dir = os.path.abspath(base_dir + '/html')
22
-man_dir = os.path.abspath(base_dir + '/man')
23
-man_pages = ['todisc', 'tovid', 'idvid', 'makemenu', 'makedvd', \
24
-    'pymakexml', 'makexml', 'postproc', 'todisc']
25
-
26
-# Temporary directory to hold wikitext
27
-wiki_dir = os.path.abspath(base_dir + '/wiki')
28
-
29
-# Subdirectories of source_dir containing translations to build
30
-translation_subdirs = ['en', 'es']
31
-
32
-
33
-# Add full names of python modules to document with pydoc
34
-pydoc_modules = []
35
-mods = libtovid.__all__
36
-for mod in mods:
37
-    pydoc_modules.append('libtovid.%s' % mod)
38
-
39
-
40
-def newer(source, target):
41
-    """Return True if the source file is more recently modified than the
42
-    target; False otherwise."""
43
-    source_mod = os.path.getmtime(source)
44
-    if os.path.exists(target):
45
-        target_mod = os.path.getmtime(target)
46
-    else:
47
-        target_mod = 0
48
-
49
-    return source_mod > target_mod
50
-
51
-    
52
-def generate_t2t_tarballs():
53
-    """Create tar/gzip of all t2t sources in the html/download directory."""
54
-    print "Generating .tar.gz of all .t2t sources..."
55
-    for lang in translation_subdirs:
56
-        cmd = 'tar --exclude .svn -czvvf tovid_t2t_%s.tar.gz src/%s' % \
57
-                (lang, lang)
58
-        os.system(cmd)
59
-        print "Generated tovid_t2t_%s.tar.gz" % lang
60
-
61
-
62
-def generate_manpages():
63
-    for manpage in man_pages:
64
-        infile = '%s/en/%s.t2t' % (source_dir, manpage)
65
-        outfile = '%s/%s.1' % (man_dir, manpage)
66
-        if newer(infile, outfile):
67
-            generate_manpage(infile, outfile)
68
-        else:
69
-            print "Skipping %s" % outfile
70
-
71
-def generate_manpage(t2tfile, manfile):
72
-    print "Generating manual page from %s" % t2tfile
73
-    cmd = 'txt2tags -t man -i "%s" -o "%s"' % (t2tfile, manfile)
74
-    os.system(cmd)
75
-
76
-
77
-def generate_pydocs():
78
-    print "Generating HTML documentation of libtovid Python sources"
79
-    for mod in pydoc_modules:
80
-        print "Writing %s/pydocs/%s.html" % (dest_dir, mod)
81
-        htmlfile = open("%s/pydocs/%s.html" % (dest_dir, mod), 'w')
82
-        gen = mypydoc.HTMLGenerator()
83
-        html = gen.document(mod)
84
-        if html:
85
-            htmlfile.write(html)
86
-            htmlfile.close()
87
-        else:
88
-            print "Couldn't generate docs for %s" % mod
89
-        # Run tidy on HTML output
90
-        #os.popen2("tidy -utf8 -i -m %s" % htmlfile)
91
-
92
-
93
-def generate_html(t2tfile, htmlfile):
94
-    cmd = 'txt2tags -i %s -o %s' % (t2tfile, htmlfile)
95
-    cmd += ' --encoding iso-8859-1'
96
-    cmd += ' -t xhtml --css-sugar --toc --style=tovid_screen.css'
97
-    # Run txt2tags cmd, displaying its normal output
98
-    os.system(cmd)
99
-
100
-    # Run tidy on HTML output
101
-    #os.popen2("tidy -utf8 -i -m %s" % htmlfile)
102
-
103
-    
104
-def generate_all_html():
105
-    print "Generating HTML for all translations of documentation."
106
-    # Convert all language translations (.t2t sources) to HTML
107
-    for trans_dir in translation_subdirs:
108
-        print "Looking for .t2t sources in %s/%s" % (source_dir, trans_dir)
109
-        for t2tfile in glob.glob('%s/%s/*.t2t' % (source_dir, trans_dir)):
110
-            # Determine output path/filename
111
-            # (Strip .t2t from basename and put in dest_dir/trans_dir)
112
-            outfile = '%s/%s/%s.html' % \
113
-                    (dest_dir, trans_dir, os.path.basename(t2tfile)[:-4])
114
-            
115
-            # If the .t2t source is newer than the existing HTML target,
116
-            # recreate the HTML.
117
-            if newer(t2tfile, outfile):
118
-                print "Source file: %s is new. Regenerating %s" % \
119
-                    (t2tfile, outfile)
120
-                generate_html(t2tfile, outfile)
121
-            else:
122
-                print "Skipping file: %s" % t2tfile
123
-
124
-if __name__ == '__main__':
125
-
126
-    usage = "Usage: docmake [targets], where targets may be:\n"
127
-    usage += "manpages, pydocs, tarballs, or html (or any combination)\n"
128
-
129
-    print "tovid documentation maker"
130
-    if len(sys.argv) < 2:
131
-        print usage
132
-        sys.exit()
133
-    for arg in sys.argv[1:]:
134
-        if arg == 'manpages':
135
-            generate_manpages()
136
-        elif arg == 'pydocs':
137
-            generate_pydocs()
138
-        elif arg == 'tarballs':
139
-            generate_t2t_tarballs()
140
-        elif arg == 'html':
141
-            generate_all_html()
142
-        else:
143
-            print usage
144
-            print "Unknown argument: %s" % arg
145
-
146
tovid-0.33.tar.bz2/docs/html Deleted
2
 
1
-(directory)
2
tovid-0.33.tar.bz2/docs/html/favicon.ico Deleted
tovid-0.33.tar.bz2/docs/html/tovid_print.css Deleted
54
 
1
@@ -1,52 +0,0 @@
2
-/* tovid_print.css
3
- * CSS print stylesheet for the tovid documentation
4
- * http://tovid.sourceforge.net/
5
- */
6
-
7
-body {
8
-    margin: 0.5in 0.75in;
9
-    font-family: Times, serif;
10
-    font-size: 12pt;
11
-    text-align: justify;
12
-}
13
-
14
-/* Show link URLs in parentheses */
15
-/*
16
-a:link:after, a:visited:after {
17
-    content: " (" attr(href) ") ";
18
-    font-size: 90%;
19
-}
20
-*/
21
-
22
-pre {
23
-    margin: 2em;
24
-}
25
-h1, h2 {
26
-    font-size: 150%;
27
-    margin: 4em 0 2em 0;
28
-    text-decoration: none;
29
-    border-bottom: 1pt solid black;
30
-    page-break-after: avoid;
31
-}
32
-h3, h4, h5, h6 {
33
-    margin-top: 2em;
34
-    page-break-after: avoid;
35
-}
36
-
37
-.toc {
38
-    font-size: 90%;
39
-    margin: 2em;
40
-}
41
-
42
-ul {
43
-    page-break-inside: avoid;
44
-}
45
-a:link, a:visited {
46
-    color: #028;
47
-    text-decoration: underline;
48
-}
49
-
50
-img {
51
-    margin: 2em;
52
-    page-break-inside: avoid;
53
-}
54
tovid-0.33.tar.bz2/docs/html/tovid_screen.css Deleted
199
 
1
@@ -1,197 +0,0 @@
2
-/* screen.css
3
- * CSS stylesheet definition for the tovid documentation
4
- * http://tovid.sourceforge.net/
5
- */
6
-
7
-/*
8
- * Body and link styles
9
- */
10
-body {
11
-  /*font-family: Arial, Helvetica, sans-serif;*/
12
-    font-family: sans-serif;
13
-    font-size: 15px;
14
-    color: #000;
15
-    background: white; /*url( "images/bg_film_white.jpg" ) 0 0 no-repeat fixed;*/
16
-    margin: 2em;
17
-    padding: 1em;
18
-}
19
-
20
-a { color: #44C; text-decoration: none; background: transparent; }
21
-a:hover {
22
-    background: #FFE;
23
-    border-width: 1px 0;
24
-    border-style: dotted;
25
-    border-color: #44C;
26
-}
27
-a:visited { color: #A4A; }
28
-
29
-.toc:before { content: 'Contents:' }
30
-.toc {
31
-    float: left;
32
-    padding: 0;
33
-    margin: 1em 3em 2em 1em;
34
-    font-family: Georgia, serif;
35
-    font-size: 16px;
36
-    font-weight: bold;
37
-}
38
-
39
-.toc a {
40
-    color: #653;
41
-    text-decoration: none;
42
-}
43
-
44
-
45
-h1 {
46
-    border-bottom: 3px solid grey;
47
-    padding: 0.5em 0;
48
-}
49
-
50
-h2 {
51
-    color: #000;
52
-    padding: 0.5em;
53
-    margin: 2em 0;
54
-    border-width: 1px;
55
-    border-style: solid;
56
-    border-color: #432;
57
-    clear: both;
58
-    text-shadow: #997 -0.2em 0.2em 0.2em;
59
-    background: #E7D8DB; /*url( "images/bg_film_negative.jpg" ) 0 0 no-repeat fixed;*/
60
-}
61
-
62
-h3 {
63
-    color: #383;
64
-    font-style: italic;
65
-    margin: 2em 0;
66
-    padding: 0.5em;
67
-    border-width: 1px 0 1px 0;
68
-    border-style: solid;
69
-    border-color: #8B8;
70
-    clear: left;
71
-    text-shadow: #CCB -0.3em 0.3em 0.2em;
72
-}
73
-
74
-pre
75
-{
76
-    padding: 1em;
77
-    margin: 2em;
78
-    background: #F8F8F8; /*url( "images/bg_film_sepia.jpg" ) 0 0 no-repeat fixed;*/
79
-    border: 1px dotted grey;
80
-}
81
-/* Indentation */
82
-body p   { margin-left: 2em }
83
-body pre { margin-left: 2em }
84
-body ul  { margin-left: 4em }
85
-body dl  { margin-left: 4em }
86
-.toc ul  { margin-left: 1em }
87
-
88
-dl { clear: both; }
89
-dt { font-weight: bold; }
90
-
91
-/* mypydoc styles */
92
-dl.class > dd {
93
-    margin: 1em 1em 1em 2em;
94
-    padding: 2em;
95
-    border-top: 3px solid #84A;
96
-    border-left: 3px solid #84A;
97
-}
98
-dl.class > dt {
99
-    margin-top: 2em;
100
-    padding: 0;
101
-    font-size: 140%;
102
-    font-style: italic;
103
-    color: #418;
104
-}
105
-
106
-pre.doc {
107
-    background: transparent;
108
-    border: none;
109
-    margin: 0;
110
-    color: #448;
111
-}
112
-pre.source {
113
-    background: white;
114
-    border: 2px dotted #080;
115
-    margin: 0;
116
-}
117
-
118
-code.args {
119
-    color: #A00;
120
-}
121
-
122
-/*
123
-dl.class dd {
124
-    margin: 1em 2em;
125
-    padding: 0;
126
-}
127
-*/
128
-
129
-/* CSS pop-out navigation menu
130
- * Adapted from Nick Rigby's:
131
- * http://www.nickrigby.com/article/25/drop-down-menus-horizontal-style-pt-3 
132
- */
133
-ul#navmenu {
134
-    margin: 1em;
135
-    padding: 0;
136
-    width: 9em;
137
-    font-family: Verdana, sans-serif;
138
-    text-shadow: #999 0.1em 0.1em 0.1em;
139
-    float: right;
140
-}
141
-
142
-ul#navmenu ul {
143
-    width: 9em;
144
-    margin: 0;
145
-    padding: 0;
146
-   position: absolute;
147
-    right: 9em;
148
-    top: 0;
149
-   display: none;
150
-}
151
-
152
-ul#navmenu li {
153
-   position: relative;
154
-    list-style: none;
155
-}
156
-
157
-ul#navmenu li a {
158
-   display: block;
159
-   text-decoration: none;
160
-    background: #E0E9C5;
161
-   color: black;
162
-   padding: 0.5em;
163
-   border: 1px solid black;
164
-    margin: 0;
165
-    text-align: right;
166
-}
167
-
168
-/* Fix IE. Hide from IE Mac \*/
169
-* html ul#navmenu li { float: left; height: 1%; }
170
-* html ul#navmenu li a { height: 1%; }
171
-/* End */
172
-
173
-ul#navmenu li ul li a { padding: 0.5em; } /* Sub Menu Styles */
174
-
175
-ul#navmenu li:hover ul ul,
176
-ul#navmenu li:hover ul ul ul,
177
-ul#navmenu li.over ul ul,
178
-ul#navmenu li.over ul ul ul { display: none; } /* Hide sub-menus initially */
179
-
180
-ul#navmenu li:hover ul,
181
-ul#navmenu li li:hover ul,
182
-ul#navmenu li li li:hover ul,
183
-ul#navmenu li.over ul,
184
-ul#navmenu li li.over ul,
185
-ul#navmenu li li li.over ul {
186
-    display: block;
187
-}
188
-
189
-ul#navmenu li.menuparent>a:before { content: '<- '; }
190
-
191
-ul#navmenu li.menuparent:hover,
192
-ul#navmenu li.over {
193
-}
194
-ul#navmenu li a:hover {
195
-    background: #F8F8F7; /*url( "images/bg_film_sepia.jpg" ) 0 0 no-repeat fixed;
196
-    color: #36A;
197
-    border-color: #753;
198
-}
199
tovid-0.33.tar.bz2/docs/mypydoc.py Deleted
293
 
1
@@ -1,291 +0,0 @@
2
-#! /usr/bin/env python
3
-# -*- coding: Latin-1 -*-
4
-
5
-
6
-"""Reimplementation of the pydoc HTML generator.
7
-
8
-Notes:
9
-
10
-__author__
11
-__date__
12
-__version__
13
-__credits__
14
-
15
-__class__
16
-__name__
17
-__all__
18
-__path__
19
-__bases__
20
-__module__
21
-
22
-
23
-======================
24
-try:
25
-    foo = object.__attrib__
26
-except AttributeError:
27
-    foo = None
28
-======================
29
-
30
-def describe(thing):
31
-    # Most return thing.__name__
32
-    inspect.ismodule(thing)
33
-    inspect.isbuiltin(thing)
34
-    inspect.isclass(thing)
35
-    inspect.isfunction(thing)
36
-    inspect.ismethod(thing)
37
-    type(thing) is types.InstanceType
38
-
39
-
40
-# Return a dictionary of member/value pairs
41
-# routines in thing
42
-for key, value in inspect.getmembers(thing, inspect.isroutine)
43
-# classes in thing
44
-for key, value in inspect.getmembers(thing, inspect.isclass)
45
-# etc.
46
-
47
-"""
48
-
49
-import datetime
50
-import re, sys, inspect, __builtin__
51
-from string import join, split, lower
52
-
53
-def trim(text):
54
-    """Strip leading indentation from a block of text.
55
-
56
-    Borrowed from http://www.python.org/peps/pep-0257.html 
57
-    """
58
-    if not text:
59
-        return ''
60
-    # Split text into lines, converting tabs to spaces
61
-    lines = text.expandtabs().splitlines()
62
-    # Determine minimum indentation (except first line)
63
-    indent = sys.maxint
64
-    for line in lines[1:]:
65
-        stripped = line.lstrip()
66
-        if stripped:
67
-            indent = min(indent, len(line) - len(stripped))
68
-    # Remove indentation (first line is special)
69
-    trimmed = [lines[0].strip()]
70
-    if indent < sys.maxint:
71
-        for line in lines[1:]:
72
-            # Append line, minus indentation
73
-            trimmed.append(line[indent:].rstrip())
74
-    # Strip leading blank lines
75
-    while trimmed and not trimmed[0]:
76
-        trimmed.pop(0)
77
-    # Strip trailing blank lines
78
-    while trimmed and not trimmed[-1]:
79
-        trimmed.pop()
80
-    # Return a string, rejoined with newlines
81
-    return '\n'.join(trimmed)
82
-    
83
-class ErrorDuringImport(Exception):
84
-    """Errors that occurred while trying to import something to document it."""
85
-    def __init__(self, filename, (exc, value, tb)):
86
-        self.filename = filename
87
-        self.exc = exc
88
-        self.value = value
89
-        self.tb = tb
90
-
91
-    def __str__(self):
92
-        exc = self.exc
93
-        if type(exc) is types.ClassType:
94
-            exc = exc.__name__
95
-        return 'problem in %s - %s: %s' % (self.filename, exc, self.value)
96
-
97
-# safeimport, locate and resolve Stolen from pydoc.py
98
-# (Clean up and rewrite later)
99
-def safeimport(path, forceload=0, cache={}):
100
-    """Import a module; handle errors; return None if the module isn't found.
101
-
102
-    If the module *is* found but an exception occurs, it's wrapped in an
103
-    ErrorDuringImport exception and reraised.  Unlike __import__, if a
104
-    package path is specified, the module at the end of the path is returned,
105
-    not the package at the beginning.  If the optional 'forceload' argument
106
-    is 1, we reload the module from disk (unless it's a dynamic extension)."""
107
-    if forceload and path in sys.modules:
108
-        # This is the only way to be sure.  Checking the mtime of the file
109
-        # isn't good enough (e.g. what if the module contains a class that
110
-        # inherits from another module that has changed?).
111
-        if path not in sys.builtin_module_names:
112
-            # Python never loads a dynamic extension a second time from the
113
-            # same path, even if the file is changed or missing.  Deleting
114
-            # the entry in sys.modules doesn't help for dynamic extensions,
115
-            # so we're not even going to try to keep them up to date.
116
-            info = inspect.getmoduleinfo(sys.modules[path].__file__)
117
-            if info[3] != imp.C_EXTENSION:
118
-                cache[path] = sys.modules[path] # prevent module from clearing
119
-                del sys.modules[path]
120
-    try:
121
-        print "Trying to import module: %s" % path
122
-        module = __import__(path)
123
-    except:
124
-        # Did the error occur before or after the module was found?
125
-        (exc, value, tb) = info = sys.exc_info()
126
-        if path in sys.modules:
127
-            # An error occured while executing the imported module.
128
-            raise ErrorDuringImport(sys.modules[path].__file__, info)
129
-        elif exc is SyntaxError:
130
-            # A SyntaxError occurred before we could execute the module.
131
-            raise ErrorDuringImport(value.filename, info)
132
-        elif exc is ImportError and \
133
-             split(lower(str(value)))[:2] == ['no', 'module']:
134
-            # The module was not found.
135
-            return None
136
-        else:
137
-            # Some other error occurred during the importing process.
138
-            raise ErrorDuringImport(path, sys.exc_info())
139
-    for part in split(path, '.')[1:]:
140
-        try: module = getattr(module, part)
141
-        except AttributeError: return None
142
-    return module
143
-
144
-def locate(path, forceload=0):
145
-    """Locate an object by name or dotted path, importing as necessary."""
146
-    parts = [part for part in split(path, '.') if part]
147
-    module, n = None, 0
148
-    while n < len(parts):
149
-        nextmodule = safeimport(join(parts[:n+1], '.'), forceload)
150
-        if nextmodule: module, n = nextmodule, n + 1
151
-        else: break
152
-    if module:
153
-        object = module
154
-        for part in parts[n:]:
155
-            try: object = getattr(object, part)
156
-            except AttributeError: return None
157
-        return object
158
-    else:
159
-        if hasattr(__builtin__, path):
160
-            return getattr(__builtin__, path)
161
-
162
-def resolve(thing, forceload=0):
163
-    """Given an object or a path to an object, get the object and its name."""
164
-    if isinstance(thing, str):
165
-        object = locate(thing, forceload)
166
-        if not object:
167
-            raise ImportError, 'no Python documentation found for %r' % thing
168
-        return object, thing
169
-    else:
170
-        return thing, getattr(thing, '__name__', None)
171
-
172
-
173
-class HTMLGenerator:
174
-
175
-    def __init__(self):
176
-        self.html = ''
177
-
178
-    def emit(self, text):
179
-        #if text: print text
180
-        if text: self.html += text
181
-
182
-    def emit_pre(self, text, css_class='doc', linenum=False):
183
-        if not text: return
184
-        # Replace '<' with '&lt;'
185
-        text = text.replace('<', '&lt;')
186
-        text = trim(text)
187
-        if linenum:
188
-            lines = text.split('\n')
189
-            self.emit('''<pre class="%s">''' % css_class)
190
-            lineno = 1
191
-            for line in lines:
192
-                strlineno = "%s" % lineno
193
-                self.emit('''%s:   %s\n''' % (strlineno.rjust(4), line))
194
-                lineno += 1
195
-            self.emit('''</pre>''')
196
-        else:
197
-            self.emit('''<pre class="%s">%s</pre>''' % \
198
-                (css_class, text))
199
-
200
-    # Generate docs for given name
201
-    def document(self, name):
202
-
203
-        # Resolve object name
204
-        self.obj, self.name = resolve(name)
205
-
206
-        self.emit("""<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
207
-         <html><head>
208
-            <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
209
-            <title>Python: %s</title>
210
-            <link rel="stylesheet" type="text/css" href="tovid_screen.css">
211
-        </head>
212
-        <body>""" % self.name)
213
-
214
-        # Document modules only (for now)
215
-        if inspect.ismodule(self.obj): self.doc_module(self.obj)
216
-
217
-        # Write source code as preformatted text
218
-        source = inspect.getsource(self.obj)
219
-        if source:
220
-            self.emit('''<h2>Source code</h2>''')
221
-            self.emit_pre(source, 'source', linenum=True)
222
-
223
-        self.emit('''</body></html>''')
224
-
225
-        return self.html
226
-
227
-    def doc_module(self, mod):
228
-        if not inspect.ismodule(mod): return
229
-        self.emit('''<h1>%s</h1>''' % mod.__name__)
230
-        self.emit('''<p class="date">Generated %s</p>''' % \
231
-            datetime.datetime.now().ctime())
232
-        self.emit_pre(mod.__doc__)
233
-
234
-        classes = inspect.getmembers(mod, inspect.isclass)
235
-        if classes:
236
-            self.emit('''<h2>Classes</h2>''')
237
-            self.emit('''<dl class="class">''')
238
-            for name, cls in classes:
239
-                # Only document classes defined in this module
240
-                if inspect.getmodule(cls) == mod:
241
-                    self.doc_class(cls)
242
-            self.emit('''</dl>''')
243
-
244
-        funcs = inspect.getmembers(mod, inspect.isfunction)
245
-        if funcs:
246
-            self.emit('''<h2>Functions</h2>''')
247
-            self.emit('''<dl class="function">''')
248
-            for name, func in funcs:
249
-                # Only document functions defined in this module
250
-                if inspect.getmodule(func) == mod:
251
-                    self.doc_function(func)
252
-            self.emit('''</dl>''')
253
-
254
-    def doc_class(self, cls):
255
-        if not inspect.isclass(cls): return
256
-        self.emit('''<dt>%s</dt>''' % cls.__name__)
257
-        self.emit('''<dd>''')
258
-        self.emit_pre(cls.__doc__)
259
-
260
-        self.emit('''<p>Methods defined in this class:</p>''')
261
-        methods = inspect.getmembers(cls, inspect.ismethod)
262
-        if methods:
263
-            self.emit('''<dl class="method">''')
264
-            for name, method in methods:
265
-                # Only document methods defined in this class's module
266
-                if inspect.getmodule(method) == inspect.getmodule(cls):
267
-                    self.doc_function(method.im_func)
268
-            self.emit('''</dl>''')
269
-        self.emit('''</dd>''')
270
-        
271
-            
272
-    def doc_function(self, func):
273
-        if not inspect.isfunction(func) and not inspect.ismethod(func): return
274
-        args, varargs, varkw, defaults = inspect.getargspec(func)
275
-        signature = inspect.formatargspec(args, varargs, varkw, defaults)
276
-        # Strip parentheses
277
-        signature = signature[1:-1]
278
-        self.emit('''<dt><code class="function">%s(<code class="args">%s</code>)</code></dt>''' % (func.__name__, signature))
279
-        self.emit('''<dd>''')
280
-        self.emit_pre(func.__doc__ or "No documentation")
281
-        self.emit('''</dd>''')
282
-
283
-    
284
-
285
-if __name__ == '__main__':
286
-    arg = sys.argv[1]
287
-    gen = HTMLGenerator()
288
-    print gen.document(arg)
289
-
290
-
291
-
292
-
293
tovid-0.33.tar.bz2/icons/tovid.gif Deleted
tovid-0.33.tar.bz2/install-sh Deleted
325
 
1
@@ -1,323 +0,0 @@
2
-#!/bin/sh
3
-# install - install a program, script, or datafile
4
-
5
-scriptversion=2005-02-02.21
6
-
7
-# This originates from X11R5 (mit/util/scripts/install.sh), which was
8
-# later released in X11R6 (xc/config/util/install.sh) with the
9
-# following copyright and license.
10
-#
11
-# Copyright (C) 1994 X Consortium
12
-#
13
-# Permission is hereby granted, free of charge, to any person obtaining a copy
14
-# of this software and associated documentation files (the "Software"), to
15
-# deal in the Software without restriction, including without limitation the
16
-# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
17
-# sell copies of the Software, and to permit persons to whom the Software is
18
-# furnished to do so, subject to the following conditions:
19
-#
20
-# The above copyright notice and this permission notice shall be included in
21
-# all copies or substantial portions of the Software.
22
-#
23
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
26
-# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
27
-# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
28
-# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29
-#
30
-# Except as contained in this notice, the name of the X Consortium shall not
31
-# be used in advertising or otherwise to promote the sale, use or other deal-
32
-# ings in this Software without prior written authorization from the X Consor-
33
-# tium.
34
-#
35
-#
36
-# FSF changes to this file are in the public domain.
37
-#
38
-# Calling this script install-sh is preferred over install.sh, to prevent
39
-# `make' implicit rules from creating a file called install from it
40
-# when there is no Makefile.
41
-#
42
-# This script is compatible with the BSD install script, but was written
43
-# from scratch.  It can only install one file at a time, a restriction
44
-# shared with many OS's install programs.
45
-
46
-# set DOITPROG to echo to test this script
47
-
48
-# Don't use :- since 4.3BSD and earlier shells don't like it.
49
-doit="${DOITPROG-}"
50
-
51
-# put in absolute paths if you don't have them in your path; or use env. vars.
52
-
53
-mvprog="${MVPROG-mv}"
54
-cpprog="${CPPROG-cp}"
55
-chmodprog="${CHMODPROG-chmod}"
56
-chownprog="${CHOWNPROG-chown}"
57
-chgrpprog="${CHGRPPROG-chgrp}"
58
-stripprog="${STRIPPROG-strip}"
59
-rmprog="${RMPROG-rm}"
60
-mkdirprog="${MKDIRPROG-mkdir}"
61
-
62
-chmodcmd="$chmodprog 0755"
63
-chowncmd=
64
-chgrpcmd=
65
-stripcmd=
66
-rmcmd="$rmprog -f"
67
-mvcmd="$mvprog"
68
-src=
69
-dst=
70
-dir_arg=
71
-dstarg=
72
-no_target_directory=
73
-
74
-usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
75
-   or: $0 [OPTION]... SRCFILES... DIRECTORY
76
-   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
77
-   or: $0 [OPTION]... -d DIRECTORIES...
78
-
79
-In the 1st form, copy SRCFILE to DSTFILE.
80
-In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
81
-In the 4th, create DIRECTORIES.
82
-
83
-Options:
84
--c         (ignored)
85
--d         create directories instead of installing files.
86
--g GROUP   $chgrpprog installed files to GROUP.
87
--m MODE    $chmodprog installed files to MODE.
88
--o USER    $chownprog installed files to USER.
89
--s         $stripprog installed files.
90
--t DIRECTORY  install into DIRECTORY.
91
--T         report an error if DSTFILE is a directory.
92
---help     display this help and exit.
93
---version  display version info and exit.
94
-
95
-Environment variables override the default commands:
96
-  CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
97
-"
98
-
99
-while test -n "$1"; do
100
-  case $1 in
101
-    -c) shift
102
-        continue;;
103
-
104
-    -d) dir_arg=true
105
-        shift
106
-        continue;;
107
-
108
-    -g) chgrpcmd="$chgrpprog $2"
109
-        shift
110
-        shift
111
-        continue;;
112
-
113
-    --help) echo "$usage"; exit $?;;
114
-
115
-    -m) chmodcmd="$chmodprog $2"
116
-        shift
117
-        shift
118
-        continue;;
119
-
120
-    -o) chowncmd="$chownprog $2"
121
-        shift
122
-        shift
123
-        continue;;
124
-
125
-    -s) stripcmd=$stripprog
126
-        shift
127
-        continue;;
128
-
129
-    -t) dstarg=$2
130
-   shift
131
-   shift
132
-   continue;;
133
-
134
-    -T) no_target_directory=true
135
-   shift
136
-   continue;;
137
-
138
-    --version) echo "$0 $scriptversion"; exit $?;;
139
-
140
-    *)  # When -d is used, all remaining arguments are directories to create.
141
-   # When -t is used, the destination is already specified.
142
-   test -n "$dir_arg$dstarg" && break
143
-        # Otherwise, the last argument is the destination.  Remove it from $@.
144
-   for arg
145
-   do
146
-          if test -n "$dstarg"; then
147
-       # $@ is not empty: it contains at least $arg.
148
-       set fnord "$@" "$dstarg"
149
-       shift # fnord
150
-     fi
151
-     shift # arg
152
-     dstarg=$arg
153
-   done
154
-   break;;
155
-  esac
156
-done
157
-
158
-if test -z "$1"; then
159
-  if test -z "$dir_arg"; then
160
-    echo "$0: no input file specified." >&2
161
-    exit 1
162
-  fi
163
-  # It's OK to call `install-sh -d' without argument.
164
-  # This can happen when creating conditional directories.
165
-  exit 0
166
-fi
167
-
168
-for src
169
-do
170
-  # Protect names starting with `-'.
171
-  case $src in
172
-    -*) src=./$src ;;
173
-  esac
174
-
175
-  if test -n "$dir_arg"; then
176
-    dst=$src
177
-    src=
178
-
179
-    if test -d "$dst"; then
180
-      mkdircmd=:
181
-      chmodcmd=
182
-    else
183
-      mkdircmd=$mkdirprog
184
-    fi
185
-  else
186
-    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
187
-    # might cause directories to be created, which would be especially bad
188
-    # if $src (and thus $dsttmp) contains '*'.
189
-    if test ! -f "$src" && test ! -d "$src"; then
190
-      echo "$0: $src does not exist." >&2
191
-      exit 1
192
-    fi
193
-
194
-    if test -z "$dstarg"; then
195
-      echo "$0: no destination specified." >&2
196
-      exit 1
197
-    fi
198
-
199
-    dst=$dstarg
200
-    # Protect names starting with `-'.
201
-    case $dst in
202
-      -*) dst=./$dst ;;
203
-    esac
204
-
205
-    # If destination is a directory, append the input filename; won't work
206
-    # if double slashes aren't ignored.
207
-    if test -d "$dst"; then
208
-      if test -n "$no_target_directory"; then
209
-   echo "$0: $dstarg: Is a directory" >&2
210
-   exit 1
211
-      fi
212
-      dst=$dst/`basename "$src"`
213
-    fi
214
-  fi
215
-
216
-  # This sed command emulates the dirname command.
217
-  dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
218
-
219
-  # Make sure that the destination directory exists.
220
-
221
-  # Skip lots of stat calls in the usual case.
222
-  if test ! -d "$dstdir"; then
223
-    defaultIFS='
224
-    '
225
-    IFS="${IFS-$defaultIFS}"
226
-
227
-    oIFS=$IFS
228
-    # Some sh's can't handle IFS=/ for some reason.
229
-    IFS='%'
230
-    set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
231
-    shift
232
-    IFS=$oIFS
233
-
234
-    pathcomp=
235
-
236
-    while test $# -ne 0 ; do
237
-      pathcomp=$pathcomp$1
238
-      shift
239
-      if test ! -d "$pathcomp"; then
240
-        $mkdirprog "$pathcomp"
241
-   # mkdir can fail with a `File exist' error in case several
242
-   # install-sh are creating the directory concurrently.  This
243
-   # is OK.
244
-   test -d "$pathcomp" || exit
245
-      fi
246
-      pathcomp=$pathcomp/
247
-    done
248
-  fi
249
-
250
-  if test -n "$dir_arg"; then
251
-    $doit $mkdircmd "$dst" \
252
-      && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
253
-      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
254
-      && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
255
-      && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
256
-
257
-  else
258
-    dstfile=`basename "$dst"`
259
-
260
-    # Make a couple of temp file names in the proper directory.
261
-    dsttmp=$dstdir/_inst.$$_
262
-    rmtmp=$dstdir/_rm.$$_
263
-
264
-    # Trap to clean up those temp files at exit.
265
-    trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
266
-    trap '(exit $?); exit' 1 2 13 15
267
-
268
-    # Copy the file name to the temp name.
269
-    $doit $cpprog "$src" "$dsttmp" &&
270
-
271
-    # and set any options; do chmod last to preserve setuid bits.
272
-    #
273
-    # If any of these fail, we abort the whole thing.  If we want to
274
-    # ignore errors from any of these, just make sure not to ignore
275
-    # errors from the above "$doit $cpprog $src $dsttmp" command.
276
-    #
277
-    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
278
-      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
279
-      && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
280
-      && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
281
-
282
-    # Now rename the file to the real destination.
283
-    { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
284
-      || {
285
-      # The rename failed, perhaps because mv can't rename something else
286
-      # to itself, or perhaps because mv is so ancient that it does not
287
-      # support -f.
288
-
289
-      # Now remove or move aside any old file at destination location.
290
-      # We try this two ways since rm can't unlink itself on some
291
-      # systems and the destination file might be busy for other
292
-      # reasons.  In this case, the final cleanup might fail but the new
293
-      # file should still install successfully.
294
-      {
295
-        if test -f "$dstdir/$dstfile"; then
296
-          $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
297
-          || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
298
-          || {
299
-        echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
300
-        (exit 1); exit 1
301
-          }
302
-        else
303
-          :
304
-        fi
305
-      } &&
306
-
307
-      # Now rename the file to the real destination.
308
-      $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
309
-    }
310
-    }
311
-  fi || { (exit 1); exit 1; }
312
-done
313
-
314
-# The final little trick to "correctly" pass the exit status to the exit trap.
315
-{
316
-  (exit 0); exit 0
317
-}
318
-
319
-# Local variables:
320
-# eval: (add-hook 'write-file-hooks 'time-stamp)
321
-# time-stamp-start: "scriptversion="
322
-# time-stamp-format: "%:y-%02m-%02d.%02H"
323
-# time-stamp-end: "$"
324
-# End:
325
tovid-0.33.tar.bz2/missing Deleted
359
 
1
@@ -1,357 +0,0 @@
2
-#! /bin/sh
3
-# Common stub for a few missing GNU programs while installing.
4
-
5
-scriptversion=2005-02-08.22
6
-
7
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
8
-#   Free Software Foundation, Inc.
9
-# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
10
-
11
-# This program is free software; you can redistribute it and/or modify
12
-# it under the terms of the GNU General Public License as published by
13
-# the Free Software Foundation; either version 2, or (at your option)
14
-# any later version.
15
-
16
-# This program is distributed in the hope that it will be useful,
17
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
18
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19
-# GNU General Public License for more details.
20
-
21
-# You should have received a copy of the GNU General Public License
22
-# along with this program; if not, write to the Free Software
23
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
24
-# 02111-1307, USA.
25
-
26
-# As a special exception to the GNU General Public License, if you
27
-# distribute this file as part of a program that contains a
28
-# configuration script generated by Autoconf, you may include it under
29
-# the same distribution terms that you use for the rest of that program.
30
-
31
-if test $# -eq 0; then
32
-  echo 1>&2 "Try \`$0 --help' for more information"
33
-  exit 1
34
-fi
35
-
36
-run=:
37
-
38
-# In the cases where this matters, `missing' is being run in the
39
-# srcdir already.
40
-if test -f configure.ac; then
41
-  configure_ac=configure.ac
42
-else
43
-  configure_ac=configure.in
44
-fi
45
-
46
-msg="missing on your system"
47
-
48
-case "$1" in
49
---run)
50
-  # Try to run requested program, and just exit if it succeeds.
51
-  run=
52
-  shift
53
-  "$@" && exit 0
54
-  # Exit code 63 means version mismatch.  This often happens
55
-  # when the user try to use an ancient version of a tool on
56
-  # a file that requires a minimum version.  In this case we
57
-  # we should proceed has if the program had been absent, or
58
-  # if --run hadn't been passed.
59
-  if test $? = 63; then
60
-    run=:
61
-    msg="probably too old"
62
-  fi
63
-  ;;
64
-
65
-  -h|--h|--he|--hel|--help)
66
-    echo "\
67
-$0 [OPTION]... PROGRAM [ARGUMENT]...
68
-
69
-Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
70
-error status if there is no known handling for PROGRAM.
71
-
72
-Options:
73
-  -h, --help      display this help and exit
74
-  -v, --version   output version information and exit
75
-  --run           try to run the given command, and emulate it if it fails
76
-
77
-Supported PROGRAM values:
78
-  aclocal      touch file \`aclocal.m4'
79
-  autoconf     touch file \`configure'
80
-  autoheader   touch file \`config.h.in'
81
-  automake     touch all \`Makefile.in' files
82
-  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
83
-  flex         create \`lex.yy.c', if possible, from existing .c
84
-  help2man     touch the output file
85
-  lex          create \`lex.yy.c', if possible, from existing .c
86
-  makeinfo     touch the output file
87
-  tar          try tar, gnutar, gtar, then tar without non-portable flags
88
-  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
89
-
90
-Send bug reports to <bug-automake@gnu.org>."
91
-    exit $?
92
-    ;;
93
-
94
-  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
95
-    echo "missing $scriptversion (GNU Automake)"
96
-    exit $?
97
-    ;;
98
-
99
-  -*)
100
-    echo 1>&2 "$0: Unknown \`$1' option"
101
-    echo 1>&2 "Try \`$0 --help' for more information"
102
-    exit 1
103
-    ;;
104
-
105
-esac
106
-
107
-# Now exit if we have it, but it failed.  Also exit now if we
108
-# don't have it and --version was passed (most likely to detect
109
-# the program).
110
-case "$1" in
111
-  lex|yacc)
112
-    # Not GNU programs, they don't have --version.
113
-    ;;
114
-
115
-  tar)
116
-    if test -n "$run"; then
117
-       echo 1>&2 "ERROR: \`tar' requires --run"
118
-       exit 1
119
-    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
120
-       exit 1
121
-    fi
122
-    ;;
123
-
124
-  *)
125
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
126
-       # We have it, but it failed.
127
-       exit 1
128
-    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
129
-       # Could not run --version or --help.  This is probably someone
130
-       # running `$TOOL --version' or `$TOOL --help' to check whether
131
-       # $TOOL exists and not knowing $TOOL uses missing.
132
-       exit 1
133
-    fi
134
-    ;;
135
-esac
136
-
137
-# If it does not exist, or fails to run (possibly an outdated version),
138
-# try to emulate it.
139
-case "$1" in
140
-  aclocal*)
141
-    echo 1>&2 "\
142
-WARNING: \`$1' is $msg.  You should only need it if
143
-         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
144
-         to install the \`Automake' and \`Perl' packages.  Grab them from
145
-         any GNU archive site."
146
-    touch aclocal.m4
147
-    ;;
148
-
149
-  autoconf)
150
-    echo 1>&2 "\
151
-WARNING: \`$1' is $msg.  You should only need it if
152
-         you modified \`${configure_ac}'.  You might want to install the
153
-         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
154
-         archive site."
155
-    touch configure
156
-    ;;
157
-
158
-  autoheader)
159
-    echo 1>&2 "\
160
-WARNING: \`$1' is $msg.  You should only need it if
161
-         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
162
-         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
163
-         from any GNU archive site."
164
-    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
165
-    test -z "$files" && files="config.h"
166
-    touch_files=
167
-    for f in $files; do
168
-      case "$f" in
169
-      *:*) touch_files="$touch_files "`echo "$f" |
170
-                      sed -e 's/^[^:]*://' -e 's/:.*//'`;;
171
-      *) touch_files="$touch_files $f.in";;
172
-      esac
173
-    done
174
-    touch $touch_files
175
-    ;;
176
-
177
-  automake*)
178
-    echo 1>&2 "\
179
-WARNING: \`$1' is $msg.  You should only need it if
180
-         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
181
-         You might want to install the \`Automake' and \`Perl' packages.
182
-         Grab them from any GNU archive site."
183
-    find . -type f -name Makefile.am -print |
184
-      sed 's/\.am$/.in/' |
185
-      while read f; do touch "$f"; done
186
-    ;;
187
-
188
-  autom4te)
189
-    echo 1>&2 "\
190
-WARNING: \`$1' is needed, but is $msg.
191
-         You might have modified some files without having the
192
-         proper tools for further handling them.
193
-         You can get \`$1' as part of \`Autoconf' from any GNU
194
-         archive site."
195
-
196
-    file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
197
-    test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
198
-    if test -f "$file"; then
199
-   touch $file
200
-    else
201
-   test -z "$file" || exec >$file
202
-   echo "#! /bin/sh"
203
-   echo "# Created by GNU Automake missing as a replacement of"
204
-   echo "#  $ $@"
205
-   echo "exit 0"
206
-   chmod +x $file
207
-   exit 1
208
-    fi
209
-    ;;
210
-
211
-  bison|yacc)
212
-    echo 1>&2 "\
213
-WARNING: \`$1' $msg.  You should only need it if
214
-         you modified a \`.y' file.  You may need the \`Bison' package
215
-         in order for those modifications to take effect.  You can get
216
-         \`Bison' from any GNU archive site."
217
-    rm -f y.tab.c y.tab.h
218
-    if [ $# -ne 1 ]; then
219
-        eval LASTARG="\${$#}"
220
-   case "$LASTARG" in
221
-   *.y)
222
-       SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
223
-       if [ -f "$SRCFILE" ]; then
224
-            cp "$SRCFILE" y.tab.c
225
-       fi
226
-       SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
227
-       if [ -f "$SRCFILE" ]; then
228
-            cp "$SRCFILE" y.tab.h
229
-       fi
230
-     ;;
231
-   esac
232
-    fi
233
-    if [ ! -f y.tab.h ]; then
234
-   echo >y.tab.h
235
-    fi
236
-    if [ ! -f y.tab.c ]; then
237
-   echo 'main() { return 0; }' >y.tab.c
238
-    fi
239
-    ;;
240
-
241
-  lex|flex)
242
-    echo 1>&2 "\
243
-WARNING: \`$1' is $msg.  You should only need it if
244
-         you modified a \`.l' file.  You may need the \`Flex' package
245
-         in order for those modifications to take effect.  You can get
246
-         \`Flex' from any GNU archive site."
247
-    rm -f lex.yy.c
248
-    if [ $# -ne 1 ]; then
249
-        eval LASTARG="\${$#}"
250
-   case "$LASTARG" in
251
-   *.l)
252
-       SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
253
-       if [ -f "$SRCFILE" ]; then
254
-            cp "$SRCFILE" lex.yy.c
255
-       fi
256
-     ;;
257
-   esac
258
-    fi
259
-    if [ ! -f lex.yy.c ]; then
260
-   echo 'main() { return 0; }' >lex.yy.c
261
-    fi
262
-    ;;
263
-
264
-  help2man)
265
-    echo 1>&2 "\
266
-WARNING: \`$1' is $msg.  You should only need it if
267
-    you modified a dependency of a manual page.  You may need the
268
-    \`Help2man' package in order for those modifications to take
269
-    effect.  You can get \`Help2man' from any GNU archive site."
270
-
271
-    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
272
-    if test -z "$file"; then
273
-   file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
274
-    fi
275
-    if [ -f "$file" ]; then
276
-   touch $file
277
-    else
278
-   test -z "$file" || exec >$file
279
-   echo ".ab help2man is required to generate this page"
280
-   exit 1
281
-    fi
282
-    ;;
283
-
284
-  makeinfo)
285
-    echo 1>&2 "\
286
-WARNING: \`$1' is $msg.  You should only need it if
287
-         you modified a \`.texi' or \`.texinfo' file, or any other file
288
-         indirectly affecting the aspect of the manual.  The spurious
289
-         call might also be the consequence of using a buggy \`make' (AIX,
290
-         DU, IRIX).  You might want to install the \`Texinfo' package or
291
-         the \`GNU make' package.  Grab either from any GNU archive site."
292
-    # The file to touch is that specified with -o ...
293
-    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
294
-    if test -z "$file"; then
295
-      # ... or it is the one specified with @setfilename ...
296
-      infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
297
-      file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
298
-      # ... or it is derived from the source name (dir/f.texi becomes f.info)
299
-      test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
300
-    fi
301
-    touch $file
302
-    ;;
303
-
304
-  tar)
305
-    shift
306
-
307
-    # We have already tried tar in the generic part.
308
-    # Look for gnutar/gtar before invocation to avoid ugly error
309
-    # messages.
310
-    if (gnutar --version > /dev/null 2>&1); then
311
-       gnutar "$@" && exit 0
312
-    fi
313
-    if (gtar --version > /dev/null 2>&1); then
314
-       gtar "$@" && exit 0
315
-    fi
316
-    firstarg="$1"
317
-    if shift; then
318
-   case "$firstarg" in
319
-   *o*)
320
-       firstarg=`echo "$firstarg" | sed s/o//`
321
-       tar "$firstarg" "$@" && exit 0
322
-       ;;
323
-   esac
324
-   case "$firstarg" in
325
-   *h*)
326
-       firstarg=`echo "$firstarg" | sed s/h//`
327
-       tar "$firstarg" "$@" && exit 0
328
-       ;;
329
-   esac
330
-    fi
331
-
332
-    echo 1>&2 "\
333
-WARNING: I can't seem to be able to run \`tar' with the given arguments.
334
-         You may want to install GNU tar or Free paxutils, or check the
335
-         command line arguments."
336
-    exit 1
337
-    ;;
338
-
339
-  *)
340
-    echo 1>&2 "\
341
-WARNING: \`$1' is needed, and is $msg.
342
-         You might have modified some files without having the
343
-         proper tools for further handling them.  Check the \`README' file,
344
-         it often tells you about the needed prerequisites for installing
345
-         this package.  You may also peek at any GNU archive site, in case
346
-         some other package would contain this missing \`$1' program."
347
-    exit 1
348
-    ;;
349
-esac
350
-
351
-exit 0
352
-
353
-# Local variables:
354
-# eval: (add-hook 'write-file-hooks 'time-stamp)
355
-# time-stamp-start: "scriptversion="
356
-# time-stamp-format: "%:y-%02m-%02d.%02H"
357
-# time-stamp-end: "$"
358
-# End:
359
tovid-0.33.tar.bz2/py-compile Deleted
148
 
1
@@ -1,146 +0,0 @@
2
-#!/bin/sh
3
-# py-compile - Compile a Python program
4
-
5
-scriptversion=2005-05-14.22
6
-
7
-# Copyright (C) 2000, 2001, 2003, 2004, 2005  Free Software Foundation, Inc.
8
-
9
-# This program is free software; you can redistribute it and/or modify
10
-# it under the terms of the GNU General Public License as published by
11
-# the Free Software Foundation; either version 2, or (at your option)
12
-# any later version.
13
-
14
-# This program is distributed in the hope that it will be useful,
15
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
16
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
-# GNU General Public License for more details.
18
-
19
-# You should have received a copy of the GNU General Public License
20
-# along with this program; if not, write to the Free Software
21
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
22
-# 02110-1301, USA.
23
-
24
-# As a special exception to the GNU General Public License, if you
25
-# distribute this file as part of a program that contains a
26
-# configuration script generated by Autoconf, you may include it under
27
-# the same distribution terms that you use for the rest of that program.
28
-
29
-# This file is maintained in Automake, please report
30
-# bugs to <bug-automake@gnu.org> or send patches to
31
-# <automake-patches@gnu.org>.
32
-
33
-if [ -z "$PYTHON" ]; then
34
-  PYTHON=python
35
-fi
36
-
37
-basedir=
38
-destdir=
39
-files=
40
-while test $# -ne 0; do
41
-  case "$1" in
42
-    --basedir)
43
-      basedir=$2
44
-      if test -z "$basedir"; then
45
-        echo "$0: Missing argument to --basedir." 1>&2
46
-        exit 1
47
-      fi
48
-      shift
49
-      ;;
50
-    --destdir)
51
-      destdir=$2
52
-      if test -z "$destdir"; then
53
-        echo "$0: Missing argument to --destdir." 1>&2
54
-        exit 1
55
-      fi
56
-      shift
57
-      ;;
58
-    -h|--h*)
59
-      cat <<\EOF
60
-Usage: py-compile [--help] [--version] [--basedir DIR] [--destdir DIR] FILES..."
61
-
62
-Byte compile some python scripts FILES.  Use --destdir to specify any
63
-leading directory path to the FILES that you don't want to include in the
64
-byte compiled file.  Specify --basedir for any additional path information you
65
-do want to be shown in the byte compiled file.
66
-
67
-Example:
68
-  py-compile --destdir /tmp/pkg-root --basedir /usr/share/test test.py test2.py
69
-
70
-Report bugs to <bug-automake@gnu.org>.
71
-EOF
72
-      exit $?
73
-      ;;
74
-    -v|--v*)
75
-      echo "py-compile $scriptversion"
76
-      exit $?
77
-      ;;
78
-    *)
79
-      files="$files $1"
80
-      ;;
81
-  esac
82
-  shift
83
-done
84
-
85
-if test -z "$files"; then
86
-    echo "$0: No files given.  Try \`$0 --help' for more information." 1>&2
87
-    exit 1
88
-fi
89
-
90
-# if basedir was given, then it should be prepended to filenames before
91
-# byte compilation.
92
-if [ -z "$basedir" ]; then
93
-    pathtrans="path = file"
94
-else
95
-    pathtrans="path = os.path.join('$basedir', file)"
96
-fi
97
-
98
-# if destdir was given, then it needs to be prepended to the filename to
99
-# byte compile but not go into the compiled file.
100
-if [ -z "$destdir" ]; then
101
-    filetrans="filepath = path"
102
-else
103
-    filetrans="filepath = os.path.normpath('$destdir' + os.sep + path)"
104
-fi
105
-
106
-$PYTHON -c "
107
-import sys, os, string, py_compile
108
-
109
-files = '''$files'''
110
-
111
-print 'Byte-compiling python modules...'
112
-for file in string.split(files):
113
-    $pathtrans
114
-    $filetrans
115
-    if not os.path.exists(filepath) or not (len(filepath) >= 3
116
-                                            and filepath[-3:] == '.py'):
117
-   continue
118
-    print file,
119
-    sys.stdout.flush()
120
-    py_compile.compile(filepath, filepath + 'c', path)
121
-print" || exit $?
122
-
123
-# this will fail for python < 1.5, but that doesn't matter ...
124
-$PYTHON -O -c "
125
-import sys, os, string, py_compile
126
-
127
-files = '''$files'''
128
-print 'Byte-compiling python modules (optimized versions) ...'
129
-for file in string.split(files):
130
-    $pathtrans
131
-    $filetrans
132
-    if not os.path.exists(filepath) or not (len(filepath) >= 3
133
-                                            and filepath[-3:] == '.py'):
134
-   continue
135
-    print file,
136
-    sys.stdout.flush()
137
-    py_compile.compile(filepath, filepath + 'o', path)
138
-print" 2>/dev/null || :
139
-
140
-# Local Variables:
141
-# mode: shell-script
142
-# sh-indentation: 2
143
-# eval: (add-hook 'write-file-hooks 'time-stamp)
144
-# time-stamp-start: "scriptversion="
145
-# time-stamp-format: "%:y-%02m-%02d.%02H"
146
-# time-stamp-end: "$"
147
-# End:
148
tovid-0.33.tar.bz2/src/.tovid.swp Deleted
tovid-0.33.tar.bz2/INSTALL -> tovid-0.34.tar.bz2/INSTALL Changed
26
 
1
@@ -21,13 +21,13 @@
2
 tovid-0.30.tar.gz), or from a quick-release, first extract the .tar.gz file,
3
 then do:
4
 
5
-    $ su -c ./setup.py install
6
+    $ su -c './setup.py install'
7
     or
8
     $ sudo ./setup.py install
9
 
10
 If you want to uninstall tovid, do this:
11
 
12
-    $ su -c ./setup.py uninstall
13
+    $ su -c './setup.py uninstall'
14
     or
15
     $ sudo ./setup.py uninstall
16
 
17
@@ -55,7 +55,7 @@
18
 
19
 Then run ./setup.py install as superuser:
20
 
21
-    $ su -c ./setup.py install
22
+    $ su -c './setup.py install'
23
     or
24
     $ sudo ./setup.py install
25
 
26
tovid-0.33.tar.bz2/PKG-INFO -> tovid-0.34.tar.bz2/PKG-INFO Changed
9
 
1
@@ -1,6 +1,6 @@
2
 Metadata-Version: 1.0
3
 Name: tovid
4
-Version: 0.33
5
+Version: 0.34
6
 Summary: UNKNOWN
7
 Home-page: http://tovid.wikia.com/
8
 Author: Eric Pierce
9
tovid-0.33.tar.bz2/README -> tovid-0.34.tar.bz2/README Changed
10
 
1
@@ -11,7 +11,7 @@
2
 
3
 Quick install:
4
 
5
-    $ su -c ./setup.py install
6
+    $ su -c './setup.py install'
7
     or
8
     $ sudo ./setup.py install
9
 
10
tovid-0.33.tar.bz2/docs/man/tovid.1 -> tovid-0.34.tar.bz2/docs/man/tovid.1 Changed
297
 
1
@@ -36,6 +36,9 @@
2
 \fBgui\fR
3
 Start the tovid GUI (was \fBtodiscgui\fR. See \fBCommand:gui\fR)
4
 .TP
5
+\fBtitlesets\fR
6
+A tovid GUI wizard for multiple titlesets. (new: See \fBCommand:titlesets\fR)
7
+.TP
8
 \fBdisc\fR
9
 Create a DVD with menus (was \fBtodisc\fR. See \fBCommand:disc\fR)
10
 .TP
11
@@ -59,6 +62,11 @@
12
 .TP
13
 \fBpostproc\fR
14
 Post\-process an MPEG video file (was \fBpostproc\fR. See \fBCommand:postproc\fR)
15
+.TP
16
+\fBchapters\fR
17
+A GUI using mplayer for setting chapter points.  It will return a string of
18
+chapter points in a format recognized by 'tovid disc' (todisc) or
19
+by 'tovid gui', for the  \fB\-chapters\fR option.
20
 
21
 .P
22
 The \fIOPTIONS\fR differ for each command; run \fBtovid <command>\fR with no
23
@@ -73,9 +81,9 @@
24
 Defines working directory for all scripts.
25
 In addition you can define the output directory for makempg here.
26
 .TP
27
-\fB~/.tovid/tovid.config\fR
28
-Includes command\-line options that should always be passed to
29
-makempg.
30
+\fB~/.tovid/tovid.ini\fR
31
+Includes command\-line options that should be passed to the various
32
+\fBtovid\fR sub\-commands.
33
 
34
 Edit these files if you wish to change your configuration.
35
 
36
@@ -89,9 +97,16 @@
37
 the easiest way to start creating DVDs with tovid. At this time, there are no
38
 additional command\-line options; the GUI controls take care of everything,
39
 and all help is integrated in the form of tooltips.  You can also see
40
-**Command:disc ** for more detail about the options.  Note: one limitation of
41
-the gui at present is that it does not do multiple titlesets (though it will do
42
-chapter menus).  Use the \fBtovid disc\fR command (below) for titlesets.
43
+**Command:disc ** for more detail about the options.  Note: if you wish to
44
+make multiple titlesets on the same DVD use 'tovid titlesets', which is a wizard
45
+that uses the the tovid GUI.  Chapter submenus can be made with 'tovid gui'
46
+however.
47
+
48
+.SH Command:titlesets
49
+.P
50
+\fBtovid titlesets\fR will assist in making a DVD with multiple titlesets.  It can
51
+be started without any options, or you can feed it the path to a saved titleset
52
+script as an option.
53
 
54
 .SH Command:disc
55
 .P
56
@@ -323,7 +338,7 @@
57
     \fB\-interlaced\fR, \fB\-interlaced_bf\fR, \fB\-type\fR, \fB\-fit\fR, \fB\-discsize\fR,
58
     \fB\-parallel\fR, \fB\-mkvsub\fR, \fB\-autosubs\fR, \fB\-subtitles\fR, \fB\-update\fR, \e
59
     \fB\-mplayeropts\fR, \fB\-audiotrack\fR, \fB\-downmix\fR, \fB\-ffmpeg\fR, \fB\-nofifo\fR,
60
-    \fB\-from\-gui\fR, \fB\-slice\fR, \fB\-async\fR, \fB\-quiet\fR,
61
+    \fB\-from\-gui\fR, \fB\-slice\fR, \fB\-quiet\fR,
62
     \fB\-fake\fR, \fB\-keepfiles\fR
63
 
64
 .SS Options
65
@@ -359,9 +374,9 @@
66
 This is a different arrangement of images for the menu: small thumbnails
67
 go at left (and right) side of screen, with a larger image in the centre.
68
 Maximum of 10 videos.  If the provided argument is a video file, the
69
-central thumb will be animated.  Pick a file of correct aspect ratio:
70
-i.e. it should still look good when resized to 720x480 (PAL 720x576),
71
-then resized to proper aspect ratio.
72
+central thumb will be animated. Only 4:3 or 16:9 videos and images are
73
+accepted for the showcase file: if not one of these todisc will assume it
74
+is the same ratio as the videos in the titleset.
75
 .TP
76
 \fB\-textmenu\fR, \fB\-text\-menu\fR NUM
77
 If used without an argument, create a textmenu out of the supplied titles
78
@@ -374,16 +389,17 @@
79
 the menu will be static.
80
 .TP
81
 \fB\-quick\-menu\fR
82
-(Note: unfortunately ffmpeg's 'vhooks' have been removed, so this
83
-option may not be available for you depending on your ffmpeg version)
84
-This will make a very quick  menu by using ffmpeg instead of imagemagick.
85
+If you are using ffmpeg 0.8 or newer you can use this option.  This will
86
+make a very quick  menu by using ffmpeg instead of imagemagick.
87
 There are two choices: you can either use '\-showcase IMAGE|VIDEO' or
88
 '\-background VIDEO'.  There are no fancy effects like \fB\-wave\fR
89
 or \fB\-rotate\fR available for it, but it is extremely fast.  It will be a
90
 text\-menu style of menu, with no video thumbs, and a central showcase
91
 IMAGE(static) | VIDEO(animated).
92
-( see \fB\-bg\-color\fR if you are not using a \fB\-background\fR and want to
93
+(i) see \fB\-bg\-color\fR if you are not using a \fB\-background\fR and want to
94
 change the default black )
95
+(ii) Note: todisc will still work with vhooks if you have an old ffmpeg with
96
+vhooks compiled in.
97
 
98
 Specifying the IMAGE|VIDEO argument to \fB\-showcase\fR is mandatory for this
99
 style of menu, unless used in conjunction with \fB\-switched\-menus\fR
100
@@ -400,31 +416,34 @@
101
 \fB\-quick\-menu\fR
102
 
103
 .TP
104
-\fB\-bg\-color\fR | \fB\-bg\-colour\fR
105
+\fB\-bg\-color\fR, \fB\-bg\-colour\fR
106
 The color to use for the menu background. (default: ntsc\-safe black)
107
 Note: use a color a great deal darker than you want, as it appears quite
108
 a bit lighter in the video version.  You can use hexadecimal ('#ffac5f')
109
 or named colors notation.
110
 .TP
111
-\fB\-submenu\-bg\-color\fR | \fB\-submenu\-bg\-colour\fR
112
+\fB\-submenu\-bg\-color\fR, \fB\-submenu\-bg\-colour\fR
113
 The color to use as background for the  submenu(s).
114
 (default: ntsc\-safe black)  See \fB\-bg\-color\fR
115
 .TP
116
-\fB\-use\-makemenu\fR
117
-This will use \fBtovid menu\fR to create a menu with the provided titles.
118
-.TP
119
 \fB\-static\fR
120
-Main menu will just be static thumbs (not animated) (default: animated)
121
+Main menu will consist of static thumbnail links. (default: animated)
122
+If you use a video for \-showcase or \-background then it will still be
123
+a 'moving' menu, in spite of the static buttons.  This option also does
124
+double duty for the \fB\-switched\-menus\fR option, and will create static
125
+"switched" images.
126
+See also \fB\-switched\-menu\fR
127
 .TP
128
 \fB\-background\fR IMAGE|VIDEO
129
 Menu background.  This can be a image file or an video file.  If it is a
130
 video file the background will be animated.  Pick a file of correct aspect
131
-ratio: i.e. it should still look good when resized to 720x480 (PAL 720x576)
132
+ratio: i.e. it should still look good when resized to 4:3 aspect ratio.
133
+It will be resized to fill the entire background.
134
 .TP
135
 \fB\-submenu\-background\fR IMAGE
136
 Submenu background.  This can be only be an image file.  Pick a file of
137
 correct aspect ratio: i.e. it should still look good when resized to
138
-720x480 (PAL 720x576)
139
+4:3 aspect ratio.  It will be resized to fill the entire background.
140
 .TP
141
 \fB\-menu\-title\fR
142
 Title for the root menu \- may be longer than thumbnail labels
143
@@ -498,7 +517,7 @@
144
 default.  \fBHint\fR: use \fB\-showcase\fR IMAGE/VIDEO to create a fancier
145
 VMGM menu.
146
 .TP
147
-\fB\-no\-vmgm\-menu\fR | \fB\-no\-vmgm\fR
148
+\fB\-no\-vmgm\-menu\fR, \fB\-no\-vmgm\fR
149
 This will skip the creation of a VMGM ( root menu ) for titlesets. The DVD
150
 will start with the first titleset.  You can not use this option unless also
151
 using \fB\-quick\-nav\fR as you would not have a way to get to other titlesets.
152
@@ -519,6 +538,9 @@
153
 process can be greatly sped up by using \fB\-quick\-menu\fR in conjunction with
154
 this, though you will lose fancy options like \fB\-rotate\fR and \fB\-wave\fR.
155
 
156
+Note that if you want to just have a static rather than an 'animated'
157
+image, add \fB\-static\fR to the command line.
158
+
159
 Example for using with \fB\-quick\-menu\fR:
160
 .nf
161
       -switched-menus -quick-menu
162
@@ -648,7 +670,7 @@
163
 without using an  argument is 12.  See also \fB\-slide\-frame\-color\fR
164
 
165
 .TP
166
-\fB\-slide\-frame\-color\fR | \fB\-slide\-frame\-colour\fR
167
+\fB\-slide\-frame\-color\fR, \fB\-slide\-frame\-colour\fR
168
 The color of the slide frame if passing \fB\-slide\-frame\fR.  The default if
169
 you don't use this option is a color\-safe white: rgb(235,235,235).
170
 
171
@@ -659,13 +681,15 @@
172
 from each slideshow in the menu.  The thumb for each slideshow button will
173
 be static.  If you used with a mixed menu of videos and slideshows, then
174
 the video thumbs WILL be animated, so you may wish to use \-static or
175
-\-textmenu with the option in that case.
176
+\-textmenu with the option in that case.  If you want to use the
177
+**\-switched\-menus option with a mixed menu leave this option out. 
178
 
179
 .TP
180
 \fB\-background\-slideshow\fR, \fB\-bg\-slideshow\fR
181
 If doing multiple slideshows or mixed videos and slideshow(s), then use
182
 the animated slideshow as a background video.  See \fB\-showcase\-slideshow\fR
183
 for additional details.
184
+
185
 .TP
186
 \fB\-no\-confirm\-backup\fR
187
 Slideshows are an experimental (but well tested) feature.  Todisc is
188
@@ -673,6 +697,7 @@
189
 and backup your images, as you would with any beta software.  Todisc
190
 will prompt you to backup your files normally.  If you have already backed
191
 up your images, use this option to disable the prompt.
192
+
193
 .TP
194
 \fB\-use\-dvd\-slideshow\fR CONFIG (FILE)
195
 If you pass this option without an argument, tovid will use the
196
@@ -777,7 +802,10 @@
197
 chapters.  Each title must be quoted, and the number of titles given
198
 must equal the total number of chapters for all videos.  In other words
199
 if you use \-chapters 4 6 8 , you must give 18 chapter titles, in the same
200
-order that the videos were passed in.
201
+order that the videos were passed in.  Note: if you are passing in options
202
+on the command line to the 'tovid disc' GUI, you must repeat the option
203
+\fB\-chapter\-titles\fR for each video, accompanied by its respective chapter
204
+titles. (you can also choose to use this syntax for the todisc script.)
205
 
206
 .TP
207
 \fB\-chapter\-font\fR FONT
208
@@ -802,6 +830,17 @@
209
 the showcase image that displays on switching to another video choice with
210
 the up/down arrow keys.
211
 .TP
212
+\fB\-fast\-seek\fR
213
+Use faster seek method for ffmpeg.  This is not as accurate as the default
214
+method, and may produce grey frames.
215
+.TP
216
+\fB\-frame\-safe\fR  Instead of seeking and then outputting one frame for
217
+previews and static menus, output 9 frames and choose the largest.  Not
218
+frame accurate (may be as much as 9 frames off), but safer.  Choose this
219
+if you are getting grey frames/thumbnails with some videos.  You can also
220
+use it to try to get the 'best' frame.  This option
221
+has no effect on submenus at present.
222
+.TP
223
 \fB\-showcase\-seek\fR NUM
224
 Seek to NUM seconds before generating thumbnails for showcase video
225
 (default: 2.0 seconds)
226
@@ -987,6 +1026,12 @@
227
 
228
 .SS Thumbnail Style
229
 .TP
230
+\fB\-user\-thumbs\fR IMAGE
231
+Supply your own images for menu buttons, rather than relying on todisc to
232
+generate them from the video.  They must be the same aspect ratio as the
233
+videos in the titleset (4:3 or 16:9), as todisc will resize them without
234
+checking and cropping.
235
+.TP
236
 \fB\-opacity\fR [0\-100] (default 100)
237
 Opacity of thumbnail videos as a percentage (no percent sign).
238
 Anything less than 100(%) is semi\-transparent. Not recommended with dark
239
@@ -1328,7 +1373,7 @@
240
 Do interlaced encoding of the input video (bottom fields first).
241
 
242
 .TP
243
-\fB\-deinterlace\fR | \fB\-progressive\fR
244
+\fB\-deinterlace\fR, \fB\-progressive\fR
245
 Convert interlaced source video into progressive output video. Because
246
 deinterlacing works by averaging fields together, some picture quality is
247
 invariably lost. Uses an adaptive kernel deinterlacer (kerndeint), or,
248
@@ -1433,10 +1478,6 @@
249
 input track with the largest number of channels, and if it fails then it
250
 will revert to the default behavior of using the original channels.
251
 
252
-.TP
253
-\fB\-async\fR \fINUM\fR
254
-Adjust audio synchronization by \fINUM\fR seconds.
255
-
256
 .SS Other options
257
 .TP
258
 \fB\-config\fR \fIFILE\fR
259
@@ -1997,6 +2038,11 @@
260
 Burn a DVD file\-system in \fIDVD_DIR\fR (must contain a VIDEO_TS folder).
261
 
262
 .TP
263
+\fB\-eject\fR
264
+Eject the DVD tray after burning is complete. By default, the DVD is not
265
+ejected.
266
+
267
+.TP
268
 \fB\-device\fR \fIDEVICE\fR (default /dev/dvdrw)
269
 Burn the disc image to \fIDEVICE\fR, the Linux device file\-system
270
 name of your DVD\-recorder. Common examples might be /dev/dvdrw,
271
@@ -2145,12 +2191,24 @@
272
 Save output in a temporary file, for later viewing if
273
 something goes wrong.
274
 
275
+.SH Command:chapters
276
+.P
277
+\fBtovid chapters\fR will start a GUI using mplayer to set chapter points in a
278
+video.  Its only (mandatory) option is the path to a video file.
279
+
280
+.SS Examples
281
+.TP
282
+tovid chapters foo.avi
283
+
284
+.TP
285
+tovid chapters /home/grepper/videos/foo.avi
286
+
287
 .SH CONTACT
288
 .P
289
 For further assistance, contact information, forum and IRC links,
290
 please refer to the tovid homepage (http://tovid.wikia.com/).
291
 
292
 
293
-.\" man code generated by txt2tags 2.3 (http://txt2tags.sf.net)
294
+.\" man code generated by txt2tags 2.5 (http://txt2tags.sf.net)
295
 .\" cmdline: txt2tags -t man -i docs/src/en/tovid.t2t -o docs/man/tovid.1
296
 
297
tovid-0.34.tar.bz2/docs/sphinx Added
2
 
1
+(directory)
2
tovid-0.34.tar.bz2/docs/sphinx/Makefile Added
92
 
1
@@ -0,0 +1,90 @@
2
+# Makefile for Sphinx documentation
3
+#
4
+
5
+# You can set these variables from the command line.
6
+SPHINXOPTS    =
7
+SPHINXBUILD   = sphinx-build
8
+PAPER         =
9
+BUILDDIR      = _build
10
+
11
+# Internal variables.
12
+PAPEROPT_a4     = -D latex_paper_size=a4
13
+PAPEROPT_letter = -D latex_paper_size=letter
14
+ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
15
+
16
+.PHONY: help clean html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest
17
+
18
+help:
19
+   @echo "Please use \`make <target>' where <target> is one of"
20
+   @echo "  html      to make standalone HTML files"
21
+   @echo "  dirhtml   to make HTML files named index.html in directories"
22
+   @echo "  pickle    to make pickle files"
23
+   @echo "  json      to make JSON files"
24
+   @echo "  htmlhelp  to make HTML files and a HTML help project"
25
+   @echo "  qthelp    to make HTML files and a qthelp project"
26
+   @echo "  latex     to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
27
+   @echo "  changes   to make an overview of all changed/added/deprecated items"
28
+   @echo "  linkcheck to check all external links for integrity"
29
+   @echo "  doctest   to run all doctests embedded in the documentation (if enabled)"
30
+
31
+clean:
32
+   -rm -rf $(BUILDDIR)/*
33
+
34
+html:
35
+   $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
36
+   @echo
37
+   @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
38
+
39
+dirhtml:
40
+   $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
41
+   @echo
42
+   @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
43
+
44
+pickle:
45
+   $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
46
+   @echo
47
+   @echo "Build finished; now you can process the pickle files."
48
+
49
+json:
50
+   $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
51
+   @echo
52
+   @echo "Build finished; now you can process the JSON files."
53
+
54
+htmlhelp:
55
+   $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
56
+   @echo
57
+   @echo "Build finished; now you can run HTML Help Workshop with the" \
58
+         ".hhp project file in $(BUILDDIR)/htmlhelp."
59
+
60
+qthelp:
61
+   $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
62
+   @echo
63
+   @echo "Build finished; now you can run "qcollectiongenerator" with the" \
64
+         ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
65
+   @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/tovid.qhcp"
66
+   @echo "To view the help file:"
67
+   @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/tovid.qhc"
68
+
69
+latex:
70
+   $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
71
+   @echo
72
+   @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
73
+   @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
74
+         "run these through (pdf)latex."
75
+
76
+changes:
77
+   $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
78
+   @echo
79
+   @echo "The overview file is in $(BUILDDIR)/changes."
80
+
81
+linkcheck:
82
+   $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
83
+   @echo
84
+   @echo "Link check complete; look for any errors in the above output " \
85
+         "or in $(BUILDDIR)/linkcheck/output.txt."
86
+
87
+doctest:
88
+   $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
89
+   @echo "Testing of doctests in the sources finished, look at the " \
90
+         "results in $(BUILDDIR)/doctest/output.txt."
91
+
92
tovid-0.34.tar.bz2/docs/sphinx/README Added
14
 
1
@@ -0,0 +1,12 @@
2
+This directory contains tovid documentation for the Sphinx_ documentation generator.
3
+
4
+To build HTML documentation, run::
5
+
6
+    $ make html
7
+
8
+from this directory.  This will create an HTML hierarchy in ``_build/html``,
9
+including documentation on the ``libtovid`` module.
10
+
11
+Run ``make`` without any arguments to see other actions.
12
+
13
+.. _Sphinx: http://sphinx.pocoo.org/
14
tovid-0.34.tar.bz2/docs/sphinx/conf.py Added
215
 
1
@@ -0,0 +1,213 @@
2
+# -*- coding: utf-8 -*-
3
+#
4
+# tovid documentation build configuration file, created by
5
+# sphinx-quickstart on Thu May 27 11:53:17 2010.
6
+#
7
+# This file is execfile()d with the current directory set to its containing dir.
8
+#
9
+# Note that not all possible configuration values are present in this
10
+# autogenerated file.
11
+#
12
+# All configuration values have a default; values that are commented out
13
+# serve to show the default.
14
+
15
+import sys, os
16
+
17
+# If extensions (or modules to document with autodoc) are in another directory,
18
+# add these directories to sys.path here. If the directory is relative to the
19
+# documentation root, use os.path.abspath to make it absolute, like shown here.
20
+#sys.path.append(os.path.abspath('.'))
21
+# Look in the libtovid source directory before anything else
22
+# (to avoid having to install libtovid with every doc change)
23
+sys.path.insert(0, os.path.abspath('../../'))
24
+
25
+# -- General configuration -----------------------------------------------------
26
+
27
+# Add any Sphinx extension module names here, as strings. They can be extensions
28
+# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
29
+extensions = [
30
+    'sphinx.ext.autodoc',
31
+    'sphinx.ext.doctest',
32
+    #'sphinx.ext.viewcode',
33
+]
34
+
35
+# Add any paths that contain templates here, relative to this directory.
36
+templates_path = ['_templates']
37
+
38
+# The suffix of source filenames.
39
+source_suffix = '.rst'
40
+
41
+# The encoding of source files.
42
+#source_encoding = 'utf-8'
43
+
44
+# The master toctree document.
45
+master_doc = 'index'
46
+
47
+# General information about the project.
48
+project = u'tovid'
49
+copyright = u'2010, Eric Pierce'
50
+
51
+# The version info for the project you're documenting, acts as replacement for
52
+# |version| and |release|, also used in various other places throughout the
53
+# built documents.
54
+#
55
+# The short X.Y version.
56
+version = '0.33'
57
+# The full version, including alpha/beta/rc tags.
58
+release = '0.33'
59
+
60
+# The language for content autogenerated by Sphinx. Refer to documentation
61
+# for a list of supported languages.
62
+#language = None
63
+
64
+# There are two options for replacing |today|: either, you set today to some
65
+# non-false value, then it is used:
66
+#today = ''
67
+# Else, today_fmt is used as the format for a strftime call.
68
+#today_fmt = '%B %d, %Y'
69
+
70
+# List of documents that shouldn't be included in the build.
71
+#unused_docs = []
72
+
73
+# List of directories, relative to source directory, that shouldn't be searched
74
+# for source files.
75
+exclude_trees = ['_build']
76
+
77
+# The reST default role (used for this markup: `text`) to use for all documents.
78
+#default_role = None
79
+
80
+# If true, '()' will be appended to :func: etc. cross-reference text.
81
+#add_function_parentheses = True
82
+
83
+# If true, the current module name will be prepended to all description
84
+# unit titles (such as .. function::).
85
+add_module_names = False
86
+
87
+# If true, sectionauthor and moduleauthor directives will be shown in the
88
+# output. They are ignored by default.
89
+#show_authors = False
90
+
91
+# The name of the Pygments (syntax highlighting) style to use.
92
+pygments_style = 'sphinx'
93
+
94
+# A list of ignored prefixes for module index sorting.
95
+#modindex_common_prefix = []
96
+
97
+
98
+# -- Options for HTML output ---------------------------------------------------
99
+
100
+# The theme to use for HTML and HTML Help pages.  Major themes that come with
101
+# Sphinx are currently 'default' and 'sphinxdoc'.
102
+html_theme = 'sphinxdoc'
103
+
104
+# Theme options are theme-specific and customize the look and feel of a theme
105
+# further.  For a list of options available for each theme, see the
106
+# documentation.
107
+#html_theme_options = {}
108
+
109
+# Add any paths that contain custom themes here, relative to this directory.
110
+#html_theme_path = []
111
+
112
+# The name for this set of Sphinx documents.  If None, it defaults to
113
+# "<project> v<release> documentation".
114
+#html_title = None
115
+
116
+# A shorter title for the navigation bar.  Default is the same as html_title.
117
+#html_short_title = None
118
+
119
+# The name of an image file (relative to this directory) to place at the top
120
+# of the sidebar.
121
+#html_logo = None
122
+
123
+# The name of an image file (within the static path) to use as favicon of the
124
+# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
125
+# pixels large.
126
+#html_favicon = None
127
+
128
+# Add any paths that contain custom static files (such as style sheets) here,
129
+# relative to this directory. They are copied after the builtin static files,
130
+# so a file named "default.css" will overwrite the builtin "default.css".
131
+html_static_path = ['_static']
132
+
133
+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
134
+# using the given strftime format.
135
+#html_last_updated_fmt = '%b %d, %Y'
136
+
137
+# If true, SmartyPants will be used to convert quotes and dashes to
138
+# typographically correct entities.
139
+#html_use_smartypants = True
140
+
141
+# Custom sidebar templates, maps document names to template names.
142
+#html_sidebars = {}
143
+
144
+# Additional templates that should be rendered to pages, maps page names to
145
+# template names.
146
+#html_additional_pages = {}
147
+
148
+# If false, no module index is generated.
149
+#html_use_modindex = True
150
+
151
+# If false, no index is generated.
152
+#html_use_index = True
153
+
154
+# If true, the index is split into individual pages for each letter.
155
+#html_split_index = False
156
+
157
+# If true, links to the reST sources are added to the pages.
158
+html_show_sourcelink = False
159
+
160
+# If true, an OpenSearch description file will be output, and all pages will
161
+# contain a <link> tag referring to it.  The value of this option must be the
162
+# base URL from which the finished HTML is served.
163
+#html_use_opensearch = ''
164
+
165
+# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
166
+#html_file_suffix = ''
167
+
168
+# Output file base name for HTML help builder.
169
+htmlhelp_basename = 'toviddoc'
170
+
171
+
172
+# -- Options for LaTeX output --------------------------------------------------
173
+
174
+# The paper size ('letter' or 'a4').
175
+#latex_paper_size = 'letter'
176
+
177
+# The font size ('10pt', '11pt' or '12pt').
178
+#latex_font_size = '10pt'
179
+
180
+# Grouping the document tree into LaTeX files. List of tuples
181
+# (source start file, target name, title, author, documentclass [howto/manual]).
182
+latex_documents = [
183
+  ('index', 'tovid.tex', u'tovid Documentation', u'Eric Pierce', 'manual'),
184
+]
185
+
186
+man_pages = [
187
+  ('man/tovid', 'tovid', u'Make DVDs from video files', u'Eric Pierce', '1'),
188
+]
189
+
190
+# The name of an image file (relative to this directory) to place at the top of
191
+# the title page.
192
+#latex_logo = None
193
+
194
+# For "manual" documents, if this is true, then toplevel headings are parts,
195
+# not chapters.
196
+#latex_use_parts = False
197
+
198
+# Additional stuff for the LaTeX preamble.
199
+#latex_preamble = ''
200
+
201
+# Documents to append as an appendix to all manuals.
202
+#latex_appendices = []
203
+
204
+# If false, no module index is generated.
205
+#latex_use_modindex = True
206
+
207
+# Custom configuration
208
+
209
+# Include both class-level and __init__ documentation
210
+autoclass_content = 'both'
211
+# Assume anything in plain `backticks` is a generic object
212
+# so it works for classes, functions, and whatever else
213
+default_role = 'obj'
214
+
215
tovid-0.34.tar.bz2/docs/sphinx/index.rst Added
26
 
1
@@ -0,0 +1,24 @@
2
+.. tovid documentation master file, created by
3
+   sphinx-quickstart on Thu May 27 11:53:17 2010.
4
+   You can adapt this file completely to your liking, but it should at least
5
+   contain the root `toctree` directive.
6
+
7
+Welcome to tovid's documentation!
8
+=================================
9
+
10
+Contents:
11
+
12
+.. toctree::
13
+    :maxdepth: 2
14
+
15
+    man/tovid
16
+    libtovid/index
17
+
18
+
19
+Indices and tables
20
+==================
21
+
22
+* :ref:`genindex`
23
+* :ref:`modindex`
24
+* :ref:`search`
25
+
26
tovid-0.34.tar.bz2/docs/sphinx/libtovid Added
2
 
1
+(directory)
2
tovid-0.34.tar.bz2/docs/sphinx/libtovid/author.rst Added
8
 
1
@@ -0,0 +1,6 @@
2
+:mod:`author`
3
+=============
4
+
5
+.. automodule:: libtovid.author
6
+    :members:
7
+
8
tovid-0.34.tar.bz2/docs/sphinx/libtovid/backend.rst Added
44
 
1
@@ -0,0 +1,42 @@
2
+:mod:`backend`
3
+==============
4
+
5
+.. automodule:: libtovid.backend
6
+
7
+
8
+:mod:`ffmpeg`
9
+-------------
10
+
11
+.. automodule:: libtovid.backend.ffmpeg
12
+    :members:
13
+
14
+:mod:`mpeg2enc`
15
+---------------
16
+
17
+.. automodule:: libtovid.backend.mpeg2enc
18
+    :members:
19
+
20
+:mod:`mplayer`
21
+--------------
22
+
23
+.. automodule:: libtovid.backend.mplayer
24
+    :members:
25
+
26
+:mod:`mplex`
27
+------------
28
+
29
+.. automodule:: libtovid.backend.mplex
30
+    :members:
31
+
32
+:mod:`spumux`
33
+-------------
34
+
35
+.. automodule:: libtovid.backend.spumux
36
+    :members:
37
+
38
+:mod:`transcode`
39
+----------------
40
+
41
+.. automodule:: libtovid.backend.transcode
42
+    :members:
43
+
44
tovid-0.34.tar.bz2/docs/sphinx/libtovid/cli.rst Added
8
 
1
@@ -0,0 +1,6 @@
2
+:mod:`cli`
3
+==========
4
+
5
+.. automodule:: libtovid.cli
6
+    :members:
7
+
8
tovid-0.34.tar.bz2/docs/sphinx/libtovid/deps.rst Added
8
 
1
@@ -0,0 +1,6 @@
2
+:mod:`deps`
3
+===========
4
+
5
+.. automodule:: libtovid.deps
6
+    :members:
7
+
8
tovid-0.34.tar.bz2/docs/sphinx/libtovid/encode.rst Added
8
 
1
@@ -0,0 +1,6 @@
2
+:mod:`encode`
3
+=============
4
+
5
+.. automodule:: libtovid.encode
6
+    :members:
7
+
8
tovid-0.34.tar.bz2/docs/sphinx/libtovid/index.rst Added
25
 
1
@@ -0,0 +1,23 @@
2
+:mod:`libtovid`
3
+===============
4
+
5
+.. automodule:: libtovid
6
+
7
+.. toctree::
8
+    :maxdepth: 2
9
+
10
+    author
11
+    backend
12
+    cli
13
+    deps
14
+    encode
15
+    media
16
+    metagui/index
17
+    odict
18
+    opts
19
+    render
20
+    standard
21
+    stats
22
+    util
23
+    xml
24
+
25
tovid-0.34.tar.bz2/docs/sphinx/libtovid/media.rst Added
8
 
1
@@ -0,0 +1,6 @@
2
+:mod:`media`
3
+============
4
+
5
+.. automodule:: libtovid.media
6
+    :members:
7
+
8
tovid-0.34.tar.bz2/docs/sphinx/libtovid/metagui Added
2
 
1
+(directory)
2
tovid-0.34.tar.bz2/docs/sphinx/libtovid/metagui/control.rst Added
8
 
1
@@ -0,0 +1,6 @@
2
+:mod:`control`
3
+==============
4
+
5
+.. automodule:: libtovid.metagui.control
6
+    :members:
7
+
8
tovid-0.34.tar.bz2/docs/sphinx/libtovid/metagui/gui.rst Added
9
 
1
@@ -0,0 +1,7 @@
2
+:mod:`gui`
3
+==========
4
+
5
+.. automodule:: libtovid.metagui.gui
6
+    :members:
7
+
8
+
9
tovid-0.34.tar.bz2/docs/sphinx/libtovid/metagui/index.rst Added
17
 
1
@@ -0,0 +1,15 @@
2
+:mod:`metagui`
3
+==============
4
+
5
+.. automodule:: libtovid.metagui
6
+
7
+.. toctree::
8
+    :maxdepth: 2
9
+
10
+    control
11
+    panel
12
+    gui
13
+    support
14
+    variable
15
+    widget
16
+
17
tovid-0.34.tar.bz2/docs/sphinx/libtovid/metagui/panel.rst Added
9
 
1
@@ -0,0 +1,7 @@
2
+:mod:`panel`
3
+============
4
+
5
+.. automodule:: libtovid.metagui.panel
6
+    :members:
7
+
8
+
9
tovid-0.34.tar.bz2/docs/sphinx/libtovid/metagui/support.rst Added
9
 
1
@@ -0,0 +1,7 @@
2
+:mod:`support`
3
+==============
4
+
5
+.. automodule:: libtovid.metagui.support
6
+    :members:
7
+
8
+
9
tovid-0.34.tar.bz2/docs/sphinx/libtovid/metagui/variable.rst Added
9
 
1
@@ -0,0 +1,7 @@
2
+:mod:`variable`
3
+===============
4
+
5
+.. automodule:: libtovid.metagui.variable
6
+    :members:
7
+
8
+
9
tovid-0.34.tar.bz2/docs/sphinx/libtovid/metagui/widget.rst Added
9
 
1
@@ -0,0 +1,7 @@
2
+:mod:`widget`
3
+=============
4
+
5
+.. automodule:: libtovid.metagui.widget
6
+    :members:
7
+
8
+
9
tovid-0.34.tar.bz2/docs/sphinx/libtovid/odict.rst Added
8
 
1
@@ -0,0 +1,6 @@
2
+:mod:`odict`
3
+============
4
+
5
+.. automodule:: libtovid.odict
6
+    :members:
7
+
8
tovid-0.34.tar.bz2/docs/sphinx/libtovid/opts.rst Added
8
 
1
@@ -0,0 +1,6 @@
2
+:mod:`opts`
3
+===========
4
+
5
+.. automodule:: libtovid.opts
6
+    :members:
7
+
8
tovid-0.34.tar.bz2/docs/sphinx/libtovid/render.rst Added
38
 
1
@@ -0,0 +1,36 @@
2
+:mod:`render`
3
+=============
4
+
5
+.. automodule:: libtovid.render
6
+
7
+
8
+:mod:`animation`
9
+----------------
10
+
11
+.. automodule:: libtovid.render.animation
12
+    :members:
13
+
14
+:mod:`drawing`
15
+--------------
16
+
17
+.. automodule:: libtovid.render.drawing
18
+    :members:
19
+
20
+:mod:`effect`
21
+-------------
22
+
23
+.. automodule:: libtovid.render.effect
24
+    :members:
25
+
26
+:mod:`flipbook`
27
+---------------
28
+
29
+.. automodule:: libtovid.render.flipbook
30
+    :members:
31
+
32
+:mod:`layer`
33
+------------
34
+
35
+.. automodule:: libtovid.render.layer
36
+    :members:
37
+
38
tovid-0.34.tar.bz2/docs/sphinx/libtovid/standard.rst Added
8
 
1
@@ -0,0 +1,6 @@
2
+:mod:`standard`
3
+===============
4
+
5
+.. automodule:: libtovid.standard
6
+    :members:
7
+
8
tovid-0.34.tar.bz2/docs/sphinx/libtovid/stats.rst Added
8
 
1
@@ -0,0 +1,6 @@
2
+:mod:`stats`
3
+============
4
+
5
+.. automodule:: libtovid.stats
6
+    :members:
7
+
8
tovid-0.34.tar.bz2/docs/sphinx/libtovid/util.rst Added
26
 
1
@@ -0,0 +1,24 @@
2
+:mod:`util`
3
+===========
4
+
5
+.. automodule:: libtovid.util
6
+    :members:
7
+
8
+:mod:`filetypes`
9
+----------------
10
+
11
+.. automodule:: libtovid.util.filetypes
12
+    :members:
13
+
14
+:mod:`output`
15
+-------------
16
+
17
+.. automodule:: libtovid.util.output
18
+    :members:
19
+    :undoc-members:
20
+
21
+:mod:`playtime`
22
+---------------
23
+
24
+.. automodule:: libtovid.util.playtime
25
+    :members:
26
tovid-0.34.tar.bz2/docs/sphinx/libtovid/xml.rst Added
8
 
1
@@ -0,0 +1,6 @@
2
+:mod:`xml`
3
+==========
4
+
5
+.. automodule:: libtovid.xml
6
+    :members:
7
+
8
tovid-0.34.tar.bz2/docs/sphinx/man Added
2
 
1
+(directory)
2
tovid-0.34.tar.bz2/docs/sphinx/man/tovid.rst Added
2039
 
1
@@ -0,0 +1,2037 @@
2
+===============================================================
3
+tovid manual
4
+===============================================================
5
+
6
+
7
+Description
8
+===============================================================================
9
+
10
+**tovid** is a command-line tool for creating DVDs. It can encode your video
11
+files to DVD-compliant MPEG format, generate simple or complex DVD menus,
12
+author and burn a ready-to-watch DVD, with just a few shell commands. A
13
+graphical interface is also provided to make the process even easier.
14
+
15
+**NOTE**: As of tovid 0.32, this is the only manual page provided by tovid.
16
+There is now a single executable frontend to all functionality in the suite, so
17
+if you were expecting to find manpages for **todisc**, **idvid**, **makemenu**
18
+and their kin, they can all be found in the **tovid** manpage you are reading now.
19
+
20
+And yes, this makes for a pretty large manual page. If you are viewing this
21
+manpage from the command-line **man** utility, which normally pages through the
22
+**less** utility, you can skip to a section by searching with the **/** key,
23
+followed by a **^** to match the given section name. For example, to skip to
24
+the **mpg** command, type **/^Command:mpg**. See :manpage:`less(1)` for more on how
25
+to navigate.
26
+
27
+Usage
28
+===============================================================================
29
+
30
+::
31
+
32
+ tovid COMMAND [OPTIONS]
33
+
34
+Where *COMMAND* is one of the following:
35
+
36
+    gui
37
+        Start the tovid GUI (was **todiscgui**. See :ref:`command-gui`)
38
+    disc
39
+        Create a DVD with menus (was **todisc**. See :ref:`command-disc`)
40
+    mpg
41
+        Encode videos to MPEG format (was **tovid**. See :ref:`command-mpg`)
42
+    id
43
+        Identify one or more video files (was **idvid**. See :ref:`command-id`)
44
+    menu
45
+        Create an MPEG menu (was **makemenu**. See :ref:`command-menu`)
46
+    xml
47
+        Create (S)VCD or DVD .xml file (was **makexml**. See :ref:`command-xml`)
48
+    dvd
49
+        Author and/or burn a DVD (was **makedvd**. See :ref:`command-dvd`)
50
+    vcd
51
+        Author and/or burn a VCD (was **makevcd**. See :ref:`command-vcd`)
52
+    postproc
53
+        Post-process an MPEG video file (was **postproc**. See :ref:`command-postproc`)
54
+
55
+The *OPTIONS* differ for each command; run **tovid <command>** with no
56
+further arguments to get help on a command, and what options it expects.
57
+
58
+Configuration
59
+===============================================================================
60
+
61
+Two configuration files are created the first time you run tovid:
62
+
63
+``~/.tovid/preferences``
64
+    Defines working directory for all scripts.
65
+    In addition you can define the output directory for makempg here.
66
+``~/.tovid/tovid.config``
67
+    Includes command-line options that should always be passed to
68
+    makempg.
69
+
70
+    Edit these files if you wish to change your configuration.
71
+
72
+The following environment variables are also honoured:
73
+
74
+``TOVID_WORKING_DIR``
75
+    working directory for all scripts
76
+``TOVID_OUTPUT_DIR``
77
+    output directory for the makempg script
78
+
79
+
80
+.. _command-gui:
81
+
82
+Command:gui
83
+===============================================================================
84
+
85
+**tovid gui** starts the graphical user interface (GUI) for tovid. This is
86
+the easiest way to start creating DVDs with tovid. At this time, there are no
87
+additional command-line options; the GUI controls take care of everything,
88
+and all help is integrated in the form of tooltips.  You can also see
89
+:ref:`command-disc` for more detail about the options.  Note: one limitation of
90
+the gui at present is that it does not do multiple titlesets (though it will do
91
+chapter menus).  Use the **tovid disc** command (below) for titlesets.
92
+
93
+
94
+.. _command-disc:
95
+
96
+Command:disc
97
+===============================================================================
98
+
99
+**tovid disc** creates a DVD file-system with menus, from a list of multimedia
100
+video files and their titles.  As this is a low level script it is the easiest
101
+command line program for creating a DVD from start to finish, including
102
+automatically converting non-compliant videos and prompting to burn at
103
+completion.  It does animated menus, static thumbnail menus and text only
104
+menus.  In addition, it can do slideshows, using images as input, and combine
105
+slideshows with videos.  It supports sub-menus for chapter breaks, configurable
106
+menu style, animated backgrounds and transparency effects.
107
+
108
+Usage
109
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
110
+
111
+::
112
+
113
+ tovid disc [OPTIONS] \
114
+   -files <file list> -titles <title list>
115
+   -out OUT_PREFIX
116
+
117
+For example::
118
+
119
+ tovid disc -files File1.mpg File2.mpg File3.mpg \
120
+   -titles "Episode 1" "Episode 2" "Episode 3" \
121
+   -out Season_one
122
+
123
+The number of **-files** and **-titles** must be equal, though if you do not
124
+include any titles **tovid disc** will use the basename of the included files
125
+as titles.  If you are doing a slideshow or multiple slideshows, use
126
+**-slides** rather than **-files** for passing in the images.  You may use
127
+-files and -slides more than once to create an ordering in a mixed
128
+slideshows/videos menu.  See :ref:`usage-slideshows` under usage below.
129
+
130
+If the input files are not mpeg, you will have the option to auto-encode them.
131
+
132
+
133
+Display arrangements
134
+-------------------------------------------------------------------------------
135
+
136
+At present there are 2 display arrangements or "templates":
137
+
138
+A. (Default)
139
+    Thumbs will be centred, and as large as space restraints allow.
140
+
141
+B. **-showcase** IMAGE|VIDEO
142
+    Produces an arrangement with small buttons on
143
+    the side and the showcase image/video in the centre.  If no IMAGE or VIDEO
144
+    argument is supplied, the central thumb will be omitted.
145
+
146
+    Note: **-textmenu**, **-quick-menu** and **-switched-menus** are all types
147
+    of showcase style menus.  See descriptions in the :ref:`menu-style` section.
148
+
149
+The **-titles** arguments should be double or single quoted, or have the spaces
150
+backslash-escaped. Special characters (like ", !, \*, &, ?) may need to be
151
+backslash-escaped.  To include a quoted string within a title, backslash-escape
152
+the quotes.  These titles are used for labelling thumbnails on the main menu,
153
+and for the submenu title for that video.  ( see also **-submenu-titles** )
154
+
155
+The **-showcase** styles can use longer titles than the default arrangement.
156
+With a showcase style, use: **-showcase-titles-align west** to give more space
157
+for the title, or use **-showcase-titles-align east** to allow titles of more
158
+than one line.
159
+
160
+The default style can only show about 16 characters (depending on the number
161
+of thumbs, and what **-titles-font** and **-titles-fontsize** is being used).
162
+If your titles are too long to fit in the label area, you may try using
163
+sub-menus, which can display longer titles, for example::
164
+
165
+ $ tovid disc -submenus \
166
+      -files file1.mpg file2.mpg ... \
167
+      -titles "Short 1" "Short 2" \
168
+      -submenu-titles "Long Title One" "Long Title Two" \
169
+      -out foo
170
+
171
+The **-align** argument will position both titles and thumbs either south,
172
+north east, west, southwest, northwest, southeast, northeast, subject to
173
+certain constraints of each arrangement.
174
+
175
+
176
+.. _usage-titlesets:
177
+
178
+Titlesets
179
+-------------------------------------------------------------------------------
180
+
181
+A word should be mentioned here about titlesets, which is really just a
182
+hierarchy of menus.  You need to use titlesets, for example, if you have videos
183
+of different resolutions, or otherwise want to arrange videos on separate menus.
184
+If you want to have titlesets you need to put all the options for each titleset
185
+menu you would like to have between **-titleset** and **-end-titleset** options.
186
+
187
+Additionally, for the main menu (the opening menu that will let you jump to
188
+each titleset), you need to put options between **-vmgm** and **-end-vmgm**.
189
+You do not use **-files** for the opening menu options (**-vmgm**), but you
190
+will need as many TITLES after **-titles** as you have menus.
191
+
192
+Any options outside the **-titleset** **-end-titleset** and **-vmgm**
193
+**-end-vmgm** areas will be general options applying to every titleset.
194
+If a general option is duplicated inside a **-titleset** or **-vmgm** area, the
195
+general option will be overridden.
196
+
197
+Note: you do not need titlesets for a single menu with chapter break menus, for
198
+that just use **-submenus** or **-ani-submenus**
199
+
200
+Example of using **tovid disc** with titlesets::
201
+
202
+ $ tovid disc -static -out MY_DVD \
203
+   \
204
+   -titleset -files 1.mpg 2.mpg 3.mpg \
205
+   -titles "Title One" "Title Two" "Title Three" \
206
+   -end-titleset \
207
+   \
208
+   -titleset -files 4.mpg 5.mpg \
209
+   -titles "Title Four" "Title Five" \
210
+   -background foo.jpg \
211
+   -showcase bar.png \
212
+   -end-titleset \
213
+   \
214
+   -vmgm \
215
+   -titles "Season One" "Season Two" \
216
+   -background bg.jpg \
217
+   -bgaudio foo.mp3 \
218
+   -titles-fontsize 20 \
219
+   -end-vmgm
220
+
221
+See also **-titleset** and **-vmgm**
222
+
223
+
224
+.. _usage-slideshows:
225
+
226
+Slideshows
227
+-------------------------------------------------------------------------------
228
+
229
+You can also use **tovid disc** to make slideshows.  This can either be a single
230
+slideshow, or multiple slideshows on the same menu.
231
+Remember to use **-slides** rather than **-files** for passing in the
232
+images.  Images can be any filetype that imagemagick supports: for example
233
+JPEG, PNG, GIF, TGA BMP etc.  For a single slideshow do not use **-titles**:
234
+use -menu-title to set the slideshow title.
235
+
236
+For a single slideshow the default is an animated menu that transitions from
237
+slide to slide.  The default transition type is 'crossfade', which fades each
238
+slide into the next and loops back to the first slide at the end.  If instead
239
+you use **-static**, then a static 'polaroid stack' menu of all the slides is
240
+created, with a single spumux'ed button for navigating with the enter key.  You
241
+may have to experiment to find out which DVD remote button advances the slides.
242
+Try the 'next chapter'(skip ?) button and the play or enter buttons.
243
+If you want to limit the number of slides in the menu to a subset of all files
244
+entered with **-slides**, then use **-menu-slide-total** INT.  Be sure to use
245
+a long enough audio file for **-bgaudio** or set **-menu-length** so the menu
246
+is long enough to support the slides plus transitions.
247
+
248
+You can also put multiple slideshows on one menu.  To do this, use
249
+**-slides IMAGES** for each slideshow desired.  You can even mix videos
250
+with slideshows by using **-files** **-slides** **-titles** multiple times.
251
+
252
+Example of a single slideshow with an animated menu with transitions::
253
+
254
+ $ tovid disc -menu-title "Autumn in Toronto" -slides images/*.jpg \
255
+    -menu-slide-total 20 -slide-transition crossfade -bgaudio slideshow.wav \
256
+    -out myslideshow
257
+
258
+Example of multiple slideshows on one menu::
259
+
260
+ $ tovid disc -menu-title "Autumn in Toronto" \
261
+   -slides photos/september/*.jpg \
262
+   -slides photos/october/*.jpg \
263
+   -slides photos/november/*.jpg \
264
+   -tile3x1 -rotate -5 5 -5 -align center \
265
+   -bgaudio background.wav \
266
+   -out myslideshow
267
+
268
+Example of mixed videos and slideshows::
269
+
270
+ $ tovid disc -menu-title "Autumn in Toronto" \
271
+   -files fall_fair.mov \
272
+   -slides  photos/september/*.jpg \
273
+   -files harvest.mpg \
274
+   -slides photos/october/*.jpg \
275
+   -titles "Fall Fair" "September" "Harvest" "October" \
276
+   -background autumn.png \
277
+   -bgaudio bg.mp3 \
278
+   -out myslideshow
279
+
280
+See the other slideshow options in the :ref:`usage-slideshows` options section.
281
+
282
+Encoding options
283
+-------------------------------------------------------------------------------
284
+
285
+These are options for reencoding your non-compliant videos.  They are passed
286
+directly to the **tovid mpg** command which is invoked by **tovid disc** when
287
+non-compliant files are found.  For details, see the :ref:`command-mpg` section.
288
+Here is a list of possible options you can pass:
289
+
290
+**-config**, **-ntscfilm**, **-dvd-vcd**, **-half-dvd**, **-kvcd**,
291
+**-kvcdx3**, **-kvcdx3a**, **-kdvd**, **-bdvd**, **-704**, **-normalize**,
292
+**-amplitude**, **-overwrite**, **-panavision**, **-force**, **-fps**,
293
+**-vbitrate**, **-quality**, **-safe**, **-crop**, **-filters**,
294
+**-abitrate**, **-priority**, **-deinterlace**, **-progressive**,
295
+**-interlaced**, **-interlaced_bf**, **-type**, **-fit**, **-discsize**,
296
+**-parallel**, **-mkvsub**, **-autosubs**, **-subtitles**, **-update**, \
297
+**-mplayeropts**, **-audiotrack**, **-downmix**, **-ffmpeg**, **-nofifo**,
298
+**-from-gui**, **-slice**, **-async**, **-quiet**,
299
+**-fake**, **-keepfiles**
300
+
301
+
302
+Basic options
303
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
304
+
305
+**-keep-files**, **-keepfiles**
306
+    Keep all intermediate/temporary files (helps with debugging)
307
+
308
+**-ntsc**
309
+    720x480 output, compatible with NTSC standard (default)
310
+
311
+**-pal**
312
+    720x576 output, compatible with PAL standard
313
+
314
+**-submenus**
315
+    Create a sub-menu with chapters for each video (default: no sub-menus)
316
+
317
+**-ani-submenus**
318
+    Create an animated sub-menu with chapters for each video (default: not
319
+    animated)
320
+
321
+**-no-menu | -nomenu**
322
+    With this option todisc will just create a DVD file system, ready for
323
+    burning, with NO MENU, just the supplied video files.  These do not need
324
+    to be compliant, as non-compliant files will be encoded as usual.  Each
325
+    video will be a chapter unless **-chapters** OPTION is passed.  The
326
+    **-chapters** option is a number indicating the chapter interval in
327
+    minutes, or a HH:MM:SS string indicating chapter points.  See **-chapters**
328
+
329
+
330
+.. _menu-style:
331
+
332
+Basic menu style options
333
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
334
+
335
+**-showcase** IMAGE|VIDEO
336
+    If used without an argument, use showcase style without a central thumb.
337
+    This is a different arrangement of images for the menu: small thumbnails
338
+    go at left (and right) side of screen, with a larger image in the centre.
339
+    Maximum of 10 videos.  If the provided argument is a video file, the
340
+    central thumb will be animated.  Pick a file of correct aspect ratio:
341
+    i.e. it should still look good when resized to 720x480 (PAL 720x576),
342
+    then resized to proper aspect ratio.
343
+
344
+**-textmenu**, **-text-menu** NUM
345
+    If used without an argument, create a textmenu out of the supplied titles
346
+    The optional argument specifies how many titles are in the 1st column,
347
+    i.e. giving 4 titles and using **-textmenu 2** would make 2 columns of 2
348
+    titles. The default is to put all titles up to 13 in the first column
349
+    before starting a second column.  Maximum: 2 columns and 26 titles.
350
+    Note that column 2 titles are aligned to the right.
351
+    If no video files for either **-background** or **-showcase** are supplied,
352
+    the menu will be static.
353
+
354
+**-quick-menu**
355
+    (Note: unfortunately ffmpeg's 'vhooks' have been removed, so this
356
+    option may not be available for you depending on your ffmpeg version)
357
+    This will make a very quick  menu by using ffmpeg instead of imagemagick.
358
+    There are two choices: you can either use **-showcase IMAGE|VIDEO** or
359
+    **-background VIDEO**.  There are no fancy effects like **-wave**
360
+    or **-rotate** available for it, but it is extremely fast.  It will be a
361
+    text-menu style of menu, with no video thumbs, and a central showcase
362
+    IMAGE (static) | VIDEO (animated).  See **-bg-color** if you are not using
363
+    a **-background** and want to change the default black.
364
+
365
+    Specifying the IMAGE|VIDEO argument to **-showcase** is mandatory for this
366
+    style of menu, unless used in conjunction with **-switched-menus**
367
+    in which case the videos passed with **-files** automatically become the
368
+    showcase videos.  If this is used in combination with **-switched-menus**
369
+    it can really speed up an otherwise time consuming process.
370
+
371
+    Example::
372
+
373
+        -quick-menu -showcase /home/robert/showcase.mpg
374
+
375
+    See **-switched-menus** for example of making switched menus with
376
+    **-quick-menu**
377
+
378
+**-bg-color** | **-bg-colour**
379
+    The color to use for the menu background. (default: ntsc-safe black)
380
+    Note: use a color a great deal darker than you want, as it appears quite
381
+    a bit lighter in the video version.  You can use hexadecimal ('#ffac5f')
382
+    or named colors notation.
383
+
384
+**-submenu-bg-color** | **-submenu-bg-colour**
385
+    The color to use as background for the  submenu(s).
386
+    (default: ntsc-safe black)  See **-bg-color**
387
+
388
+**-use-makemenu**
389
+    This will use **tovid menu** to create a menu with the provided titles.
390
+
391
+**-static**
392
+    Main menu will just be static thumbs (not animated) (default: animated)
393
+
394
+**-background** IMAGE|VIDEO
395
+    Menu background.  This can be a image file or an video file.  If it is a
396
+    video file the background will be animated.  Pick a file of correct aspect
397
+    ratio: i.e. it should still look good when resized to 720x480 (PAL 720x576)
398
+
399
+**-submenu-background** IMAGE
400
+    Submenu background.  This can be only be an image file.  Pick a file of
401
+    correct aspect ratio: i.e. it should still look good when resized to
402
+    720x480 (PAL 720x576)
403
+
404
+**-menu-title**
405
+    Title for the root menu - may be longer than thumbnail labels
406
+    Also if you use \n in the title, you can use multi line titles, but you
407
+    would need to adjust **-menu-fontsize** to something smaller than default
408
+    for example::
409
+
410
+        $ tovid disc ... -menu-title "A\nMultilined\nTitle" -menu-fontsize 24
411
+
412
+**-menu-font** FONT
413
+    Font to use for titles, either by ImageMagick font name (ex., "Arial") or
414
+    explicit pathname (ex., "/full/path/to/arial.ttf"). To see a complete
415
+    list of acceptable ImageMagick font names, run **convert -list type**, and
416
+    refer to the leftmost column
417
+
418
+**-menu-fontsize**
419
+    Font size for main menu - best to **-preview** if you use this
420
+
421
+**-submenu-font**
422
+    Font to use for the sub-menu main titles.  See **-menu-font**
423
+
424
+**-submenu-fontsize**
425
+    Font size for the sub-menu main titles
426
+
427
+**-menu-fade** ['BACKGROUND DURATION']
428
+    Fade the menu in and out The background will fade in first, then title (and
429
+    mist if called for), then the menu thumbs.  The fadeout is in reverse
430
+    order.  'BACKGROUND DURATION' is an integer denoting the amount of time the
431
+    background will play before the menu begins to fade in.  This can allow you
432
+    to do a 'transition' to the menu: if you supply a **-background VIDEO** it
433
+    will play for the indicated time before the menu fades in.  Leave the
434
+    optional argument empty (just **-menu-fade**) to get the default behavior
435
+    of showing the background for 1 second before fading the menu in.  To
436
+    disable the fadeout portion, use '**-loop** inf'.  See also:
437
+    **-transition-to-menu** and **-loop**
438
+
439
+**-transition-to-menu**
440
+    This option goes with the **-menu-fade** option above, which must be
441
+    enabled for it to have effect.  It is a convenience option for animated
442
+    backgrounds: the background will become static at the exact point the
443
+    thumbs finish fading in. This menu does not loop unless you pass
444
+    **-loop VALUE**.  See also: **-loop**
445
+
446
+**-bgaudio**, **-bg-audio** FILE
447
+    An file containing audio for the main menu background.  For static menus
448
+    the default is to use 20 seconds of audio.  You can change this using the
449
+    **-menu-length** option.
450
+
451
+**-submenu-audio** FILE(S)
452
+    List of files for sub-menu audio backgrounds. If one file is given, then
453
+    it will be used for all sub-menus.  Otherwise the number given must equal
454
+    the number of submenus, though the keyword "none" in this list may be used for
455
+    silence.  See also **-submenu-length**
456
+
457
+**-titleset** . . . **-end-titleset**
458
+    If you have more than one titleset, put options for each titleset between
459
+    **-titleset** and **-end-titleset**.  A separate menu will be created that
460
+    can be accessed from the main menu (VMGM).  You can create this main menu
461
+    using the **-vmgm** **-end-vmgm** options.  See **-vmgm** below and
462
+    :ref:`usage-titlesets` under the **Usage** section.
463
+
464
+**-vmgm** . . . **-end-vmgm**
465
+    The VMGM menu is the root menu when you use titlesets.
466
+    Put your VMGM menu options between **-vmgm** and **-end-vmgm**.
467
+    You only need **-titles** "Titleset One title"  "Titleset Two title"
468
+    . . . , and not **-files**.
469
+    Any other options can be used, but the  menu will be a textmenu style by
470
+    default.  **Hint**: use **-showcase** IMAGE/VIDEO to create a fancier
471
+    VMGM menu.
472
+
473
+**-no-vmgm-menu** | **-no-vmgm**
474
+    This will skip the creation of a VMGM ( root menu ) for titlesets. The DVD
475
+    will start with the first titleset.  You can not use this option unless also
476
+    using **-quick-nav** as you would not have a way to get to other titlesets.
477
+
478
+**-skip-vmgm**
479
+    Start DVD from the first titleset instead of the VMGM ( root ) menu.
480
+
481
+**-switched-menus**
482
+    This will make a "switched menu": there will be a central image where the
483
+    showcase image would go, and text menu titles along the menu edge where
484
+    textmenu titles go.  As you select a video title with the down or up arrow
485
+    on your DVD remote, the image in the centre will change to the image or
486
+    video made from that selected video. Do not use **-showcase** IMAGE/VIDEO
487
+    with this option.
488
+
489
+    This can be a time consuming process for making animated menus as you need
490
+    to make a separate menu for each video provided with **-files**.  The
491
+    process can be greatly sped up by using **-quick-menu** in conjunction with
492
+    this, though you will lose fancy options like **-rotate** and **-wave**.
493
+
494
+    Example for using with **-quick-menu**::
495
+
496
+        -switched-menus -quick-menu
497
+
498
+
499
+Thumbnail style
500
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
501
+
502
+**-thumb-shape** normal|oval|vignette|plectrum|arch|spiral|blob|star|flare
503
+    Apply a shaped transparency mask to thumbnail videos.
504
+    These "feathered" shapes look best against a plain background (or used
505
+    in conjunction with **-thumb-mist** [COLOR]).  For this rectangular
506
+    semi-transparent misted background for each thumb:  see **-thumb-mist**.
507
+    Note: if you wish to make your own mask PNGS you can put them in
508
+    $PREFIX/lib/tovid/masks/ or $HOME/.tovid/masks/ and use them on the
509
+    command line using the filename minus the path and extension.
510
+    (i.e ~/.tovid/masks/tux.png becomes **-thumb-shape tux**)
511
+    No frame is used for shaped thumbs.
512
+
513
+**-thumb-frame-size** INT
514
+    The size (thickness) of the thumb frames in pixels.  This will also set the
515
+    thickness of the raised "frame" of thumbs when you use **-3d-thumbs**.
516
+    See also **-showcase-frame-size** and **-thumb-frame-color**
517
+
518
+**-thumb-frame-color**, **-thumb-frame-colour** COLOR
519
+    The color of frames for video thumbnails.  Use hexadecimal or named colors
520
+    notation.  Remember to quote if using hexadecimal! ( '#ffac5f' ).
521
+
522
+**-3d-thumbs**, **-3dthumbs**
523
+    This will give an illusion of 3D to the thumbnails: dynamic lighting on
524
+    rounded thumbs, and a raised effect on rectangular thumbs.  Try it !
525
+
526
+**-titles-font** FONT
527
+    Display thumbnail or textmenu titles in the given font
528
+
529
+**-titles-fontsize** POINTS
530
+    Font size to use for thumbnail or textmenu titles
531
+
532
+
533
+Slideshows
534
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
535
+
536
+**-slides** IMAGES
537
+    Use **-slides** IMAGES to pass in images for a slideshow.  The default is
538
+    to make an animated menu of the slides, moving from one slide to the
539
+    next. If you use **-static**, a 'polaroid stack' montage is created.  This
540
+    composites the slides onto the background in 'random' locations with random
541
+    rotations.  **-slides**  IMAGES can be used multiple times if you wish to
542
+    make a menu with multiple slideshows.  You can also make a menu
543
+    of mixed videos and slideshows by using **-slides** IMAGES, and **-files**
544
+    VIDEOS multiple times.  For such a menu, the number of **-titles**
545
+    needs to match the number of **-files** passed in plus the number of
546
+    slideshows.  (Each time you use **-slides** counts as one title.)  To use
547
+    a transition between the slides, use **-slide-transition**
548
+    crossfade|fade.  See **-slide-transition** **-menu-slide-total**
549
+
550
+**-menu-slide-total** INT
551
+    Use INT number of the slides that were passed in with **-slides**
552
+    to make the animated or static slide menu.  The length of the menu is
553
+    determined by 1) **-menu-length** NUM if given,  and by 2) the length
554
+    of the audio from **-bgaudio**.  For submenu slideshows, it is determined
555
+    by 1) **-submenu-length** NUM if given,  and by 2) the length of the
556
+    audio from **-submenu-audio** FILE(S).
557
+
558
+**-submenu-slide-total** INT
559
+    This option is the same as **-menu-slide-total** except that it is
560
+    for submenu slideshows.
561
+
562
+**-slide-transition** crossfade|fade [crossfade]
563
+    The type of fade transition between slides in a animated slide menu.  Be
564
+    sure the menu length is long enough to support the 1 second transitions
565
+    between the slides.  The length is determined by 1) the length of the
566
+    **-bgaudio AUDIO** and 2) the length given with **-menu-length NUM**.  For
567
+    submenu slideshows, it is determined by 1) **-submenu-length NUM** if
568
+    given, and by 2) the length of the audio from **-submenu-audio** FILE(S).
569
+
570
+    See **-menu-slide-total** , **-bgaudio** , **-menu-length** ,
571
+    **-submenu-length**, and **-submenu-audio**.
572
+
573
+    The 'crossfade' transition fades from one slide to another.  The 'fade'
574
+    transition fades in and out from and to black.  If you don't use this
575
+    option, the default is to use a 'crossfade' transition.
576
+
577
+**-slideshow-menu-thumbs** FILES
578
+    Use the FILES instead of the 1st image in each slideshow as the
579
+    thumb that shows on the menu.  This option is for multiple slideshows
580
+    or mixed slideshow/video menus only.
581
+
582
+**-slides-to-bin** FILES
583
+    FILES will be resized to 640x480 using a 'box' filter - this
584
+    is called 'binning'.  It will reduce the 'signal to noise' ratio for the
585
+    image in the animated slide menu.  Use this if you get some unwanted
586
+    effects for certain images, such as pixels shifting in what should be a
587
+    static image.  See also **-slides-to-blur** and **-slide-border**
588
+
589
+**-slides-to-blur** FILES
590
+    FILES will be blurred a small amount - which will help on
591
+    slides that still have noise even after 'binning' with -slides-to-bin.
592
+    The default blur is 0x0.2 - you can increase this with
593
+    -slide-blur ARG.  See also **-slides-to-bin** and **-slide-border**
594
+
595
+**-slide-blur** VALUE or LIST of VALUES [0x0.2]
596
+    The argument to use for blurring files.  It will be passed to
597
+    imagemagick: convert -blur ARG.  The format of the arg is {radius}x{sigma}
598
+    and the default is 0x0.2. Using values between 0x0.1 and 0x0.9 is probably
599
+    the best range.  Use a single value for all, or a list to have a different
600
+    blur for each file passed with **-slides-to-blur**.  You must pass in
601
+    **-files-to-blur** FILES to use this option.  Blurring can help 'noise'
602
+    problems in the video.  See also **-slides-to-bin** and **-slide-border**
603
+
604
+**-slide-border** WIDTH [100]
605
+    Pad the slides with a border for the animated slide menu.  The default
606
+    without using an argument is 100.  Using this option can also solve some
607
+    noise/ringing effects if used alone or in conjunction with 'binning'
608
+    (**-slides-to-bin**) or blurring (**-slides-to-blur**).
609
+
610
+**-slide-frame** WIDTH [12]
611
+    Frame the slides for the animated slideshow menu.  The default width
612
+    without using an  argument is 12.  See also **-slide-frame-color**
613
+
614
+**-slide-frame-color** | **-slide-frame-colour**
615
+    The color of the slide frame if passing **-slide-frame**.  The default if
616
+    you don't use this option is a color-safe white: rgb(235,235,235).
617
+
618
+**-showcase-slideshow**
619
+    If doing multiple slideshows or mixed videos and slideshow(s), then use
620
+    the animated slideshow as a showcase video.  It will be composed of slides
621
+    from each slideshow in the menu.  The thumb for each slideshow button will
622
+    be static.  If you used with a mixed menu of videos and slideshows, then
623
+    the video thumbs WILL be animated, so you may wish to use -static or
624
+    -textmenu with the option in that case.
625
+
626
+**-background-slideshow**, **-bg-slideshow**
627
+    If doing multiple slideshows or mixed videos and slideshow(s), then use
628
+    the animated slideshow as a background video.  See **-showcase-slideshow**
629
+    for additional details.
630
+
631
+**-no-confirm-backup**
632
+    Slideshows are an experimental (but well tested) feature.  Todisc is
633
+    unlikely to overwrite your personal files, but you should take precautions
634
+    and backup your images, as you would with any beta software.  Todisc
635
+    will prompt you to backup your files normally.  If you have already backed
636
+    up your images, use this option to disable the prompt.
637
+
638
+**-use-dvd-slideshow** [FILE CONFIG]
639
+    If you pass this option without an argument, tovid will use the
640
+    dvd-slideshow program to create the animated slide menu, assuming you have
641
+    this program installed.  The optional argument is the dvd-slideshow
642
+    configuration file  - if you don't use this argument tovid will create it
643
+    for you.  If you want to use the 'Ken Burns effect' - then the
644
+    configuration file argument is required.  Note: the configuration file will
645
+    override many of the above options for slideshows.
646
+
647
+
648
+Advanced Options
649
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
650
+
651
+**-menu-length**
652
+    The desired animated main menu length in seconds
653
+
654
+**-submenu-length**
655
+    The desired submenu length.  This will also affect the length of submenu
656
+    audio for static submenus.  (Assuming that -submenu-audio was passed in).
657
+    The default is to use 10 seconds of audio for static menus.
658
+
659
+**-submenu-stroke** COLOR
660
+    The color for the sub-menu font outline (stroke)
661
+
662
+**-submenu-title-color**, **-submenu-title-colour**
663
+    The fill color used for sub-menu title fonts
664
+
665
+**-submenu-titles**
666
+    You can supple a list of titles here for sub-menus without the length
667
+    restrictions found in thumb titles.  Must equal number of videos
668
+
669
+**-chapters** [ NUM | CHAPTER POINTS in HH:MM:SS ]
670
+    The number of chapters for each video (default: 6) OR
671
+    the actual chapter points in HH:MM:SS format.
672
+    Chapter points will be used for generating the submenu thumbs, and for
673
+    seeking with your DVD player.  You can pass in just one value that will
674
+    be used for all videos, or supply a list of values (number of chapters)
675
+    or time code strings.
676
+
677
+    If you just pass an integer for 'number of chapters', then tovid will
678
+    make the chapter points for you by dividing the video length by the number
679
+    you supply.  If using the **-no-menu** option, the INT passed in will be
680
+    the chapter interval in minutes, rather than the above formula.
681
+
682
+    If passing HH:MM:SS format you need to pass the string of chapter points for
683
+    each video and each string should have comma separated values.
684
+    Additionally, the first chapter should always start at 00:00:00 as
685
+    dvdauthor will add that if it is not there already.
686
+
687
+    To get your time codes, you can play your videos in mplayer and press 'o'
688
+    to see them on-screen.  I have found these to be very accurate in my short
689
+    tests.  For greater frame accuracy you could try loading the file in
690
+    avidemux and find the time codes for the frames you want.
691
+
692
+    If passing grouped chapters you need to join the chapters from all the
693
+    videos in a group with a '+' separator.  If you want to skip creating
694
+    chapters for a video in the group use '0' for its chapters.
695
+
696
+    Note: chapters for grouped videos should probably be passed in using the
697
+    above HH:MM:SS format. (Arbitrary chapters using just an INT for the # of
698
+    chapters is not guaranteed to work reliably in all cases for grouped videos
699
+    at the moment.)
700
+
701
+    Example for passing just number of chapters ( 4 videos )::
702
+
703
+        -chapters 5 2 4 8
704
+
705
+    Example of passing chapter points ( 4 videos )::
706
+
707
+        -chapters 00:00:00,00:05:34.41,00:12:54,00:20:45 \
708
+        00:00:00,00:04:25.623,00:09:12,00:15:51 \
709
+        00:00:00,00:05:10,00:13:41,00:18:13.033 \
710
+        00:00:00,00:15:23.342,00:26:42.523
711
+
712
+    Example of passing grouped chapters using the '+' separator::
713
+
714
+        -chapters 00:00:00,00:05:34.41,00:12:54,00:20:45+00:04:23,00:09:35 \
715
+        00:00:00... etc.
716
+
717
+**-chapter-titles** LIST
718
+    If you are using submenus, you can pass a list of titles for the
719
+    chapters.  Each title must be quoted, and the number of titles given
720
+    must equal the total number of chapters for all videos.  In other words
721
+    if you use -chapters 4 6 8 , you must give 18 chapter titles, in the same
722
+    order that the videos were passed in.
723
+
724
+**-chapter-font** FONT
725
+    Use FONT as the font for submenu chapters.
726
+
727
+**-chapter-fontsize** SIZE
728
+    Use SIZE as the pointsize for the chapters font.
729
+
730
+**-chapter-color** COLOR
731
+    The color for the chapters font.
732
+
733
+**-chapter-stroke** COLOR
734
+    The color for the chapters font outline (stroke)
735
+
736
+**-seek** NUM | "NUM1 NUM2 NUM3 . . ."
737
+    Seek to NUM seconds before generating thumbnails (default: 2.0 seconds)
738
+    If a quoted string of values matching the number of videos is used, then
739
+    each video can use a different seek value
740
+    If using switched menus, the **-seek** value(s) will be used to generate
741
+    the showcase image that displays on switching to another video choice with
742
+    the up/down arrow keys.
743
+
744
+**-showcase-seek** NUM
745
+    Seek to NUM seconds before generating thumbnails for showcase video
746
+    (default: 2.0 seconds)
747
+
748
+**-bgvideo-seek**, **-bg-video-seek** NUM
749
+    Seek to NUM seconds before generating images for background video
750
+    (default: 2.0 seconds)
751
+
752
+**-bgaudio-seek**, **-bg-audio-seek** NUM
753
+    Seek to NUM seconds before generating audio for bgaudio
754
+    (default: 2.0 seconds)
755
+
756
+**-group** N VIDEO1 VIDEO2 . . .
757
+    Allow grouping videos in dvdauthor.xml, so they will play sequentially as
758
+    a group.  The videos passed in after the 'N' will be grouped with the 'Nth'
759
+    video. Example::
760
+
761
+        -group 2 2.mpg 3.mpg 4.mpg
762
+
763
+    will group these 3 videos with the 2nd video given with **-files**, so that
764
+    they will play sequentially as one title.  Only one thumbnail and/or title
765
+    will appear on the menu for the group: it will be made from the 1st video
766
+    in the group.  In the above example if you passed::
767
+
768
+        -files foo.mpg bar.mpg baz.mpg -group 2 2.mpg 3.mpg 4.mpg
769
+
770
+    then the group will consist of bar.mpg  2.mpg, 3.mpg and 4.mpg, and only the
771
+    title and/or thumbnail for bar.mpg will appear in the menu.  You can use
772
+    **-group** more than once for multiple groups.  Be  sure to quote video
773
+    filenames if they contain  spaces.
774
+
775
+**-jobs**
776
+    By default, **tovid disc** starts a parallel job for each processor
777
+    detected.  With this option you can manually set the number of jobs.  For
778
+    example if you have a computer with 2 CPUs you can set **-jobs 1** to keep
779
+    one processor free for other things.  At present this applies to the time
780
+    consuming imagemagick loops: you will notice a substantial speedup now if
781
+    you have a multi-cpu system.
782
+
783
+**-no-ask**, **-noask**
784
+    Skip all interactive questions.  No preview, automatic re-encoding with
785
+    tovid if needed, no interactive option to use background video for bgaudio.
786
+
787
+**-no-warn**, **-nowarn**
788
+    Don't pause after outputting warning or info messages
789
+
790
+**-grid**
791
+    Show a second preview image with a grid and numbers that will help in finding
792
+    coordinates for options that might use them, like **-text-start**
793
+
794
+
795
+Menu Style
796
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
797
+
798
+**-menu-title-geo** north|south|east|west|center [south]
799
+    The position of the menu title.  You may need to use **-align** as well if
800
+    you don't want your title covering other parts of your menu.  See
801
+    **-align**
802
+
803
+**-menu-title-offset** OFFSET (+X+Y)
804
+    Move menu title by this offset from its N|S|E|W|Center position.  You
805
+    may need to use **-align** as well if you don't want your title covering other
806
+    parts of your menu.  See **-align**
807
+
808
+**-button-style** rect|text|line|text-rect
809
+    The style of button that you will see when you play the DVD.  "rect" draws
810
+    a rectangle around the thumb when you select it in the DVD player.  "text"
811
+    highlights the video title text, "line" underlines the title, and
812
+    "text-rect" draws a rectangle around the title text.
813
+
814
+**-title-color**, **-title-colour** COLOR
815
+    Color to use for the main menu title.  For list of supported colors do:
816
+    **convert -list** color.  HTML notation may be used: "#ff0000". See:
817
+    http://www.imagemagick.org/script/color.php
818
+
819
+**-title-stroke** COLOR
820
+    Outline color for the main menu's title font. Use "none" for transparent
821
+    outline  (see title-color)
822
+
823
+**-titles-stroke** COLOR
824
+    Outline color for the thumb or textmenu video titles font. Use "none" for
825
+    transparent outline  (see **-titles-color**).
826
+
827
+**-highlight-color**, **-highlight-colour**
828
+    Color to use for the menu buttons that your DVD remote uses to navigate.
829
+
830
+**-select-color**, **-select-colour**
831
+    Color to use for the menu buttons that your DVD remote uses to select.
832
+
833
+**-text-mist**
834
+    Put a semi-transparent misted background behind the text for the menu's
835
+    title, just slightly larger than the text area.
836
+
837
+**-text-mist-color**, **-text-mist-colour** COLOR
838
+    Color of the mist behind the menu's title (see title-color).
839
+
840
+**-text-mist-opacity**
841
+    Opacity of the mist behind the menu's title - see **-opacity**
842
+
843
+**-title-opacity**
844
+    Opacity of the menu title text
845
+
846
+**-titles-opacity**
847
+    Opacity of the text for video titles
848
+
849
+**-submenu-title-opacity**
850
+    Opacity of the text for submenu menu titles
851
+
852
+**-chapter-title-opacity**
853
+    Opacity of the text for submenu chapter titles
854
+
855
+**-menu-audio-fade**
856
+    Number of sec to fade given menu audio in and out (default: 1.0 seconds)
857
+    If you use **-menu-audio-fade** 0 then the audio will not be faded.
858
+
859
+**-submenu-audio-fade**
860
+    Number of secs to fade sub-menu audio in and out (default: 1.0 seconds).
861
+    See **-menu-audio-fade**
862
+
863
+**-intro** VIDEO
864
+    Use a introductory video that will play before the main menu.
865
+    At present it must be a DVD compatible video at the correct resolution etc.
866
+    Only 4:3 aspect is supported: 16:9 will give unexpected results.
867
+
868
+
869
+Showcase and textmenu
870
+-------------------------------------------------------------------------------
871
+The following menu style options are specific to showcase and textmenu arrangements:
872
+
873
+**-text-start** N
874
+    This option is for **-textmenu** menus.  The titles will start at the Nth
875
+    pixel from the top of the menu ( Y axis ).
876
+
877
+**-title-gap** N
878
+    This option is for **-textmenu** menus.  The gap is the space between
879
+    titles vertically ( Y axis ).
880
+
881
+**-rotate** DEGREES
882
+    Rotate the showcase image|video clockwise by DEGREES.
883
+    (default: if used without options, the rotate will be 5 degrees).  Note:
884
+    this will not turn a portait image into a landscape image!
885
+
886
+**-showcase-geo** GEOMETRY
887
+    The position of the showcase image.  ( XxY position )
888
+
889
+**-wave** default|GEOMETRY
890
+    Wave effect for showcase image|video.  Alters thumbs along a sine wave
891
+    using GEOMETRY. (default: no wave) "default" will produce a wave arg of
892
+    **-20x556**, which produces a gentle wave with a small amount of
893
+    distortion.  See: http://www.imagemagick.org/Usage/distorts/#wave if you
894
+    want to try other values.
895
+
896
+**-showcase-shape**  egg|oval|plectrum|arch|spiral|galaxy|flat-tube|normal
897
+    Apply a shaped transparency mask to showcase videos or images.
898
+    Note: if you wish to make your own mask PNGS you can put them in
899
+    $PREFIX/lib/tovid/masks/ or $HOME/.tovid/masks/ and use them on the
900
+    command line using the filename minus the path and extension.
901
+    No frame is used for shaped thumbs.
902
+
903
+**-showcase-framestyle**  none|glass
904
+    For **-showcase-** style template only
905
+    "none" will use the default frame method, using "convert -frame . . ."
906
+    "glass" will use mplayer to make frames, which gives an interesting
907
+    animated effect to the frames, and can be much faster ( especially if you
908
+    don't use **-rotate** or **-wave** as thumbs will not need to be processed
909
+    again after mplayer spits them out.  Note: you need to be using either
910
+    **-showcase** IMAGE or **-showcase** VIDEO for this "frame style" to work.
911
+
912
+**-showcase-frame-size** PIXELS
913
+    The size of the showcase frame.  This value will be used for both width and
914
+    height for the 'thickness' of the frame.  This will also set the thickness
915
+    of the raised "frame" of the showcase thumb when you use **-3d-showcase**.
916
+    See also **-thumb-frame-size** and **-showcase-frame-color**
917
+
918
+**-showcase-frame-color**, **-showcase-frame-colour** PIXELS
919
+    The color of the showcase frame.  Use hexadecimal or named colors notation.
920
+    Remember to quote! ( '#ffac5f' ).
921
+
922
+**-3d-showcase**, **-3dshowcase**
923
+    This will give an illusion of 3D to the showcase thumb: dynamic lighting on
924
+    rounded thumbs, and a raised effect on rectangular thumbs.  Try it !
925
+
926
+
927
+Thumbnail style
928
+-------------------------------------------------------------------------------
929
+
930
+**-opacity** [0-100] (default 100)
931
+    Opacity of thumbnail videos as a percentage (no percent sign).
932
+    Anything less than 100(%) is semi-transparent. Not recommended with dark
933
+    backgrounds.
934
+
935
+**-thumb-blur**, **-blur** NUM
936
+    The amount of feather blur to apply to the thumb-shape.  The default is 1.0
937
+    which will more or less keep the shape and produces transparency at the
938
+    edges.  Choose float or integer values between 0.1 and 2.0. 3D thumbs are
939
+    set to a tiny blur, so this option doesn't affect the **-3dthumbs** option.
940
+
941
+**-showcase-blur** NUM
942
+    The amount of 'feather' blur to apply to the showcase image/video.  Choose
943
+    values between 0.1 and 2.0.  This option has no effect on **-3d-showcase**.
944
+    See **-thumb-blur** for more info.
945
+
946
+**-align** north|south
947
+    This will align  thumbs/titles north or south.
948
+    If **-align** south then menu title will align north, unless you manually
949
+    set one or both of **-menu-title-geo** or **-menu-title-offset**.
950
+
951
+**-thumb-mist** [COLOR]
952
+    Use a mist behind thumbnails.  The optional argument is the color of the
953
+    mist.  This option helps with contrast.  Be sure to set the font color
954
+    to an appropriate color if using a colored mist, and/or use a bold font.
955
+
956
+**-titles-color**, **-titles-colour** COLOR
957
+    Color to use for the thumb or textmenu titles.  If your titles are not
958
+    clear enough or look washed out, try using a **-titles-stroke** that
959
+    is the same color as used with **-titles-color**  (see **-title-color**)
960
+
961
+**-showcase-titles-align** west|east (default: center [centre])
962
+    The default is to center the text above the thumbnails.  This option will
963
+    align the titles either to the left (west) or right (east).  Aligning west
964
+    gives more space to the titles.  Aligning east also does so, and as well
965
+    will facilitate using \n in your titles to achieve multi line titles.
966
+
967
+**-tile-3x1**, **-tile3x1**
968
+    Use a montage tile of 3x1 instead of the usual 2x2 for 3 videos
969
+    ie.::
970
+
971
+        [movie1] [movie2] [movie3] instead of:
972
+
973
+        [movie1] [movie2]
974
+
975
+        [movie3]
976
+
977
+    This option only comes into play if the number of videos supplied equals 3
978
+    Otherwise it will be silently ignored. Not used for **-showcase-\*** style.
979
+
980
+**-tile-4x1**, **-tile4x1**
981
+    Same as **-tile-3x1** above, except use tile of 4x1. (one row of 4 videos)
982
+
983
+**-thumb-columns** 3|4
984
+    Same as **-tile-3x1** and **tile-4x1** above, except it accepts either '3'
985
+    (1 row of 3 thumbs), or '4' (one row of 4 thumbs) as an argument.  This
986
+    alternative was added to help compact the gui layout.
987
+
988
+**-rotate-thumbs** DEGREE LIST ( list of degrees, one for each thumb )
989
+    Rotate thumbs the given amount in degrees - can be positive or negative.
990
+    There must be one value for each file given with **-files**.
991
+    If the values are not the same distance from zero, the thumbs will be of
992
+    different sizes as images are necessarily resized *after* rotating.  With
993
+    the default montage template - this will also resize the titles; with the
994
+    showcase template the titles will remain the same size. Example::
995
+
996
+        -rotate-thumbs -10 10 -10 10 -10  (for 5 files)
997
+
998
+    **Note**: this option will not turn a portrait image into a landscape image!
999
+
1000
+
1001
+Dvdauthor options
1002
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1003
+
1004
+**-loop** PAUSE
1005
+    Pause in seconds at end of menu.  Use "inf" if you wish indefinite pause.
1006
+    Note: using "inf" with **-menu-fade** will disable the fadeout portion of
1007
+    the fade.  (default: "inf" for static menu, 10.0 seconds for animated.)
1008
+
1009
+**-playall**
1010
+    This option will create a button on the main menu that will allow going
1011
+    right to the 1st title and playing all videos in succession before
1012
+    returning to the main menu.  If doing titlesets you can use this within
1013
+    the **-vmgm** ... **-end-vmgm** options to allow playing ALL titlesets.
1014
+    (If you want also to have a playall button in each titleset you could use
1015
+    this option between each **-titleset** ... **-end-titleset** option or put
1016
+    it outside of the vmgm and titlset options as a general option.
1017
+
1018
+**-videos-are-chapters**
1019
+    A button will be made on the main menu for each video, which you can use as
1020
+    a chapter button.  Selecting any video will play them all in order
1021
+    starting with the selected one.
1022
+
1023
+**-chain-videos** NUM | N1-NN
1024
+    Without options this will chain all videos together so they play
1025
+    sequentially without returning to the main menu, except for the last, which
1026
+    will return.  You can also specify which videos you want to behave this way
1027
+    by number or by a range. ( ie. **-chain-videos** 1 2 4-6 ).
1028
+
1029
+**-subtitle-lang** "lang1 lang2 . . ."
1030
+    This allows selectable subtitles in the DVD, assuming you have optional
1031
+    subtitles muxed into your videos.  Use 2 character language codes.
1032
+
1033
+**-audio-channel** "Video1_track Video2_track Video3_track . . ."
1034
+    "VideoN_track" is the track number to use in a multi-track (multi-language)
1035
+    mpeg: usually something like **-audio-channel** "1 0 1".  The 1st track is
1036
+    0, 2nd is 1 . . . etc.  If the tracks are 0. English 1.French, then the
1037
+    above would make French the audio language on Video1 and Video3, and
1038
+    English the audio language on Video2.  You can check the mpeg with
1039
+    "mplayer -v . . .".
1040
+
1041
+**-audio-lang** LANGUAGE CODES
1042
+    Identify the audio tracks on the DVD.  These language codes are used for
1043
+    each video in the titleset.  When you use the audio button on your DVD
1044
+    remote the language name is displayed.  Example: **-audio-lang** en fr
1045
+
1046
+**-aspect** 4:3|16:9
1047
+    This will output a <video aspect WIDTH:HEIGHT /> tag for the dvdauthor
1048
+    xml file.  It will affect all videos in the titleset.  Example::
1049
+
1050
+        -aspect 16:9
1051
+
1052
+**-widescreen** nopanscan|noletterbox [nopanscan]
1053
+    This will output a <video widescreen=nopanscan /> tag (for example)
1054
+    for the dvdauthor xml file.  It will affect all videos in the titleset. Use
1055
+    in conjunction with **-aspect** if your dvd player is cropping your videos.
1056
+    Example::
1057
+
1058
+        -aspect 16:9 -widescreen
1059
+
1060
+**-quick-nav**
1061
+    This option will allow navigation of a menu with more than one titleset by
1062
+    using the left and right arrow keys of your DVD remote.  When you press
1063
+    this key the highlight will go the next or previous title.  If you are at
1064
+    the end of a titleset the right key will go to the next titleset.  If you
1065
+    are at the beginning of a titleset, the left key will go to the previous
1066
+    titleset.  If no next or previous titleset it will cycle to the end or
1067
+    beginning of the titlesets.
1068
+
1069
+**-outlinewidth**, **-outline-width** WIDTH
1070
+    For spumux outlinewidth variable.  If there is a large gap between words in
1071
+    a text button, this option may help.
1072
+
1073
+**-video-pause** PAUSE (single value or list)
1074
+    The pause in seconds after playing a video title.  This is useful for
1075
+    slideshows: the 'slide' will remain on the screen for this length of time.
1076
+    If you have grouped videos you should probably not pause the videos that
1077
+    have a grouped title after it, but instead see **-grouped-video-pause**.
1078
+    Note: if you provide a list of values they must be one for each video.
1079
+
1080
+**-group-video-pause** PAUSE (single value or list)
1081
+    The pause in seconds after a grouped video plays.  If you wish to pause
1082
+    after the whole group finishes, then only use a value greater than zero
1083
+    for the last video in the group.  If providing a list of values they must
1084
+    equal the number of grouped videos.
1085
+
1086
+
1087
+Burning the disc
1088
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1089
+
1090
+**-burn**
1091
+    Prompt to burn the DVD directory on completion.
1092
+
1093
+**-device** DEVICE [/dev/dvdrw]
1094
+    Device to use for the burning program.
1095
+
1096
+**-speed** N
1097
+    The speed to use for burning the disc.
1098
+
1099
+
1100
+
1101
+.. _command-mpg:
1102
+
1103
+Command:mpg
1104
+===============================================================================
1105
+
1106
+**tovid mpg** converts arbitrary video files into (S)VCD/DVD-compliant
1107
+MPEG format, suitable for burning to CD/DVD-R for playback on a
1108
+standalone DVD player.
1109
+
1110
+Usage
1111
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1112
+
1113
+::
1114
+
1115
+ tovid mpg [OPTIONS] -in INFILE -out OUTPREFIX
1116
+
1117
+Where *INFILE* is any multimedia video file, and *OUTPREFIX* is what
1118
+you want to call the output file, minus the file extension. *OPTIONS*
1119
+are additional customizations, described below.
1120
+
1121
+By default, you will (hopefully) end up with an NTSC DVD-compliant
1122
+MPEG-2 video file; if you burn this file to a DVD-R, it should be
1123
+playable on most DVD players.
1124
+
1125
+For example:
1126
+
1127
+``tovid mpg -in foo.avi -out foo_encoded``
1128
+    Convert 'foo.avi' to NTSC DVD format, saving to 'foo_encoded.mpg'.
1129
+
1130
+``tovid mpg -pal -vcd foo.avi -out foo_encoded``
1131
+    Convert 'foo.avi' to PAL VCD format, saving to 'foo_encoded.mpg'.
1132
+
1133
+Basic options
1134
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1135
+
1136
+**-v**, **-version**
1137
+    Print tovid version number only, then exit.
1138
+
1139
+**-quiet**
1140
+    Reduce output to the console.
1141
+
1142
+**-fake**
1143
+    Do not actually encode; only print the commands (mplayer, mpeg2enc etc.)
1144
+    that would be executed. Useful in debugging; have tovid give you the
1145
+    commands, and run them manually.
1146
+
1147
+**-ffmpeg**
1148
+    Use ffmpeg for video encoding, instead of mplayer/mpeg2enc. Try this if
1149
+    you have any problems with the default encoding method. Using this option,
1150
+    encoding will be considerably faster. Currently does not work with
1151
+    **-subtitles** or  **-filters**.
1152
+
1153
+Television standards
1154
+-------------------------------------------------------------------------------
1155
+
1156
+**-ntsc**
1157
+    NTSC format video (USA, Americas) (default)
1158
+
1159
+**-ntscfilm**
1160
+    NTSC-film format video
1161
+
1162
+**-pal**
1163
+    PAL format video (Europe and others)
1164
+
1165
+Formats
1166
+-------------------------------------------------------------------------------
1167
+
1168
+Standard formats, should be playable in most DVD players:
1169
+
1170
+**-dvd**
1171
+    (720x480 NTSC, 720x576 PAL) DVD-compatible output (default)
1172
+
1173
+**-half-dvd**
1174
+    (352x480 NTSC, 352x576 PAL) Half-D1-compatible output
1175
+
1176
+**-svcd**
1177
+    (480x480 NTSC, 480x576 PAL) Super VideoCD-compatible output
1178
+
1179
+**-dvd-vcd**
1180
+    (352x240 NTSC, 352x288 PAL) VCD-on-DVD output
1181
+
1182
+**-vcd**
1183
+    (352x240 NTSC, 352x288 PAL) VideoCD-compatible output
1184
+
1185
+Non-standard formats, playable in some DVD players:
1186
+
1187
+**-kvcd**
1188
+    (352x240 NTSC, 352x288 PAL) KVCD-enhanced long-playing video CD
1189
+
1190
+**-kdvd**
1191
+    (720x480 NTSC, 720x576 PAL) KVCD-enhanced long-playing DVD
1192
+
1193
+**-kvcdx3**
1194
+    (528x480 NTSC, 520x576 PAL) KVCDx3 specification
1195
+
1196
+**-kvcdx3a**
1197
+    (544x480 NTSC, 544x576 PAL) KVCDx3a specification (slightly wider)
1198
+
1199
+**-bdvd**
1200
+    (720x480 NTSC, 720x576 PAL) BVCD-enhanced long-playing DVD
1201
+
1202
+See kvcd.net (http://kvcd.net/) for details on the KVCD specification. Please
1203
+note that KVCD ("K Video Compression Dynamics") is the name of a compression
1204
+scheme that can be applied to any MPEG-1 or MPEG-2 video, and has little to
1205
+do with VCD ("Video Compact Disc"), which is the name of a standard video disc
1206
+format.
1207
+
1208
+Advanced options
1209
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1210
+
1211
+Aspect ratios
1212
+-------------------------------------------------------------------------------
1213
+
1214
+tovid automatically determines aspect ratio of the input video by playing it in
1215
+mplayer. If your video plays with correct aspect in mplayer, you should not
1216
+need to override the default tovid behavior.
1217
+
1218
+If mplayer does not play your video with correct aspect, you may provide an
1219
+explicit aspect ratio in one of several ways:
1220
+
1221
+**-aspect** *WIDTH*:*HEIGHT*
1222
+    Custom aspect, where *WIDTH* and *HEIGHT* are integers.
1223
+
1224
+**-full**
1225
+    Same as **-aspect 4:3**
1226
+
1227
+**-wide**
1228
+    Same as **-aspect 16:9**
1229
+
1230
+**-panavision**
1231
+    Same as **-aspect 235:100**
1232
+
1233
+The above are the intended INPUT aspect ratio. tovid chooses an optimal output
1234
+aspect ratio for the selected disc format (VCD, DVD, etc.) and does the
1235
+appropriate letterboxing or anamorphic scaling. Use **-widetv** to encode
1236
+for a widescreen monitor or TV.
1237
+
1238
+Video stream options
1239
+-------------------------------------------------------------------------------
1240
+
1241
+**-quality** *NUM* (default 6)
1242
+    Desired output quality, on a scale of 1 to 10, with 10 giving the best
1243
+    quality at the expense of a larger output file. Default is 6. Output size
1244
+    can vary by approximately a factor of 4 (that is, **-quality 1** output
1245
+    can be 1/4 the size of **-quality 10** output). Your results may vary.
1246
+    WARNING: With **-quality 10**, the output bitrate may be too high for
1247
+    your hardware DVD player to handle. Stick with 9 or lower unless you
1248
+    have phenomenally good eyesight.
1249
+
1250
+    At present, this option affects both output bitrate and quantization (but
1251
+    may, in the future, affect other quality/size-related attributes). Use
1252
+    **-vbitrate** if you want to explicitly provide a maximum bitrate.
1253
+
1254
+**-vbitrate** *NUM*
1255
+    Maximum bitrate to use for video (in kbits/sec). Must be within allowable
1256
+    limits for the given format. Overrides default values. Ignored for VCD,
1257
+    which must be constant bitrate.
1258
+
1259
+**-interlaced**
1260
+    Do interlaced encoding of the input video (top fields first). Use this
1261
+    option if your video is  interlaced, and you want to preserve as much
1262
+    picture quality as possible. This option is ignored for VCD, which
1263
+    doesn't support it.
1264
+
1265
+    You can tell your source video is interlaced by playing it, and pausing
1266
+    during a scene with horizontal motion; if you see a "comb" effect at the
1267
+    edges of objects in the scene, you have interlaced video. Use this option
1268
+    to encode it properly.
1269
+
1270
+    If you would prefer to have output in progressive format, use
1271
+    **-progressive**. If you have a DV camera, use **-interlaced_bf** since
1272
+    DV footage is generally bottom fields first.
1273
+
1274
+**-interlaced_bf**
1275
+    Do interlaced encoding of the input video (bottom fields first).
1276
+
1277
+**-deinterlace** | **-progressive**
1278
+    Convert interlaced source video into progressive output video. Because
1279
+    deinterlacing works by averaging fields together, some picture quality is
1280
+    invariably lost. Uses an adaptive kernel deinterlacer (kerndeint), or,
1281
+    if that's not available, the libavcodec deinterlacer (lavcdeint).
1282
+
1283
+**-mkvsub** *LANG* (EXPERIMENTAL)
1284
+    Attempt to encode an integrated subtitle stream (such as may be found in
1285
+    Matroska .mkv files) in the given language code (eng, jpn, etc.) May work
1286
+    for other formats.
1287
+
1288
+**-autosubs**
1289
+    Automatically include subtitle files with the same name as the input video.
1290
+
1291
+**-subtitles** *FILE*
1292
+    Get subtitles from *FILE* and encode them into the video.  WARNING: This
1293
+    hard-codes the subtitles into the video, and you cannot turn them off while
1294
+    viewing the video. By default, no subtitles are loaded. If your video is
1295
+    already compliant with the chosen output format, it will be re-encoded to
1296
+    include the subtitles.
1297
+
1298
+**-type** {live|animation|bw}
1299
+    Optimize video encoding for different kinds of video. Use 'live' (default)
1300
+    for live-action video, use 'animation' for cartoons or anime, and 'bw' for
1301
+    black-and-white video.  This option currently only has an effect with
1302
+    KVCD/KSVCD output formats; other formats may support this in the future.
1303
+
1304
+**-safe** *PERCENT*
1305
+    Fit the video within a safe area defined by *PERCENT*. For example,
1306
+    **-safe 90%** will scale the video to 90% of the width/height of the output
1307
+    resolution, and pad the edges with a black border. Use this if some of the
1308
+    picture is cut off when played on your TV.  The percent sign is optional.
1309
+
1310
+**-filters** {none,denoise,deblock,contrast,all} (default none)
1311
+    Apply post-processing filters to enhance the video. If your input video is
1312
+    very high quality, use 'none'. If your input video is grainy, use 'denoise';
1313
+    if it looks washed out or faded, use 'contrast'. You can use multiple
1314
+    filters separated by commas. To apply all filters, use 'all'.
1315
+
1316
+**-fps** *RATIO*
1317
+    Force input video to be interpreted as *RATIO* frames per second.  May be
1318
+    necessary for some ASF, MOV, or other videos. *RATIO* should be an
1319
+    integer ratio such as "24000:1001" (23.976fps), "30000:1001" (29.97fps), or
1320
+    "25:1" (25fps). This option is temporary, and may disappear in future
1321
+    releases. (Hint: To convert a decimal like 23.976 to an integer ratio, just
1322
+    multiply by 1000, i.e. 23976:1000)
1323
+
1324
+**-crop** *WIDTH*:*HEIGHT*:*X*:*Y*
1325
+    Crop a portion of the video *WIDTH* by *HEIGHT* in size, with the
1326
+    top-left corner at *X*, *Y*.
1327
+
1328
+**-widetv**
1329
+    Always encode to 16:9 widescreen (only supported by **-dvd**, **-kdvd**,
1330
+    **-bdvd**), for optimal viewing on a widescreen monitor or TV.
1331
+
1332
+Audio stream options
1333
+-------------------------------------------------------------------------------
1334
+
1335
+**-normalize**
1336
+    Analyze the audio stream and then normalize the volume of the audio.
1337
+    This is useful if the audio is too quiet or too loud, or you want to
1338
+    make volume consistent for a bunch of videos. Similar to running
1339
+    normalize without any parameters. The default is -12dB average level
1340
+    with 0dB gain.
1341
+
1342
+**-amplitude** *NUM[dB]*
1343
+    In addition to analyzing and normalizing, apply the gain to the audio
1344
+    such that the 'average' (RMS) sound level is *NUM*. Valid values
1345
+    range 0.0 - 1.0, with 0.0 being silent and 1.0 being full scale. Use
1346
+    *NUMdB* for a decibel gain below full scale (the default without
1347
+    **-amplitude** is -12dB).
1348
+
1349
+**-abitrate** *NUM*
1350
+    Encode audio at *NUM* kilobits per second.  Reasonable values include
1351
+    128, 224, and 384. The default is 224 kbits/sec, good enough for most
1352
+    encodings. The value must be within the allowable range for the chosen disc
1353
+    format; Ignored for VCD, which must be 224.
1354
+
1355
+**-audiotrack** *NUM*
1356
+    Encode the given audio track, if the input video has multiple audio tracks.
1357
+    *NUM* is *1* for the first track, *2* for the second, etc. You may
1358
+    also provide a list of tracks, separated by spaces or commas, for example
1359
+    **-audiotrack 3,1,2**. Use **tovid id** on your source video to determine
1360
+    which audio tracks it contains.
1361
+
1362
+**-downmix**
1363
+    Encode all audio tracks as stereo.  This can save space on your DVD if
1364
+    your player only does stereo.  The default behavior of tovid is to use
1365
+    the original number of channels in each track.  For aac audio, downmixing
1366
+    is not possible: tovid runs a quick 1 frame test to try to downmix the
1367
+    input track with the largest number of channels, and if it fails then it
1368
+    will revert to the default behavior of using the original channels.
1369
+
1370
+**-async** *NUM*
1371
+    Adjust audio synchronization by *NUM* seconds.
1372
+
1373
+Other options
1374
+-------------------------------------------------------------------------------
1375
+
1376
+**-config** *FILE*
1377
+    Read configuration from *FILE*, containing 'tovid' alone on the first
1378
+    line, and free-formatted (whitespace-separated) tovid command-line options
1379
+    on remaining lines.
1380
+
1381
+**-force**
1382
+    Force encoding of already-compliant video or audio streams.
1383
+
1384
+**-overwrite**
1385
+    Overwrite any existing output files (with the same name as the given
1386
+    **-out** option).
1387
+
1388
+**-priority** {low|medium|high}
1389
+    Sets the main encoding process to the given priority. With high priority,
1390
+    it may take other programs longer to load and respond. With lower priority,
1391
+    other programs will be more responsive, but encoding may take 30-40%
1392
+    longer.  The default is high priority.
1393
+
1394
+**-discsize** *NUM*
1395
+    When encoding, tovid automatically splits the output file into several
1396
+    pieces if it exceeds the size of the target media. This option sets the
1397
+    desired target DVD/CD-R size to *NUM* mebibytes (MiB, 2^20). By default,
1398
+    splitting occurs at 700 for CD, 4300 for DVD. Use higher values at your
1399
+    own risk. Use 650 or lower if you plan to burn to smaller-capacity CDs.
1400
+    Doesn't work with the **-ffmpeg** option.
1401
+
1402
+**-fit** *NUM*
1403
+    Fit the output file into *NUM* MiB. Rather than using default (or
1404
+    specified) video bitrates, tovid will calculate the correct video bitrate
1405
+    that will limit the final output size to *NUM* MiB. This is different
1406
+    than **-discsize**, which cuts the final file into *NUM* MiB pieces.
1407
+    **-fit** makes sure that the file never exceeds *NUM* MiB. This works
1408
+    with **-ffmpeg**, but not with **-vcd** since VCDs have a standardized
1409
+    constant bitrate.
1410
+
1411
+**-parallel**
1412
+    Perform ripping, encoding, and multiplexing processes in parallel using
1413
+    named pipes. Maximizes CPU utilization and minimizes disk usage. Note that
1414
+    this option simply does more tasks simultaneously, in order to make better
1415
+    use of available CPU cycles; it's unrelated to multi-CPU processing (which
1416
+    is done automatically anyway). Has no effect when **-ffmpeg** is used.
1417
+
1418
+**-update** *SECS*
1419
+    Print status updates at intervals of *SECS* seconds. This affects how
1420
+    regularly the progress-meter is updated. The default is once every five
1421
+    seconds.
1422
+
1423
+**-mplayeropts** "**OPTIONS**"
1424
+    Append *OPTIONS* to the mplayer command run during video encoding.  Use
1425
+    this if you want to add specific video filters (documented in the mplayer
1426
+    manual page). Overriding some options will cause encoding to fail, so use
1427
+    this with caution!
1428
+
1429
+**-nofifo** (EXPERIMENTAL)
1430
+    Do not use a FIFO pipe for video encoding. If you are getting "Broken pipe"
1431
+    errors with normal encoding, try this option.  WARNING: This uses lots of
1432
+    disk space (about 2 GB per minute of video).
1433
+
1434
+**-keepfiles**
1435
+    Keep the intermediate files after encoding. Usually, this means the audio
1436
+    and video streams are kept (eg the .ac3 and .m2v files for an NTSC DVD).
1437
+    This doesn't work with **-parallel** because the intermediate files are named
1438
+    pipes, and not real files.
1439
+
1440
+**-slice** *START*-*END*
1441
+    Encode a segment from *START* to *END* (in seconds). Only works with
1442
+    **-ffmpeg**.
1443
+
1444
+**-from-gui**
1445
+    Put makempg into a fully non-interactive state, suitable for calling from
1446
+    a gui.
1447
+
1448
+**-noask**
1449
+    Don't ask questions when choices need to be made. Assume reasonable
1450
+    answers.
1451
+
1452
+
1453
+.. _command-id:
1454
+
1455
+Command:id
1456
+===============================================================================
1457
+
1458
+**tovid id** identifies each multimedia video file in a
1459
+list, and reports its compliance with video disc standards such as VCD,
1460
+SVCD, and DVD.
1461
+
1462
+Usage
1463
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1464
+
1465
+::
1466
+
1467
+ tovid id [OPTIONS] VIDEO_FILE(s)
1468
+
1469
+For example:
1470
+
1471
+``tovid id foo.avi``
1472
+``tovid id -tabluar videos/*.mpg``
1473
+
1474
+Options
1475
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1476
+
1477
+**-terse**
1478
+    Print raw video characteristics, no formatting. Helpful when
1479
+    calling from other scripts.
1480
+
1481
+**-verbose**
1482
+    Print extra information from mplayer, tcprobe, and ffmpeg.
1483
+
1484
+**-accurate**
1485
+    Do lengthy play-time estimation by scanning through the entire video file.
1486
+    Use this if the default behavior is giving you inaccurate play times.
1487
+
1488
+**-fast**
1489
+    Skip lengthy play-time estimation, and go with what mplayer reports
1490
+    as being the video duration. Unlike pre-0.32 versions of tovid, this
1491
+    is now the default behavior, and the **-fast** option doesn't do anything.
1492
+
1493
+**-tabular**
1494
+    Display output in a table format for easier comparison. Most useful
1495
+    when identifying multiple video files.
1496
+
1497
+**-isformat** [pal-dvd|ntsc-dvd] (same syntax for vcd and svcd)
1498
+    Check *VIDEO_FILE* for compliance with the given disc format.
1499
+    If *VIDEO_FILE* matches the given format, then **tovid id** reports "true"
1500
+    and exits successfully. Otherwise, **tovid id** reports "false" and exits
1501
+    with status 1 (failure).  This checks and reports both vcd/svcd/dvd
1502
+    and pal/ntsc.
1503
+
1504
+Examples
1505
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1506
+
1507
+``tovid id -verbose homevideo.avi``
1508
+    Report everything mplayer, ffmpeg, and transcode can determine about
1509
+    homevideo.avi.
1510
+
1511
+``tovid id -isformat dvd homevideo.mpg``
1512
+    Check to see if homevideo.mpg is compliant with the DVD standard.
1513
+
1514
+
1515
+.. _command-menu:
1516
+
1517
+Command:menu
1518
+===============================================================================
1519
+
1520
+**tovid menu** generates textual (S)VCD- or DVD-compliant MPEG videos for use
1521
+as navigational menus, given a list of text strings to use for title names. You
1522
+can customize the menu by providing an optional background image or audio clip,
1523
+or by using custom font and font color.
1524
+
1525
+Usage
1526
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1527
+
1528
+::
1529
+
1530
+ tovid menu [OPTIONS] TITLES -out OUT_PREFIX
1531
+
1532
+For example:
1533
+
1534
+``tovid menu "Season One" "Season Two" "Featurettes" -out MainMenu``
1535
+
1536
+Options
1537
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1538
+
1539
+**-ntsc** (default)
1540
+    Generate an NTSC-format menu
1541
+
1542
+**-ntscfilm**
1543
+    Generate an NTSC-format menu (24000/1001fps)
1544
+
1545
+**-pal**
1546
+    Generate a PAL-format menu
1547
+
1548
+**-dvd** (default)
1549
+    Generate a DVD-format menu, with highlighted text included
1550
+    as a multiplexed subtitle stream.
1551
+
1552
+**-vcd** or **-svcd**
1553
+    Generate a VCD/SVCD menu; each menu option will have a
1554
+    number associated with it. You can have up to nine menu
1555
+    options per menu.
1556
+
1557
+Menu background/audio options:
1558
+
1559
+**-background** *IMAGE*
1560
+    Use *IMAGE* (in most any graphic format) as a background. If image is not
1561
+    the correct aspect ratio (4:3), it will be scaled and/or cropped,
1562
+    depending on the **-crop** and **-scale** options. If no background is
1563
+    supplied, a default background will be created.
1564
+
1565
+**-crop** (default)
1566
+    If provided background image is not 4:3 aspect ratio, crop edges
1567
+    to make it so. Image will be scaled up if it is too small. Cropping
1568
+    keeps the center area of image. If you want to do cropping/scaling
1569
+    yourself in another program, provide an image of 768x576 pixels.
1570
+
1571
+**-scale**
1572
+    If provided background image is not 4:3 aspect ratio, scale/stretch
1573
+    it to make it fit. May cause visible distortion!
1574
+
1575
+**-audio** *AUDIOFILE*
1576
+    Use *AUDIOFILE* (in most any audio format) for background music. The
1577
+    menu will play for long enough to hear the whole audio clip. If
1578
+    one is not provided, 4 seconds of silence will be used.
1579
+
1580
+**-length** *NUM*
1581
+    Make the menu *NUM* seconds long. Useful for menus with **-audio**:
1582
+    if you don't want the entire *AUDIOFILE* in the menu, then you can trim
1583
+    the length of the menu with **-length**.
1584
+
1585
+Menu text options:
1586
+
1587
+**-menu-title** "*MENU TITLE TEXT*"
1588
+    Add *MENU TITLE TEXT* as a title/header to the menu.
1589
+
1590
+**-font** *FONTNAME* (default Helvetica)
1591
+    Use *FONTNAME* for the menu text. Run 'convert -list type' to see a
1592
+    list of the fonts that you can use; choose a font name from the
1593
+    leftmost column that is displayed. Or you can specify a ttf font file instead.
1594
+    E.g., **-font /path/to/myfont.ttf**.
1595
+
1596
+**-fontsize** *NUM* (default 24)
1597
+    Sets the size for the font to *NUM* pixels.
1598
+
1599
+**-menu-title-fontsize** *NUM* (default **-fontsize** + 8)
1600
+    Sets the size of the menu title.
1601
+
1602
+**-fontdeco** '*FONTDECORATION*'
1603
+    Sets the font decoration method to *FONTDECORATION*. It is used by the
1604
+    'convert' ImageMagick command to draw the menu text. You can add colored
1605
+    text outlines, gradient fills, and many others. See **Usage notes**.
1606
+
1607
+**-align** {left|center|middle|right}
1608
+    Align the text at the top left, top center, very middle, or top right
1609
+    side of the screen. You may also substitute any "gravity" keyword
1610
+    allowed by ImageMagick (north|south|east|west|northeast|southwest|...).
1611
+
1612
+**-textcolor** {#RRGGBB|#RGB|COLORNAME}
1613
+    Use specified color for menu text. #RRGGBB and #RGB are
1614
+    hexadecimal triplets (e.g., #FF8035). COLORNAME may be any of
1615
+    several hundred named colors; run 'convert -list color' to see them.
1616
+    White (#FFF) is the default color.
1617
+
1618
+DVD-only options:
1619
+
1620
+**-button** *BUTTON* (default '>')
1621
+    Specify the button used for menu selection. Specify either a *single*
1622
+    character or one of the shortcuts:
1623
+
1624
+    **play**
1625
+        Use a button shaped like 'Play' on many A/V electronics:
1626
+        a triangle pointing to the right. (uses the font Webdings)
1627
+    **movie**
1628
+        Use a button shaped like an old movie projector.
1629
+        (uses the font Webdings)
1630
+    **utf8**
1631
+        Use your own non-keyboard character as a button. Provide
1632
+        only the four hex digits: eg **-button utf8 00b7**. Beware that
1633
+        ImageMagick's utf8 characters aren't the same as those drawn in
1634
+        character browsers like gucharmap.
1635
+
1636
+**-highlightcolor** {#RRGGBB|#RGB|COLORNAME}
1637
+    Use the specified color for button highlighting. Yellow (#FF0) is the
1638
+    default color.
1639
+
1640
+**-selectcolor** {#RRGGBB|#RGB|COLORNAME}
1641
+    Use the specified color for button selections (when a menu item is played
1642
+    or activated). Red (#F00) is the default color.
1643
+
1644
+**-button-outline** {#RRGGBB|#RGB|COLORNAME}
1645
+    Outline buttons with the specified color. 'none' is the default.
1646
+
1647
+**-button-font** *FONTNAME*
1648
+    Specify a differnt font to use for the buttons. By default, the button
1649
+    font will be inherited from the title font (see **-font**). Use this
1650
+    option to use a different font for the buttons. The button font size is
1651
+    inherited from **-fontsize** and cannot be changed.
1652
+
1653
+Other options:
1654
+
1655
+**-debug**
1656
+    Print extra debugging information to the log file. Useful in
1657
+    diagnosing problems if they occur. This option also leaves
1658
+    the log file (with a .log extension) in the directory after
1659
+    encoding finishes as well as all the temporary files created.
1660
+
1661
+**-nosafearea**
1662
+    Do not attempt to put text inside a TV-safe viewing area. Most
1663
+    television sets cut off about 10% of the image border, so the script
1664
+    automatically leaves a substantial margin. This option turns that
1665
+    behavior off, leaving only a tiny margin. Use at your own risk.
1666
+
1667
+**-overwrite**
1668
+    Overwrite any existing output menu.
1669
+
1670
+**-noask**
1671
+    Don't ask interactive questions, and assume answers that will
1672
+    continue making the menu until completion.
1673
+
1674
+**-quiet**
1675
+    Limit output to essential messages.
1676
+
1677
+If the word "**back**" is given as an episode title, a "back" button for
1678
+returning to a higher-level menu will be added at the end of the list
1679
+of titles. "**Back**" *must be the last title listed*.
1680
+
1681
+Examples
1682
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1683
+
1684
+Make an NTSC VCD menu with white Helvetica text containing three centered
1685
+selections: Episode 1, Episode 2, and Episode 3. The finished menu will be
1686
+called Season-1.mpg::
1687
+
1688
+ $ tovid menu -ntsc -vcd \
1689
+    -align center -textcolor white -font "Helvetica" \
1690
+    "Episode 1" "Episode 2" "Episode 3" \
1691
+    -out "Season-1"
1692
+
1693
+Make an NTSC DVD menu with white Kirsty text containing three lower-left
1694
+aligned selections: Episode 1, Episode 2, and Episode 3. Items under the cursor
1695
+will be highlighted a pale blue, and selected items will be a pale orange
1696
+(before going to the selected title). The finished menu will be called
1697
+Main-menu.mpg::
1698
+
1699
+ $ tovid menu -ntsc -dvd \
1700
+    -align southwest \
1701
+    -textcolor white \
1702
+    -highlightcolor "#5f65ff" \
1703
+    -selectcolor "#ffac5f" \
1704
+    -font "Kirsty" \
1705
+    "Episode 1" "Episode 2" "Episode 3" \
1706
+    -out "Main_menu"
1707
+
1708
+Usage notes
1709
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1710
+
1711
+The argument given to **-font** must be one of the fonts listed by the command
1712
+'convert -list type'. Please note that many of your installed fonts may not be
1713
+available; if you want to maximize the number of fonts available, download and
1714
+run Anthony Thyssen's (http://www.cit.gu.edu.au/~anthony/anthony.html)
1715
+imagick_type_gen.pl (http://www.cit.gu.edu.au/~anthony/software/imagick_type_gen.pl)
1716
+script and run it like this::
1717
+
1718
+    imagick_type_gen.pl > ~/.magick/type.xml.
1719
+
1720
+If that doesn't work, try::
1721
+
1722
+    imagick_type_gen.pl > ~/.magick/type.mgk.
1723
+
1724
+Or you can specify a ttf font file directly to the **-font** options if you
1725
+don't want to install fonts to ImageMagick.
1726
+
1727
+The **-fontdeco** option is quite flexible and takes a lot of ImageMagick's
1728
+*convert* options. Please refer to the tovid wiki
1729
+(http://tovid.wikia.com/wiki/Making_a_DVD_with_text_menus)
1730
+and Anthony Thyssen's guide for further explanation and examples.
1731
+
1732
+
1733
+.. _command-xml:
1734
+
1735
+Command:xml
1736
+===============================================================================
1737
+
1738
+**tovid xml** generates XML output describing an (S)VCD
1739
+or DVD file structure and navigation hierarchy in the format expected by
1740
+dvdauthor (http://dvdauthor.sourceforge.net/) or
1741
+vcdxbuild (http://www.vcdimager.org/).
1742
+
1743
+Usage
1744
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1745
+
1746
+::
1747
+
1748
+ tovid xml [OPTIONS] VIDEOS -out OUTFILE
1749
+
1750
+For example::
1751
+
1752
+ tovid xml -menu MainMenu.mpg \
1753
+   Season1.mpg Season2.mpg Featurettes.mpg \
1754
+   -out MyDisc
1755
+
1756
+Options
1757
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1758
+
1759
+**-dvd** (default)
1760
+    Generate the XML for a DVD disc, to be used with dvdauthor or **tovid dvd**.
1761
+
1762
+**-vcd**
1763
+    Generate the XML for a VCD disc, to be used with vcdxbuild or **tovid vcd**.
1764
+
1765
+**-svcd**
1766
+    Generate the XML for an SVCD disc, to be used with vcdxbuild or **tovid vcd**.
1767
+
1768
+**-overwrite**
1769
+    Overwrite any existing output files.
1770
+
1771
+**-quiet**
1772
+    Limit output to essential messages.
1773
+
1774
+*VIDEOS* may be any of the following:
1775
+
1776
+*<file list>*
1777
+    List of one or more video files to include, separated by spaces. At
1778
+    minimum, a DVD must have one video file. You can use shell wildcards
1779
+    (i.e., "\*.mpg") to include multiple files easily. Put filenames in
1780
+    quotes if they have spaces in them.
1781
+
1782
+**-menu** *VIDEO* *<file list>*
1783
+    Use video file *VIDEO* as a menu from which you can jump to each of
1784
+    the listed video files. If you have multiple menus, include a
1785
+    top menu so they are reachable.
1786
+
1787
+**-slides** *<file list>*
1788
+    Create a slide-show of still images
1789
+
1790
+DVD-only options
1791
+
1792
+**-group** *<file list>* **-endgroup**
1793
+    (DVD only) List of video files to include as one single title. This is useful
1794
+    if you have split a movie into several video files.
1795
+
1796
+**-topmenu** *VIDEO* [**-menu** *VIDEO* *<file list>*] [**-menu** *VIDEO* *<file list>*]...
1797
+    (DVD only) Use video file *VIDEO* for the top-level (VMGM) menu. The
1798
+    top menu will jump to each of the subsequent [-menu...] videos listed.
1799
+    Use this only if you have multiple sub-menus to jump to. You can only
1800
+    have one top menu.
1801
+
1802
+**-titlesets**
1803
+    (DVD only) Forces the creation of a separate titleset per title. This
1804
+    is useful if the titles of a DVD have different video formats,
1805
+    e.g. PAL + NTSC or 4:3 + 16:9. If used with menus, there must be a
1806
+    **-topmenu** option that specifies a menu file with an entry for each of the
1807
+    titlesets.
1808
+
1809
+**-chapters** *INTERVAL*
1810
+    (DVD only) Creates a chapter every *INTERVAL* minutes (default 5 minutes:
1811
+    without **-chapters**, each movie will be divided into 5-minute chapters).
1812
+    This option can be put at any position in a *<file list>* and is valid
1813
+    for all subsequent titles until a new **-chapters** option is encountered.
1814
+    Using this option may take some time, since the duration of the video is
1815
+    calculated.
1816
+
1817
+**-nochapters**
1818
+    (DVD only) Don't create chapters for the videos.
1819
+
1820
+*OUT_PREFIX* is the file that will receive the resulting XML.
1821
+
1822
+Usage notes
1823
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1824
+
1825
+The 'xml' command checks to make sure the video filenames you
1826
+give it exist, but it does not check whether they are valid for the
1827
+chosen disc format. MPEG videos of menus should have the specified
1828
+number of buttons for reaching each of the videos, and, if you're
1829
+using DVD, should be multiplexed with their corresponding subtitles
1830
+using spumux of the dvdauthor 0.6.0 package prior to
1831
+authoring using dvdauthor. If you use the 'tovid menu'
1832
+component to generate the menu, this should all be handled for you.
1833
+
1834
+Examples
1835
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1836
+
1837
+``tovid xml -dvd title-1.mpg title-2.mpg title-3.mpg -out My_DVD``
1838
+    Make a DVD without a menu. Title 1, 2, and 3 will play in sequence.
1839
+
1840
+``tovid xml -dvd -group chapter-1.mpg chapter-2.mpg chapter-3.mpg -endgroup -out My_DVD``
1841
+    Group the file chapter-1|2|3.mpg into one title and make a DVD without a menu.
1842
+
1843
+``tovid xml -dvd -menu main_menu.mpg -chapters 3 movie-1.mpg -chapters 10 movie-2.mpg -out My_DVD``
1844
+    Make a DVD with a main menu that points to two movies, with movie-1.mpg
1845
+    divided into 3-minute chapters, and movie-2.mpg into 10-minute chapters.
1846
+
1847
+
1848
+.. _command-dvd:
1849
+
1850
+Command:dvd
1851
+===============================================================================
1852
+
1853
+**tovid dvd** takes a dvdauthor XML file (as generated by the **tovid xml**
1854
+command) and authors a DVD filesytem. This command can also burn a DVD disc
1855
+from either the XML file or from an existing DVD file-system.
1856
+
1857
+To ensure that this script successfully executes, please run it from a
1858
+directory with plenty of free space. "Plenty" would be 10 GB for single-layer
1859
+discs, and 20 GB for dual-layer discs.  Running this program may slow down your
1860
+other applications, due to intense disk activity.
1861
+
1862
+Usage
1863
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1864
+
1865
+::
1866
+
1867
+ tovid dvd [OPTIONS] FILE.xml
1868
+ tovid dvd [OPTIONS] DVD_DIR
1869
+
1870
+For example:
1871
+
1872
+``tovid dvd -burn MyDisc.xml``
1873
+``tovid dvd -burn /path/to/DVD/directory``
1874
+
1875
+Options
1876
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1877
+
1878
+**-author**
1879
+    Author the DVD described by *FILE.xml*. Overwrites an existing
1880
+    directory containing the dvdauthor output if already present.
1881
+
1882
+**-burn**
1883
+    Burn a DVD file-system in *DVD_DIR* (must contain a VIDEO_TS folder).
1884
+
1885
+**-device** *DEVICE* (default /dev/dvdrw)
1886
+    Burn the disc image to *DEVICE*, the Linux device file-system
1887
+    name of your DVD-recorder. Common examples might be /dev/dvdrw,
1888
+    /dev/scd1, and /dev/hdc. You can also use a bus/id/lun triple
1889
+    such as ATAPI:0,1,0
1890
+
1891
+**-speed** *NUM* (default 1)
1892
+    Burn disc at speed *NUM*.
1893
+
1894
+**-label** *DISC_LABEL*
1895
+    Uses *DISC_LABEL* as the volume ID. This appears as the mount
1896
+    name of the disc on some computer platforms. Must be <=32
1897
+    alphanumeric digits without spaces.
1898
+
1899
+**-quiet**
1900
+    Limit output to essential messages.
1901
+
1902
+**-noask**
1903
+    Don't ask interactive questions and assume answers that will continue
1904
+    execution.
1905
+
1906
+Examples
1907
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1908
+
1909
+``tovid dvd -burn -device /dev/dvdrw foo.xml``
1910
+    Author the dvd file-system and burn to /dev/dvdrw. This will
1911
+    automatically call dvdauthor to make the file-system. **-author**
1912
+    is not explicitly needed. If there's an existing file-system, it
1913
+    will be burned.
1914
+
1915
+``tovid dvd -author foo.xml``
1916
+    Author the DVD file-system and exit without burning. If the output
1917
+    directory given in foo.xml already exists, then the contents are
1918
+    removed before authoring. At this point, the DVD can be previewed
1919
+    by calling ``xine dvd:/path/to/output/directory``.
1920
+
1921
+
1922
+.. _command-vcd:
1923
+
1924
+Command:vcd
1925
+===============================================================================
1926
+
1927
+**tovid vcd** takes an XML file (which may be generated by **tovid xml**) and
1928
+creates a cue/bin (S)VCD image. It can also burn (S)VCD discs.
1929
+
1930
+To ensure that this script successfully executes, please run it from a directory
1931
+with plenty of free space. "Plenty" would be about 1 GB. Running this program
1932
+may slow down your other applications, due to intense disk activity.
1933
+
1934
+Usage
1935
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1936
+
1937
+::
1938
+
1939
+ tovid vcd [OPTIONS] VCDIMAGER.xml
1940
+
1941
+For example:
1942
+
1943
+``tovid vcd -burn MyDisc.xml``
1944
+
1945
+Options
1946
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1947
+
1948
+**-overwrite** (default off -- nothing is overwritten)
1949
+    Overwrite any existing cue/bin files matching *VCDIMAGER.xml*. Useful
1950
+    if you modified the xml file and wish to re-image or burn the new (S)VCD.
1951
+
1952
+**-burn** (default off -- no images are burned)
1953
+    Burn the (S)VCD described by *VCDIMAGER.xml*.
1954
+
1955
+**-device** *DEVICE* (default /dev/cdrw)
1956
+    Burn the disc image to *DEVICE*, the Linux device file-system
1957
+    name of your CD-recorder. Common examples might be /dev/cdrw,
1958
+    /dev/scd1, and /dev/hdc.
1959
+
1960
+**-speed** *NUM* (default 12)
1961
+    Burn the disc at speed *NUM*.
1962
+
1963
+**-quiet**
1964
+    Limit output to essential messages.
1965
+
1966
+Examples
1967
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1968
+
1969
+``tovid vcd -burn -device /dev/cdrw foo.xml``
1970
+    Create the (S)VCD image and burn it to /dev/cdrw. This will
1971
+    automatically call vcdxbuild to make the image. If there is an existing
1972
+    image, it will be burned.
1973
+
1974
+``tovid vcd -overwrite foo.xml``
1975
+    Create the (S)VCD image and exit without burning. If the image
1976
+    already exists, then it is removed before re-imaging.
1977
+
1978
+
1979
+.. _command-postproc:
1980
+
1981
+Command:postproc
1982
+===============================================================================
1983
+
1984
+**tovid postproc** is designed to do simple post-processing on MPEG video files, such
1985
+as those generated by tovid. It can adjust audio/video sync, and re-quantize
1986
+(shrink) without re-encoding.
1987
+
1988
+Usage
1989
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1990
+
1991
+::
1992
+
1993
+ tovid postproc [OPTIONS] IN_FILE OUT_FILE
1994
+
1995
+Options
1996
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1997
+
1998
+**-audiodelay** *NUM*
1999
+    Delay the audio stream by *NUM* milliseconds. Use this if
2000
+    your final output has audio that is not synced with the
2001
+    video. For example, if the audio comes 2 seconds sooner than
2002
+    the video, use **-audiodelay 2000**. Use a negative number for
2003
+    audio that comes later than the video.
2004
+
2005
+**-normalize**
2006
+    Analyze the audio stream and then normalize the volume of the audio.
2007
+    This is useful if the audio is too quiet or too loud, or you want to
2008
+    make volume consistent for a bunch of videos. Similar to running
2009
+    normalize without any parameters. The default is -12dB average level
2010
+    with 0dB gain.
2011
+
2012
+**-amplitude** *NUM[dB]*
2013
+    In addition to analyzing and normalizing, apply the gain to the audio
2014
+    such that the 'average' (RMS) sound level is *NUM*. Valid values
2015
+    range 0.0 - 1.0, with 0.0 being silent and 1.0 being full scale. Use
2016
+    *NUMdB[dB]* for a decibel gain below full scale (the default without
2017
+    -amplitude is -12dB).
2018
+
2019
+**-shrink** *NUM*
2020
+    Shrink the video stream by a factor of *NUM*. May be a decimal
2021
+    value. A value of 1.0 means the video will be the same size;
2022
+    larger values cause more reduction in size. Beyond 2.0, the
2023
+    returns are diminishing.
2024
+
2025
+**-parallel**
2026
+    Run all processes in parallel and pipe into multiplexer, should
2027
+    increase speed significantly.
2028
+
2029
+**-debug**
2030
+    Save output in a temporary file, for later viewing if
2031
+    something goes wrong.
2032
+
2033
+Contact
2034
+===============================================================================
2035
+
2036
+For further assistance, contact information, forum and IRC links,
2037
+please refer to the tovid homepage (http://tovid.wikia.com/).
2038
+
2039
tovid-0.33.tar.bz2/docs/src/en/tovid.t2t -> tovid-0.34.tar.bz2/docs/src/en/tovid.t2t Changed
278
 
1
@@ -34,6 +34,8 @@
2
 
3
 : **gui**
4
     Start the tovid GUI (was **todiscgui**. See **Command:gui**)
5
+: **titlesets**
6
+    A tovid GUI wizard for multiple titlesets. (new: See **Command:titlesets**)
7
 : **disc**
8
     Create a DVD with menus (was **todisc**. See **Command:disc**)
9
 : **mpg**
10
@@ -50,7 +52,11 @@
11
     Author and/or burn a VCD (was **makevcd**. See **Command:vcd**)
12
 : **postproc**
13
     Post-process an MPEG video file (was **postproc**. See **Command:postproc**)
14
-
15
+: **chapters**
16
+    A GUI using mplayer for setting chapter points.  It will return a string of
17
+    chapter points in a format recognized by 'tovid disc' (todisc) or
18
+    by 'tovid gui', for the  **-chapters** option.
19
+    
20
 
21
 The //OPTIONS// differ for each command; run **tovid <command>** with no
22
 further arguments to get help on a command, and what options it expects.
23
@@ -64,9 +70,9 @@
24
 : **~/.tovid/preferences**
25
     Defines working directory for all scripts.
26
     In addition you can define the output directory for makempg here.
27
-: **~/.tovid/tovid.config**
28
-    Includes command-line options that should always be passed to
29
-    makempg.
30
+: **~/.tovid/tovid.ini**
31
+    Includes command-line options that should be passed to the various
32
+    **tovid** sub-commands.
33
 
34
 Edit these files if you wish to change your configuration.
35
 
36
@@ -81,9 +87,17 @@
37
 the easiest way to start creating DVDs with tovid. At this time, there are no
38
 additional command-line options; the GUI controls take care of everything,
39
 and all help is integrated in the form of tooltips.  You can also see
40
-**Command:disc ** for more detail about the options.  Note: one limitation of
41
-the gui at present is that it does not do multiple titlesets (though it will do
42
-chapter menus).  Use the **tovid disc** command (below) for titlesets.
43
+**Command:disc ** for more detail about the options.  Note: if you wish to
44
+make multiple titlesets on the same DVD use 'tovid titlesets', which is a wizard
45
+that uses the the tovid GUI.  Chapter submenus can be made with 'tovid gui'
46
+however.
47
+
48
+
49
+=Command:titlesets=
50
+
51
+**tovid titlesets** will assist in making a DVD with multiple titlesets.  It can
52
+be started without any options, or you can feed it the path to a saved titleset
53
+script as an option.
54
 
55
 
56
 =Command:disc=
57
@@ -287,7 +301,7 @@
58
     **-interlaced**, **-interlaced_bf**, **-type**, **-fit**, **-discsize**,
59
     **-parallel**, **-mkvsub**, **-autosubs**, **-subtitles**, **-update**, \
60
     **-mplayeropts**, **-audiotrack**, **-downmix**, **-ffmpeg**, **-nofifo**,
61
-    **-from-gui**, **-slice**, **-async**, **-quiet**,
62
+    **-from-gui**, **-slice**, **-quiet**,
63
     **-fake**, **-keepfiles**
64
 
65
 ==Options==
66
@@ -319,9 +333,9 @@
67
     This is a different arrangement of images for the menu: small thumbnails
68
     go at left (and right) side of screen, with a larger image in the centre.
69
     Maximum of 10 videos.  If the provided argument is a video file, the
70
-    central thumb will be animated.  Pick a file of correct aspect ratio:
71
-    i.e. it should still look good when resized to 720x480 (PAL 720x576),
72
-    then resized to proper aspect ratio.
73
+    central thumb will be animated. Only 4:3 or 16:9 videos and images are
74
+    accepted for the showcase file: if not one of these todisc will assume it
75
+    is the same ratio as the videos in the titleset.
76
 : **-textmenu**, **-text-menu** NUM
77
     If used without an argument, create a textmenu out of the supplied titles
78
     The optional argument specifies how many titles are in the 1st column,
79
@@ -332,16 +346,17 @@
80
     If no video files for either **-background** or **-showcase** are supplied,
81
     the menu will be static.
82
 : **-quick-menu**
83
-    (Note: unfortunately ffmpeg's 'vhooks' have been removed, so this
84
-    option may not be available for you depending on your ffmpeg version)
85
-    This will make a very quick  menu by using ffmpeg instead of imagemagick.
86
+    If you are using ffmpeg 0.8 or newer you can use this option.  This will
87
+    make a very quick  menu by using ffmpeg instead of imagemagick.
88
     There are two choices: you can either use '-showcase IMAGE|VIDEO' or
89
     '-background VIDEO'.  There are no fancy effects like **-wave**
90
     or **-rotate** available for it, but it is extremely fast.  It will be a
91
     text-menu style of menu, with no video thumbs, and a central showcase
92
     IMAGE(static) | VIDEO(animated).
93
-    ( see **-bg-color** if you are not using a **-background** and want to
94
+    (i) see **-bg-color** if you are not using a **-background** and want to
95
     change the default black )
96
+    (ii) Note: todisc will still work with vhooks if you have an old ffmpeg with
97
+    vhooks compiled in.
98
 
99
     Specifying the IMAGE|VIDEO argument to **-showcase** is mandatory for this
100
     style of menu, unless used in conjunction with **-switched-menus**
101
@@ -356,26 +371,30 @@
102
     See **-switched-menus** for example of making switched menus with
103
     **-quick-menu**
104
 
105
-: **-bg-color** | **-bg-colour**
106
+: **-bg-color**, **-bg-colour**
107
     The color to use for the menu background. (default: ntsc-safe black)
108
     Note: use a color a great deal darker than you want, as it appears quite
109
     a bit lighter in the video version.  You can use hexadecimal ('#ffac5f')
110
     or named colors notation.
111
-: **-submenu-bg-color** | **-submenu-bg-colour**
112
+: **-submenu-bg-color**, **-submenu-bg-colour**
113
     The color to use as background for the  submenu(s).
114
     (default: ntsc-safe black)  See **-bg-color**
115
-: **-use-makemenu**
116
-    This will use **tovid menu** to create a menu with the provided titles.
117
 : **-static**
118
-    Main menu will just be static thumbs (not animated) (default: animated)
119
+    Main menu will consist of static thumbnail links. (default: animated)
120
+    If you use a video for -showcase or -background then it will still be
121
+    a 'moving' menu, in spite of the static buttons.  This option also does
122
+    double duty for the **-switched-menus** option, and will create static
123
+    "switched" images.
124
+    See also **-switched-menu**
125
 : **-background** IMAGE|VIDEO
126
     Menu background.  This can be a image file or an video file.  If it is a
127
     video file the background will be animated.  Pick a file of correct aspect
128
-    ratio: i.e. it should still look good when resized to 720x480 (PAL 720x576)
129
+    ratio: i.e. it should still look good when resized to 4:3 aspect ratio.
130
+    It will be resized to fill the entire background.
131
 : **-submenu-background** IMAGE
132
     Submenu background.  This can be only be an image file.  Pick a file of
133
     correct aspect ratio: i.e. it should still look good when resized to
134
-    720x480 (PAL 720x576)
135
+    4:3 aspect ratio.  It will be resized to fill the entire background.
136
 : **-menu-title**
137
     Title for the root menu - may be longer than thumbnail labels
138
     Also if you use \n in the title, you can use multi line titles, but you
139
@@ -436,7 +455,7 @@
140
     Any other options can be used, but the  menu will be a textmenu style by
141
     default.  **Hint**: use **-showcase** IMAGE/VIDEO to create a fancier
142
     VMGM menu.
143
-: **-no-vmgm-menu** | **-no-vmgm**
144
+: **-no-vmgm-menu**, **-no-vmgm**
145
   This will skip the creation of a VMGM ( root menu ) for titlesets. The DVD
146
   will start with the first titleset.  You can not use this option unless also
147
   using **-quick-nav** as you would not have a way to get to other titlesets.
148
@@ -455,6 +474,9 @@
149
     process can be greatly sped up by using **-quick-menu** in conjunction with
150
     this, though you will lose fancy options like **-rotate** and **-wave**.
151
 
152
+    Note that if you want to just have a static rather than an 'animated'
153
+    image, add **-static** to the command line.
154
+
155
     Example for using with **-quick-menu**:
156
 ```
157
     -switched-menus -quick-menu
158
@@ -570,7 +592,7 @@
159
     Frame the slides for the animated slideshow menu.  The default width
160
     without using an  argument is 12.  See also **-slide-frame-color**
161
 
162
-: **-slide-frame-color** | **-slide-frame-colour**
163
+: **-slide-frame-color**, **-slide-frame-colour**
164
     The color of the slide frame if passing **-slide-frame**.  The default if
165
     you don't use this option is a color-safe white: rgb(235,235,235).
166
 
167
@@ -580,18 +602,21 @@
168
     from each slideshow in the menu.  The thumb for each slideshow button will
169
     be static.  If you used with a mixed menu of videos and slideshows, then
170
     the video thumbs WILL be animated, so you may wish to use -static or
171
-    -textmenu with the option in that case.
172
+    -textmenu with the option in that case.  If you want to use the
173
+    **-switched-menus option with a mixed menu leave this option out. 
174
 
175
 : **-background-slideshow**, **-bg-slideshow**
176
     If doing multiple slideshows or mixed videos and slideshow(s), then use
177
     the animated slideshow as a background video.  See **-showcase-slideshow**
178
     for additional details.
179
+
180
 : **-no-confirm-backup**
181
     Slideshows are an experimental (but well tested) feature.  Todisc is
182
     unlikely to overwrite your personal files, but you should take precautions
183
     and backup your images, as you would with any beta software.  Todisc
184
     will prompt you to backup your files normally.  If you have already backed
185
     up your images, use this option to disable the prompt.
186
+
187
 : **-use-dvd-slideshow** [CONFIG FILE]
188
     If you pass this option without an argument, tovid will use the
189
     dvd-slideshow program to create the animated slide menu, assuming you have
190
@@ -687,7 +712,10 @@
191
     chapters.  Each title must be quoted, and the number of titles given
192
     must equal the total number of chapters for all videos.  In other words
193
     if you use -chapters 4 6 8 , you must give 18 chapter titles, in the same
194
-    order that the videos were passed in.
195
+    order that the videos were passed in.  Note: if you are passing in options
196
+    on the command line to the 'tovid disc' GUI, you must repeat the option
197
+    **-chapter-titles** for each video, accompanied by its respective chapter
198
+    titles. (you can also choose to use this syntax for the todisc script.)
199
 
200
 : **-chapter-font** FONT
201
     Use FONT as the font for submenu chapters.
202
@@ -706,6 +734,15 @@
203
     If using switched menus, the **-seek** value(s) will be used to generate
204
     the showcase image that displays on switching to another video choice with
205
     the up/down arrow keys.
206
+: **-fast-seek**
207
+    Use faster seek method for ffmpeg.  This is not as accurate as the default
208
+    method, and may produce grey frames.
209
+: **-frame-safe**  Instead of seeking and then outputting one frame for
210
+    previews and static menus, output 9 frames and choose the largest.  Not
211
+    frame accurate (may be as much as 9 frames off), but safer.  Choose this
212
+    if you are getting grey frames/thumbnails with some videos.  You can also
213
+    use it to try to get the 'best' frame.  This option
214
+    has no effect on submenus at present.
215
 : **-showcase-seek** NUM
216
     Seek to NUM seconds before generating thumbnails for showcase video
217
     (default: 2.0 seconds)
218
@@ -857,6 +894,11 @@
219
 
220
 
221
 ==Thumbnail Style==
222
+: **-user-thumbs** IMAGE
223
+    Supply your own images for menu buttons, rather than relying on todisc to
224
+    generate them from the video.  They must be the same aspect ratio as the
225
+    videos in the titleset (4:3 or 16:9), as todisc will resize them without
226
+    checking and cropping.
227
 : **-opacity** [0-100] (default 100)
228
     Opacity of thumbnail videos as a percentage (no percent sign).
229
     Anything less than 100(%) is semi-transparent. Not recommended with dark
230
@@ -1153,7 +1195,7 @@
231
 : **-interlaced_bf**
232
     Do interlaced encoding of the input video (bottom fields first).
233
 
234
-: **-deinterlace** | **-progressive**
235
+: **-deinterlace**, **-progressive**
236
     Convert interlaced source video into progressive output video. Because
237
     deinterlacing works by averaging fields together, some picture quality is
238
     invariably lost. Uses an adaptive kernel deinterlacer (kerndeint), or,
239
@@ -1246,9 +1288,6 @@
240
     input track with the largest number of channels, and if it fails then it
241
     will revert to the default behavior of using the original channels.
242
 
243
-: **-async** //NUM//
244
-    Adjust audio synchronization by //NUM// seconds.
245
-
246
 
247
 
248
 ===Other options===
249
@@ -1748,6 +1787,10 @@
250
 : **-burn**
251
     Burn a DVD file-system in //DVD_DIR// (must contain a VIDEO_TS folder).
252
 
253
+: **-eject**
254
+    Eject the DVD tray after burning is complete. By default, the DVD is not
255
+    ejected.
256
+
257
 : **-device** //DEVICE// (default /dev/dvdrw)
258
     Burn the disc image to //DEVICE//, the Linux device file-system
259
     name of your DVD-recorder. Common examples might be /dev/dvdrw,
260
@@ -1888,6 +1931,17 @@
261
     something goes wrong.
262
 
263
 
264
+=Command:chapters=
265
+
266
+**tovid chapters** will start a GUI using mplayer to set chapter points in a
267
+video.  Its only (mandatory) option is the path to a video file.
268
+
269
+==Examples==
270
+: ``tovid chapters foo.avi``
271
+
272
+: ``tovid chapters /home/grepper/videos/foo.avi``
273
+
274
+
275
 =CONTACT=
276
 
277
 For further assistance, contact information, forum and IRC links,
278
tovid-0.34.tar.bz2/icons/hicolor/128x128/apps/titleset-wizard.png Added
tovid-0.34.tar.bz2/icons/hicolor/32x32/apps/titleset-wizard.png Added
tovid-0.34.tar.bz2/icons/hicolor/48x48/apps/titleset-wizard.png Added
tovid-0.34.tar.bz2/icons/hicolor/64x64/apps/titleset-wizard.png Added
tovid-0.34.tar.bz2/icons/hicolor/scalable/apps/titleset-wizard.svg Added
588
 
1
@@ -0,0 +1,586 @@
2
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
3
+<!-- Created with Sodipodi ("http://www.sodipodi.com/") -->
4
+
5
+<svg
6
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
7
+   xmlns:cc="http://creativecommons.org/ns#"
8
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
9
+   xmlns:svg="http://www.w3.org/2000/svg"
10
+   xmlns="http://www.w3.org/2000/svg"
11
+   xmlns:xlink="http://www.w3.org/1999/xlink"
12
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
13
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
14
+   width="128"
15
+   height="128"
16
+   id="svg2"
17
+   sodipodi:version="0.32"
18
+   inkscape:version="0.47 r22583"
19
+   version="1.0"
20
+   sodipodi:docname="titleset_wizard.svg">
21
+  <defs
22
+     id="defs4">
23
+    <inkscape:perspective
24
+       sodipodi:type="inkscape:persp3d"
25
+       inkscape:vp_x="0 : 64 : 1"
26
+       inkscape:vp_y="0 : 1000 : 0"
27
+       inkscape:vp_z="128 : 64 : 1"
28
+       inkscape:persp3d-origin="64 : 42.666667 : 1"
29
+       id="perspective3141" />
30
+    <linearGradient
31
+       id="linearGradient2495">
32
+      <stop
33
+         id="stop2497"
34
+         offset="0"
35
+         style="stop-color:#000000;stop-opacity:1;" />
36
+      <stop
37
+         id="stop2499"
38
+         offset="1"
39
+         style="stop-color:#000000;stop-opacity:0.02284264;" />
40
+    </linearGradient>
41
+    <linearGradient
42
+       id="linearGradient792">
43
+      <stop
44
+         style="stop-color:#f5ffff;stop-opacity:1;"
45
+         offset="0"
46
+         id="stop793" />
47
+      <stop
48
+         style="stop-color:#ff0000;stop-opacity:0;"
49
+         offset="1"
50
+         id="stop794" />
51
+    </linearGradient>
52
+    <linearGradient
53
+       id="linearGradient783">
54
+      <stop
55
+         style="stop-color:#f50000;stop-opacity:1;"
56
+         offset="0"
57
+         id="stop784" />
58
+      <stop
59
+         style="stop-color:#ff0000;stop-opacity:0;"
60
+         offset="1"
61
+         id="stop785" />
62
+    </linearGradient>
63
+    <linearGradient
64
+       id="linearGradient777">
65
+      <stop
66
+         style="stop-color:#f5e2f8;stop-opacity:1;"
67
+         offset="0"
68
+         id="stop778" />
69
+      <stop
70
+         style="stop-color:#000000;stop-opacity:1;"
71
+         offset="1"
72
+         id="stop779" />
73
+    </linearGradient>
74
+    <linearGradient
75
+       id="linearGradient6659">
76
+      <stop
77
+         style="stop-color:#00b7ff;stop-opacity:0.60784316;"
78
+         offset="0"
79
+         id="stop6661" />
80
+      <stop
81
+         style="stop-color:#090b0c;stop-opacity:1;"
82
+         offset="1"
83
+         id="stop6663" />
84
+    </linearGradient>
85
+    <linearGradient
86
+       id="linearGradient3269">
87
+      <stop
88
+         style="stop-color:#ffffff;stop-opacity:1;"
89
+         offset="0"
90
+         id="stop3271" />
91
+      <stop
92
+         style="stop-color:#ffffff;stop-opacity:0.31218275;"
93
+         offset="1"
94
+         id="stop3273" />
95
+    </linearGradient>
96
+    <linearGradient
97
+       id="linearGradient2358">
98
+      <stop
99
+         style="stop-color:#e2afff;stop-opacity:1;"
100
+         offset="0"
101
+         id="stop2360" />
102
+      <stop
103
+         style="stop-color:#09004d;stop-opacity:0;"
104
+         offset="1"
105
+         id="stop2362" />
106
+    </linearGradient>
107
+    <linearGradient
108
+       id="linearGradient2325">
109
+      <stop
110
+         style="stop-color:#ff7e00;stop-opacity:1;"
111
+         offset="0"
112
+         id="stop2327" />
113
+      <stop
114
+         id="stop2335"
115
+         offset="0.25460124"
116
+         style="stop-color:#ffffcc;stop-opacity:0.70558375;" />
117
+      <stop
118
+         style="stop-color:#00ff81;stop-opacity:0.02030457;"
119
+         offset="1"
120
+         id="stop2329" />
121
+    </linearGradient>
122
+    <linearGradient
123
+       id="linearGradient2317">
124
+      <stop
125
+         style="stop-color:#100081;stop-opacity:0.01960784;"
126
+         offset="0"
127
+         id="stop2319" />
128
+      <stop
129
+         id="stop2333"
130
+         offset="0.5"
131
+         style="stop-color:#00558c;stop-opacity:0.50980395;" />
132
+      <stop
133
+         style="stop-color:#78ff88;stop-opacity:1;"
134
+         offset="1"
135
+         id="stop2321" />
136
+    </linearGradient>
137
+    <linearGradient
138
+       id="linearGradient2650">
139
+      <stop
140
+         style="stop-color:#e9f4f3;stop-opacity:1;"
141
+         offset="0"
142
+         id="stop2652" />
143
+      <stop
144
+         style="stop-color:#6d4198;stop-opacity:1;"
145
+         offset="1"
146
+         id="stop2654" />
147
+    </linearGradient>
148
+    <linearGradient
149
+       id="linearGradient2640">
150
+      <stop
151
+         style="stop-color:#ffffff;stop-opacity:0;"
152
+         offset="0"
153
+         id="stop2642" />
154
+      <stop
155
+         style="stop-color:#ffffff;stop-opacity:1;"
156
+         offset="1"
157
+         id="stop2644" />
158
+    </linearGradient>
159
+    <linearGradient
160
+       id="linearGradient2624">
161
+      <stop
162
+         id="stop2626"
163
+         offset="0"
164
+         style="stop-color:#ffffff;stop-opacity:0;" />
165
+      <stop
166
+         id="stop2628"
167
+         offset="1"
168
+         style="stop-color:#e8ab68;stop-opacity:1;" />
169
+    </linearGradient>
170
+    <linearGradient
171
+       id="linearGradient2614">
172
+      <stop
173
+         style="stop-color:#fff1ff;stop-opacity:1;"
174
+         offset="0"
175
+         id="stop2616" />
176
+      <stop
177
+         style="stop-color:#765da5;stop-opacity:0;"
178
+         offset="1"
179
+         id="stop2618" />
180
+    </linearGradient>
181
+    <linearGradient
182
+       id="linearGradient2602">
183
+      <stop
184
+         style="stop-color:#a695c5;stop-opacity:0.35294119;"
185
+         offset="0"
186
+         id="stop2604" />
187
+      <stop
188
+         id="stop2610"
189
+         offset="0.5"
190
+         style="stop-color:#ffffff;stop-opacity:1;" />
191
+      <stop
192
+         style="stop-color:#adb79f;stop-opacity:0.2;"
193
+         offset="1"
194
+         id="stop2606" />
195
+    </linearGradient>
196
+    <linearGradient
197
+       id="linearGradient2594">
198
+      <stop
199
+         style="stop-color:#f4ffff;stop-opacity:0.64720809;"
200
+         offset="0"
201
+         id="stop2596" />
202
+      <stop
203
+         style="stop-color:#008396;stop-opacity:0;"
204
+         offset="1"
205
+         id="stop2598" />
206
+    </linearGradient>
207
+    <linearGradient
208
+       inkscape:collect="always"
209
+       xlink:href="#linearGradient2594"
210
+       id="linearGradient2600"
211
+       x1="55.796875"
212
+       y1="55.418274"
213
+       x2="8.03125"
214
+       y2="97.759254"
215
+       gradientUnits="userSpaceOnUse" />
216
+    <linearGradient
217
+       inkscape:collect="always"
218
+       xlink:href="#linearGradient2602"
219
+       id="linearGradient2608"
220
+       x1="32.142857"
221
+       y1="22.464287"
222
+       x2="78.928574"
223
+       y2="88.35714"
224
+       gradientUnits="userSpaceOnUse" />
225
+    <linearGradient
226
+       inkscape:collect="always"
227
+       xlink:href="#linearGradient2650"
228
+       id="linearGradient2656"
229
+       x1="22.728434"
230
+       y1="18.398447"
231
+       x2="90.063934"
232
+       y2="92.396599"
233
+       gradientUnits="userSpaceOnUse" />
234
+    <linearGradient
235
+       inkscape:collect="always"
236
+       xlink:href="#linearGradient2317"
237
+       id="linearGradient2323"
238
+       x1="14.53125"
239
+       y1="32.666855"
240
+       x2="43.573139"
241
+       y2="9.5"
242
+       gradientUnits="userSpaceOnUse" />
243
+    <linearGradient
244
+       inkscape:collect="always"
245
+       xlink:href="#linearGradient2325"
246
+       id="linearGradient2331"
247
+       x1="49.118668"
248
+       y1="11.074844"
249
+       x2="33.635151"
250
+       y2="14.484109"
251
+       gradientUnits="userSpaceOnUse" />
252
+    <linearGradient
253
+       inkscape:collect="always"
254
+       xlink:href="#linearGradient2317"
255
+       id="linearGradient2343"
256
+       x1="97.03125"
257
+       y1="78.457802"
258
+       x2="68.115631"
259
+       y2="101.3125"
260
+       gradientUnits="userSpaceOnUse" />
261
+    <linearGradient
262
+       inkscape:collect="always"
263
+       xlink:href="#linearGradient2325"
264
+       id="linearGradient2351"
265
+       x1="62.552032"
266
+       y1="100.08803"
267
+       x2="79.757614"
268
+       y2="96.173683"
269
+       gradientUnits="userSpaceOnUse" />
270
+    <radialGradient
271
+       inkscape:collect="always"
272
+       xlink:href="#linearGradient2358"
273
+       id="radialGradient2374"
274
+       cx="55.828125"
275
+       cy="55.28125"
276
+       fx="55.828125"
277
+       fy="55.28125"
278
+       r="47.296875"
279
+       gradientTransform="matrix(1.090613,-5.702015e-7,5.740756e-7,1.098023,-5.058789,-5.418775)"
280
+       gradientUnits="userSpaceOnUse" />
281
+    <linearGradient
282
+       inkscape:collect="always"
283
+       xlink:href="#linearGradient3269"
284
+       id="linearGradient3275"
285
+       x1="40.721771"
286
+       y1="40.4324"
287
+       x2="70.016197"
288
+       y2="69.789963"
289
+       gradientUnits="userSpaceOnUse" />
290
+    <linearGradient
291
+       inkscape:collect="always"
292
+       xlink:href="#linearGradient6659"
293
+       id="linearGradient6665"
294
+       x1="82.793664"
295
+       y1="79.371693"
296
+       x2="108.01286"
297
+       y2="52.370876"
298
+       gradientTransform="scale(0.92119,1.085552)"
299
+       gradientUnits="userSpaceOnUse" />
300
+    <linearGradient
301
+       xlink:href="#linearGradient777"
302
+       id="linearGradient776"
303
+       x1="0.63703692"
304
+       y1="9.37500373e-2"
305
+       x2="0.78518504"
306
+       y2="0.38749999" />
307
+    <radialGradient
308
+       xlink:href="#linearGradient783"
309
+       id="radialGradient780"
310
+       cx="0.52730381"
311
+       cy="0.5068357"
312
+       r="0.45754647"
313
+       fx="0.52730381"
314
+       fy="0.5068357" />
315
+    <radialGradient
316
+       xlink:href="#linearGradient783"
317
+       id="radialGradient791"
318
+       cx="0.51908255"
319
+       cy="0.48437575"
320
+       r="0.36649653"
321
+       fx="0.51908255"
322
+       fy="0.48437575" />
323
+    <radialGradient
324
+       inkscape:collect="always"
325
+       xlink:href="#linearGradient783"
326
+       id="radialGradient1606"
327
+       gradientUnits="userSpaceOnUse"
328
+       gradientTransform="scale(1.009974,0.990125)"
329
+       cx="83.58308"
330
+       cy="26.587969"
331
+       fx="83.58308"
332
+       fy="26.587969"
333
+       r="5.5932387" />
334
+    <radialGradient
335
+       inkscape:collect="always"
336
+       xlink:href="#linearGradient783"
337
+       id="radialGradient1608"
338
+       gradientUnits="userSpaceOnUse"
339
+       gradientTransform="scale(1.009974,0.990125)"
340
+       cx="83.48258"
341
+       cy="26.313409"
342
+       fx="83.48258"
343
+       fy="26.313409"
344
+       r="4.4802063" />
345
+    <linearGradient
346
+       inkscape:collect="always"
347
+       xlink:href="#linearGradient6659"
348
+       id="linearGradient3148"
349
+       gradientUnits="userSpaceOnUse"
350
+       gradientTransform="matrix(0.91963779,-0.05345955,0.06299799,1.0837228,-4.021557,5.620455)"
351
+       x1="82.793664"
352
+       y1="79.371693"
353
+       x2="108.01286"
354
+       y2="52.370876" />
355
+    <linearGradient
356
+       inkscape:collect="always"
357
+       xlink:href="#linearGradient6659"
358
+       id="linearGradient3175"
359
+       gradientUnits="userSpaceOnUse"
360
+       gradientTransform="matrix(0.91963779,-0.05345955,0.06299799,1.0837228,-4.021557,5.620455)"
361
+       x1="82.793664"
362
+       y1="79.371693"
363
+       x2="108.01286"
364
+       y2="52.370876" />
365
+    <linearGradient
366
+       inkscape:collect="always"
367
+       xlink:href="#linearGradient6659"
368
+       id="linearGradient3204"
369
+       gradientUnits="userSpaceOnUse"
370
+       gradientTransform="matrix(0.91963779,-0.05345955,0.06299799,1.0837228,-4.021557,5.620455)"
371
+       x1="82.793664"
372
+       y1="79.371693"
373
+       x2="108.01286"
374
+       y2="52.370876" />
375
+    <linearGradient
376
+       inkscape:collect="always"
377
+       xlink:href="#linearGradient6659"
378
+       id="linearGradient3212"
379
+       gradientUnits="userSpaceOnUse"
380
+       gradientTransform="matrix(0.91963779,-0.05345955,0.06299799,1.0837228,-4.021557,5.620455)"
381
+       x1="82.793664"
382
+       y1="79.371693"
383
+       x2="108.01286"
384
+       y2="52.370876" />
385
+    <linearGradient
386
+       inkscape:collect="always"
387
+       xlink:href="#linearGradient6659"
388
+       id="linearGradient3220"
389
+       gradientUnits="userSpaceOnUse"
390
+       gradientTransform="matrix(0.91963779,-0.05345955,0.06299799,1.0837228,-4.021557,5.620455)"
391
+       x1="82.793664"
392
+       y1="79.371693"
393
+       x2="108.01286"
394
+       y2="52.370876" />
395
+    <linearGradient
396
+       inkscape:collect="always"
397
+       xlink:href="#linearGradient6659"
398
+       id="linearGradient3224"
399
+       gradientUnits="userSpaceOnUse"
400
+       gradientTransform="matrix(-0.51268106,0.42189897,-0.49717567,-0.60415542,255.8237,34.702047)"
401
+       x1="82.793664"
402
+       y1="79.371693"
403
+       x2="108.01286"
404
+       y2="52.370876" />
405
+    <linearGradient
406
+       inkscape:collect="always"
407
+       xlink:href="#linearGradient6659"
408
+       id="linearGradient3228"
409
+       gradientUnits="userSpaceOnUse"
410
+       gradientTransform="matrix(-0.57245977,-0.43573391,0.5134791,-0.67460006,95.903102,128.01288)"
411
+       x1="82.793664"
412
+       y1="79.371693"
413
+       x2="108.01286"
414
+       y2="52.370876" />
415
+    <linearGradient
416
+       inkscape:collect="always"
417
+       xlink:href="#linearGradient6659"
418
+       id="linearGradient3232"
419
+       gradientUnits="userSpaceOnUse"
420
+       gradientTransform="matrix(0.51268106,-0.42189897,0.49717567,0.60415542,131.69494,63.061288)"
421
+       x1="82.793664"
422
+       y1="79.371693"
423
+       x2="108.01286"
424
+       y2="52.370876" />
425
+    <linearGradient
426
+       inkscape:collect="always"
427
+       xlink:href="#linearGradient6659"
428
+       id="linearGradient3236"
429
+       gradientUnits="userSpaceOnUse"
430
+       gradientTransform="matrix(0.57245977,0.43573391,-0.5134791,0.67460006,32.412667,1.0748769)"
431
+       x1="82.793664"
432
+       y1="79.371693"
433
+       x2="108.01286"
434
+       y2="52.370876" />
435
+  </defs>
436
+  <sodipodi:namedview
437
+     id="base"
438
+     pagecolor="#ffffff"
439
+     bordercolor="#666666"
440
+     borderopacity="1.0"
441
+     inkscape:pageopacity="0.0"
442
+     inkscape:pageshadow="2"
443
+     inkscape:zoom="2.8"
444
+     inkscape:cx="37.795931"
445
+     inkscape:cy="47.100046"
446
+     inkscape:document-units="px"
447
+     inkscape:current-layer="svg2"
448
+     showgrid="false"
449
+     showguides="true"
450
+     inkscape:guide-bbox="true"
451
+     inkscape:window-width="1256"
452
+     inkscape:window-height="1029"
453
+     inkscape:window-x="0"
454
+     inkscape:window-y="17"
455
+     inkscape:window-maximized="0" />
456
+  <metadata
457
+     id="metadata7">
458
+    <rdf:RDF>
459
+      <cc:Work
460
+         rdf:about="">
461
+        <dc:format>image/svg+xml</dc:format>
462
+        <dc:type
463
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
464
+      </cc:Work>
465
+    </rdf:RDF>
466
+  </metadata>
467
+  <g
468
+     id="Disc"
469
+     style="font-size:12px"
470
+     transform="translate(8.5714285,9.2857142)">
471
+    <path
472
+       style="font-size:12px;fill-opacity:0.32338305;stroke-linecap:round;stroke-linejoin:round"
473
+       d="M 60.657163,7.8847913 C 31.330916,8.6286031 7.7722978,32.674167 7.7722978,62.178608 c 0,29.972771 24.3210492,54.293852 54.2938212,54.293852 29.972771,0 54.293771,-24.321081 54.293771,-54.293852 0,-29.972772 -24.321,-54.2938167 -54.293771,-54.2938167 -0.468332,0 -0.943461,-0.011806 -1.408956,0 z m 1.736615,47.0196927 c 0.03131,-3.99e-4 0.0669,0 0.0983,0 4.019547,0 7.274134,3.287349 7.274134,7.306896 0,4.019536 -3.254587,7.274123 -7.274134,7.274123 -4.019536,0 -7.274123,-3.254587 -7.274123,-7.274123 0,-3.988147 3.199588,-7.256473 7.175827,-7.306896 z"
474
+       id="shadow" />
475
+    <path
476
+       id="path2384"
477
+       d="M 54.1875,3.71875 C 26.218393,4.4281406 3.75,27.360938 3.75,55.5 c 0,28.585714 23.195536,51.78125 51.78125,51.78125 28.585714,0 51.78125,-23.195536 51.78125,-51.78125 0,-28.585714 -23.195536,-51.78125 -51.78125,-51.78125 -0.446652,0 -0.899796,-0.01126 -1.34375,0 z m 1.65625,44.84375 c 0.02986,-3.79e-4 0.0638,0 0.09375,0 3.833529,0 6.9375,3.135222 6.9375,6.96875 10e-7,3.833527 -3.103972,6.9375 -6.9375,6.9375 -3.833526,2e-6 -6.9375,-3.103972 -6.9375,-6.9375 -10e-7,-3.803579 3.051514,-6.920661 6.84375,-6.96875 z"
478
+       style="fill:#000000;fill-opacity:1;stroke:none" />
479
+    <path
480
+       id="cdsurface"
481
+       d="M 54.75,6.03125 C 27.887151,6.5422292 6.25,28.515686 6.25,55.5 c 0,27.304286 22.164464,49.46875 49.46875,49.46875 27.304286,0 49.46875,-22.164464 49.46875,-49.46875 0,-27.304286 -22.164464,-49.46875 -49.46875,-49.46875 -0.319972,0 -0.650218,-0.00606 -0.96875,0 z m 0.375,40.1875 c 0.193296,-0.01226 0.397377,0 0.59375,0 5.027144,0 9.09375,4.066605 9.09375,9.09375 2e-6,5.027144 -4.066605,9.125 -9.09375,9.125 -5.027146,-10e-7 -9.125,-4.097855 -9.125,-9.125 0,-4.830773 3.776177,-8.792045 8.53125,-9.09375 z"
482
+       style="fill:url(#linearGradient2656);fill-opacity:1;stroke:none" />
483
+    <path
484
+       id="highlight"
485
+       d="m 53.9375,7.65625 c -25.516351,0.9677939 -45.9062501,21.998126 -45.90625,47.75 0,26.367859 21.413392,47.78125 47.78125,47.78125 26.367859,0 47.75,-21.413392 47.75,-47.78125 0,-26.367859 -21.382141,-47.7500002 -47.75,-47.75 -0.514997,0 -1.051415,-0.016204 -1.5625,0 -0.100221,0.00318 -0.212436,-0.0038 -0.3125,0 z M 54.625,38.1875 c 0.07051,-0.0044 0.148019,0.0036 0.21875,0 0.292052,-0.01482 0.579286,0 0.875,0 9.462858,-10e-7 17.125,7.662144 17.125,17.125 0,9.462858 -7.662144,17.15625 -17.125,17.15625 -9.462855,0 -17.15625,-7.693394 -17.15625,-17.15625 -10e-7,-9.095523 7.10825,-16.560368 16.0625,-17.125 z m 0.125,1.78125 c -8.021646,0.505856 -14.406248,7.195675 -14.40625,15.34375 0,8.477143 6.897858,15.375002 15.375,15.375 8.477143,0 15.34375,-6.897859 15.34375,-15.375 0,-8.477143 -6.866607,-15.34375 -15.34375,-15.34375 -0.264911,0 -0.51962,-0.01328 -0.78125,0 -0.06336,0.0032 -0.124337,-0.004 -0.1875,0 z m 0.3125,4.8125 c 0.08736,-0.0055 0.162073,0.0033 0.25,0 0.135055,-0.0051 0.269944,0 0.40625,0 5.815714,-10e-7 10.53125,4.715536 10.53125,10.53125 10e-7,5.815714 -4.715536,10.53125 -10.53125,10.53125 -5.815714,-3e-6 -10.53125,-4.715536 -10.53125,-10.53125 -10e-7,-5.590667 4.371179,-10.185211 9.875,-10.53125 z"
486
+       style="fill:url(#linearGradient2600);fill-opacity:1;stroke:none" />
487
+    <path
488
+       id="path2538"
489
+       d="m 53.9375,7.65625 c -25.516351,0.9677939 -45.9062501,21.998126 -45.90625,47.75 0,26.367859 21.413392,47.78125 47.78125,47.78125 26.367859,0 47.75,-21.413392 47.75,-47.78125 0,-26.367859 -21.382141,-47.7500002 -47.75,-47.75 -0.514997,0 -1.051415,-0.016204 -1.5625,0 -0.100221,0.00318 -0.212436,-0.0038 -0.3125,0 z M 54.625,38.1875 c 0.07051,-0.0044 0.148019,0.0036 0.21875,0 0.292052,-0.01482 0.579286,0 0.875,0 9.462858,-10e-7 17.125,7.662144 17.125,17.125 0,9.462858 -7.662144,17.15625 -17.125,17.15625 -9.462855,0 -17.15625,-7.693394 -17.15625,-17.15625 -10e-7,-9.095523 7.10825,-16.560368 16.0625,-17.125 z m 0.125,1.78125 c -8.021646,0.505856 -14.406248,7.195675 -14.40625,15.34375 0,8.477143 6.897858,15.375002 15.375,15.375 8.477143,0 15.34375,-6.897859 15.34375,-15.375 0,-8.477143 -6.866607,-15.34375 -15.34375,-15.34375 -0.264911,0 -0.51962,-0.01328 -0.78125,0 -0.06336,0.0032 -0.124337,-0.004 -0.1875,0 z m 0.3125,4.8125 c 0.08736,-0.0055 0.162073,0.0033 0.25,0 0.135055,-0.0051 0.269944,0 0.40625,0 5.815714,-10e-7 10.53125,4.715536 10.53125,10.53125 10e-7,5.815714 -4.715536,10.53125 -10.53125,10.53125 -5.815714,-3e-6 -10.53125,-4.715536 -10.53125,-10.53125 -10e-7,-5.590667 4.371179,-10.185211 9.875,-10.53125 z"
490
+       style="fill:url(#linearGradient2608);fill-opacity:1;stroke:none" />
491
+    <path
492
+       id="rect2309"
493
+       d="m 60.84375,64.5 c -1.054296,0.58942 -2.230793,0.989868 -3.46875,1.1875 L 58.15625,70.5 c 1.818478,-0.290625 3.516655,-0.909531 5.0625,-1.78125 L 60.875,64.5 c -0.003,-5.19e-4 -0.02855,1.31e-4 -0.03125,0 z m 3.21875,5.78125 c -1.71621,0.96205 -3.608791,1.646762 -5.625,1.96875 l 4.9375,30.34375 C 68.971074,101.70119 74.230386,99.816953 79,97.15625 l -14.90625,-26.875 -0.03125,0 z"
494
+       style="fill:url(#linearGradient2351);fill-opacity:1;stroke:none" />
495
+    <path
496
+       id="rect2281"
497
+       d="m 64.78125,60.6875 c -1.348146,2.267662 -3.538618,3.96568 -6.125,4.71875 L 60,70.0625 c 3.783463,-1.103852 6.974447,-3.609454 8.9375,-6.9375 l -4.15625,-2.4375 z m 5.6875,3.34375 c -2.190682,3.713603 -5.745761,6.518719 -9.96875,7.75 l 8.53125,29.53125 c 11.883794,-3.425461 21.875192,-11.326801 28,-21.78125 l -26.5625,-15.5 z"
498
+       style="fill:url(#linearGradient2343);fill-opacity:1;stroke:none" />
499
+    <path
500
+       id="rect2307"
501
+       d="M 48.03125,8.25 C 42.527073,9.1499919 37.326078,10.979707 32.625,13.59375 l 14.8125,26.6875 c 1.677589,-0.926611 3.540849,-1.585552 5.5,-1.90625 L 48.03125,8.25 z m 5.0625,31.90625 c -1.699242,0.295775 -3.32032,0.881167 -4.78125,1.6875 l 2.34375,4.21875 C 51.684604,45.494138 52.799606,45.103948 54,44.90625 l -0.78125,-4.75 c -0.0051,2.74e-4 -0.026,1.14e-4 -0.03125,0 -0.01064,-6.91e-4 -0.05187,6.73e-4 -0.0625,0 -0.0052,-9.5e-5 -0.02614,-3.03e-4 -0.03125,0 z"
502
+       style="fill:url(#linearGradient2331);fill-opacity:1;stroke:none" />
503
+    <path
504
+       id="path2297"
505
+       d="m 42.53125,9.5 c -11.899911,3.435068 -21.882163,11.362366 -28,21.84375 L 40.875,46.71875 C 43.079197,42.919382 46.691437,40.045922 51,38.8125 L 42.53125,9.5 z m 8.9375,31.03125 c -3.850349,1.109441 -7.088469,3.697269 -9.0625,7.09375 l 4.15625,2.4375 c 1.349941,-2.351568 3.593981,-4.140434 6.25,-4.90625 l -1.3125,-4.625 -0.03125,0 z"
506
+       style="fill:url(#linearGradient2323);fill-opacity:1;fill-rule:evenodd;stroke:none" />
507
+    <path
508
+       id="path2353"
509
+       d="M 24.75,19.0625 C 16.184784,26.39461 10.248117,36.72822 8.53125,48.40625 L 38.75,52.71875 c 0.636049,-4.190363 2.81163,-7.878137 5.90625,-10.5 L 24.75,19.0625 z m 21.09375,24.5 c -2.784522,2.345889 -4.735112,5.649853 -5.3125,9.40625 L 45.3125,53.625 c 0.414961,-2.553656 1.754212,-4.813473 3.65625,-6.40625 l -3.125,-3.65625 z m 20.3125,13.03125 c -0.316909,2.616642 -1.563546,4.930895 -3.4375,6.59375 l 3.15625,3.65625 c 2.727093,-2.412388 4.580711,-5.767761 5.0625,-9.5625 l -4.78125,-0.6875 z m 6.5625,0.9375 c -0.54458,4.226532 -2.646842,7.971122 -5.6875,10.65625 L 87.09375,91.5 C 95.65324,84.064426 101.53591,73.631948 103.125,61.84375 l -30.40625,-4.3125 z"
510
+       style="fill:url(#radialGradient2374);fill-opacity:1;stroke:none" />
511
+    <path
512
+       id="path2391"
513
+       d="m 54.90625,39.875 c -8.122661,0.463766 -14.562501,7.230611 -14.5625,15.46875 0,8.538314 6.930435,15.468754 15.46875,15.46875 8.538314,0 15.468753,-6.930436 15.46875,-15.46875 0,-8.538314 -6.930437,-15.46875 -15.46875,-15.46875 -0.300175,0 -0.610283,-0.0169 -0.90625,0 z m 0.5625,4.96875 c 0.08985,-0.0023 0.190857,0 0.28125,0 5.785145,-10e-7 10.46875,4.714857 10.46875,10.5 -2e-6,5.785143 -4.683607,10.46875 -10.46875,10.46875 -5.785142,10e-7 -10.46875,-4.683607 -10.46875,-10.46875 0,-5.694751 4.527145,-10.356434 10.1875,-10.5 z"
514
+       style="fill:url(#linearGradient3275);fill-opacity:1;stroke:none" />
515
+  </g>
516
+  <path
517
+     style="font-size:12px;fill:url(#linearGradient3228);fill-opacity:1;fill-rule:evenodd;stroke:none"
518
+     d="M 112.61991,47.640062 C 75.472011,19.798284 26.712203,33.588408 58.269248,71.054782 19.397317,25.960275 76.516705,-3.3713544 124.10395,31.982672 l -11.48404,15.65739 z"
519
+     id="path3200"
520
+     sodipodi:nodetypes="cccc" />
521
+  <path
522
+     style="font-size:12px;fill-rule:evenodd;stroke-width:0.625;stroke-linecap:round;stroke-linejoin:round"
523
+     d="m 57.510504,23.155164 1.667416,11.26793 c -2.085121,0.805229 -3.976039,1.758276 -5.556246,2.947827 l -1.960708,-9.834938 c 1.690912,-1.657364 3.644431,-3.176183 5.849538,-4.380819 z m 8.441911,-3.757135 0.725469,13.311351 c -2.364544,0.285832 -4.603283,0.728766 -6.560877,1.447036 l -1.576996,-11.6285 c 2.225394,-1.31188 4.731942,-2.348414 7.412404,-3.129887 z m 12.012821,-2.081912 -1.736442,14.93394 C 73.242831,32.06289 70.362367,32.14005 67.77233,32.560957 L 67.361045,18.998013 c 3.238695,-1.03133 6.825213,-1.552541 10.604191,-1.681896 z m 14.858001,1.433257 -5.116001,15.183283 c -3.35235,-0.8341 -6.599193,-1.403864 -9.731251,-1.640891 l 1.961924,-15.06902 c 4.109986,-8.3e-5 8.392148,0.498935 12.885328,1.526628 z m 15.542113,5.450473 -7.88228,14.304537 C 96.834477,36.770035 93.134303,35.425818 89.51935,34.453178 l 5.398894,-15.151987 c 4.385935,1.007406 8.894206,2.659996 13.447106,4.898656 z m 4.38812,21.31328 C 109.39296,43.077931 105.9032,40.97374 102.34156,39.36692 l 8.21329,-14.175272 c 3.88164,1.911724 7.7598,4.31155 11.66406,7.160629 l -9.46544,13.16085 z M 59.000607,70.934394 57.80313,71.951726 C 18.917316,26.895168 77.259157,-8.0516734 126.39137,29.345841 l -15.59056,21.19641 C 75.223647,23.46231 27.450899,33.48608 59.000607,70.934394 z"
524
+     id="path3202"
525
+     sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccc" />
526
+  <path
527
+     style="font-size:12px;fill:url(#linearGradient3236);fill-opacity:1;fill-rule:evenodd;stroke:none"
528
+     d="M 15.695851,81.447701 C 52.843758,109.28948 101.60357,95.499355 70.04652,58.03298 108.91846,103.12749 51.799063,132.45912 4.2118144,97.10509 L 15.695851,81.447701 z"
529
+     id="path3216"
530
+     sodipodi:nodetypes="cccc" />
531
+  <path
532
+     style="font-size:12px;fill-rule:evenodd;stroke-width:0.625;stroke-linecap:round;stroke-linejoin:round"
533
+     d="M 70.805265,105.93261 69.137848,94.664668 c 2.085121,-0.805229 3.97604,-1.758276 5.556246,-2.947827 l 1.960709,9.834939 c -1.690912,1.65736 -3.644432,3.17618 -5.849538,4.38083 z m -8.44191,3.75712 -0.725471,-13.311349 c 2.364543,-0.285831 4.603284,-0.728765 6.560879,-1.447032 l 1.576995,11.628501 c -2.225394,1.31188 -4.731942,2.34841 -7.412403,3.12989 z m -12.012822,2.08192 1.736441,-14.933946 c 2.985963,0.187168 5.866428,0.110007 8.456464,-0.310899 l 0.411286,13.562945 c -3.238697,1.03133 -6.825209,1.55256 -10.604191,1.6819 z M 35.49253,110.33838 40.608532,95.155104 c 3.35235,0.8341 6.599193,1.403865 9.73125,1.640891 L 48.37786,111.86502 c -4.109985,8e-5 -8.392149,-0.49894 -12.88533,-1.52664 z m -15.54212,-5.45047 7.882291,-14.304534 c 3.64859,1.734349 7.348764,3.078567 10.963717,4.051207 l -5.39889,15.151987 c -4.385936,-1.0074 -8.894207,-2.66 -13.447118,-4.89866 z M 15.562306,83.574633 c 3.3605,2.435197 6.850264,4.539389 10.411898,6.146209 L 17.760909,103.89611 C 13.879279,101.98439 10.001117,99.584563 6.0968617,96.735483 L 15.562306,83.574633 z M 69.315161,58.153367 70.512639,57.136034 C 109.39845,102.19259 51.056612,137.13944 1.9244014,99.74192 L 17.51496,78.545512 c 35.577161,27.079938 83.34991,17.056165 51.800201,-20.392145 z"
534
+     id="path3218"
535
+     sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccc" />
536
+  <g
537
+     id="g3165"
538
+     transform="matrix(1.4930158,0,0,1.4930158,-51.884632,21.149575)">
539
+    <polygon
540
+       sodipodi:type="star"
541
+       style="font-size:12px;fill:url(#radialGradient1606);fill-rule:evenodd"
542
+       id="glow2"
543
+       sodipodi:sides="6"
544
+       sodipodi:cx="84.079628"
545
+       sodipodi:cy="26.242664"
546
+       sodipodi:r1="6.3324742"
547
+       sodipodi:r2="2.2163661"
548
+       sodipodi:arg1="0.82241875"
549
+       sodipodi:arg2="1.3460175"
550
+       points="88.38857,30.88306 84.57364,28.40327 82.21539,32.29451 82.45549,27.75079 77.90646,27.65411 81.96148,25.59018 79.77069,21.60227 83.58562,24.08205 85.94386,20.19082 85.70377,24.73454 90.2528,24.83121 86.19778,26.89515 88.38857,30.88306 "
551
+       transform="matrix(2.424356,-1.7467053,1.7467042,2.424355,-171.96521,112.42067)"
552
+       inkscape:flatsided="false"
553
+       inkscape:rounded="0"
554
+       inkscape:randomized="0"
555
+       d="m 88.388565,30.883062 -3.814929,-2.479788 -2.358242,3.891238 0.240095,-4.54372 -4.549032,-0.09668 4.055024,-2.063932 -2.19079,-3.987916 3.814929,2.479788 2.358242,-3.891237 -0.240095,4.543719 4.549032,0.09668 -4.055024,2.063931 2.19079,3.987916 z" />
556
+    <g
557
+       id="g3153">
558
+      <polygon
559
+         d="m 88.388565,30.883062 -3.814929,-2.479788 -2.358242,3.891238 0.240095,-4.54372 -4.549032,-0.09668 4.055024,-2.063932 -2.19079,-3.987916 3.814929,2.479788 2.358242,-3.891237 -0.240095,4.543719 4.549032,0.09668 -4.055024,2.063931 2.19079,3.987916 z"
560
+         inkscape:randomized="0"
561
+         inkscape:rounded="0"
562
+         inkscape:flatsided="false"
563
+         transform="matrix(2.7453045,-0.30743176,0.30743171,2.7453035,-161.5026,-17.12319)"
564
+         points="88.38857,30.88306 84.57364,28.40327 82.21539,32.29451 82.45549,27.75079 77.90646,27.65411 81.96148,25.59018 79.77069,21.60227 83.58562,24.08205 85.94386,20.19082 85.70377,24.73454 90.2528,24.83121 86.19778,26.89515 88.38857,30.88306 "
565
+         sodipodi:arg2="1.3460175"
566
+         sodipodi:arg1="0.82241875"
567
+         sodipodi:r2="2.2163661"
568
+         sodipodi:r1="6.3324742"
569
+         sodipodi:cy="26.242664"
570
+         sodipodi:cx="84.079628"
571
+         sodipodi:sides="6"
572
+         id="glow1"
573
+         style="font-size:12px;fill:url(#radialGradient1608);fill-rule:evenodd"
574
+         sodipodi:type="star" />
575
+      <path
576
+         transform="matrix(1.6588481,-0.09643065,0.09643083,1.6588511,-64.72575,-6.8978244)"
577
+         sodipodi:ry="1.7677784"
578
+         sodipodi:rx="1.7677765"
579
+         sodipodi:cy="26.573837"
580
+         sodipodi:cx="84.411316"
581
+         d="m 86.179092,26.573837 c 0,0.976317 -0.79146,1.767779 -1.767776,1.767779 -0.976316,0 -1.767777,-0.791462 -1.767777,-1.767779 0,-0.976317 0.791461,-1.767778 1.767777,-1.767778 0.976316,0 1.767776,0.791461 1.767776,1.767778 z"
582
+         id="laser"
583
+         style="font-size:12px;fill:#ffffff;fill-rule:evenodd;stroke-width:1"
584
+         sodipodi:type="arc" />
585
+    </g>
586
+  </g>
587
+</svg>
588
tovid-0.33.tar.bz2/libtovid/__init__.py -> tovid-0.34.tar.bz2/libtovid/__init__.py Changed
10
 
1
@@ -37,7 +37,7 @@
2
 # Configuration file reader/writer
3
 class Config (ConfigParser):
4
     """Interface for reading/writing tovid configuration files. Just a wrapper
5
-    around the standard library ConfigParser. Example usage:
6
+    around the standard library ConfigParser. Example usage::
7
 
8
         config = libtovid.Config()
9
         config.get('DEFAULT', 'work_dir')
10
tovid-0.33.tar.bz2/libtovid/author.py -> tovid-0.34.tar.bz2/libtovid/author.py Changed
77
 
1
@@ -39,32 +39,32 @@
2
     """A menu for navigating the titles on a video disc.
3
     """
4
     def __init__(self, filename='', videos=None):
5
-        """Create a menu linking to the given Videos."""
6
+        """Create a menu linking to the given `Video`\s."""
7
         self.filename = filename
8
         self.videos = videos or []
9
 
10
     def add(self, video):
11
-        """Add a Video to the Menu."""
12
+        """Add a `Video` to the Menu."""
13
         self.videos.append(video)
14
 
15
 
16
 class Titleset:
17
-    """A group of videos, with an optional Menu.
18
+    """A group of `Video`\s, with an optional `Menu`.
19
     """
20
     def __init__(self, menu=None, videos=None):
21
-        """Create a Titleset containing the given Videos.
22
+        """Create a Titleset containing the given `Video`\s.
23
         """
24
         self.menu = menu
25
         self.videos = videos or []
26
 
27
     def add(self, video):
28
-        """Add a Video to the Titleset."""
29
+        """Add a `Video` to the Titleset."""
30
         self.videos.append(video)
31
 
32
 
33
 class Disc:
34
-    """A video disc containing one or more Titlesets, and an optional
35
-    top Menu for navigating to each Titleset.
36
+    """A video disc containing one or more `Titleset`\s, and an optional
37
+    top `Menu` for navigating to each Titleset.
38
 
39
     """
40
     def __init__(self, name='Untitled', format='dvd', tvsys='ntsc',
41
@@ -78,7 +78,7 @@
42
             title
43
                 String containing the title of the disc
44
             titlesets
45
-                List of Titlesets
46
+                List of `Titleset` objects
47
         """
48
         self.name = name
49
         self.format = format
50
@@ -94,7 +94,7 @@
51
 
52
 def _add_titleset(titleset, ts_id, segment_items, sequence_items, pbc):
53
     """Add titleset content to a vcdimager XML structure. This function is
54
-    used internally, mainly to keep vcdimager_xml() from being too long.
55
+    used internally, mainly to keep `vcdimager_xml` from being too long.
56
     """
57
     menu = titleset.menu
58
     videos = titleset.videos
59
@@ -145,7 +145,7 @@
60
 ###
61
 
62
 def vcdimager_xml(disc):
63
-    """Return the vcdimager XML string for the given Disc.
64
+    """Return the vcdimager XML string for the given `Disc`.
65
     """
66
     assert isinstance(disc, Disc)
67
     # XML header (will be added later)
68
@@ -197,7 +197,7 @@
69
 
70
 
71
 def dvdauthor_xml(disc):
72
-    """Return the dvdauthor XML string for the given Disc.
73
+    """Return the dvdauthor XML string for the given `Disc`.
74
     """
75
     assert isinstance(disc, Disc)
76
     # Root dvdauthor element
77
tovid-0.33.tar.bz2/libtovid/backend/__init__.py -> tovid-0.34.tar.bz2/libtovid/backend/__init__.py Changed
15
 
1
@@ -5,13 +5,3 @@
2
 submodules may be defined here in ``__init__.py``.
3
 """
4
 
5
-# Submodules
6
-__all__ = [
7
-    'ffmpeg',
8
-    'mpeg2enc',
9
-    'mplayer',
10
-    'mplex',
11
-    'spumux',
12
-    'transcode',
13
-]
14
-
15
tovid-0.33.tar.bz2/libtovid/backend/ffmpeg.py -> tovid-0.34.tar.bz2/libtovid/backend/ffmpeg.py Changed
56
 
1
@@ -15,9 +15,9 @@
2
     """Encode a multimedia video using ffmpeg.
3
 
4
         source
5
-            Input MediaFile
6
+            Input `~libtovid.media.MediaFile`
7
         target
8
-            Output MediaFile
9
+            Output `~libtovid.media.MediaFile`
10
         kw
11
             Keyword arguments to customize encoding behavior
12
 
13
@@ -81,7 +81,7 @@
14
     else:
15
         cmd.add('-aspect', '4:3')
16
 
17
-    cmd.add(target.filename)    
18
+    cmd.add(target.filename)
19
     cmd.run()
20
 
21
 
22
@@ -90,11 +90,11 @@
23
     to the given filename.
24
 
25
         source
26
-            Input MediaFile
27
+            Input `~libtovid.media.MediaFile`
28
         audiofile
29
             Filename for encoded audio
30
         target
31
-            Output MediaFile
32
+            Output `~libtovid.media.MediaFile`
33
 
34
     If no audio is present in the source file, encode silence.
35
     """
36
@@ -122,8 +122,8 @@
37
 from libtovid.media import MediaFile
38
 
39
 def identify(filename):
40
-    """Identify a video file using ffmpeg, and return a MediaFile with
41
-    the video's specifications.
42
+    """Identify a video file using ffmpeg, and return a
43
+    `~libtovid.media.MediaFile` with the video's specifications.
44
     """
45
     result = MediaFile(filename)
46
 
47
@@ -131,7 +131,7 @@
48
     cmd.run(capture=True)
49
 
50
     # ffmpeg puts its output on stderr
51
-    output = cmd.get_error()
52
+    output = cmd.get_errors()
53
 
54
     video_line = re.compile(''
55
         'Stream (?P<tracknum>[^:]+): Video: ' # Track number (ex. #0.0)
56
tovid-0.33.tar.bz2/libtovid/backend/mpeg2enc.py -> tovid-0.34.tar.bz2/libtovid/backend/mpeg2enc.py Changed
38
 
1
@@ -19,9 +19,9 @@
2
     """Encode a multimedia video using mplayer|yuvfps|mpeg2enc.
3
 
4
         source
5
-            Input MediaFile
6
+            Input `~libtovid.media.MediaFile`
7
         target
8
-            Output MediaFile
9
+            Output `~libtovid.media.MediaFile`
10
         kw
11
             Keyword arguments to customize encoding behavior
12
 
13
@@ -63,13 +63,13 @@
14
     """Encode a yuv4mpeg stream to an MPEG video stream.
15
 
16
         source
17
-            Input MediaFile
18
+            Input `~libtovid.media.MediaFile`
19
         yuvfile
20
             Filename of .yuv stream coming from mplayer
21
         videofile
22
             Filename of .m[1|2]v to write encoded video stream to
23
         target
24
-            Output MediaFile
25
+            Output `~libtovid.media.MediaFile`
26
 
27
     """
28
     # TODO: Control over quality (bitrate/quantization) and disc split size,
29
@@ -125,7 +125,7 @@
30
 
31
 def encode_frames(imagedir, outfile, format, tvsys, aspect, interlaced=False):
32
     """Convert an image sequence in the given directory to match a target
33
-    MediaFile, putting the output stream in outfile.
34
+    `~libtovid.media.MediaFile`, putting the output stream in outfile.
35
 
36
         imagedir
37
             Directory containing images (and only images)
38
tovid-0.33.tar.bz2/libtovid/backend/mplayer.py -> tovid-0.34.tar.bz2/libtovid/backend/mplayer.py Changed
38
 
1
@@ -16,9 +16,9 @@
2
     """Encode a multimedia video using mencoder.
3
 
4
         source
5
-            Input MediaFile
6
+            Input `~libtovid.media.MediaFile`
7
         target
8
-            Output MediaFile
9
+            Output `~libtovid.media.MediaFile`
10
         kw
11
             Keyword arguments to customize encoding behavior
12
 
13
@@ -105,8 +105,8 @@
14
 
15
 
16
 def identify(filename):
17
-    """Identify a video file using mplayer, and return a MediaFile with
18
-    the video's specifications.
19
+    """Identify a video file using mplayer, and return a
20
+    `~libtovid.media.MediaFile` with the video's specifications.
21
     """
22
     # TODO: Raise an exception if the file couldn't be identified
23
     # TODO: Infer aspect ratio
24
@@ -186,11 +186,11 @@
25
     """Rip video to the given yuv4mpeg file.
26
 
27
         source
28
-            Input MediaFile
29
+            Input `~libtovid.media.MediaFile`
30
         yuvfile
31
             File to put ripped video in
32
         target
33
-            Output MediaFile
34
+            Output `~libtovid.media.MediaFile`
35
 
36
     """
37
     # TODO: Custom mplayer options, subtitles, interlacing,
38
tovid-0.33.tar.bz2/libtovid/backend/spumux.py -> tovid-0.34.tar.bz2/libtovid/backend/spumux.py Changed
76
 
1
@@ -2,10 +2,10 @@
2
 
3
 Defined here are two functions for adding subtitles to an MPEG file:
4
 
5
-    add_subpictures
6
-        Add image files (.png)
7
-    add_subtitles
8
-        Add subtitle files (.sub, .srt etc.)
9
+    `add_subpictures`
10
+        Add image files (``.png``)
11
+    `add_subtitles`
12
+        Add subtitle files (``.sub``, ``.srt`` etc.)
13
 
14
 Use these if you just want to add subpictures or subtitles, and don't want
15
 to think much about the XML internals.
16
@@ -23,7 +23,7 @@
17
 from libtovid.backend import mplayer
18
 
19
 # spumux XML elements and valid attributes
20
-# 
21
+#
22
 # subpictures
23
 # stream
24
 # textsub
25
@@ -81,12 +81,12 @@
26
 
27
 
28
 def _mux_subs(subtitle, movie_filename, stream_id=0):
29
-    """Run spumux to multiplex the given subtitle with an .mpg file.
30
+    """Run spumux to multiplex the given subtitle with an ``.mpg`` file.
31
 
32
         subtitle
33
             Textsub or Spu element
34
         movie_filename
35
-            Name of an .mpg file to multiplex subtitle into
36
+            Name of an ``.mpg`` file to multiplex subtitle into
37
         stream_id
38
             Stream ID number to pass to spumux
39
     """
40
@@ -109,14 +109,14 @@
41
 
42
 
43
 def add_subpictures(movie_filename, select, image=None, highlight=None):
44
-    """Adds PNG image subpictures to an .mpg video file to create a DVD menu.
45
+    """Adds ``.png`` subpictures to an ``.mpg`` video file to create a DVD menu.
46
 
47
         select
48
-            Image shown as the navigational selector or "cursor"
49
+            ``.png`` filename shown for the navigational selector or "cursor"
50
         image
51
-            Image shown for non-selected regions
52
+            ``.png`` filename shown for non-selected regions
53
         highlight
54
-            Image shown when "enter" is pressed
55
+            ``.png`` filename shown when "enter" is pressed
56
 
57
     All images must be indexed, 4-color, transparent, non-antialiased PNG.
58
     Button regions are auto-inferred.
59
@@ -134,13 +134,13 @@
60
 
61
 
62
 def add_subtitles(movie_filename, sub_filenames):
63
-    """Adds one or more subtitle files to an .mpg video file.
64
+    """Adds one or more subtitle files to an ``.mpg`` video file.
65
 
66
         movie_filename
67
-            Name of .mpg file to add subtitles to
68
+            Name of ``.mpg`` file to add subtitles to
69
         sub_filenames
70
             Filename or list of filenames of subtitle
71
-            files to include (.sub/.srt etc.)
72
+            files to include (``.sub``, ``.srt`` etc.)
73
 
74
     """
75
     infile = mplayer.identify(movie_filename)
76
tovid-0.33.tar.bz2/libtovid/backend/transcode.py -> tovid-0.34.tar.bz2/libtovid/backend/transcode.py Changed
51
 
1
@@ -2,12 +2,12 @@
2
 """
3
 
4
 # Sample output from tcprobe:
5
-# 
6
+#
7
 # [tcprobe] RIFF data, AVI video
8
 # [avilib] V: 24.000 fps, codec=DIVX, frames=15691, width=1024, height=576
9
 # [avilib] A: 48000 Hz, format=0x2000, bits=0, channels=5, bitrate=448 kbps,
10
 # [avilib]    10216 chunks, 36614144 bytes, CBR
11
-# [tcprobe] summary for Elephants_1024.avi, (*) = not default, 0 = not 
12
+# [tcprobe] summary for Elephants_1024.avi, (*) = not default, 0 = not
13
 # detected
14
 # import frame size: -g 1024x576 [720x576] (*)
15
 #        frame rate: -f 24.000 [25.000] frc=0 (*)
16
@@ -26,8 +26,8 @@
17
 from libtovid.media import MediaFile
18
 
19
 def identify(filename):
20
-    """Identify a video file using transcode (tcprobe), and return a MediaFile
21
-    with the video's specifications.
22
+    """Identify a video file using transcode (tcprobe), and return a
23
+    `~libtovid.media.MediaFile` with the video's specifications.
24
     """
25
     result = MediaFile(filename)
26
 
27
@@ -69,17 +69,17 @@
28
 
29
 
30
 def rip_frames(media, out_dir, frames='all', size=(0, 0)):
31
-    """Extract frame images from a MediaFile and return a list of frame image
32
-    files.
33
+    """Extract frame images from a `~libtovid.media.MediaFile` and return a
34
+    list of frame image files.
35
 
36
         media
37
-            MediaFile to extract images from
38
+            `~libtovid.media.MediaFile` to extract images from
39
         out_dir
40
             Directory where output images should be stored; images are saved
41
-            in a subdirectory of out_dir named after the input filename
42
+            in a subdirectory of ``out_dir`` named after the input filename
43
         frames
44
-            Which frames to rip: 'all' for all frames, 15 to rip frame 15;
45
-            [30, 90] to rip frames 30 through 90, etc.
46
+            Which frames to rip: ``'all'`` for all frames, ``15`` to rip frame
47
+            15; ``[30, 90]`` to rip frames 30 through 90, etc.
48
         size
49
             Resolution of frame images (default: original size), used
50
             for prescaling
51
tovid-0.33.tar.bz2/libtovid/cli.py -> tovid-0.34.tar.bz2/libtovid/cli.py Changed
276
 
1
@@ -1,9 +1,9 @@
2
 """This module provides an interface for running command-line applications.
3
 Two primary classes are provided:
4
 
5
-    Command
6
+    `Command`
7
         For constructing and executing command-line commands
8
-    Pipe
9
+    `Pipe`
10
         For piping commands together
11
 
12
 Commands are constructed by specifying a program to run, and each separate
13
@@ -27,25 +27,59 @@
14
     >>> pipe.run()                                # doctest: +SKIP
15
     Hello nurse
16
 
17
-Command output may be captured and retrieved later with get_output()::
18
+The above can be easily accomplished using Python standard library functions
19
+like ``os.Popen`` or ``commands.getoutput``. This module was designed to
20
+simplify the task of executing long-running commands or command-line pipes in
21
+the background, and getting their output later. This behavior is controlled by
22
+the arguments to the `~Command.run` method.
23
+
24
+Normally, `~Command.run` prints all output on standard output. If instead you
25
+need to capture the output, pass ``capture=True``, then retrieve it later with
26
+`~Command.get_output`::
27
 
28
     >>> echo.run(capture=True)                    # doctest: +SKIP
29
     >>> echo.get_output()
30
     'Hello world\\n'
31
 
32
+If the command you're running will take a long time to run, and you don't want
33
+your program to be blocked while it's running, pass ``background=True``. If the
34
+command may produce a lot of output during execution, you'll probably want to
35
+capture it instead of printing it::
36
+
37
+    >>> find = Command('find', '/')               # doctest: +SKIP
38
+    >>> find.run(capture=True, background=True)
39
+
40
+In this way, your application can keep doing other things while the long-running
41
+command is executing; you can check whether it's done like so::
42
+
43
+    >>> find.done()
44
+    False
45
+    >>> find.done()
46
+    False
47
+    >>> find.done()
48
+    True
49
+
50
+Then, as before, use `~Command.get_output` to get the output, if you need it. If
51
+you need to get the standard error output, use `~Command.get_errors`.
52
+
53
 """
54
 # Note: Some of the run() tests above will fail doctest.testmod(), since output
55
 # from Command subprocesses is not seen as real output by doctest. The current
56
 # workaround is to use the "doctest: +SKIP" directive (new in python 2.5).
57
 # For other directives see http://www.python.org/doc/lib/doctest-options.html
58
 
59
+# TODO: Make the 'capture/get_output' mechanisms able to handle large amounts
60
+# of output, perhaps by logging to a temporary file and/or returning an iterator
61
+# for lines of output, instead of a flat string.
62
+
63
 __all__ = [
64
     'Command',
65
     'Pipe',
66
 ]
67
 
68
 import subprocess
69
-from os import environ
70
+import signal
71
+import os
72
 
73
 # Small workaround for Python 3.x
74
 try:
75
@@ -53,6 +87,11 @@
76
 except NameError:
77
     unicode = str
78
 
79
+class ProgramNotFound (ValueError):
80
+    """Raised when the program given to a command is not available.
81
+    """
82
+    pass
83
+
84
 class Command:
85
     """A command-line statement, consisting of a program and its arguments,
86
     with support for various modes of execution.
87
@@ -86,28 +125,37 @@
88
         contents is necessary.
89
         """
90
         for arg in args:
91
-            self.args.append(str(arg))
92
+            self.args.append(unicode(arg))
93
 
94
 
95
-    def run(self, capture=False, background=False):
96
+    def run(self, capture=False, background=False, silent=False):
97
         """Run the command and capture or display output.
98
 
99
             capture
100
-                False to show command output/errors on stdout,
101
-                True to capture output/errors for retrieval
102
-                by get_output() and get_error()
103
+                ``False`` to show command output/errors on stdout,
104
+                ``True`` to capture output/errors for retrieval
105
+                by `get_output` and `get_errors`
106
             background
107
-                False to wait for command to finish running,
108
-                True to run process in the background
109
+                ``False`` to wait for command to finish running,
110
+                ``True`` to run process in the background
111
+            silent
112
+                ``False`` to print each command as it runs,
113
+                ``True`` to run silently
114
 
115
         By default, this function displays all command output, and waits
116
         for the program to finish running, which is usually what you'd want.
117
         Capture output if you don't want it printed immediately (and call
118
-        get_output() later to retrieve it).
119
+        `get_output` later to retrieve it).
120
 
121
         This function does not allow special stream redirection. For that,
122
-        use run_redir().
123
+        use `run_redir`.
124
         """
125
+        if not silent:
126
+            print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
127
+            print("Running command:")
128
+            print(unicode(self))
129
+            print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
130
+
131
         if capture:
132
             self.run_redir(None, subprocess.PIPE, stderr=subprocess.PIPE)
133
         else:
134
@@ -120,24 +168,20 @@
135
         """Execute the command using the given stream redirections.
136
 
137
             stdin
138
-                Filename or File object to read input from
139
+                Filename or `file` object to read input from
140
             stdout
141
-                Filename or File object to write output to
142
+                Filename or `file` object to write output to
143
             stderr
144
-                Filename or File object to write errors to
145
+                Filename or `file` object to write errors to
146
 
147
-        Use None for regular system stdin/stdout/stderr (default behavior).
148
-        That is, if stdout=None, the command's standard output is printed.
149
+        Use ``None`` for regular system stdin/stdout/stderr (default behavior).
150
+        That is, if ``stdout=None``, the command's standard output is printed.
151
 
152
-        This function is used internally by run(); if you need to do stream
153
-        redirection (ex. ``spumux < menu.mpg > menu_subs.mpg``), use this
154
-        function instead of run(), and call wait() afterwards if needed.
155
+        This function is used internally by `run`; if you need to do
156
+        stream redirection (ex. ``spumux < menu.mpg > menu_subs.mpg``), use
157
+        this function instead of `run`, and call `wait` afterwards
158
+        if needed.
159
         """
160
-        print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
161
-        print("Running command:")
162
-        print(self)
163
-        print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
164
-
165
         self.output = ''
166
         # Open files if string filenames were provided
167
         if isinstance(stdin, basestring):
168
@@ -147,16 +191,19 @@
169
         if isinstance(stderr, basestring):
170
             stderr = open(stderr, 'w')
171
         # Run the subprocess
172
-        self.proc = subprocess.Popen([self.program] + self.args,
173
-                          stdin=stdin, stdout=stdout, stderr=stderr)
174
+        try:
175
+            self.proc = subprocess.Popen([self.program] + self.args,
176
+                              stdin=stdin, stdout=stdout, stderr=stderr)
177
+        except OSError:
178
+            raise ProgramNotFound("Program '%s' not found." % self.program)
179
 
180
 
181
     def wait(self):
182
         """Wait for the command to finish running, and return the result
183
-        (``self.proc.returncode`` attribute).
184
+        (`self.proc.returncode`).
185
 
186
-        If a ``KeyboardInterrupt`` occurs (user pressed Ctrl-C), the
187
-        subprocess is killed (and ``KeyboardInterrupt`` re-raised).
188
+        If a :exc:`KeyboardInterrupt` occurs (user pressed Ctrl-C), the
189
+        subprocess is killed (and :exc:`KeyboardInterrupt` re-raised).
190
         """
191
         if not isinstance(self.proc, subprocess.Popen):
192
             print("**** Can't wait(): Command is not running")
193
@@ -172,14 +219,14 @@
194
     def kill(self):
195
         """Abort!
196
         """
197
-        #os.kill(self.proc.pid, signal.SIGTERM)
198
-        self.proc.kill()
199
+        os.kill(self.proc.pid, signal.SIGTERM)
200
+        #self.proc.kill()
201
 
202
 
203
 
204
     def done(self):
205
-        """Return True if the command is finished running; False otherwise.
206
-        Only useful if the command is run in the background.
207
+        """Return ``True`` if the command is finished running; ``False``
208
+        otherwise. Only useful if the command is run in the background.
209
         """
210
         return self.proc.poll() != None
211
 
212
@@ -195,7 +242,7 @@
213
         return self.output
214
 
215
 
216
-    def get_error(self):
217
+    def get_errors(self):
218
         """Wait for the command to finish running, and return a string
219
         containing the command's standard error output. Returns an empty
220
         string if the command has not been run yet.
221
@@ -203,7 +250,6 @@
222
         if self.error == '' and isinstance(self.proc, subprocess.Popen):
223
             self.error = self.proc.communicate()[1]
224
         return self.error
225
-    get_errors = get_error
226
 
227
 
228
     def __str__(self):
229
@@ -220,7 +266,7 @@
230
         """Return a bash script for running the given command.
231
         """
232
         script = '#!/usr/bin/env bash' + '\n\n'
233
-        script_path = environ['PATH'].rsplit(':')
234
+        script_path = os.environ['PATH'].rsplit(':')
235
         script += 'PATH=' + script_path[0] + ':$PATH'  + '\n\n'
236
         # Write arguments, one per line with backslash-continuation
237
         words = [_enc_arg(arg) for arg in [self.program] + self.args]
238
@@ -229,7 +275,7 @@
239
 
240
 
241
 class Pipe:
242
-    """A series of Commands, each having its output piped into the next.
243
+    """Several `Command` objects, each having its output piped into the next.
244
     """
245
     def __init__(self, *commands):
246
         """Create a new Pipe containing all the given Commands."""
247
@@ -251,8 +297,8 @@
248
         redirection for piping.
249
 
250
             capture
251
-                False to show pipeline output on stdout,
252
-                True to capture output for retrieval by get_output()
253
+                ``False`` to show pipeline output on stdout,
254
+                ``True`` to capture output for retrieval by `get_output`
255
 
256
         """
257
         self.output = ''
258
@@ -284,7 +330,7 @@
259
     def __str__(self):
260
         """Return a string representation of the Pipe.
261
         """
262
-        commands = [str(cmd) for cmd in self.commands]
263
+        commands = [unicode(cmd) for cmd in self.commands]
264
         return ' | '.join(commands)
265
 
266
 
267
@@ -302,7 +348,7 @@
268
     This is used internally by Command; you'd only need this if you're running
269
     shell programs without using the Command class.
270
     """
271
-    arg = str(arg)
272
+    arg = unicode(arg)
273
     # At the first sign of any special character in the argument,
274
     # single-quote the whole thing and return it (escaping ' itself)
275
     for char in ' #"\'\\&|<>()[]!?*':
276
tovid-0.33.tar.bz2/libtovid/deps.py -> tovid-0.34.tar.bz2/libtovid/deps.py Changed
53
 
1
@@ -4,7 +4,7 @@
2
     deps.require(deps.core)
3
 
4
 will look for all of tovid's core dependencies. If any cannot be found, the
5
-missing ones are printed and an exception is raised. Run deps.py from a prompt
6
+missing ones are printed and an exception is raised. Run ``deps.py`` from a prompt
7
 for further examples.
8
 
9
 In practice::
10
@@ -15,7 +15,7 @@
11
         print("Exiting...")
12
         sys.exit(1)
13
 
14
-deps.core is an internal dictionary of tovid's core dependencies, where the
15
+`deps.core` is an internal dictionary of tovid's core dependencies, where the
16
 keys are the names, and the values are brief descriptions with URLs.
17
 
18
 Provided dependency dictionaries:
19
@@ -40,13 +40,14 @@
20
 
21
     deps.require("more less cat")
22
 
23
-require also provides ways to print custom URLs and help when it cannot find
24
-dependencies. See help(deps.require) or keep reading.
25
+`require` also provides ways to print custom URLs and help when it cannot find
26
+dependencies. See ``help(deps.require)`` or keep reading.
27
 """
28
 
29
 __all__ = [
30
     'which',
31
     'require',
32
+    'MissingDep',
33
 ]
34
 
35
 import subprocess
36
@@ -129,7 +130,7 @@
37
             description="oops"):
38
 
39
     """Assert that one or more dependencies exist on the system. If any
40
-    are missing, raise a ``MissingDep`` exception.
41
+    are missing, raise a `MissingDep` exception.
42
 
43
         deps
44
             Names of dependencies to assert. May be a single name,
45
@@ -145,6 +146,7 @@
46
     (core, magick, etc.), its description is taken from there.
47
 
48
     Examples:
49
+
50
         require(all)
51
             Look for ALL dependencies that are defined internally.
52
 
53
tovid-0.33.tar.bz2/libtovid/encode.py -> tovid-0.34.tar.bz2/libtovid/encode.py Changed
149
 
1
@@ -2,14 +2,14 @@
2
 
3
 One high-level function is provided::
4
 
5
-    encode(infile, outfile, format, tvsys, method, ...)
6
+    encode(infile, outfile, format, tvsys, method, **kwargs)
7
 
8
-where "..." is optional keyword arguments (described below). For example::
9
+For example::
10
 
11
     encode('/video/foo.avi', '/video/bar.mpg', 'dvd', 'ntsc', 'ffmpeg')
12
 
13
-This will encode '/video/foo.avi' to NTSC DVD format using ffmpeg, saving
14
-the result as '/video/bar.mpg'. The ``format``, ``tvsys``, and ``method``
15
+This will encode ``/video/foo.avi`` to NTSC DVD format using ffmpeg, saving
16
+the result as ``/video/bar.mpg``. The ``format``, ``tvsys``, and ``method``
17
 arguments are optional; if you do::
18
 
19
     encode('/video/foo.avi', '/video/bar.mpg')
20
@@ -22,12 +22,18 @@
21
            quality=7, interlace='bottom', ...)
22
 
23
 The supported keywords may vary by backend, but some keywords are supported
24
-by all backends.
25
+by all backends. The available backends are:
26
+
27
+    - `~libtovid.backend.ffmpeg`
28
+    - `~libtovid.backend.mplayer`
29
+    - `~libtovid.backend.mpeg2enc`
30
+
31
 """
32
 
33
 __all__ = [
34
     'encode',
35
-    'get_encoder',
36
+    'eval_keywords',
37
+    'fit',
38
 ]
39
 
40
 from libtovid.backend import ffmpeg, mplayer, mpeg2enc
41
@@ -51,24 +57,44 @@
42
 
43
 def encode(infile, outfile, format='dvd', tvsys='ntsc', method='ffmpeg',
44
            **kwargs):
45
-    """Encode a multimedia file according to a target profile, saving the
46
-    encoded file to outfile.
47
+    """Encode a multimedia file ``infile`` according to a target profile,
48
+    saving the encoded file to ``outfile``.
49
 
50
         infile
51
             Input filename
52
         outfile
53
-            Desired output filename (.mpg implied)
54
+            Desired output filename (``.mpg`` implied)
55
         format
56
             One of 'vcd', 'svcd', 'dvd' (case-insensitive)
57
         tvsys
58
             One of 'ntsc', 'pal' (case-insensitive)
59
         method
60
-            Encoding backend: 'ffmpeg', 'mencoder', or 'mpeg2enc'
61
+            Encoding backend: `~libtovid.backend.ffmpeg`,
62
+            `~libtovid.backend.mplayer`, or `~libtovid.backend.mpeg2enc`
63
         kwargs
64
             Additional keyword arguments (name=value)
65
 
66
-    The supported keyword arguments vary by encoding method. See the encoding
67
-    functions for what is available in each.
68
+    For example::
69
+
70
+        encode('/video/foo.avi', '/video/bar.mpg', 'dvd', 'ntsc', 'ffmpeg')
71
+
72
+    This will encode ``/video/foo.avi`` to NTSC DVD format using ffmpeg, saving
73
+    the result as '/video/bar.mpg'. The ``format``, ``tvsys``, and ``method``
74
+    arguments are optional; if you do::
75
+
76
+        encode('/video/foo.avi', '/video/bar.mpg')
77
+
78
+    then encoding will be DVD NTSC, using ffmpeg.
79
+
80
+    Keyword arguments may be used to further refine encoding behavior, for example::
81
+
82
+        encode('foo.avi', 'foo.mpg', 'dvd', 'pal',
83
+               quality=7, interlace='bottom', ...)
84
+
85
+    The supported keywords may vary by backend, but some keywords are supported
86
+    by all backends.
87
+
88
+
89
     """
90
     source = mplayer.identify(infile)
91
     # Add .mpg to outfile if not already present
92
@@ -98,7 +124,13 @@
93
     encode_method(source, target, **kwargs)
94
 
95
 
96
-def get_encoder(backend):
97
+# --------------------------------------------------------------------------
98
+#
99
+# Helper functions
100
+#
101
+# --------------------------------------------------------------------------
102
+
103
+def _get_encoder(backend):
104
     """Get an encoding function."""
105
     if backend == 'ffmpeg':
106
         return ffmpeg.encode
107
@@ -108,12 +140,6 @@
108
         return mpeg2enc.encode
109
 
110
 
111
-# --------------------------------------------------------------------------
112
-#
113
-# Helper functions
114
-#
115
-# --------------------------------------------------------------------------
116
-
117
 def eval_keywords(source, target, **kwargs):
118
     """Interpret keywords that affect other keywords, and return the result.
119
     These are keywords that can be shared between multiple encoding backends.
120
@@ -136,17 +162,17 @@
121
     # Set quant and vbitrate to fit desired size
122
     if 'fit' in kwargs:
123
         kwargs['quant'], kwargs['vbitrate'] = \
124
-            _fit(source, target, kwargs['fit'])
125
+            fit(source, target, kwargs['fit'])
126
     return kwargs
127
 
128
 
129
-def _fit(source, target, fit_size):
130
+def fit(source, target, fit_size):
131
     """Return video (quantization, bitrate) to fit a video into a given size.
132
 
133
         source
134
-            MediaFile input (the video being encoded)
135
+            `~libtovid.media.MediaFile` input (the video being encoded)
136
         target
137
-            MediaFile output (desired target profile)
138
+            `~libtovid.media.MediaFile` output (desired target profile)
139
         fit_size
140
             Desired encoded file size, in MiB
141
 
142
@@ -177,6 +203,3 @@
143
         return (quant, vid_bitrate)
144
 
145
 
146
-
147
-
148
-
149
tovid-0.34.tar.bz2/libtovid/guis/helpers.py Added
597
 
1
@@ -0,0 +1,595 @@
2
+import Tkinter as tk
3
+import time
4
+import shlex
5
+import commands
6
+import re
7
+import os
8
+import fnmatch
9
+from libtovid.metagui import *
10
+from libtovid.metagui.control import _SubList
11
+from libtovid.util import filetypes
12
+from subprocess import Popen, PIPE, STDOUT
13
+from tempfile import mkdtemp
14
+
15
+__all__ = [ 'VideoGui', 'SetChapters', 'Chapters', 'strip_all', 'to_title',
16
+'find_masks', 'nodupes', 'video_filetypes', 'image_filetypes',
17
+'visual_filetypes', 'dvd_video_files', 'av_filetypes', 'sys_dir',
18
+'thumb_masks', 'home_dir', 'tovid_prefix', 'tovid_icon', 'os_path',
19
+'heading_text', '_files_and_titles', '_out' ]
20
+
21
+class VideoGui(tk.Frame):
22
+    """A basic GUI to play video files.  It runs mplayer in slave mode
23
+    so that commands can be sent to it via fifo.
24
+
25
+    Without subclassing it only contains a 'play/pause button
26
+    and an 'exit' button.
27
+    """
28
+    def __init__(self, master, args='', title='', callback=None, style='popup'):
29
+        """Initialize GUI
30
+
31
+           master
32
+               widget that will conain this GUI
33
+           args
34
+               additional arguments to mplayer command, inserted
35
+               at the end of the command just before the 'FILE' argument.
36
+           title
37
+               the wm title given to the master widget.
38
+           callback
39
+               a function run at program exit, before cleanup of temp files
40
+           style
41
+               may be one of 'popup' (default), 'standalone', or 'embedded'(TBA)
42
+        """
43
+        tk.Frame.__init__(self, master)
44
+
45
+        self.args = args
46
+        self.show_osd = False
47
+        if '-osdlevel 3' in args:
48
+            self.show_osd = True
49
+        self.master = master
50
+        if title:
51
+            try:
52
+                self.master.title(title)
53
+            except AttributeError:
54
+                print "Error: " + \
55
+                  "VideoGui master must be a root window for 'title' option"
56
+        self.callback = callback
57
+        self.style = style
58
+                
59
+        self.is_running = tk.BooleanVar()
60
+        self.is_running.set(False)
61
+        self.pauseplay = tk.StringVar()
62
+        self.pauseplay.set('play')
63
+        # temporary directory for fifo and other mplayer files
64
+        self.tempdir = mkdtemp(prefix='tovid-')
65
+        self.cmd_pipe = os.path.join(self.tempdir, 'slave.fifo')
66
+        self.editlist = os.path.join(self.tempdir, 'editlist')
67
+        os.mkfifo(self.cmd_pipe)
68
+        self.log = os.path.join(self.tempdir, 'mplayer.log')
69
+        self.draw()
70
+
71
+    def draw(self):
72
+        """Draw the GUI in self.master and get X11 identifier for container"""
73
+        self.root_frame = tk.Frame(self)
74
+        self.root_frame.pack(side='top', fill='both', expand=1, pady=20)
75
+        self.container = tk.Frame(self.root_frame, bg='black', container=1, colormap='new')
76
+        self.container.pack()
77
+        # X11 identifier for the container frame
78
+        self.xid = self.tk.call('winfo', 'id', self.container)
79
+        # bindings for exit
80
+        if self.style == 'standalone':
81
+            self._root().protocol("WM_DELETE_WINDOW", self.confirm_exit)
82
+            self._root().bind('<Control-q>', self.confirm_exit)
83
+        self.add_widgets()
84
+
85
+    def add_widgets(self):
86
+        """
87
+        Add buttons to the VideoGui.  Override this to customize buttons.
88
+        root_frame has 'grab_set()' applied to it so make sure widgets go
89
+        into this frame or they will not be functional!
90
+        This function is called in draw()
91
+        """
92
+        button_frame = tk.Frame(self.root_frame)
93
+        button_frame.pack(side='bottom', fill='x', expand=1)
94
+        control_frame = tk.Frame(button_frame, borderwidth=1, relief='groove')
95
+        control_frame.pack()
96
+        exit_button = tk.Button(control_frame, command=self.exit_mplayer, text='exit')
97
+        pause_button = tk.Button(control_frame, command=self.pause,
98
+                          width=12, textvariable=self.pauseplay)
99
+        exit_button.pack(side='left')
100
+        pause_button.pack(side='left')
101
+
102
+
103
+    def identify(self, video):
104
+        """
105
+        Get information about video from mplayer -identify.
106
+        Called by set_container()
107
+        """
108
+        
109
+        output = commands.getoutput('mplayer -vo null -ao null -frames 5 \
110
+          -channels 6 -identify %s' %video)
111
+        return output
112
+
113
+    def set_container(self, video):
114
+        """Get aspect ratio and set dimensions of video container.
115
+           Called by run().
116
+        """
117
+        if self.style == 'standalone':
118
+            v_width = 600
119
+        else:
120
+            v_width = 540
121
+        media_info = self.identify(video)
122
+        asr = re.findall('ID_VIDEO_ASPECT=.*', media_info)
123
+        # get last occurence as the first is 0.0 with mplayer
124
+        if asr:
125
+            asr = sorted(asr, reverse=True)[0].split('=')[1]
126
+        try:
127
+            asr = float(asr)
128
+        except ValueError:
129
+            asr = 0.0
130
+        # get largest value as mplayer prints it out before playing file
131
+        if asr and asr > 0.0:
132
+            v_height = int(v_width/asr)
133
+        else:
134
+            # default to 4:3 if identify fails
135
+            v_height = int(v_width/1.333)
136
+        self.container.configure(width=v_width, height=v_height)
137
+
138
+    def run(self, video):
139
+        """Play video in this GUI using mplayer."""
140
+        self.set_container(video)
141
+        command =  'mplayer -wid %s -nomouseinput -slave \
142
+          -input nodefault-bindings:conf=/dev/null:file=%s \
143
+          -edlout %s %s %s' \
144
+          %(self.xid, self.cmd_pipe, self.editlist, self.args, video)
145
+        self.command = shlex.split(command)
146
+
147
+    def poll(self):
148
+        """
149
+        Check mplayer log output for 'End of file' and restart the video.
150
+        This is necessary because otherwise Tkinter has no way of knowing
151
+        mplayer is still running.  In this way mplayer must be sent a 'quit'
152
+        explicity before exit. Use 'on_eof()' to run custom command when
153
+        'End of file' is found.
154
+        """
155
+        if not self.is_running.get():
156
+            return
157
+        tail = 'tail -n 1 %s' %self.log
158
+        log_output = commands.getoutput(tail)
159
+        # restart mplayer with same commands if it exits without being sent
160
+        # an explict 'quit'.
161
+        if '(End of file)' in log_output:
162
+            self.on_eof()
163
+            # check for is_running again as on_oef() might set it to false
164
+            if self.is_running.get():
165
+                cmd = Popen(self.command, stderr=open(os.devnull, 'w'), \
166
+                  stdout=open(self.log, "w"))
167
+                if self.show_osd:
168
+                    self.send('osd 3\n')
169
+                self.pause()
170
+        self.master.after(200, self.poll)
171
+
172
+    def on_eof(self):
173
+        """
174
+        Run when 'End of file' discovered in mplayer output by poll().
175
+        Override to run custom commands.
176
+        Note: change is_running() variable to false to prevent looping of video.
177
+        """
178
+        pass
179
+
180
+    def send(self, text):
181
+        """send command to mplayer's slave fifo"""
182
+        if self.is_running.get():
183
+            commands.getstatusoutput('echo -e "%s"  > %s' %(text, self.cmd_pipe))
184
+
185
+    def pause(self):
186
+        """send pause to mplayer via slave and set button var to opposite value"""
187
+        # mplayer's 'pause' pauses if playing and plays if paused
188
+        # pauseplay ==play in pause mode, and ==pause in play mode (button text)
189
+        if self.is_running.get():
190
+            if self.pauseplay.get() == 'pause':
191
+                self.pauseplay.set('play')
192
+            else:
193
+                self.pauseplay.set('pause')
194
+            self.send('pause\n')
195
+        else:
196
+            # start the video for the 1st time
197
+            cmd = Popen(self.command, stderr=open(os.devnull, 'w'), stdout=open(self.log, "w"))
198
+            self.is_running.set(True)
199
+            self.poll()
200
+            # show osd time and remaining time
201
+            if self.show_osd:
202
+                self.send('osd 3\n')
203
+            self.pauseplay.set('pause')
204
+
205
+    def exit_mplayer(self):
206
+        """
207
+        Close mplayer if it is running, then exit, running callback if it exists
208
+        """
209
+        # unpause so mplayer doesn't hang
210
+        if self.is_running.get():
211
+            if self.pauseplay.get() == 'play':
212
+                self.send('mute 1\n')
213
+                self.send('pause\n')
214
+            self.send('quit\n')
215
+            self.is_running.set(False)
216
+        time.sleep(0.3)
217
+        self.confirm_exit()
218
+
219
+    def confirm_exit(self, event=None):
220
+        """on exit, make sure that mplayer is not running before quit"""
221
+        if self.is_running.get():
222
+            mess = "osd_show_text 'please exit mplayer first' 4000 3\n"
223
+            if not self.show_osd:
224
+                self.send('osd 3\n%s' %mess)
225
+                self.after(2500, lambda:self.send('osd 0\n'))
226
+            else:
227
+                self.send(mess)
228
+        else:
229
+            # run any custom commands on exit
230
+            if callable(self.callback):
231
+                self.callback()
232
+            # remove temporary files and directory
233
+            for f in self.cmd_pipe, self.log, self.editlist:
234
+                if os.path.exists(f):
235
+                    os.remove(f)
236
+            if os.path.exists(self.tempdir):
237
+                os.rmdir(self.tempdir)
238
+            if self.style == 'standalone':
239
+                self.quit()
240
+            else:
241
+                self.destroy()
242
+
243
+
244
+class SetChapters(VideoGui):
245
+    """A GUI to set video chapter points using mplayer"""
246
+    def __init__(self, master, args='', title='', callback=None, style='popup'):
247
+        """
248
+        master
249
+            Pack into this widget
250
+        args
251
+            Additional args to pass to mplayer
252
+        title
253
+            Window manager titlebar title (master must be root window for this)
254
+        callback
255
+            Function to run on application exit, run before temp file cleanup
256
+        style
257
+            Can one of: 'popup' (default), 'standalone', or 'embedded'(TBA)
258
+        """
259
+        VideoGui.__init__(self, master, args, title, callback, style)
260
+
261
+        self.chapter_var = tk.StringVar()
262
+
263
+    def add_widgets(self):
264
+        # button frame and buttons
265
+        button_frame = tk.Frame(self.root_frame)
266
+        button_frame.pack(side='bottom', fill='x', expand=1)
267
+        control_frame = tk.Frame(button_frame, borderwidth=1, relief='groove')
268
+        control_frame.pack()
269
+        exit_button = tk.Button(control_frame, command=self.exit_mplayer, text='done !')
270
+        mark_button = tk.Button(control_frame, command=self.set_chapter,text='set chapter')
271
+        pause_button = tk.Button(control_frame, command=self.pause,
272
+                          width=12, textvariable=self.pauseplay)
273
+        framestep_button = tk.Button(control_frame, text='step >', command=self.framestep)
274
+        forward_button = tk.Button(control_frame, text='seek >', command=self.forward)
275
+        back_button = tk.Button(control_frame, text='< seek', command=self.back)
276
+        # seek frame and scale widget
277
+        seek_frame = tk.Frame(self.root_frame)
278
+        seek_frame.pack(side='left', fill='x', expand=1, padx=30)
279
+        self.seek_scale = tk.Scale(seek_frame, from_=0, to=100, tickinterval=10,
280
+        orient='horizontal', label='Use slider to seek to point in file (%)')
281
+        self.seek_scale.bind('<ButtonRelease-1>', self.seek)
282
+        # pack the buttons and scale in their frames
283
+        mark_button.pack(side='bottom', fill='both', expand=1)
284
+        self.seek_scale.pack(side='left', fill='x', expand=1)
285
+        exit_button.pack(side='left')
286
+        back_button.pack(side='left')
287
+        pause_button.pack(side='left')
288
+        framestep_button.pack(side='left')
289
+        forward_button.pack(side='left')
290
+
291
+    def seek(self, event=None):
292
+        """seek in video according to value set by slider"""
293
+        self.send('seek %s 3\n' %self.seek_scale.get())
294
+
295
+    def forward(self):
296
+        """seek forward 10 seconds and make sure button var is set to 'pause'"""
297
+        self.send('seek 10\n')
298
+        self.pauseplay.set('pause')
299
+
300
+    def back(self):
301
+        """seek backward 10 seconds and make sure button var is set to 'pause'"""
302
+        self.send('seek -10\n')
303
+        self.pauseplay.set('pause')
304
+
305
+    def framestep(self):
306
+        """step frame by frame forward and set button var to 'play'"""
307
+        self.send('pausing frame_step\n')
308
+        self.pauseplay.set('play')
309
+
310
+    def set_chapter(self):
311
+        """send chapter mark (via slave) twice so mplayer writes the data.
312
+           we only take the 1st mark on each line
313
+        """
314
+        for i in range(2):
315
+            self.send('edl_mark\n')
316
+        mess = "osd_show_text 'chapter point saved' 2000 3\n"
317
+        if not self.show_osd:
318
+            self.send('osd 3\n%s' %mess)
319
+            self.after(2500, lambda:self.send('osd 0\n'))
320
+        else:
321
+            self.send(mess)
322
+
323
+
324
+    def get_chapters(self):
325
+        # need a sleep to make sure mplayer gives up its data
326
+        if not os.path.exists(self.editlist):
327
+            return
328
+        time.sleep(0.5)
329
+        f = open(self.editlist)
330
+        c = f.readlines()
331
+        f.close()
332
+        # if chapter_var has value, editlist has been reset.  Append value, if any.
333
+        # only 1st value on each line is taken (2nd is to make mplayer write out)
334
+        s = [ i.split()[0]  for i  in self.chapter_var.get().splitlines() if i]
335
+        c.extend(s)
336
+        times = [ float(shlex.split(i)[0]) for i in c ]
337
+        chapters = ['00:00:00']
338
+        for t in sorted(times):
339
+            fraction = '.' + str(t).split('.')[1]
340
+            chapters.append(time.strftime('%H:%M:%S', time.gmtime(t)) + fraction)
341
+        if c:
342
+            return '%s' %','.join(chapters)
343
+
344
+
345
+# class for control that allow setting chapter points
346
+class Chapters(ListToOne):
347
+    """A popup version of the ListToOne Control, that also
348
+       allows setting chapter points with a mplayer GUI
349
+       (SetChapters).  This Control is specific to the tovid GUI.
350
+    """
351
+    def __init__(self,
352
+                 parent,
353
+                 label="ListToOne",
354
+                 option='',
355
+                 default=None,
356
+                 help='',
357
+                 filter=lambda x: x,
358
+                 side='left',
359
+                 control=Text(),
360
+                 text='',
361
+                 **kwargs):
362
+        """initialize Chapters
363
+           text
364
+               The text for the button that calls mplayer
365
+           For other options see help(control.ListToOne) 
366
+        """
367
+        ListToOne.__init__(self, parent, label, option, default, help,
368
+                          control, filter, side, **kwargs)
369
+        self.text = text
370
+        self.parent = parent
371
+        self.top_width = 540
372
+        self.top_height = 540
373
+
374
+    def draw(self, master):
375
+        """initialize Toplevel popup, video/chapters lists, and mplayer GUI.
376
+        Only pack the video/chapter lists (_SubList).  Withdraw until called.
377
+        """
378
+        chapters_button = tk.Button(master, text='edit', command=self.popup)
379
+        chapters_button.pack()
380
+        # popup to hold lists and mplayer
381
+        self.top = tk.Toplevel(master)
382
+        self.top.withdraw()
383
+        self.top.minsize(540, 540)
384
+        self.top.title('Chapters')
385
+        # text and label for instructions
386
+        txt = 'Auto chapters:\n' + \
387
+        '   1. Enter single value (integer) for all videos on 1st line.\n' + \
388
+        '   2. Or, use a different auto chapter value for each video.\n' + \
389
+        'HH:MM:SS format:\n' + \
390
+        '   1. Enter timecode for each video, eg. 00:00:00,00:05:00 ...\n' + \
391
+        '   2. Or use the "set with mplayer" button to use a GUI'
392
+        self.top.label = tk.Label(self.top, text=txt, justify=tk.LEFT)
393
+        self.top.label.pack(side=tk.TOP)
394
+        self.top_button = tk.Button(self.top, text='Okay', command=self.top.withdraw)
395
+        # frames to hold the _Sublist and mplayer
396
+        self.sublist_frame = tk.Frame(self.top)
397
+        self.mplayer_frame = tk.Frame(self.top)
398
+        # bindings for initial toplevel window
399
+        self.top.protocol("WM_DELETE_WINDOW", self.top.withdraw)
400
+        self.top.bind('<Escape>', self.withdraw_popup)
401
+        # pack the _SubList frame and draw _SubList
402
+        self.sublist_frame.pack(expand=1, fill=tk.BOTH)
403
+        _SubList.draw(self, self.sublist_frame, allow_add_remove=False)
404
+        self.top_button.pack(side='bottom')
405
+
406
+        # a button to allow setting chapters in mplayer GUI
407
+        button = tk.Button(self.control, text=self.text,
408
+        command=self.run_mplayer, state='disabled')
409
+        button.pack(side='left')
410
+        # 1:1, parent listbox is linked to this one
411
+        self.parent_listbox.link(self.listbox)
412
+        # Add callbacks to handle changes in parent
413
+        self.add_callbacks()
414
+
415
+    def get_geo(self, widget):
416
+        """Get geometry of a widget.
417
+           Returns List (integers): width, height, Xpos, Ypos
418
+        """
419
+        geo = widget.winfo_geometry()
420
+        return  [ int(x) for x in geo.replace('x', '+').split('+') ]
421
+
422
+    def center_popup(self, master, width, height):
423
+        """Get centered screen location of popup, relative to master.
424
+           Returns geometry string in form of 'WxH+Xpos+Ypos'
425
+        """
426
+        root_width, root_height, rootx, rooty = self.get_geo(master)
427
+        xoffset = (root_width - width) / 2
428
+        # subtract 15 pixels for WM titlebar (still looks OK if there is none)
429
+        yoffset = ((root_height - height) / 2 ) - 15
430
+        return '%dx%d+%d+%d' %(width, height, rootx + xoffset, rooty + yoffset)
431
+        
432
+    def popup(self):
433
+            """popup the list of chapters, with button to run mplayer GUI"""
434
+            videolist = self.parent_listbox
435
+            self.top.transient(self.parent._root())
436
+            w = self.top_width
437
+            h = self.top_height
438
+            self.top.geometry(self.center_popup(self.parent._root(), w, h))
439
+            self.after(100, lambda:self.top.deiconify())
440
+            if videolist.items.count() and not videolist.selected.get():
441
+                self.parent_listbox.select_index(0)
442
+    
443
+    def run_mplayer(self, event=None):
444
+        """run the mplayer GUI to set chapters"""
445
+        selected = self.parent_listbox.selected.get()
446
+        if selected:
447
+            # initialize mplayer GUI
448
+            self.mpl = SetChapters(self.mplayer_frame, '-osdlevel 3', '', self.on_exit)
449
+            self.mpl.pack()
450
+            # unpack label
451
+            self.sublist_frame.pack_forget()
452
+            self.top.label.pack_forget()
453
+            self.top_button.pack_forget()
454
+            self.mplayer_frame.pack()
455
+            self.mpl.run(selected)
456
+            # disable close button while mplayer running, both top and _root()
457
+            self.top.protocol("WM_DELETE_WINDOW", self.mpl.confirm_exit)
458
+            self.master._root().protocol("WM_DELETE_WINDOW", self.mpl.confirm_exit)
459
+            # disable usage of _root() window while mplayer running
460
+            self.top.grab_set()
461
+            self.top.bind('<Escape>', self.mpl.confirm_exit)
462
+
463
+    def on_exit(self):
464
+        """callback run when mplayer GUI exits. This sets the chapters list
465
+           to the timecodes set by the mplayer gui, repacks the label and the
466
+           list frame, sets/resets bindings, and releases the grab_set().
467
+        """
468
+        if self.mpl.get_chapters():
469
+            self.control.variable.set(self.mpl.get_chapters())
470
+        self.mplayer_frame.pack_forget()
471
+        # repack label
472
+        self.top.label.pack(side=tk.TOP)
473
+        self.sublist_frame.pack(expand=1, fill=tk.BOTH)
474
+        self.top_button.pack(side='bottom')
475
+        self.top.protocol("WM_DELETE_WINDOW", self.top.withdraw)
476
+        self.top.grab_release()
477
+        self.master._root().protocol("WM_DELETE_WINDOW", self.master._root().confirm_exit)
478
+        self.top.bind('<Escape>', self.withdraw_popup)
479
+
480
+    def withdraw_popup(self, event=None):
481
+        self.top.withdraw()
482
+
483
+    def select(self, index, value):
484
+        """Select an item in the list and enable editing.
485
+           List select method overriden in order to clear entry selection.
486
+        """
487
+        List.select(self, index, value)
488
+        # don't make it easy to erase a chapters string with a keypress
489
+        self.control.selection_clear()
490
+
491
+# Define a few supporting functions
492
+def to_title(filename):
493
+    basename = os.path.basename(filename)
494
+    firstdot = basename.find('.')
495
+    if firstdot >= 0:
496
+        return basename[0:firstdot]
497
+    else:
498
+        return basename
499
+
500
+def strip_all(filename):
501
+    return ''
502
+
503
+def find_masks(dir, pattern):
504
+    file_list=[]
505
+    ext = pattern.replace('*', '')
506
+    for path, dirs, files in os.walk(os.path.abspath(dir)):
507
+        for filename in fnmatch.filter(files, pattern):
508
+            file_list+=[ filename.replace(ext, '') ]
509
+    return file_list
510
+
511
+def nodupes(seq):
512
+    noDupes = []
513
+    [noDupes.append(i) for i in seq if not noDupes.count(i)]
514
+    return noDupes
515
+
516
+# List of file-type selections for Filename controls
517
+image_filetypes = [filetypes.image_files]
518
+image_filetypes.append(filetypes.all_files)
519
+#image_filetypes.extend(filetypes.match_types('image'))  # confusing
520
+# video file-types from filetypes needs some additions
521
+v_filetypes = 'm2v vob ts '
522
+v_filetypes += filetypes.get_extensions('video').replace('*.', '')
523
+v_filetypes += ' mp4 mpeg4 mp4v divx mkv ogv ogm ram rm rmvb wmv'
524
+vid_filetypes = filetypes.new_filetype('Video files', v_filetypes)
525
+video_filetypes = [vid_filetypes]
526
+video_filetypes += [filetypes.all_files]
527
+
528
+# some selectors can use video or audio
529
+av_filetypes = [ filetypes.all_files, filetypes.audio_files, vid_filetypes ]
530
+
531
+# some selectors can use image or video
532
+visual_filetypes = [ filetypes.all_files, filetypes.image_files, vid_filetypes ]
533
+
534
+# DVD video
535
+dvdext = 'vob mpg mpeg mpeg2'
536
+dvd_video_files = [ filetypes.new_filetype('DVD video files', dvdext) ]
537
+
538
+# Users can use their own thumb masks.  Add to thumb mask control drop-down
539
+masks = [ 'none', 'normal', 'oval', 'vignette', 'plectrum', 'arch', 'spiral', \
540
+'blob', 'star', 'flare' ]
541
+# $PREFIX/lib/tovid is already added to end of PATH
542
+os_path = os.environ['PATH'].rsplit(':')
543
+sys_dir = os_path[-1] + '/masks'
544
+home_dir = os.path.expanduser("~") + '/.tovid/masks'
545
+for dir in sys_dir, home_dir:
546
+    masks.extend(find_masks(dir, '*.png'))
547
+thumb_masks =  '|'.join(nodupes(masks))
548
+tovid_prefix = commands.getoutput('tovid -prefix')
549
+tovid_icon = os.path.join(tovid_prefix, 'lib', 'tovid', 'tovid.png')
550
+
551
+### configuration for titleset wizard ( 'tovid titlesets' )
552
+wizard = os.getenv('METAGUI_WIZARD')
553
+if wizard == '1':
554
+    # General options
555
+    heading_text = 'General options applying to all titlesets.\n'
556
+    heading_text += 'Required: "Output name" at bottom of window'
557
+elif wizard == '2':
558
+    # Root menu options
559
+    heading_text = 'Root menu options.  Use any options that do not depend\n'
560
+    heading_text += 'on video files or slideshows being loaded. Required: None'
561
+    heading_text += '\nChange "Menu title" from the default to suit your needs'
562
+elif wizard >= '3':
563
+    # titleset options
564
+    heading_text = 'Options for titleset %s\n' %(int(wizard) - 2)
565
+    heading_text += 'Required: 1 or more videos and/or slideshows'
566
+else:
567
+    heading_text = 'You can author (and burn) a DVD with a simple menu '
568
+    heading_text += 'using ONLY this "Basic" pane\n'
569
+    heading_text += 'Required: video files (and/or slideshows) and "Output name"'
570
+
571
+if wizard == '2':
572
+    # Root menu options
573
+    _files = List('Do not load any files for Root menu !', '-files', None,
574
+        '',
575
+        Filename('', filetypes=video_filetypes))
576
+    _files_and_titles = ListToOne(_files, 'Root menu link titleset titles',
577
+        '-titles', None,
578
+        'The titles for the Root menu link titleset titles',
579
+        Text(),
580
+        filter=to_title)
581
+else:
582
+    _files = List('Video files', '-files', None,
583
+        'List of video files to include on the disc',
584
+        Filename('', filetypes=video_filetypes))
585
+    _files_and_titles = ListToOne(_files, 'Video titles', '-titles', None,
586
+        'Titles to display in the main menu, one for each video file on the disc',
587
+        Text(),
588
+        filter=to_title)
589
+
590
+if wizard and wizard != '1':
591
+    # 'Output name' only for General Options ( '1' )
592
+    _out = Label(' ')
593
+else:
594
+    _out = Filename('Output name', '-out', '',
595
+        'Name to use for the output directory where the disc will be created.',
596
+        'save', 'Choose an output name')
597
tovid-0.33.tar.bz2/libtovid/guis/todisc.py -> tovid-0.34.tar.bz2/libtovid/guis/todisc.py Changed
216
 
1
@@ -3,72 +3,12 @@
2
 """A GUI for the todisc command-line program.
3
 """
4
 
5
-import os
6
+import Tkinter as tk
7
 
8
 # Get supporting classes from libtovid.metagui
9
 from libtovid.metagui import *
10
-from libtovid.util import filetypes
11
-import os
12
-import fnmatch
13
-from libtovid.cli import Command
14
-
15
-# Define a few supporting functions
16
-def to_title(filename):
17
-    basename = os.path.basename(filename)
18
-    firstdot = basename.find('.')
19
-    if firstdot >= 0:
20
-        return basename[0:firstdot]
21
-    else:
22
-        return basename
23
-
24
-def strip_all(filename):
25
-    return ''
26
-
27
-def find_masks(dir, pattern):
28
-    file_list=[]
29
-    ext = pattern.replace('*', '')
30
-    for path, dirs, files in os.walk(os.path.abspath(dir)):
31
-        for filename in fnmatch.filter(files, pattern):
32
-            file_list+=[ filename.replace(ext, '') ]
33
-    return file_list
34
-
35
-def nodupes(seq):
36
-    noDupes = []
37
-    [noDupes.append(i) for i in seq if not noDupes.count(i)]
38
-    return noDupes
39
-
40
-# List of file-type selections for Filename controls
41
-image_filetypes = [filetypes.image_files]
42
-image_filetypes.append(filetypes.all_files)
43
-#image_filetypes.extend(filetypes.match_types('image'))  # confusing
44
-# video file-types from filetypes needs some additions
45
-v_filetypes = 'm2v vob ts '
46
-v_filetypes += filetypes.get_extensions('video').replace('*.', '')
47
-v_filetypes += ' mp4 mpeg4 mp4v divx mkv ogv ogm ram rm rmvb wmv'
48
-vid_filetypes = filetypes.new_filetype('Video files', v_filetypes)
49
-video_filetypes = [vid_filetypes]
50
-video_filetypes += [filetypes.all_files]
51
-
52
-# some selectors can use video or audio
53
-av_filetypes = [ filetypes.all_files, filetypes.audio_files, vid_filetypes ]
54
-
55
-# some selectors can use image or video
56
-visual_filetypes = [ filetypes.all_files, filetypes.image_files, vid_filetypes ]
57
-
58
-# DVD video
59
-dvdext = 'vob mpg mpeg mpeg2'
60
-dvd_video_files = [ filetypes.new_filetype('DVD video files', dvdext) ]
61
-
62
-# Users can use their own thumb masks.  Add to thumb mask control drop-down
63
-masks = [ 'none', 'normal', 'oval', 'vignette', 'plectrum', 'arch', 'spiral', \
64
-'blob', 'star', 'flare' ]
65
-# $PREFIX/lib/tovid is already added to end of PATH
66
-os_path = os.environ['PATH'].rsplit(':')
67
-sys_dir = os_path[-1] + '/masks'
68
-home_dir = os.path.expanduser("~") + '/.tovid/masks'
69
-for dir in sys_dir, home_dir:
70
-    masks.extend(find_masks(dir, '*.png'))
71
-thumb_masks =  '|'.join(nodupes(masks))
72
+from libtovid.guis.helpers import *
73
+
74
 
75
 """Since todisc has a large number of options, it helps to store each
76
 one in a variable, named after the corresponding command-line option.
77
@@ -81,19 +21,14 @@
78
 ### Main todisc options
79
 ### --------------------------------------------------------------------
80
 
81
+# Note: _files_and_titles is defined in helpers.py
82
+
83
+_heading = Label(heading_text, 'center', tovid_icon, 48, 48)
84
+
85
 _menu_title = Text('Menu title', '-menu-title', 'My video collection',
86
     'Title text displayed on the main menu. Use \\n for a new line '
87
      'in a multi-line title.')
88
 
89
-_files = List('Video files', '-files', None,
90
-    'List of video files to include on the disc',
91
-    Filename('', filetypes=video_filetypes))
92
-
93
-_files_and_titles = ListToOne(_files, 'Video titles', '-titles', None,
94
-    'Titles to display in the main menu, one for each video file on the disc',
95
-    Text(),
96
-    filter=to_title)
97
-
98
 _group = ListToMany('-files', 'Grouped videos', '-group', None,
99
     'Video files to group together. Select the video in the list ' \
100
     'on the left, and add files to group with it by using the file ' \
101
@@ -106,10 +41,6 @@
102
 
103
 _pal = Flag('PAL', '-pal', False, 'PAL, European standard')
104
 
105
-_out = Filename('Output name', '-out', '',
106
-    'Name to use for the output directory where the disc will be created.',
107
-    'save', 'Choose an output name')
108
-
109
 
110
 ### --------------------------------------------------------------------
111
 ### Showcase options
112
@@ -330,8 +261,6 @@
113
     'This value is applied before the menu is scaled.',
114
     0, 460, 'pixels')
115
 
116
-
117
-
118
 ### --------------------------------------------------------------------
119
 ### Runtime behavior
120
 ### --------------------------------------------------------------------
121
@@ -693,7 +622,7 @@
122
     'Create a "Play All" button that jumps to the 1st title and plays '
123
     'all the videos in succession before returning to the main menu.')
124
 
125
-_chapters = ListToOne('-files', 'Chapters', '-chapters', None,
126
+_chapters = Chapters('-files', 'Chapters', '-chapters', None,
127
     'Number of chapters or HH:MM:SS string for each video. '
128
     'If only one value is given, use that for all videos. '
129
     'For grouped videos, use a "+" separator for joining '
130
@@ -704,7 +633,7 @@
131
     'When using HH:MM:SS format the 1st chapter MUST be 00:00:00.  '
132
     'If using -no-menu and passing just integer(s), then the value '
133
     'represents the chapter INTERVAL not the number of chapters',
134
-    Text(),
135
+    text='set with mplayer',
136
     side='top',
137
     filter=strip_all)
138
 
139
@@ -737,7 +666,8 @@
140
 ### --------------------------------------------------------------------
141
 
142
 # Burning options
143
-_burn = Flag('Burn project on completion', '-burn', False)
144
+_burn = Flag('Burn project', '-burn', False, 'Burn project on completion')
145
+_eject = Flag('Eject', '-eject', False, 'Eject DVD when burn complete')
146
 
147
 _speed = Number('Speed', '-speed', 8,
148
     'Speed for burning',
149
@@ -800,9 +730,7 @@
150
 """
151
 
152
 main =  VPanel('Basic',
153
-    Label('You can author (and burn) a DVD with a simple menu '
154
-          'using ONLY this "Basic" pane', 'center'),
155
-    _files_and_titles,
156
+    _heading,_files_and_titles,
157
     VPanel('',
158
         HPanel('',
159
             VPanel('Menu options',
160
@@ -812,14 +740,11 @@
161
                     _submenus, _ani_submenus, side='left')
162
             ),
163
             FlagGroup('TV System', 'exclusive', _ntsc, _pal),
164
-            VPanel('Chapters', Number('', '-chapters', 6,
165
-            'Number of chapters for each video.  '
166
-            'You can instead set chapters or time codes individually '
167
-            'for each video by using the "Chapters" tab on '
168
-            'the "Playback" tab.  Do NOT use both settings.',
169
-            1, 25, '', 'popup', 1), Label('per video')),
170
+            VPanel('Chapters', _chapters),
171
             VPanel('Burning',
172
+                HPanel('',
173
                 _burn,
174
+                _eject),
175
                 HPanel('',
176
                     _speed,
177
                     _device,
178
@@ -994,7 +919,8 @@
179
                 _thumb_shape,
180
                 _thumb_framesize,
181
                 _thumb_frame_color,
182
-                HPanel('', _thumb_columns, _align),
183
+                _thumb_columns,
184
+                _align,
185
                 ),
186
         ),
187
         VPanel("Showcase thumbnail",
188
@@ -1044,7 +970,6 @@
189
             _outlinewidth,
190
         ),
191
     ),
192
-    VPanel('Chapters', _chapters),
193
     VPanel('Grouped Videos', _group),
194
 )
195
 
196
@@ -1056,8 +981,8 @@
197
         tovid.AUDIO,
198
         tovid.BEHAVIOR,
199
     ),
200
-    SpacedText('Custom tovid options', '', '',
201
-         'Space-separated list of custom options to pass to tovid.'),
202
+    SpacedText('Custom makempg options', '', '',
203
+         'Space-separated list of custom options to pass to makempg.'),
204
 )
205
 
206
 ### --------------------------------------------------------------------
207
@@ -1065,7 +990,7 @@
208
 def run(args=None):
209
     app = Application('todisc',
210
         main, main_menu, submenus, thumbnails, slideshows, playback, behavior, encoding)
211
-    gui = GUI("tovid gui", 800, 660, app)
212
+    gui = GUI("tovid gui", 800, 660, app, icon=tovid_icon)
213
     gui.run(args)
214
 
215
 if __name__ == '__main__':
216
tovid-0.33.tar.bz2/libtovid/media.py -> tovid-0.34.tar.bz2/libtovid/media.py Changed
67
 
1
@@ -1,14 +1,8 @@
2
-"""This module provides a multimedia file class (MediaFile), for storing
3
-a profile of attributes including resolution, audio and video codecs and
4
-bitrates.
5
+"""This module provides a multimedia file class for storing a profile of
6
+attributes including resolution, audio and video codecs and bitrates.
7
 
8
-A function is also provided:
9
-
10
-    standard_media(format, tvsys)
11
-        Return a MediaFile profile matching the given format and TV system
12
-
13
-These can be used for getting a target MediaFile for encoding via
14
-one of the backends in libtovid.transcode.encode. For example::
15
+These can be used for getting a target `MediaFile` for encoding via
16
+one of the backends in :mod:`libtovid.backend`. For example::
17
 
18
     >>> dvd = standard_media('dvd', 'ntsc')
19
     >>> print(dvd)
20
@@ -33,7 +27,7 @@
21
 from libtovid.util import ratio_to_float
22
 
23
 # Analysis of MediaFile attributes
24
-# 
25
+#
26
 # acodec: ID, target
27
 # abitrate: ID, target
28
 # channels: ID
29
@@ -46,8 +40,8 @@
30
 # fps: ID, source, target
31
 # aspect: source
32
 # widescreen: target
33
-# 
34
-# 
35
+#
36
+#
37
 # Redundancies(?):
38
 # widescreen/aspect
39
 # scale/expand if aspect is known
40
@@ -103,7 +97,7 @@
41
 
42
 
43
 def standard_media(format, tvsys):
44
-    """Return a MediaFile compliant with a standard format and TV system.
45
+    """Return a `MediaFile` compliant with a standard format and TV system.
46
 
47
         format
48
             Standard format ('vcd', 'svcd', or 'dvd')
49
@@ -139,14 +133,14 @@
50
     aspect ratio, without distorting the picture.
51
 
52
         source
53
-            Input MediaFile
54
+            Input `MediaFile`
55
         target
56
-            Output MediaFile
57
+            Output `MediaFile`
58
         aspect
59
             Aspect ratio to assume for input file (e.g., '4:3', '16:9')
60
             or 'auto' to use autodetection based on source aspect
61
 
62
-    Return a new target MediaFile with correct scaling, using letterboxing
63
+    Return a new target `MediaFile` with correct scaling, using letterboxing
64
     if appropriate, and anamorphic widescreen if available (DVD only).
65
     """
66
     assert isinstance(source, MediaFile)
67
tovid-0.33.tar.bz2/libtovid/metagui/__init__.py -> tovid-0.34.tar.bz2/libtovid/metagui/__init__.py Changed
133
 
1
@@ -1,20 +1,37 @@
2
-"""A simplified GUI-writing module.
3
+"""This module provides a simpler way to create GUIs for command-line programs.
4
+
5
+Overview
6
+--------
7
+
8
+Command-line programs typically accept some number of *options*, many of which
9
+must be followed by some number of *arguments*. The arguments commonly represent
10
+filenames, numbers, text, fonts or colors, all of which should be displayed in
11
+a particular way in a GUI interface. This module was designed with many common
12
+option and argument types in mind.
13
+
14
+Each command-line option, and any arguments expected by it, are encapsulated in
15
+a `~control.Control`. Specialized controls exist for various kinds of options;
16
+for instance, one of the most common kinds is a `~control.Flag`, which simply
17
+enables or disables certain behavior. For instance, the ``ls`` program has an
18
+``-l`` flag for enabling a "long" output format. In metagui, this might be
19
+declared like::
20
+
21
+    Flag('Long listing', '-l')
22
+
23
 
24
-This module provides a simplified approach to creating GUIs for
25
-command-line programs. It's designed so _anyone_ can easily write their
26
-own GUI, without having any programming experience.
27
 
28
 It assumes your GUI is a direct frontend to one or more command-line programs,
29
 with each command-line option having an associated GUI control widget. Several
30
 kinds of widget are provided, for setting Filename, Color, Number or Font, or
31
 for picking a Choice or Flag.
32
 
33
-You probably know of a handful of command-line applications that would be
34
-much better with a GUI, even a cheesy-looking Tkinter one. This module makes
35
-it easy to create one.
36
+You probably know a handful of command-line applications that could benefit
37
+from a GUI, even a cheesy-looking Tkinter one. This module makes it easy to
38
+create one.
39
 
40
 
41
-DEFINE CONTROLS
42
+Define controls
43
+---------------
44
 
45
 Say, if you have a program that takes input and output filenames::
46
 
47
@@ -25,32 +42,32 @@
48
     Filename('Input filename', '-in')
49
     Filename('Output prefix', '-out')
50
 
51
-These have the general format:
52
+These have the general format::
53
 
54
     Control('Label', '-option', ...)
55
 
56
 where:
57
 
58
-    Control
59
-        is a Control subclass, such as Filename, Choice, or Number,
60
-        describing what type of value is being controlled;
61
-    '-option'
62
-        is a command-line option whose value is set by the Control; and
63
-    'Label'
64
-        is the text that should appear next to the GUI Control.
65
+    ``Control``
66
+        is a ``Control`` subclass appropriate to whatever is being controlled
67
+    ``'Label'``
68
+        is the text that should appear next to the GUI Control
69
+    ``'-option'``
70
+        is a command-line option whose value is set by the Control
71
 
72
 Other parameters include default value, help/tooltip text to show, allowable
73
 values, and hints about how to draw the GUI control widget; they are specific
74
-to the flavor of Control being used.    
75
+to the flavor of Control being used.
76
 
77
 For a full list of available Control subclasses and how to use them,
78
-see libtovid/metagui/control.py.
79
+see the `~libtovid.metagui.control` module.
80
 
81
 
82
-CREATING THE GUI
83
+Creating the GUI
84
+----------------
85
 
86
 Controls can be grouped together either vertically or horizontally (using a
87
-VPanel or HPanel, respectively)::
88
+`~libtovid.metagui.panel.VPanel` or `~libtovid.metagui.panel.HPanel`, respectively)::
89
 
90
     general = VPanel('General',
91
         Filename('Background audio file', '-bgaudio'),
92
@@ -59,17 +76,18 @@
93
         )
94
 
95
 This will create three GUI widgets in a panel labeled 'General': one for typing
96
-or browsing to a filename, one for enabling or disabling submenus, and another 
97
+or browsing to a filename, one for enabling or disabling submenus, and another
98
 for setting menu length to a number between 0 and 120. You can nest panels
99
 inside one another for grouping; sub-panels have their own label and list of
100
 Controls or sub-Panels.
101
 
102
-Once you have a panel, you can create an Application::
103
+Once you have a panel, you can create an `~libtovid.metagui.gui.Application`::
104
 
105
     app = Application('todisc', [general])
106
 
107
-This says your application will run the 'todisc' command-line program,
108
-passing options set by the 'General' panel. Now, create the GUI::
109
+This says your application will run the 'todisc' command-line program, passing
110
+options set by the 'General' panel. Now, create the
111
+`~libtovid.metagui.gui.GUI`::
112
 
113
     gui = GUI('MyGUI', [app])
114
     gui.run()
115
@@ -78,7 +96,8 @@
116
 program at the push of a button.
117
 
118
 
119
-CREATE A MULTI-PANEL GUI
120
+Create a multi-panel GUI
121
+------------------------
122
 
123
 If your program has a lot of options, one panel may not be enough to hold them
124
 all without looking cluttered, so you may break them down into multiple Panels,
125
@@ -102,6 +121,7 @@
126
 
127
 If multiple panels are given to Application, a tabbed interface is created,
128
 with one tab for each panel.
129
+
130
 """
131
 
132
 # Export everything from support, control, panel, and gui modules
133
tovid-0.33.tar.bz2/libtovid/metagui/control.py -> tovid-0.34.tar.bz2/libtovid/metagui/control.py Changed
359
 
1
@@ -1,83 +1,5 @@
2
-"""Control widget classes.
3
-
4
-This module defines a Control class and several derivatives. A Control is a
5
+"""This module defines a Control class and several derivatives. A Control is a
6
 special-purpose GUI widget for setting a value such as a number or filename.
7
-
8
-Control subclasses:
9
-
10
-    Choice
11
-        Multiple-choice selection, with radiobutton or dropdown style
12
-    Color
13
-        RGB color selection, with color picker
14
-    Filename
15
-        Filename selection, with filesystem browse button
16
-    Flag
17
-        Checkbox for enabling/disabling a flag-type option
18
-    FlagOpt
19
-        Flag option, taking an argument when enabled
20
-    Font
21
-        Font name chooser
22
-    Number
23
-        Numeric entry, with min/max and optional slide bar
24
-    Text
25
-        Plain text string
26
-    SpacedText
27
-        Plain text, interpreted as a space-separated list of strings
28
-    List
29
-        List of values, editable in another Control
30
-
31
-
32
-Option revamp ideas
33
-
34
-Need a way to handle positional arguments, where the position in the
35
-command-line does not necessarily correspond to the draw-order in the GUI.
36
-
37
-Currently, an empty '' option is used for positional arguments, which
38
-prevents them from having a global name. If instead, a convention were
39
-adopted for option strings, where:
40
-
41
-    List('Input files', '<in_files>', ...)
42
-
43
-would create a positional argument, where the order of positioning is
44
-defined somewhere else, like:
45
-
46
-    Application('grep', panel1, panel2, ...
47
-        expected = '[options] <in_files>')
48
-
49
-or ffmpeg:
50
-
51
-    _infile = Filename('Input file', '<infile>')
52
-    _outfile = Filename('Output file', '<outfile>')
53
-    _options = VPanel('Options', ...)
54
-
55
-    expected = '[options] <infile> [options] <outfile>'
56
-
57
-Would that work?
58
-
59
-Or tovid-batch, where -infiles is an option, but must come last:
60
-
61
-    expected = '[options] -infiles'
62
-
63
-How does '[options]' include everything _but_ -infiles?
64
-
65
-Focus on getting most of the tovid scripts metagui-ized, then go from there.
66
-
67
-Some options are like begin/end tokens:
68
-
69
-    makexml -group <file_list> -endgroup
70
-
71
-Some have complex expected followup options:
72
-
73
-    makexml -topmenu VIDEO \
74
-        -menu MENU1.mpg <file_list1> \
75
-        -menu MENU2.mpg <file_list2>
76
-
77
-How deep should metagui get into parsing all this?
78
-
79
-Shorthand for a FlagGroup of Flags might be handy:
80
-
81
-    format = FlagChoice('Format', '-vcd|-dvd|-svcd')
82
-
83
 """
84
 
85
 __all__ = [
86
@@ -158,7 +80,7 @@
87
 
88
     Control subclasses may have any number of sub-widgets such as labels,
89
     buttons or entry boxes; one of the sub-widgets should be linked to
90
-    self.variable like so:
91
+    self.variable like so::
92
 
93
         textbox = tk.Entry(self, textvariable=self.variable)
94
 
95
@@ -172,7 +94,7 @@
96
     @staticmethod
97
     def by_option(option):
98
         """Return the Control instance for a given option string,
99
-        or None if no Control has that option string.
100
+        or ``None`` if no Control has that option string.
101
         """
102
         if option != '' and option in Control.all:
103
             return Control.all[option]
104
@@ -191,6 +113,8 @@
105
                  **kwargs):
106
         """Create a Control for an option.
107
 
108
+        Arguments:
109
+
110
             vartype
111
                 Python type of stored variable
112
                 (str, bool, int, float, list, dict)
113
@@ -198,7 +122,7 @@
114
                 Label shown in the GUI for the Control
115
             option
116
                 Command-line option associated with this Control,
117
-                or '' to create a positional argument
118
+                or empty to create a positional argument
119
             default
120
                 Default value for the Control
121
             help
122
@@ -209,7 +133,7 @@
123
                 Position of label ('left' or 'top'). It's up to the
124
                 derived Control class to use this appropriately.
125
             kwargs
126
-                Keyword arguments of the form key1=arg1, key2=arg2
127
+                Keyword arguments of the form ``key1=arg1, key2=arg2``
128
 
129
         """
130
         Widget.__init__(self, label, **kwargs)
131
@@ -243,7 +167,7 @@
132
         """Draw the control widgets in the given master.
133
 
134
         Override this method in derived classes, and call the base
135
-        class draw() method:
136
+        class method::
137
 
138
             Control.draw(self, master)
139
 
140
@@ -297,7 +221,13 @@
141
         # self.variable isn't defined until draw() is called
142
         if not self.variable:
143
             raise NotDrawn("Can't get() from '%s'" % self.name)
144
-        return self.variable.get()
145
+        # In some strange cases (like a Number control with an empty Entry)
146
+        # the get() method can raise a ValueError. If so, just return the
147
+        # control's default value.
148
+        try:
149
+            return self.variable.get()
150
+        except ValueError:
151
+            return self.default
152
 
153
 
154
     def set(self, value):
155
@@ -336,7 +266,7 @@
156
 
157
     def get_args(self):
158
         """Return a list of arguments for passing this command-line option.
159
-        draw() must be called before this function.
160
+        `draw` must be called before this function.
161
         """
162
         args = []
163
         value = self.get()
164
@@ -371,6 +301,18 @@
165
         return args
166
 
167
 
168
+    def set_args(self, args):
169
+        """Set control options from the given list of command-line arguments,
170
+        and remove any successfully parsed options and arguments from ``args``.
171
+        """
172
+        # If this control's option is not in args, there's nothing to do
173
+        if self.option not in args:
174
+            return
175
+        # Get the index where the option appears
176
+        index = args.index(self.option)
177
+        # TODO
178
+
179
+
180
     def add_callback(self, callback):
181
         """Add a callback to this Control, which will be called anytime the
182
         Control's value is modified. The callback will be called with a single
183
@@ -431,19 +373,18 @@
184
             option
185
                 Command-line option to set
186
             default
187
-                Default choice, or '' to use first choice in list
188
+                Default choice, or empty to use first choice in list
189
             help
190
                 Help text to show in a tooltip
191
             choices
192
-                Available choices, in string form: 'one|two|three'
193
-                or list form: ['one', 'two', 'three'], or as a
194
-                list-of-lists: [['a', "Use A"], ['b', "Use B"], ..].
195
-                A dictionary is also allowed, as long as you don't
196
-                care about preserving choice order.
197
+                Available choices, in string form: ``one|two|three``, list
198
+                form ``['one', 'two', 'three']``, or as a list-of-lists
199
+                ``[['a', "Use A"], ['b', "Use B"], ..]``.  A dictionary is also
200
+                allowed, as long as you don't care about preserving order.
201
             style
202
-                'radio' for radiobuttons, 'dropdown' for a drop-down list
203
+                ``radio`` for radiobuttons, ``dropdown`` for a drop-down list
204
             side
205
-                'left' for horizontal, 'top' for vertical arrangement
206
+                ``left`` for horizontal, ``top`` for vertical arrangement
207
 
208
         """
209
         self.choices = convert_list(choices)
210
@@ -481,7 +422,7 @@
211
 
212
 
213
 class Color (Control):
214
-    """A color chooser that may have hex '#RRGGBB' or 'ColorName' values.
215
+    """A color chooser that may have '#RRGGBB' or 'ColorName' values.
216
     """
217
     def __init__(self,
218
                  label="Color",
219
@@ -499,6 +440,7 @@
220
                 Default color (named color or hexadecimal RGB)
221
             help
222
                 Help text to show in a tooltip
223
+
224
         """
225
         Control.__init__(self, str, label, option, default, help, **kwargs)
226
         # Defined in draw()
227
@@ -554,8 +496,8 @@
228
 
229
 
230
     def hexcolor(self, color):
231
-        """Return an 8-bit '#rrggbb' hex string for the given color.
232
-        If a given color name is unknown, return '#ffffff' (white).
233
+        """Return an 8-bit '#RRGGBB' hex string for the given color.
234
+        If a given color name is unknown, return '#FFFFFF' (white).
235
         """
236
         # If color is already hex, return it
237
         if self._is_hex_rgb(color):
238
@@ -589,8 +531,18 @@
239
     # Static methods for supporting functions
240
     @staticmethod
241
     def _is_hex_rgb(color):
242
-        """Return True if color appears to be a hex #RRGGBB value.
243
+        """Return True if color appears to be a hex '#RRGGBB' value.
244
         Both three-digit and six-digit hex codes are allowed.
245
+
246
+        Examples::
247
+
248
+            >>> _is_hex_rgb('#FF0080')
249
+            True
250
+            >>> _is_hex_rgb('#F08')
251
+            True
252
+            >>> _is_hex_rgb('#FF008')
253
+            False
254
+
255
         """
256
         if not isinstance(color, basestring):
257
             return False
258
@@ -605,6 +557,12 @@
259
     @staticmethod
260
     def _hex_to_rgb(color):
261
         """Convert a hexadecimal color string '#RRGGBB' to an RGB tuple.
262
+
263
+        Example::
264
+
265
+            >>> _hex_to_rgb('#FF0080')
266
+            (255, 0, 128)
267
+
268
         """
269
         color = color.lstrip('#')
270
         red, green, blue = (color[0:2], color[2:4], color[4:6])
271
@@ -614,6 +572,12 @@
272
     @staticmethod
273
     def _rgb_to_hex(rgb_tuple):
274
         """Convert an RGB tuple into a hexadecimal color string '#RRGGBB'.
275
+
276
+        Example::
277
+
278
+            >>> _rgb_to_hex((255, 0, 128))
279
+            '#FF0080'
280
+
281
         """
282
         red, green, blue = rgb_tuple
283
         return '#%02x%02x%02x' % (red, green, blue)
284
@@ -648,6 +612,7 @@
285
             filetypes
286
                 Types of files to show in the file browser dialog. May be 'all'
287
                 for all file types, or a list of ``('label', '*.ext')`` tuples.
288
+
289
         """
290
         Control.__init__(self, str, label, option, default, help, **kwargs)
291
         self.action = action
292
@@ -703,11 +668,12 @@
293
             option
294
                 Command-line flag passed
295
             default
296
-                Default value (True or False)
297
+                Default value (``True`` or ``False``)
298
             help
299
                 Help text to show in a tooltip
300
             enables
301
                 Option or list of options to enable when the Flag is checked
302
+
303
         """
304
         Control.__init__(self, bool, label, option, default, help, **kwargs)
305
 
306
@@ -759,7 +725,7 @@
307
 
308
     def get_args(self):
309
         """Return a list of arguments for passing this command-line option.
310
-        draw() must be called before this function.
311
+        `draw` must be called before this function.
312
         """
313
         args = []
314
         # If flag is true, and option is nonempty, append to args
315
@@ -845,9 +811,10 @@
316
             option
317
                 Command-line option to set
318
             default
319
-                Default font
320
+                Default font name
321
             help
322
                 Help text to show in a tooltip
323
+
324
         """
325
         Control.__init__(self, str, label, option, default, help, **kwargs)
326
         # Defined by draw()
327
@@ -900,10 +867,10 @@
328
             min, max
329
                 Range of allowable numbers (inclusive)
330
             units
331
-                Units of measurement (ex. "kbits/sec"), used as a label
332
+                Units of measurement (ex. 'kbits/sec'), used as a label
333
             style
334
-                'spin' for a spinbox
335
-                'scale' for a slider
336
+                'spin' for a spinbox,
337
+                'scale' for a slider,
338
                 'popup' for a slider in a popup window
339
             step
340
                 For 'scale' style, the amount to increment or
341
@@ -990,7 +957,7 @@
342
                 Help text to show in a tooltip
343
             width
344
                 Width in characters of the text field, or
345
-                None to maximize width in available space
346
+                ``None`` to maximize width in available space
347
         """
348
         Control.__init__(self, str, label, option, default, help, **kwargs)
349
         self.width = width
350
@@ -1075,7 +1042,7 @@
351
 class List (Control):
352
     """A list of values, editable with a given Control.
353
 
354
-    Examples:
355
+    Examples::
356
 
357
         List('Filenames', '-files', control=Filename())
358
         List('Colors', '-colors', control=Color())
359
tovid-0.33.tar.bz2/libtovid/metagui/gui.py -> tovid-0.34.tar.bz2/libtovid/metagui/gui.py Changed
212
 
1
@@ -20,6 +20,8 @@
2
     from tkFileDialog import \
3
         (asksaveasfilename, askopenfilename)
4
     from tkMessageBox import showinfo, showerror
5
+    import Tix
6
+
7
 # Python 3.x
8
 except ImportError:
9
     import tkinter as tk
10
@@ -27,12 +29,13 @@
11
     from tkinter.filedialog import \
12
         (asksaveasfilename, askopenfilename)
13
     from tkinter.messagebox import showinfo, showerror
14
+    import tkinter.tix as Tix
15
 
16
 from libtovid import cli
17
 from libtovid.metagui.widget import Widget
18
 from libtovid.metagui.panel import Panel, Tabs
19
 from libtovid.metagui.support import \
20
-    (ConfigWindow, Style, ensure_type, askyesno)
21
+    (ConfigWindow, Style, ensure_type, askyesno, get_photo_image, show_icons)
22
 from libtovid.metagui.control import Control, NoSuchControl
23
 
24
 
25
@@ -60,25 +63,25 @@
26
         # Log output text area
27
         self.text = ScrolledText(self, width=1, height=1,
28
             highlightbackground='gray', highlightcolor='gray', relief='groove',
29
-            font=('Courier', 12, 'normal'))
30
+            font=('Nimbus Sans L', 12, 'normal'))
31
         self.text.pack(fill='both', expand=True)
32
         # Bottom frame to hold the next four widgets
33
-        frame = tk.Frame(self)
34
+        self.frame = tk.Frame(self)
35
         # Text area for stdin input to the program
36
-        label = tk.Label(frame, text="Input:")
37
+        label = tk.Label(self.frame, text="Input:")
38
         label.pack(side='left')
39
-        self.stdin_text = tk.Entry(frame)
40
+        self.stdin_text = tk.Entry(self.frame)
41
         self.stdin_text.pack(side='left', fill='x', expand=True)
42
         self.stdin_text.bind('<Return>', self.send_stdin)
43
         # Button to stop the process
44
-        self.kill_button = tk.Button(frame, text="Kill", command=self.kill)
45
+        self.kill_button = tk.Button(self.frame, text="Kill", command=self.kill)
46
         self.kill_button.pack(side='left')
47
         # Button to save log output
48
-        self.save_button = tk.Button(frame, text="Save log",
49
+        self.save_button = tk.Button(self.frame, text="Save log",
50
                                      command=self.save_log)
51
         self.save_button.pack(side='left')
52
         # Pack the bottom frame
53
-        frame.pack(anchor='nw', fill='x')
54
+        self.frame.pack(anchor='nw', fill='x')
55
         # Disable stdin box and kill button until execution starts
56
         self.stdin_text.config(state='disabled')
57
         self.kill_button.config(state='disabled')
58
@@ -97,17 +100,16 @@
59
         self.stdin_text.delete(0, 'end')
60
 
61
 
62
-    def execute(self, command, callback=lambda x:x):
63
-        """Execute the given command, and call the given callback when done.
64
+    def execute(self, command, callback=None):
65
+        """Execute the given `~libtovid.cli.Command`, and call the given callback when done.
66
         """
67
         if not isinstance(command, cli.Command):
68
             raise TypeError("execute() requires a Command instance.")
69
-        else:
70
-            self.command = command
71
-        if not hasattr(callback, '__call__'):
72
-            raise TypeError("execute() callback must be a function")
73
-        else:
74
-            self.callback = callback
75
+        if not callable(callback):
76
+            raise TypeError("execute() callback must be callable")
77
+
78
+        self.command = command
79
+        self.callback = callback
80
 
81
         # Temporary file to hold stdout/stderr from command
82
         name = self.command.program
83
@@ -145,12 +147,15 @@
84
         """Poll for process completion, and update the output window.
85
         """
86
         # Read from output file and print to log window
87
-        data = self.outfile.read()
88
-        if data:
89
-            # Split on newlines (but not on \r)
90
-            lines = data.split('\n')
91
-            for line in lines:
92
-                self.write(line)
93
+        try:
94
+            data = self.outfile.read()
95
+            if data:
96
+                # Split on newlines (but not on \r)
97
+                lines = data.split('\n')
98
+                for line in lines:
99
+                    self.write(line)
100
+        except ValueError:
101
+            pass
102
 
103
         # Stop if command is done, or poll again
104
         if self.command.done():
105
@@ -172,7 +177,7 @@
106
 
107
     def write(self, line):
108
         """Write a line of text to the end of the log.
109
-        If the line contains '\r', overwrite the current line.
110
+        If the line contains ``\\r``, overwrite the current line.
111
         """
112
         if '\r' in line:
113
             curline = self.text.index('end-1c linestart')
114
@@ -279,7 +284,7 @@
115
             save_button.pack(anchor='w', side='left', fill='x', expand=True)
116
             save_button.config(command=self.save_exit, text='Save to wizard')
117
             run_button.pack_forget()
118
-#            exit_button.pack_forget()
119
+            #exit_button.pack_forget()
120
 
121
 
122
     def get_args(self):
123
@@ -291,6 +296,15 @@
124
         return args
125
 
126
 
127
+    def set_args(self, args):
128
+        """Load application settings from a list of command-line arguments.
129
+        The list of args is modified in-place; if all args are successfully
130
+        parsed and loaded, the list will be empty when this method returns.
131
+        """
132
+        for panel in self.panels:
133
+            panel.set_args(args)
134
+
135
+
136
     def execute(self):
137
         """Run the program with all the supplied options.
138
         """
139
@@ -335,12 +349,14 @@
140
         else:
141
             showinfo(title="Script saved", message="Saved '%s'" % filename)
142
 
143
+
144
     def save_exit(self):
145
-        filename = os.getcwd() + '/todisc_commands.bash'
146
+        filename = os.getcwd() + os.path.sep + '%s_commands.bash' % self.program
147
         self.save_script(filename)
148
         # exit code borrowed from apache so wizard knows it has a file to read
149
         exit(200)
150
 
151
+
152
     def prompt_load_script(self):
153
         """Prompt for a script filename, then load current Control settings
154
         from that file.
155
@@ -404,6 +420,7 @@
156
         print("Done reading '%s'" % filename)
157
 
158
 
159
+    # TODO: Relocate all this stuff into Control and its subclasses
160
     def load_args(self, args):
161
         """Load settings from a list of command-line arguments.
162
         """
163
@@ -443,8 +460,10 @@
164
                 control.set(control.vartype(value))
165
 
166
 
167
-
168
-class GUI (tk.Tk):
169
+# This uses Tix.Tk as a base class, to allow Tix widgets within
170
+# (since for some reason a Tix.ComboBox doesn't like to be inside
171
+# a Tkinter.Tk root window)
172
+class GUI (Tix.Tk):
173
     """GUI with one or more Applications
174
     """
175
     def __init__(self, title, width, height, application, **kwargs):
176
@@ -461,9 +480,12 @@
177
 
178
         Keywords arguments accepted:
179
 
180
-            inifile:      Name of an .ini-formatted file with GUI configuration
181
+            inifile
182
+                Name of an .ini-formatted file with GUI configuration
183
+            icon
184
+                Full path to an image to use as the titlebar icon
185
         """
186
-        tk.Tk.__init__(self)
187
+        Tix.Tk.__init__(self)
188
 
189
         # Ensure that one or more Application instances were provided
190
         ensure_type("GUI needs Application", Application, application)
191
@@ -475,8 +497,9 @@
192
         self.width = width
193
         self.height = height
194
 
195
-        # Get style configuration from INI file
196
+        # Get keyword arguments
197
         self.inifile = kwargs.get('inifile', DEFAULT_CONFIG)
198
+        self.icon_file = kwargs.get('icon', None)
199
 
200
         self.style = Style()
201
         if os.path.exists(self.inifile):
202
@@ -535,6 +558,9 @@
203
         self.application.pack(anchor='n', fill='both', expand=True)
204
         # Draw the toolbar
205
         self.application.draw_toolbar(self.show_config, self.confirm_exit)
206
+        # Set the application icon, if provided
207
+        if self.icon_file:
208
+            show_icons(self, self.icon_file)
209
 
210
 
211
     def show_config(self):
212
tovid-0.33.tar.bz2/libtovid/metagui/panel.py -> tovid-0.34.tar.bz2/libtovid/metagui/panel.py Changed
159
 
1
@@ -19,24 +19,51 @@
2
 except ImportError:
3
     import tkinter as tk
4
 
5
+from libtovid import cli
6
 from libtovid.odict import Odict
7
 from libtovid.metagui.widget import Widget
8
 from libtovid.metagui.control import Control, Flag
9
 from libtovid.metagui.support import \
10
-    (ComboBox, ensure_type, divide_list)
11
+    (ComboBox, ensure_type, divide_list, get_photo_image)
12
 from libtovid.metagui.variable import ListVar
13
+from base64 import b64encode
14
 
15
 
16
 class Label (Widget):
17
     """A widget with a text label.
18
     """
19
-    def __init__(self, text='', justify='left'):
20
+    def __init__(self,
21
+                 text='',
22
+                 justify='left',
23
+                 image_file='',
24
+                 image_width=0,
25
+                 image_height=0):
26
         """Create a Label with the given text.
27
 
28
             text
29
                 String to appear in the Label
30
             justify
31
                 Text justification: 'left', 'center', or 'right'
32
+            image_file
33
+                Full path to image file. May be in any format that
34
+                'convert' supports.
35
+            image_width
36
+                Width in pixels to resize the image to
37
+            image_height
38
+                Height in pixels to resize the image to
39
+
40
+        Width and height may be used to scale the image in different ways:
41
+
42
+            width == 0, height == 0
43
+                Preserve the original image's size
44
+            width > 0, height == 0
45
+                Resize to the given width; height automatically
46
+                adjusts to maintain aspect ratio
47
+            width == 0, height > 0
48
+                Resize to the given height; width automatically
49
+                adjusts to maintain aspect ratio
50
+            width > 0, height > 0
51
+                Resize to exactly the given dimensions
52
         """
53
         Widget.__init__(self, text)
54
         self.text = text
55
@@ -44,19 +71,35 @@
56
             raise ValueError("Label justify argument must be 'left', 'center', "
57
                              "or 'right' (got '%s' instead)." % justify)
58
         self.justify = justify
59
-        # In addition to justify, anchor to nw, n, or ne
60
-        _anchors = {'left': 'nw', 'center': 'n', 'right': 'ne'}
61
-        self.anchor = _anchors[self.justify]
62
+        # Image attributes
63
+        self.image_file = image_file
64
+        self.image_width = image_width
65
+        self.image_height = image_height
66
         # Will be set by draw()
67
         self.label = None
68
+        self.image = None
69
 
70
 
71
     def draw(self, master, **kwargs):
72
         """Draw the Label in the given master.
73
         """
74
         Widget.draw(self, master, **kwargs)
75
-        self.label = tk.Label(self, text=self.text, justify=self.justify)
76
-        self.label.pack(anchor=self.anchor)
77
+        # If an image filename was provided, get a PhotoImage
78
+        if self.image_file:
79
+            photo_image = get_photo_image(self.image_file,
80
+                self.image_width, self.image_height, self.cget('background'))
81
+            # Keep a reference to the PhotoImage to prevent garbage collection
82
+            self.photo = photo_image
83
+            image_frame = tk.Frame(self, padx=4, pady=4)
84
+            self.image = tk.Label(image_frame, image=photo_image)
85
+            self.image.pack()
86
+            image_frame.pack(side='left', expand=False)
87
+
88
+        # Create and pack the label
89
+        self.label = tk.Label(self, text=self.text, justify=self.justify, padx=8)
90
+        # Set appropriate anchoring based on justification
91
+        _anchors = {'left': 'w', 'center': 'center', 'right': 'e'}
92
+        self.label.pack(expand=True, anchor=_anchors[self.justify])
93
 
94
 
95
 class Panel (Widget):
96
@@ -93,7 +136,7 @@
97
         # Get a labeled or unlabeled frame (labeled by default)
98
         if self.name and kwargs.get('labeled', True):
99
             self.frame = tk.LabelFrame(self, text=self.name,
100
-                                       padx=8, pady=8)
101
+                                       padx=4, pady=4)
102
         else:
103
             self.frame = tk.Frame(self)
104
         # Pack the frame
105
@@ -120,14 +163,20 @@
106
     def get_args(self):
107
         """Return a list of all command-line options from contained widgets.
108
         """
109
-        if not self.widgets:
110
-            return []
111
         args = []
112
         for widget in self.widgets:
113
             args += widget.get_args()
114
         return args
115
 
116
 
117
+    def set_args(self, args):
118
+        """Set panel options from the given list of command-line arguments,
119
+        and remove any successfully parsed options and arguments from ``args``.
120
+        """
121
+        for widget in self.widgets:
122
+            widget.set_args(args)
123
+
124
+
125
     def enable(self, enabled=True):
126
         """Enable all widgets in the Panel.
127
         """
128
@@ -138,7 +187,7 @@
129
 class HPanel (Panel):
130
     """A group of widgets or sub-panels, packed horizontally (left-to-right).
131
 
132
-    For example:
133
+    For example::
134
 
135
         HPanel("General",
136
             Filename(...),
137
@@ -162,7 +211,7 @@
138
 class VPanel (Panel):
139
     """A group of widgets or sub-panels, packed vertically (top-to-bottom).
140
 
141
-    For example:
142
+    For example::
143
 
144
         VPanel("General",
145
             Filename(...),
146
@@ -192,9 +241,9 @@
147
     corresponding Control is displayed, along with a "remove" button to
148
     discard the control.
149
     """
150
-    def __init__(self, name='', *widgets, **kwargs):
151
-        Panel.__init__(self, name, *widgets, **kwargs)
152
-        ensure_type("Dropdown contents must be Controls", Control, *widgets)
153
+    def __init__(self, name='', *controls, **kwargs):
154
+        Panel.__init__(self, name, *controls, **kwargs)
155
+        ensure_type("Dropdown contents must be Controls", Control, *controls)
156
         # Controls, indexed by label
157
         self.controls = Odict()
158
         for control in self.widgets:
159
tovid-0.33.tar.bz2/libtovid/metagui/support.py -> tovid-0.34.tar.bz2/libtovid/metagui/support.py Changed
598
 
1
@@ -1,10 +1,12 @@
2
-"""Supporting classes for metagui"""
3
+"""Supporting classes for metagui
4
+"""
5
 
6
 __all__ = [
7
     # Functions
8
     'exit_with_traceback',
9
     'ensure_type',
10
     'divide_list',
11
+    'get_photo_image',
12
     # Others
13
     'ScrollList',
14
     'DragList',
15
@@ -21,6 +23,7 @@
16
 import traceback
17
 import math
18
 import base64
19
+import re
20
 
21
 # Python < 3.x
22
 try:
23
@@ -28,12 +31,17 @@
24
     from tkSimpleDialog import Dialog
25
     import tkMessageBox
26
     from ConfigParser import ConfigParser
27
+    import Tix
28
+    import tkFont
29
+
30
 # Python 3.x
31
 except ImportError:
32
     import tkinter as tk
33
     from tkinter.simpledialog import Dialog
34
     import tkinter.messagebox as tkMessageBox
35
     from configparser import ConfigParser
36
+    import tkinter.tix as Tix
37
+    import tkinter.font as tkFont
38
 
39
 from libtovid import cli
40
 from libtovid.util import imagemagick_fonts
41
@@ -58,7 +66,7 @@
42
 
43
 def ensure_type(message, required_type, *objects):
44
     """Ensure that the given objects are of the required type.
45
-    If not, print a message and exit_with_traceback.
46
+    If not, print a message and call `exit_with_traceback`.
47
     """
48
     for obj in objects:
49
         if not isinstance(obj, required_type):
50
@@ -81,11 +89,11 @@
51
 
52
 
53
 def askyesno(title=None, message=None, **options):
54
-    """Show a popup with Yes / No options. Return True if Yes was clicked,
55
-    False if No was clicked.
56
+    """Show a popup with Yes / No options. Return ``True`` if Yes was clicked,
57
+    ``False`` if No was clicked.
58
 
59
     This function is to work around a bug in Tkinter 8.5 / Python 2.6, where
60
-    the askyesno function always returns False after a file dialog has been
61
+    the askyesno function always returns ``False`` after a file dialog has been
62
     displayed.
63
     """
64
     result = tkMessageBox._show(title, message,
65
@@ -97,6 +105,87 @@
66
         return False
67
 
68
 
69
+def get_photo_image(filename, width=0, height=0, background='', dither=False):
70
+    """Get a ``tk.PhotoImage`` from a given image file.
71
+
72
+        filename
73
+            Full path to the image file, in any format that 'convert'
74
+            understands
75
+        width
76
+            Desired image width in pixels
77
+        height
78
+            Desired image height in pixels
79
+        background
80
+            An '#RRGGBB' string for the desired background color.
81
+            Only effective for images with transparency.
82
+        dither
83
+            True to dither the image. May increase graininess.
84
+            Smallish images usually look better without dithering.
85
+
86
+    Width and height may be used to scale the image in different ways:
87
+
88
+        width == 0, height == 0
89
+            Preserve the original image's size
90
+        width > 0, height == 0
91
+            Resize to the given width; height automatically
92
+            adjusts to maintain aspect ratio
93
+        width == 0, height > 0
94
+            Resize to the given height; width automatically
95
+            adjusts to maintain aspect ratio
96
+        width > 0, height > 0
97
+            Resize to exactly the given dimensions
98
+    """
99
+    # Convert the image file to gif using 'convert'
100
+    cmd = cli.Command('convert')
101
+
102
+    # Pre-processing
103
+    # Dither if requested, otherwise disable
104
+    if dither:
105
+        cmd.add('-dither')
106
+    else:
107
+        cmd.add('+dither')
108
+    # Set the background color, if provided
109
+    if background:
110
+        cmd.add('-background', background)
111
+
112
+    cmd.add(filename)
113
+
114
+    # Post-processing
115
+    # Scale appropriately
116
+    if width > 0 and height == 0:
117
+        cmd.add('-resize', '%dx' % width)
118
+    elif width == 0 and height > 0:
119
+        cmd.add('-resize', 'x%d' % height)
120
+    elif width > 0 and height > 0:
121
+        cmd.add('-resize', '%dx%d!' % (width, height))
122
+
123
+    # If background color was set, flatten the image
124
+    if background:
125
+        cmd.add('-flatten')
126
+
127
+    # Convert to gif data
128
+    cmd.add('gif:-')
129
+
130
+    # Run the command, capturing the gif data from standard output
131
+    cmd.run(capture=True, silent=True)
132
+    gif_data = cmd.get_output()
133
+    # Create and return the PhotoImage from the gif data
134
+    return tk.PhotoImage(data=base64.b64encode(gif_data))
135
+
136
+
137
+def show_icons(window, image):
138
+    '''Show window manager icons for window, if supported.
139
+    The icon argument is full path to the image to be used.
140
+    '''
141
+    icon = get_photo_image(image, 32, 32)
142
+    try:
143
+        window.tk.call('wm', 'iconphoto', window._w, icon)
144
+    except tk.TclError:
145
+        print("Could not set window manager icons.  Maybe your "
146
+              "Tkinter (Tcl) is too old? Continuing anyway.")
147
+
148
+
149
+
150
 ### --------------------------------------------------------------------
151
 ### Classes
152
 ### --------------------------------------------------------------------
153
@@ -104,12 +193,12 @@
154
 class ScrollList (tk.Frame):
155
     """A Listbox with a scrollbar.
156
 
157
-    Similar to a tk.Listbox, a ScrollList shows a list of items. tk.Variables
158
-    may be associated with both the list of items, and the one that is currently
159
-    selected.
160
+    Similar to a ``tk.Listbox``, a ScrollList shows a list of items.
161
+    ``tk.Variable`` objects may be associated with both the list of items, and
162
+    the one that is currently selected.
163
     """
164
     def __init__(self, master=None, items=None,
165
-                 selected=None):
166
+                 selected=None, **kwargs):
167
         """Create a ScrollList widget.
168
 
169
             master
170
@@ -118,6 +207,13 @@
171
                 ListVar or Python list of items to show in listbox
172
             selected
173
                 Tk StringVar to store currently selected choice in
174
+
175
+        Keyword arguments:
176
+
177
+            width
178
+                Width of the listbox, in characters
179
+            height
180
+                Height of the listbox, in characters
181
         """
182
         tk.Frame.__init__(self, master)
183
 
184
@@ -132,7 +228,8 @@
185
         self.scrollbar = tk.Scrollbar(self, orient='vertical',
186
                                       command=self.scroll)
187
         self.listbox = tk.Listbox(self, listvariable=self.items,
188
-                                  width=30, height=7,
189
+                                  width=kwargs.get('width', 45),
190
+                                  height=kwargs.get('height', 7),
191
                                   yscrollcommand=self.scrollbar.set,
192
                                   exportselection=0)
193
         self.listbox.pack(side='left', fill='both', expand=True)
194
@@ -185,9 +282,9 @@
195
 
196
 
197
     def delete(self, first, last=None):
198
-        """Delete values in a given index range (first, last), not including
199
-        last itself. If last is None, delete only the item at first index.
200
-        Calls ``remove`` callbacks for each removed item.
201
+        """Delete values in a given index range (``first``, ``last``), not
202
+        including ``last`` itself. If ``last`` is ``None``, delete only the
203
+        item at index ``first``.  Calls ``remove`` callbacks for each removed item.
204
         """
205
         if first == last:
206
             return
207
@@ -201,7 +298,7 @@
208
 
209
 
210
     def swap(self, index_a, index_b):
211
-        """Swap the element at index_a with the one at index_b.
212
+        """Swap the element at ``index_a`` with the one at ``index_b``.
213
         Calls ``swap`` callbacks for the swapped items.
214
         """
215
         # Use a temporary list, so self.items is only modified once
216
@@ -233,7 +330,7 @@
217
 
218
 
219
     def select_index(self, index, select_in_linked=True):
220
-        """Select (highlight) the list item at the given index.
221
+        """Select (highlight) the list item at the given ``index``.
222
         Calls ``select`` callbacks for the selected item.
223
         """
224
         item_count = self.items.count()
225
@@ -288,11 +385,11 @@
226
             action
227
                 May be 'insert', 'remove', 'select', or 'swap'
228
             function
229
-                Callback function, taking (index, value) arguments
230
-                index is 0-based; passes -1 for the last item
231
+                Callback function to call for the given action
232
 
233
-        All callback functions (except 'swap') must take (index, value)
234
-        parameters. The 'swap' callback should accept (index_a, index_b).
235
+        All callback functions except 'swap' must take ``(index, value)``
236
+        parameters; the 'swap' callback should accept ``(index_a, index_b)``.
237
+        In all cases, ``index`` is 0-based, and -1 is passed for the last item.
238
         """
239
         if action not in ['insert', 'remove', 'select', 'swap']:
240
             raise ValueError("List callback action must be"
241
@@ -303,8 +400,8 @@
242
 
243
 
244
     def summon_callbacks(self, action, index, item):
245
-        """Summon callbacks for the given action,
246
-        passing index and item to each.
247
+        """Summon callbacks for the given ``action``, passing ``index`` and
248
+        ``item`` to each.
249
         """
250
         if action not in ['insert', 'remove', 'select', 'swap']:
251
             raise ValueError("Callback action must be"
252
@@ -365,10 +462,9 @@
253
 
254
 
255
 class ComboBox (tk.Frame):
256
-    """A dropdown menu with several choices.
257
-    """
258
     def __init__(self, master, choices=None,
259
-                 variable=None, command=None):
260
+                 variable=None, command=None,
261
+                 **kwargs):
262
         """Create a ComboBox.
263
 
264
             master
265
@@ -381,96 +477,28 @@
266
                 Function to call when an item in the list is selected
267
         """
268
         tk.Frame.__init__(self, master)
269
-        if type(choices) == list:
270
-            choices = ListVar(self, choices)
271
-        self.choices = choices or ListVar()
272
         self.variable = variable or tk.StringVar()
273
-        self.command = command
274
-        self.curindex = 0
275
-
276
-        # Text and button
277
-        # Fit to width of longest choice
278
-        _width = max([len(str(c)) for c in self.choices.get()])
279
-        self.text = tk.Entry(self, textvariable=self.variable, width=_width)
280
-        self.text.pack(side='left', expand=True, fill='both')
281
-        self.button = tk.Button(self, text="...", command=self.open)
282
-        self.button.pack(side='left')
283
-
284
-        # Dropdown list, displayed when button is clicked
285
-        self.dropdown = tk.Toplevel(self)
286
-        # Don't draw window manager frame around the dropdown
287
-        self.dropdown.wm_overrideredirect(1)
288
-        # Hide until later
289
-        self.dropdown.withdraw()
290
-
291
-        # List of choices
292
-        self.chooser = tk.Listbox(self.dropdown, background='#ffffff',
293
-                                  listvariable=self.choices, width=_width,
294
-                                  height=self.choices.count())
295
-        # Use alternating white/gray for choices
296
-        #for index in range(0, len(self.choices), 2):
297
-        #    self.chooser.itemconfig(index, bg='LightGray')
298
-        self.chooser.bind('<Button-1>', self.choose, '+')
299
-        self.bind_all('<Button>', self.close, '+')
300
-        self.chooser.bind('<Motion>', self.highlight)
301
-        self.chooser.grid()
302
-
303
-
304
-    def open(self):
305
-        """Open/close a panel showing the list of choices.
306
-        """
307
-        if self.dropdown.winfo_viewable():
308
-            self.dropdown.withdraw()
309
-        else:
310
-            # Align dropdown list with the text box
311
-            x = self.text.winfo_rootx()
312
-            y = self.text.winfo_rooty()
313
-            self.dropdown.wm_geometry("+%d+%d" % (x, y))
314
-            # Show list
315
-            self.dropdown.deiconify()
316
-
317
-        # Highlight the current selection
318
-        self.chooser.itemconfig(self.curindex, background='LightGray')
319
-
320
-
321
-    def close(self, event=None):
322
-        """Close the panel showing the list of choices.
323
-        """
324
-        try:
325
-            if self.dropdown.winfo_viewable():
326
-                self.dropdown.withdraw()
327
-        except tk.TclError:
328
-            pass
329
-
330
-
331
-    def highlight(self, event=None):
332
-        """Event handler to highlight an entry on mouse-over.
333
-        """
334
-        for index in range(self.choices.count()):
335
-            self.chooser.itemconfig(index, background='White')
336
-        index = self.chooser.nearest(event.y)
337
-        self.chooser.itemconfig(index, background='LightGray')
338
-
339
-
340
-    def choose(self, event=None):
341
-        """Make a selection from the list, and set the variable.
342
-        """
343
-        self.curindex = self.chooser.nearest(event.y)
344
-        self.variable.set(self.chooser.get(self.curindex))
345
-        self.close()
346
-        # Callback, if any
347
-        if self.command:
348
-            self.command()
349
+        # Create and pack the Tix ComboBox
350
+        self.combo = Tix.ComboBox(self, editable=True, **kwargs)
351
+        self.combo.config(variable=self.variable, command=command)
352
+        self.combo.pack(side='left', expand=True, fill='both')
353
+        # Make the entry box background white
354
+        # FIXME: This doesn't do anything when editable=False
355
+        self.combo.subwidget('entry').config(bg='#ffffff')
356
+        # Add choices, if specified
357
+        if choices:
358
+            for index, choice in enumerate(choices):
359
+                self.combo.insert(index, choice)
360
 
361
 
362
 class FontChooser (Dialog):
363
-    """A widget for choosing a font.
364
+    """A widget for choosing an ImageMagick font name.
365
     """
366
     # Cache of PhotoImage previews, indexed by font name
367
     _cache = {}
368
 
369
     def __init__(self, parent=None):
370
-        Dialog.__init__(self, parent, "Font chooser")
371
+        Dialog.__init__(self, parent, "ImageMagick font chooser")
372
         # Defined in body()
373
         self.fontlist = None
374
         self.preview = None
375
@@ -517,7 +545,7 @@
376
 
377
 
378
     def render_font(self, fontname):
379
-        """Return a tk.PhotoImage preview of the given font.
380
+        """Return a `tk.PhotoImage` preview of the given font.
381
         """
382
         cmd = cli.Command('convert')
383
         cmd.add('-size',  '500x60')
384
@@ -588,7 +616,8 @@
385
         root.option_clear()
386
         # Font
387
         root.option_add("*font", self.font)
388
-        root.option_add("*Text.font", ('Courier', 10, 'normal'))
389
+        #root.option_add("*Text.font", ('Courier', 10, 'normal'))
390
+        root.option_add("*Text.font", self.font)
391
         # Background color
392
         root.option_add("*Scale.troughColor", self.bgcolor)
393
         root.option_add("*Spinbox.background", self.bgcolor)
394
@@ -652,7 +681,7 @@
395
         """Create and display a configuration window.
396
 
397
             inifile
398
-                An .ini-style file to load/save settings from
399
+                An ``.ini``-style file to load/save settings from
400
         """
401
         self.style = style or Style()
402
         Dialog.__init__(self, master, "Configuration")
403
@@ -667,40 +696,65 @@
404
         have the initial focus. Called by the Dialog base class constructor.
405
         """
406
         # Font family
407
+        families = sorted(tkFont.families())
408
         tk.Label(master, text="Font family").pack(side='top')
409
-        self.fontfamily = ComboBox(master,
410
-                                   choices=['Helvetica', 'Courier', 'Times'])
411
+        self.fontfamily = ScrollList(master, families)
412
+        self.fontfamily.callback('select', self.refresh)
413
         self.fontfamily.pack(side='top', fill='both', expand=True)
414
-        # Font size
415
-        tk.Label(master, text="Font size").pack(side='top')
416
-        self.fontsize = ComboBox(master, choices=[8, 10, 12, 15, 18, 24])
417
-        self.fontsize.pack(side='top')
418
         # Font style
419
         tk.Label(master, text="Font style").pack(side='top')
420
-        self.fontstyle = ComboBox(master, choices=['normal', 'bold'])
421
+        self.fontstyle = ScrollList(master, ['normal', 'bold'], height=2)
422
+        self.fontstyle.callback('select', self.refresh)
423
         self.fontstyle.pack(side='top')
424
+        # Font size
425
+        tk.Label(master, text="Font size").pack(side='top')
426
+        size_var = tk.StringVar()
427
+        self.fontsize = tk.Spinbox(master, from_=8, to=24,
428
+           textvariable=size_var, command=self.refresh)
429
+        self.fontsize.variable = size_var
430
+        self.fontsize.pack(side='top')
431
+        # Preview area
432
+        preview_frame = tk.LabelFrame(master, text="Preview")
433
+        preview_frame.pack(side='top', fill='both')
434
+        self.preview = tk.Label(preview_frame,
435
+            text="The quick brown fox")
436
+        self.preview.pack(side='top')
437
         # Use initial values loaded from .ini file
438
         family, size, style = self.style.font
439
-        self.fontfamily.variable.set(family)
440
+        self.fontfamily.selected.set(family)
441
         self.fontsize.variable.set(size)
442
-        self.fontstyle.variable.set(style)
443
+        self.fontstyle.selected.set(style)
444
+        # Refresh the preview
445
+        self.refresh()
446
         # Return widget with initial focus
447
         return self.fontfamily
448
 
449
 
450
+    def get_font(self):
451
+        """Return a ``(family, size, style)`` tuple for the current font.
452
+        """
453
+        return (self.fontfamily.selected.get(),
454
+                self.fontsize.variable.get(),
455
+                self.fontstyle.selected.get())
456
+
457
+
458
+    def refresh(self, *args):
459
+        """Refresh the preview to show the current font.
460
+        """
461
+        self.preview.config(font=self.get_font())
462
+
463
+
464
     def apply(self):
465
         """Apply the selected configuration settings.
466
         """
467
-        self.style.font = (self.fontfamily.variable.get(),
468
-                           self.fontsize.variable.get(),
469
-                           self.fontstyle.variable.get())
470
+        self.style.font = self.get_font()
471
         self.result = self.style
472
 
473
 
474
 class ScrolledWindow (tk.Tk):
475
     """A top-level window with scrollbars.
476
 
477
-    To use as a container for other widgets, do:
478
+    To use as a container for other widgets, do::
479
 
480
         window = ScrolledWindow()
481
         button = tk.Button(window.frame, text="Click me", ...)
482
@@ -740,3 +794,115 @@
483
         self.canvas.configure(xscrollcommand=h_scroll.set,
484
                               yscrollcommand=v_scroll.set)
485
 
486
+
487
+class PrettyLabel (tk.Text):
488
+    """Like a Label, with automatic word-wrapping of paragraphs, and inference
489
+    of headings and preformatted text from basic markup cues.
490
+
491
+    """
492
+    def __init__(self, master, text, font=None, width=65, height=24):
493
+        """Create a pretty label for displaying the given text.
494
+        """
495
+        # Text widget with the same background color as the master
496
+        tk.Text.__init__(self, master, wrap='word', borderwidth=0,
497
+           padx=10, width=width, height=height, exportselection=0)
498
+        if font:
499
+            self.config(font=font)
500
+        # Add the text with formatting applied
501
+        self.set_text(text)
502
+        # background and unfocused border color same as master's background
503
+        bg = master.cget('background')
504
+        self.config(background=bg, highlightbackground=bg)
505
+        # Make the text widget read-only
506
+        self.config(state='disabled')
507
+
508
+
509
+    def rewrap(self, text):
510
+        """Rewrap the given text, by joining regular paragraphs into
511
+        single lines, and leaving preformatted text and headings alone.
512
+        """
513
+        # Start by splitting into chunks at double-line-breaks
514
+        lines = []
515
+        chunks = text.strip().split('\n\n')
516
+        for chunk in chunks:
517
+            # If this chunk contains newlines, they could be in paragraphs
518
+            # (which should wrap) or preformatted text (which should not be
519
+            # wrapped)
520
+            if '\n' in chunk:
521
+                parts = chunk.split('\n')
522
+                # Preformatted - append each line individually
523
+                if all(line.startswith(' ') for line in parts):
524
+                    lines.extend(parts)
525
+                # Paragraph - join lines with spaces
526
+                else:
527
+                    lines.append(' '.join(parts))
528
+            # No newline in chunk -- It's either a heading or a
529
+            # one-line paragraph, so append it as-is
530
+            else:
531
+                lines.append(chunk)
532
+            # Include an empty line where the \n\n was before
533
+            lines.append('')
534
+        return lines
535
+
536
+
537
+    def set_text(self, text):
538
+        """Set the widget to contain the given text, with formatting applied.
539
+        """
540
+        heading_re = re.compile('^[ A-Z()]+$')
541
+        pre_re = re.compile('^ +(.+)$')
542
+
543
+        # Parse each logical (wrapped) line in the text
544
+        lineno = 1
545
+        for line in self.rewrap(text):
546
+            L = str(lineno)
547
+            # Heading line
548
+            if heading_re.match(line):
549
+                # Capitalize each word in the heading
550
+                heading = ' '.join(word.capitalize() for word in line.split(' '))
551
+                self.insert('end', heading)
552
+                # Unique tag name for this heading
553
+                tag = 'heading' + L
554
+                self.tag_add(tag, L+'.0', L+'.end')
555
+                self.tag_config(tag, font=self.get_heading_font())
556
+            # Preformatted line
557
+            elif pre_re.match(line):
558
+                self.insert('end', line)
559
+                # Unique tag name for this line
560
+                tag = 'pre' + L
561
+                self.tag_add(tag, L+'.0', L+'.end')
562
+                self.tag_config(tag, font=self.get_monospace_font())
563
+            # Paragraph
564
+            else:
565
+                self.insert('end', line)
566
+            # Newline to separate each logical line
567
+            self.insert('end', '\n')
568
+            lineno += 1
569
+
570
+
571
+    def get_heading_font(self):
572
+        """Return a bold font, in the current font family.
573
+        """
574
+        # The config('font') method returns a 5-tuple, where the last
575
+        # item is the font descriptor tuple, or 'TkFixedFont' as a default
576
+        font = self.config('font')[-1]
577
+        # If font is (family, height, style), increase size and make it bold
578
+        if isinstance(font, tuple) and len(font) == 3:
579
+            family, height, style = font
580
+            return (family, int(height)+6, 'bold')
581
+        # Default font
582
+        else:
583
+            return ('Helvetica', 16, 'bold')
584
+
585
+
586
+    def get_monospace_font(self):
587
+        """Return a monospace font, with the current font size and style.
588
+        """
589
+        font = self.config('font')[-1]
590
+        # If font is (family, height, style), change family to Courier
591
+        if isinstance(font, tuple) and len(font) == 3:
592
+            family, height, style = font
593
+            return ('Courier', int(height), style)
594
+        # Default font
595
+        else:
596
+            return ('Courier', 12, 'normal')
597
+
598
tovid-0.33.tar.bz2/libtovid/metagui/variable.py -> tovid-0.34.tar.bz2/libtovid/metagui/variable.py Changed
31
 
1
@@ -1,7 +1,7 @@
2
 """Contains Tkinter Variable subclasses for List and Dict variables.
3
 
4
 This module exists to supplement the built-in Tkinter Variable types,
5
-which do not provide ``list`` and ``dict`` equivalents.
6
+which do not provide `list` and `dict` equivalents.
7
 """
8
 
9
 __all__ = [
10
@@ -137,7 +137,8 @@
11
 
12
 
13
     def get(self):
14
-        """Return the entire dictionary of keys/values as an Odict.
15
+        """Return the entire dictionary of keys/values as an
16
+        `~libtovid.odict.Odict`.
17
         """
18
         # Convert from tuple
19
         tup = tk.Variable.get(self)
20
@@ -149,8 +150,8 @@
21
 
22
 
23
     def set(self, new_dict):
24
-        """Set the entire dictionary of keys/values. If new_dict is empty, or
25
-        is not a ``dict`` or ``Odict``, an empty ``dict`` is used.
26
+        """Set the entire dictionary of keys/values. If ``new_dict`` is empty, or
27
+        is not a `dict` or `~libtovid.odict.Odict`, an empty `dict` is used.
28
         """
29
         if not isinstance(new_dict, dict) and not isinstance(new_dict, Odict):
30
             new_dict = {}
31
tovid-0.33.tar.bz2/libtovid/metagui/widget.py -> tovid-0.34.tar.bz2/libtovid/metagui/widget.py Changed
16
 
1
@@ -50,6 +50,14 @@
2
         return []
3
 
4
 
5
+    def set_args(self, args):
6
+        """Set widget options from the given list of command-line arguments,
7
+        and remove any successfully parsed options and arguments from ``args``.
8
+        Override this in derived classes.
9
+        """
10
+        pass
11
+
12
+
13
     def enable(self, enabled=True):
14
         """Enable or disable the Widget and all its children.
15
         """
16
tovid-0.33.tar.bz2/libtovid/odict.py -> tovid-0.34.tar.bz2/libtovid/odict.py Changed
105
 
1
@@ -1,12 +1,14 @@
2
 # odict.py
3
 
4
-"""Ordered dictionary class, from a Python Cookbook recipe:
5
-
6
-    http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/107747
7
+"""Ordered dictionary class, from a recipe_ in the Python Cookbook.
8
 
9
+.. _recipe: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/107747
10
 """
11
 
12
-__all__ = ['Odict']
13
+__all__ = [
14
+    'Odict',
15
+    'convert_list',
16
+]
17
 
18
 # Python < 3.x
19
 try:
20
@@ -16,7 +18,8 @@
21
     from collections import UserDict
22
 
23
 class Odict (UserDict):
24
-    """Ordered dictionary class, compatible with the builtin dict.
25
+    """Ordered dictionary class, compatible with the builtin `dict`.
26
+    The order in which items are added to the Odict is preserved.
27
     """
28
     def __init__(self, keys=None, values=None):
29
         """Create an Odict from the given keys and values.
30
@@ -29,13 +32,13 @@
31
         UserDict.__init__(self, dict(zip(keys, values)))
32
 
33
     def __delitem__(self, key):
34
-        """Delete the value from Odict[key].
35
+        """Delete the value from Odict[``key``].
36
         """
37
         UserDict.__delitem__(self, key)
38
         self._keys.remove(key)
39
 
40
     def __setitem__(self, key, item):
41
-        """Set Odict[key] = item.
42
+        """Set Odict[``key``] = ``item``.
43
         """
44
         UserDict.__setitem__(self, key, item)
45
         if key not in self._keys:
46
@@ -55,7 +58,7 @@
47
         return dict_copy
48
 
49
     def items(self):
50
-        """Return a list of (key, value) pairs, in order.
51
+        """Return a list of ``(key, value)`` pairs, in order.
52
         """
53
         return zip(self._keys, self.values())
54
 
55
@@ -70,7 +73,7 @@
56
         return [self.get(key) for key in self._keys]
57
 
58
     def popitem(self):
59
-        """Pop the last (key, value) pair from the Odict, and return it.
60
+        """Pop the last ``(key, value)`` pair from the Odict, and return it.
61
         """
62
         try:
63
             key = self._keys[-1]
64
@@ -96,7 +99,7 @@
65
         return result
66
 
67
     def update(self, other_dict, **kwargs):
68
-        """Update the Odict with values from another dict.
69
+        """Update the Odict with values from another `dict`.
70
         """
71
         UserDict.update(self, other_dict, **kwargs)
72
         for key in other_dict.keys():
73
@@ -113,19 +116,19 @@
74
 
75
 
76
 def convert_list(choices):
77
-    """Convert a list of choices to an Odict (ordered dictionary).
78
-    choices may be in one of several formats:
79
+    """Convert a list of choices to an `Odict` (ordered dictionary).
80
+    ``choices`` may be in one of several formats:
81
 
82
         string
83
-            'one|two|three'
84
+            ``'one|two|three'``
85
         list
86
-            ['one', 'two', 'three']
87
+            ``['one', 'two', 'three']``
88
         dict
89
-            {'a': "Choice A", 'b': "Choice B"}
90
+            ``{'a': "Choice A", 'b': "Choice B"}``
91
         list-of-lists
92
-            [['a', "Choice A"], ['b', "Choice B"], ..]
93
+            ``[['a', "Choice A"], ['b', "Choice B"], ..]``
94
 
95
-    Note: the dict form does not preserve order. Use list-of-lists
96
+    Note: the `dict` form does not preserve order. Use list-of-lists
97
     to maintain the specified order.
98
     """
99
     if type(choices) not in [str, list, dict]:
100
@@ -150,3 +153,4 @@
101
     else:
102
         raise TypeError("choices lists must either be"\
103
             "['a', 'b', 'c'] or [['a', 'A'], ['b', 'B']] style.")
104
+
105
tovid-0.33.tar.bz2/libtovid/render/animation.py -> tovid-0.34.tar.bz2/libtovid/render/animation.py Changed
214
 
1
@@ -1,15 +1,17 @@
2
 """This module provides classes and functions for working with animation.
3
 Two classes are provided:
4
 
5
-    Keyframe: A frame with a specific data value
6
-    Tween:    A data sequence interpolated from Keyframes
7
+    `Keyframe`
8
+        A frame with a specific data value
9
+    `Tween`
10
+        A data sequence interpolated from Keyframes
11
 
12
 The data being interpolated may represent color, opacity, location, or anything
13
 else that can be described numerically. Keyframe data may be scalar (single
14
-integers or decimal values) or vector (tuples such as (x, y) coordinates or
15
-(r, g, b) color values).
16
+integers or decimal values) or vector (tuples such as ``(x, y)`` coordinates or
17
+``(r, g, b)`` color values).
18
 
19
-For example, let's define three keyframes:
20
+For example, let's define three keyframes::
21
 
22
     >>> keys = [Keyframe(1, 0),
23
     ...         Keyframe(6, 50),
24
@@ -17,20 +19,20 @@
25
 
26
 The value increases from 0 to 50 over frames 1-6, then back down to 10
27
 over frames 6-12. The values at intermediate frames (2-5 and 7-11) can be
28
-interpolated or "tweened" automatically, using the Tween class:
29
+interpolated or "tweened" automatically, using the Tween class::
30
 
31
     >>> tween = Tween(keys)
32
     >>> tween.data
33
     [0, 10, 20, 30, 40, 50, 43, 36, 30, 23, 16, 10]
34
 
35
-Another example using tweening of (x, y) coordinates:
36
+Another example using tweening of ``(x, y)`` coordinates::
37
 
38
     >>> keys = [Keyframe(1, (20, 20)),
39
     ...         Keyframe(6, (80, 20)),
40
     ...         Keyframe(12, (100, 100))]
41
 
42
 Here, a point on a two-dimensional plane starts at (20, 20), moving first
43
-to the right, to (80, 20), then diagonally to (100, 100).
44
+to the right, to (80, 20), then diagonally to (100, 100)::
45
 
46
     >>> tween = Tween(keys)
47
     >>> for (x, y) in tween.data:
48
@@ -53,10 +55,10 @@
49
 
50
 __all__ = [
51
     'Keyframe',
52
+    'Tween',
53
     'lerp',
54
     'cos_interp',
55
     'interpolate',
56
-    'tween',
57
 ]
58
 
59
 import copy
60
@@ -65,7 +67,7 @@
61
 
62
 class Keyframe:
63
     """Associates a specific frame in an animation with a numeric value.
64
-    A Keyframe is a (frame, data) pair defining a "control point" on a graph::
65
+    A Keyframe is a ``(frame, data)`` pair defining a "control point" on a graph::
66
 
67
             100 |
68
                 |       Keyframe(10, 50)
69
@@ -78,14 +80,14 @@
70
     The data can represent anything you like. For instance, opacity::
71
 
72
             100 |* Keyframe(1, 100)
73
-                |       
74
+                |
75
      opacity(%) |
76
                 |
77
               0 |____________________* Keyframe(30, 0)
78
                 1     10     20     30
79
                         frame
80
 
81
-    See the Tween class below for what you can do with these Keyframes,
82
+    See the `Tween` class below for what you can do with these Keyframes,
83
     once you have them.
84
     """
85
     def __init__(self, frame, data):
86
@@ -102,25 +104,26 @@
87
 ### --------------------------------------------------------------------------
88
 
89
 def lerp(x, (x0, y0), (x1, y1)):
90
-    """Do linear interpolation between points (x0, y0), (x1, y1), and return
91
-    the 'y' of the given 'x'.
92
+    """Do linear interpolation between points ``(x0, y0)``, ``(x1, y1)``, and
93
+    return the ``y`` for the given ``x``.
94
 
95
     This form of interpolation simply connects two points with a straight
96
-    line. Blunt, but effective."""
97
+    line. Blunt, but effective.
98
+    """
99
     return y0 + (x - x0) * (y1 - y0) / (x1 - x0)
100
 
101
 
102
 def cos_interp(x, (x0, y0), (x1, y1)):
103
-    """Do cosine-based interpolation between (x0, y0), (x1, y1) and return
104
-    the 'y' of the given 'x'.
105
+    """Do cosine-based interpolation between ``(x0, y0)``, ``(x1, y1)`` and
106
+    return the ``y`` for the given ``x``.
107
 
108
     Essentially, a crude alternative to polynomial spline interpolation; this
109
     method transitions between two values by matching a segment of the cosine
110
     curve [0, pi] (for decreasing value) or [pi, 2*pi] (for increasing value)
111
     to the interval between the given points.
112
 
113
-    It gives smoother results at inflection points than linear interpolation, 
114
-    but will result in "ripple" effects if keyframes are too dense or many.   
115
+    It gives smoother results at inflection points than linear interpolation,
116
+    but will result in "ripple" effects if keyframes are too dense or many.
117
     """
118
     # Map the interpolation area (domain of x) to [0, pi]
119
     x_norm = math.pi * (x - x0) / (x1 - x0)
120
@@ -133,10 +136,9 @@
121
     return y_min + y_diff * (math.cos(x_norm) + 1) / 2.0
122
 
123
 
124
-def interpolate(frame, left, right, method):
125
-    """Interpolate data between left and right Keyframes at the given frame,
126
-    using the given interpolation method ('linear' or 'cosine'). Return the
127
-    value at the given frame.
128
+def interpolate(frame, left, right, method='linear'):
129
+    """Return the interpolated value at ``frame``, between two `Keyframe`
130
+    endpoints, using the given interpolation method ('linear' or 'cosine').
131
 
132
     The left and right Keyframes mark the endpoints of the curve to be
133
     interpolated. For example, if a value changes from 50 to 80 over the
134
@@ -159,6 +161,7 @@
135
         50
136
         >>> interpolate(40, left, right, 'linear')
137
         80
138
+
139
     """
140
     assert isinstance(left, Keyframe) and isinstance(right, Keyframe)
141
     # At or beyond endpoints, return endpoint value
142
@@ -191,6 +194,7 @@
143
             dim += 1
144
         return tuple(result)
145
 
146
+
147
 class Tween:
148
     """An "in-between" sequence, calculated by interpolating the data in a
149
     list of keyframes according to a given interpolation method.
150
@@ -215,29 +219,29 @@
151
         6
152
         >>> tween[8]
153
         19
154
+
155
     """
156
     def __init__(self, keyframes, method='linear'):
157
         """Create an in-between sequence from a list of keyframes. The
158
         interpolation method can be 'linear' or 'cosine'.
159
 
160
-        See effect.py for implementation examples.
161
+        See `libtovid.render.effect` for implementation examples.
162
         """
163
         for keyframe in keyframes:
164
             assert isinstance(keyframe, Keyframe)
165
         self.keyframes = keyframes
166
         self.start = self.keyframes[0].frame
167
         self.end = self.keyframes[-1].frame
168
-        self.data = []
169
         self.method = method
170
         # Do the tweening
171
-        self._tween()
172
+        self.data = self._calculate()
173
 
174
 
175
-    def _tween(self):
176
+    def _calculate(self):
177
         """Perform in-betweening calculation on the current keyframes and
178
-        fill self.data with tweened values, indexed by frame number.
179
+        return a list of tweened values, indexed by frame number.
180
         """
181
-        self.data = []
182
+        data = []
183
         # TODO: Sort keyframes in increasing order by frame number (to ensure
184
         # keyframes[0] is the first frame, and keyframes[-1] is the last frame)
185
         # Make a copy of keyframes
186
@@ -247,8 +251,7 @@
187
 
188
         # If keyframe interval is empty, use constant data from first keyframe
189
         if first == last:
190
-            self.data = keys[0].data
191
-            return
192
+            return keys[0].data
193
 
194
         # Pop off keyframes as each interval is calculated
195
         left = keys.pop(0)
196
@@ -257,13 +260,16 @@
197
         # Interpolate until the last frame is reached
198
         while frame <= last:
199
             value = interpolate(frame, left, right, self.method)
200
-            self.data.append(value)
201
+            data.append(value)
202
             # Get the next interval, if it exists
203
             if frame == right.frame and len(keys) > 0:
204
                 left = right
205
                 right = keys.pop(0)
206
             frame += 1
207
 
208
+        return data
209
+
210
+
211
     def __getitem__(self, frame):
212
         """Return the interpolated data at the given frame. This allows
213
         accessing a tweened value with subscripting by frame number::
214
tovid-0.33.tar.bz2/libtovid/render/drawing.py -> tovid-0.34.tar.bz2/libtovid/render/drawing.py Changed
50
 
1
@@ -124,21 +124,22 @@
2
     def __str__(self):
3
         return "%s%s" % (self.name, self.args)
4
 
5
+
6
 # Drawing class notes
7
-# 
8
-# The Drawing class has a number of methods (circle, rectangle, fill, stroke 
9
-# and many others) that need to operate on a Cairo surface. But we'd like to 
10
-# delay execution of actually drawing on that surface--otherwise, we can't 
11
+#
12
+# The Drawing class has a number of methods (circle, rectangle, fill, stroke
13
+# and many others) that need to operate on a Cairo surface. But we'd like to
14
+# delay execution of actually drawing on that surface--otherwise, we can't
15
 # easily render a given Drawing to a custom resolution.
16
-# 
17
-# Closures save the day here--that is, functions without "free variables". 
18
-# Anytime you "paint" on the Drawing, what's actually happening is a new 
19
-# function is getting created, whose sole purpose in life is to carry out that 
20
-# specific paint operation. These tiny, single-purpose functions are then 
21
-# added to a list of steps (self.steps) that will actually be executed at 
22
+#
23
+# Closures save the day here--that is, functions without "free variables".
24
+# Anytime you "paint" on the Drawing, what's actually happening is a new
25
+# function is getting created, whose sole purpose in life is to carry out that
26
+# specific paint operation. These tiny, single-purpose functions are then
27
+# added to a list of steps (self.steps) that will actually be executed at
28
 # rendering-time (i.e., when you do display() or save_png).
29
-# 
30
-# This not only lets us render a Drawing to different resolutions, but allows 
31
+#
32
+# This not only lets us render a Drawing to different resolutions, but allows
33
 # the possibility of rendering to different Cairo surfaces.
34
 
35
 class Drawing:
36
@@ -173,11 +174,13 @@
37
         if self.autodraw and step.name in ['fill', 'stroke']:
38
             display(self, 640, 480, True)
39
 
40
+
41
     def doStep(self, func, *args):
42
         """Add the given Step, and execute it."""
43
         self.addStep(func, *args)
44
         func(self.cr)
45
 
46
+
47
     def history(self):
48
         """Return a formatted string of all steps in this Drawing."""
49
         result = ''
50
tovid-0.33.tar.bz2/libtovid/render/effect.py -> tovid-0.34.tar.bz2/libtovid/render/effect.py Changed
45
 
1
@@ -22,7 +22,7 @@
2
     'Movement',
3
     'Translate',
4
     'Fade',
5
-    'FadeInOut'
6
+    'FadeInOut',
7
     'Colorfade',
8
     'Spectrum',
9
     'Scale',
10
@@ -88,19 +88,19 @@
11
 
12
 
13
 # New Effect template
14
-# 
15
+#
16
 # Copy and paste this code to create your own Effect
17
-# 
18
+#
19
 # The first line defines your effect's name. (Effect) means it inherits from
20
 # the base Effect class, and shares some properties with it.
21
 
22
 class MyEffect (Effect):
23
     """Modify this documentation string to describe what your effect does.
24
     """
25
-    # The __init__ function is called whenever a MyEffect is created. Make 
26
-    # sure your __init__ takes start and end arguments; additional arguments 
27
-    # (such as start_val and end_val below) allow someone using your effect 
28
-    # class to customize its behavior in some way. See the other effects below 
29
+    # The __init__ function is called whenever a MyEffect is created. Make
30
+    # sure your __init__ takes start and end arguments; additional arguments
31
+    # (such as start_val and end_val below) allow someone using your effect
32
+    # class to customize its behavior in some way. See the other effects below
33
     # for examples.
34
     def __init__(self, start, end, start_val, end_val):
35
         """Create a MyEffect lasting from start to end frame.
36
@@ -438,7 +438,7 @@
37
         frame 30).
38
 
39
         The 'method' argument defines an interpolation method to use between
40
-        keyframes, and may be either 'linear' or 'cosine'. 
41
+        keyframes, and may be either 'linear' or 'cosine'.
42
         """
43
         # Call base constructor with start and end frames
44
         Effect.__init__(self, keyframes[0].frame, keyframes[-1].frame)
45
tovid-0.33.tar.bz2/libtovid/render/layer.py -> tovid-0.34.tar.bz2/libtovid/render/layer.py Changed
9
 
1
@@ -20,7 +20,6 @@
2
     'Background',
3
     'Text',
4
     'ShadedText',
5
-    'TextBox',
6
     'Label',
7
     'VideoClip',
8
     'Image',
9
tovid-0.33.tar.bz2/libtovid/util/__init__.py -> tovid-0.34.tar.bz2/libtovid/util/__init__.py Changed
133
 
1
@@ -1,8 +1,4 @@
2
 __all__ = [
3
-    # Submodules
4
-    'output',
5
-    'filetypes',
6
-    'playtime',
7
     # Functions
8
     'escape',
9
     'float_to_ratio',
10
@@ -33,9 +29,9 @@
11
 special_chars = '\\ #*:;&?!<>[]()"\''
12
 
13
 def safe_filename(filename, work_dir):
14
-    """Ensure the given filename is free of quirky or problematic characters.
15
-    If so, simply return the filename; if not, create a safe symlink in
16
-    work_dir to the original file, and return the symlink name.
17
+    """Ensure the given ``filename`` is free of quirky or problematic characters.
18
+    If so, simply return ``filename``; if not, create a safe symlink in
19
+    ``work_dir`` to the original file, and return the symlink name.
20
     """
21
     safename = filename
22
     for char in special_chars:
23
@@ -67,13 +63,26 @@
24
 
25
 def indent_level(line):
26
     """Return the number of leading whitespace characters in the line.
27
+    Tab, newline, and carriage-return characters each count as a single space.
28
+
29
+    For example::
30
+
31
+        >>> indent_level('      foo')
32
+        6
33
+        >>> indent_level('foo')
34
+        0
35
+        >>> indent_level('\\r\\n\\t foo')
36
+        4
37
+
38
     """
39
     return len(line) - len(line.lstrip())
40
 
41
 
42
 def trim(text):
43
     """Strip leading indentation from a block of text.
44
-    Borrowed from http://www.python.org/peps/pep-0257.html 
45
+    Borrowed from `PEP 257`_.
46
+    
47
+    .. _PEP 257: http://www.python.org/peps/pep-0257.html
48
     """
49
     if not text:
50
         return ''
51
@@ -103,12 +112,15 @@
52
 
53
 def ratio_to_float(ratio):
54
     """Convert a string expressing a numeric ratio, with X and Y parts
55
-    separated by a colon ':', into a decimal number.
56
+    separated by a colon ':', into a floating-point decimal number.
57
 
58
     For example::
59
 
60
         >>> ratio_to_float('4:3')
61
-        1.33333
62
+        1.3333333333333333
63
+
64
+        >>> ratio_to_float('16:9')
65
+        1.7777777777777777
66
 
67
     """
68
     values = ratio.split(':', 1)
69
@@ -122,17 +134,27 @@
70
 
71
 def float_to_ratio(number):
72
     """Convert a decimal number into an integer ratio string 'X:Y'.
73
-    Keeps three digits of precision.
74
+    Keeps three digits of precision. No attempt is made to find a
75
+    greatest common divisor.
76
+
77
+    For example::
78
+
79
+        >>> float_to_ratio(1.3333333333333333)
80
+        '1333:1000'
81
+
82
+        >>> float_to_ratio(16.0 / 9)
83
+        '1777:1000'
84
+
85
     """
86
-    numerator = float(number) * 1000
87
-    return "%g:1000" % numerator
88
+    numerator = int(number * 1000)
89
+    return "%d:1000" % numerator
90
 
91
 
92
 def tokenize(line, include_chars=''):
93
     """Separate a text line into tokens, returning them in a list. By default,
94
-    tokens are space-separated, and each token consists of [a-z], [A-Z], [0-9],
95
-    or any of '.:-%()/'. Additional valid token characters may be specified by
96
-    passing them in the include_chars string.
97
+    tokens are space-separated, and each token consists of ``[a-z]``,
98
+    ``[A-Z]``, ``[0-9]``, or any of ``.:-%()/``. Additional valid token
99
+    characters may be specified by passing them in the include_chars string.
100
     """
101
     lexer = shlex.shlex(line, posix = True)
102
     # Rules for splitting tokens
103
@@ -175,7 +197,7 @@
104
 
105
 def get_code_lines(filename):
106
     """Return a list of all lines of code in the given file.
107
-    Whitespace and #-style comments are ignored.
108
+    Whitespace and lines beginning with ``#`` are ignored.
109
     """
110
     infile = open(filename, 'r')
111
     codelines = []
112
@@ -188,9 +210,9 @@
113
 
114
 def get_file_type(filename):
115
     """Return 'image', 'audio', or 'video', if the given filename appears to be
116
-    any of those types; otherwise, return None. Determined by file's mimetype,
117
+    any of those types; otherwise, return ``None``. Determined by file's mimetype,
118
     which is based on filename extension, so possibly inaccurate. Returns
119
-    None for any directory or extensionless filename.
120
+    ``None`` for any directory or extensionless filename.
121
     """
122
     mimetype, encoding = mimetypes.guess_type(filename)
123
     # Get the base type (the part before '/')
124
@@ -233,7 +255,7 @@
125
 
126
 def imagemagick_version():
127
     """Return the version of ImageMagick that's currently installed,
128
-    as a list of integers (ex. [6, 3, 5, 10] for version 6.3.5.10).
129
+    as a list of integers (ex. ``[6, 3, 5, 10]`` for version 6.3.5.10).
130
     """
131
     command = 'convert -list configure | grep ^LIB_VERSION_NUMBER'
132
     lines = os.popen(command).readlines()
133
tovid-0.33.tar.bz2/libtovid/util/filetypes.py -> tovid-0.34.tar.bz2/libtovid/util/filetypes.py Changed
39
 
1
@@ -15,8 +15,8 @@
2
 
3
 
4
 def etc_mimetypes():
5
-    """Get mimetypes from /etc/mime.types and return a dict of {ext: typename}
6
-    in the same format as returned by mimetypes.types_map.
7
+    """Get mimetypes from ``/etc/mime.types`` and return a dict of ``{ext: typename}``
8
+    in the same format as returned by `mimetypes.types_map`.
9
     """
10
     if not os.path.exists('/etc/mime.types'):
11
         return {}
12
@@ -31,7 +31,7 @@
13
 
14
 
15
 def match_types(containing):
16
-    """Return a list of (type, extensions) tuples for matching mimetypes.
17
+    """Return a list of ``(type, extensions)`` tuples for matching mimetypes.
18
 
19
         containing
20
             String or list of strings to match
21
@@ -47,7 +47,7 @@
22
     to match any mimetype containing 'image' or 'mpeg'.
23
 
24
     The returned tuples are suitable for use as the 'filetypes' argument of
25
-    Tkinter file dialogs (askopenfilename etc.).
26
+    Tkinter file dialogs like `askopenfilename`.
27
     """
28
     if type(containing) == str:
29
         containing = [containing]
30
@@ -71,7 +71,7 @@
31
 
32
 def get_extensions(containing):
33
     """Return a space-separated string of all extensions for matching types.
34
-    Like match_types, but only return the extensions.
35
+    Like `match_types`, but only return the extensions.
36
     """
37
     type_dict = dict(match_types(containing))
38
     ext_list = type_dict.values()
39
tovid-0.33.tar.bz2/libtovid/util/output.py -> tovid-0.34.tar.bz2/libtovid/util/output.py Changed
60
 
1
@@ -1,14 +1,14 @@
2
 """This module does colored console output by calling color-named functions.
3
-To use it, simply:
4
+To use it, simply::
5
 
6
-    >>> print(green("Looking good"))
7
-    >>> print(red("Uh-oh..."))
8
+    print(green("Looking good"))
9
+    print(red("Uh-oh..."))
10
 
11
-It was stolen from an early version of a Gentoo module called output.py,
12
+It was stolen from an early version of a Gentoo module called ``output.py``,
13
 copyright 1998-2003 Daniel Robbins, Gentoo Technologies, Inc., distributed
14
-under the GNU GPL v2:
15
+under the GNU GPL v2::
16
 
17
-# $Header: /home/cvsroot/gentoo-src/portage/pym/output.py,v 1.16 \
18
+    # $Header: /home/cvsroot/gentoo-src/portage/pym/output.py,v 1.16 \
19
     2003/05/29 08:34:55 carpaski Exp $
20
 
21
 Modified for inclusion in libtovid.
22
@@ -29,7 +29,8 @@
23
     'yellow',
24
     'brown',
25
     'red',
26
-    'darkred']
27
+    'darkred',
28
+]
29
 
30
 codes = {
31
     'reset':     '\x1b[0m',
32
@@ -45,18 +46,24 @@
33
     'yellow':    '\x1b[33;01m',
34
     'brown':     '\x1b[33;06m',
35
     'red':       '\x1b[31;01m',
36
-    'darkred':   '\x1b[31;06m'}
37
+    'darkred':   '\x1b[31;06m',
38
+}
39
 
40
 _do_color = True
41
 
42
 def color(do_color):
43
-    """Turn colored output on (True) or off (False).
44
+    """Turn colored output on or off at a global level.
45
+    
46
+        do_color
47
+            ``True`` to enable colored output, ``False`` to disable
48
+
49
     """
50
     global _do_color
51
     _do_color = do_color
52
 
53
 def ctext(color, text):
54
-    """Return a string containing text in the given color."""
55
+    """Return a string containing text in the given color.
56
+    """
57
     if _do_color:
58
         return codes[color] + text + codes['reset']
59
     else:
60
tovid-0.33.tar.bz2/libtovid/util/playtime.py -> tovid-0.34.tar.bz2/libtovid/util/playtime.py Changed
36
 
1
@@ -1,7 +1,7 @@
2
 # -*- coding: utf8 -*-
3
 
4
 # Copyright 2007 Joe Friedrichsen <pengi.films@gmail.com>
5
-# 
6
+#
7
 # This file is part of tovid.
8
 
9
 """Relate a video's bitrate, size, and play time
10
@@ -13,7 +13,7 @@
11
     - Encoded (average) bitrate
12
 
13
 These are related by their units: ``bitrate = size / length``. This module
14
-provides ways to calculate these values. 
15
+provides ways to calculate these values.
16
 
17
 You can predict/calculate any one of these characteristics given the
18
 other two. By default, a new AVstream object assumes you want to find
19
@@ -33,7 +33,7 @@
20
 
21
 Usually when putting video on a disc, the final output size is well
22
 defined and non-changing. By default, AVstream fixes this characteristic so
23
-that you can see how the bitrate changes for different amounts of time on 
24
+that you can see how the bitrate changes for different amounts of time on
25
 that disc::
26
 
27
     >>> avs.set_play_length(180)
28
@@ -76,6 +76,7 @@
29
         - AVstream.bitrate.GiBph -- Gibibytes per hour
30
 
31
     There are four attributes:
32
+
33
         play_length
34
             the length of the video in minutes
35
         final_size
36
tovid-0.33.tar.bz2/libtovid/xml.py -> tovid-0.34.tar.bz2/libtovid/xml.py Changed
57
 
1
@@ -1,8 +1,8 @@
2
 """This module is for defining XML elements and attributes, and for creating
3
 element hierarchies.
4
 
5
-To create a new element, use the Element class constructor, providing at least
6
-the element name::
7
+To create a new element, use the `Element` constructor, providing at
8
+least the element name::
9
 
10
     >>> video = Element('video')
11
 
12
@@ -12,13 +12,13 @@
13
     <video></video>
14
 
15
 Since this is an empty element with no attributes yet, it's pretty boring.
16
-You can add or change attributes using the set method::
17
+You can add or change attributes using the `~Element.set` method::
18
 
19
     >>> video.set(file="Brian.mpg")
20
     >>> print(video)
21
     <video file="Brian.mpg"></video>
22
 
23
-To add children to an element, use the add method::
24
+To add children to an element, use the `~Element.add` method::
25
 
26
     >>> length = video.add('length', '15')
27
     >>> print(video)
28
@@ -26,7 +26,8 @@
29
       <length>15</length>
30
     </video>
31
 
32
-See author.py and spumux.py for additional examples.
33
+See `libtovid.author` and `libtovid.backend.spumux` for additional
34
+examples.
35
 """
36
 
37
 __all__ = ['Element']
38
@@ -34,10 +35,10 @@
39
 class Element (object):
40
     """A named XML element having optional content, attributes, and children.
41
 
42
-    Attribute values may be set in the constructor, or by calling set() with a
43
+    Attribute values may be set in the constructor, or by calling `set` with a
44
     dictionary and/or attribute=value keywords.
45
 
46
-    Use add() or add_child() to create a hierarchy of Elements.
47
+    Use `add` or `add_child` to create a hierarchy of Elements.
48
     """
49
     def __init__(self, name, content='', **attributes):
50
         """Create a new Element with the given attributes.
51
@@ -135,5 +136,3 @@
52
         return '</' + self.name + '>'
53
 
54
 
55
-
56
-
57
tovid-0.33.tar.bz2/setup.py -> tovid-0.34.tar.bz2/setup.py Changed
170
 
1
@@ -14,28 +14,35 @@
2
 At this time, there is no 'uninstall' mechanism...
3
 """
4
 
5
-import os
6
 
7
 def svn_version():
8
     """Return the current SVN revision number, as reported by 'svn info',
9
     as a string like 'svn-r1234'. If svn is not installed, or if something goes
10
     wrong, return 'svn-unknown'
11
     """
12
-    rev_line = os.popen('svn info 2>/dev/null | grep ^Revision').read()
13
-    # If rev_line is empty, either svn is missing or the command failed
14
+    from commands import getoutput
15
+    rev_line = getoutput('svn info 2>/dev/null | grep ^Revision')
16
+    # If rev_line is found, get the revision number
17
     if rev_line:
18
         return 'svn-r' + rev_line.split(':')[1].strip()
19
+    # If rev_line is empty, try using bzr instead
20
     else:
21
-        return 'svn-unknown'
22
+        rev_line = getoutput('bzr log -l 1 2>/dev/null | grep "^svn revno"')
23
+        # "svn revno: NNNN (on /trunk)"
24
+        if rev_line:
25
+            return 'svn-r' + rev_line.split(':')[1].strip().split(' ')[0]
26
+    # If all else fails...
27
+    return 'svn-unknown'
28
 
29
 # Current version number of tovid, as a string.
30
 # Examples:
31
 # Current SVN version number
32
 #_tovid_version = svn_version()
33
 # Official release number
34
-_tovid_version = '0.33'
35
+_tovid_version = '0.34'
36
 
37
 
38
+import os
39
 import sys
40
 import shutil
41
 from distutils.core import setup, Command
42
@@ -127,7 +134,8 @@
43
     user_options = []
44
 
45
     def initialize_options(self):
46
-        pass
47
+        self.source = os.path.join('docs', 'src', 'en', 'tovid.t2t')
48
+        self.target = os.path.join('docs', 'man', 'tovid.1')
49
 
50
     def finalize_options(self):
51
         pass
52
@@ -135,13 +143,14 @@
53
     def run(self):
54
         """Build the tovid manual page.
55
         """
56
-        source = 'docs/src/en/tovid.t2t'
57
-        target = 'docs/man/tovid.1'
58
         # Build only if target does not exist, or if source is newer than target
59
         mod = os.path.getmtime
60
-        if not os.path.exists(target) or (mod(source) > mod(target)):
61
-            command = 'txt2tags -t man -i "%s" -o "%s"' % (source, target)
62
+        if not os.path.exists(self.target) or (mod(self.source) > mod(self.target)):
63
+            print("Rebuilding tovid manual page")
64
+            command = 'txt2tags -t man -i "%s" -o "%s"' % (self.source, self.target)
65
             os.system(command)
66
+        else:
67
+            print("Manual page already built, not building again")
68
 
69
 
70
 class BuildTovidInit (Command):
71
@@ -149,27 +158,31 @@
72
     user_options = []
73
 
74
     def initialize_options(self):
75
-        pass
76
+        self.source = os.path.join('src', 'tovid-init.in')
77
+        self.target = os.path.join('src', 'tovid-init')
78
+        # Touch the source file to ensure that it gets rebuilt
79
+        os.utime(self.source, None)
80
 
81
     def finalize_options(self):
82
         pass
83
 
84
-
85
     def run(self):
86
         """Build src/tovid-init from tovid-init.in.
87
         """
88
-        source = 'src/tovid-init.in'
89
-        target = 'src/tovid-init'
90
         # We basically just need to replace @VERSION@ in tovid-init.in with
91
         # the current version of tovid.
92
         lines = [line.replace('@VERSION@', _tovid_version)
93
-                 for line in open(source, 'r')]
94
+                 for line in open(self.source, 'r')]
95
         # Write all lines to the target file
96
-        outfile = open(target, 'w')
97
+        outfile = open(self.target, 'w')
98
         outfile.writelines(lines)
99
         outfile.close()
100
 
101
 
102
+# Build tovid-init with regular 'build' command
103
+build.sub_commands.append(('build_tovid_init', None))
104
+#build.sub_commands.append(('build_docs', None))
105
+
106
 # The actual setup
107
 setup(
108
     name = 'tovid',
109
@@ -225,9 +238,11 @@
110
             'src/todiscgui',
111
             'src/tovid-stats',
112
             'src/titleset-wizard',
113
+            'src/set_chapters',
114
 
115
-            # Icon used by titleset wizard
116
-            'icons/tovid.gif',
117
+            # Icons used in the GUIs
118
+            'icons/hicolor/128x128/apps/tovid.png',
119
+            'icons/hicolor/128x128/apps/titleset-wizard.png',
120
 
121
             # Config file
122
             'src/tovid.ini',
123
@@ -237,22 +252,37 @@
124
          ['docs/man/tovid.1']),
125
         # Desktop shortcut
126
         ('share/applications',
127
-         ['tovidgui.desktop']),
128
+         ['tovidgui.desktop',
129
+         'titleset-wizard.desktop']),
130
         # Icons
131
         ('share/icons/hicolor/scalable/apps',
132
-         ['icons/hicolor/scalable/apps/tovid.svg',
133
-          'icons/hicolor/scalable/apps/tovid_bw.svg',
134
-          'icons/hicolor/scalable/apps/disc.svg',
135
-          'icons/hicolor/scalable/apps/cd.svg',
136
+         [
137
+             'icons/hicolor/scalable/apps/tovid.svg',
138
+             'icons/hicolor/scalable/apps/titleset-wizard.svg',
139
+             'icons/hicolor/scalable/apps/tovid_bw.svg',
140
+             'icons/hicolor/scalable/apps/disc.svg',
141
+             'icons/hicolor/scalable/apps/cd.svg',
142
          ]),
143
         ('share/icons/hicolor/128x128/apps',
144
-         ['icons/hicolor/128x128/apps/tovid.png']),
145
+         [
146
+             'icons/hicolor/128x128/apps/tovid.png',
147
+             'icons/hicolor/128x128/apps/titleset-wizard.png',
148
+         ]),
149
         ('share/icons/hicolor/64x64/apps',
150
-         ['icons/hicolor/64x64/apps/tovid.png']),
151
+         [
152
+             'icons/hicolor/64x64/apps/tovid.png',
153
+             'icons/hicolor/64x64/apps/titleset-wizard.png',
154
+         ]),
155
         ('share/icons/hicolor/48x48/apps',
156
-         ['icons/hicolor/48x48/apps/tovid.png']),
157
+         [
158
+             'icons/hicolor/48x48/apps/tovid.png',
159
+             'icons/hicolor/48x48/apps/titleset-wizard.png',
160
+         ]),
161
         ('share/icons/hicolor/32x32/apps',
162
-         ['icons/hicolor/32x32/apps/tovid.png']),
163
+         [
164
+             'icons/hicolor/32x32/apps/tovid.png',
165
+             'icons/hicolor/32x32/apps/titleset-wizard.png',
166
+         ]),
167
     ]
168
 )
169
 
170
tovid-0.33.tar.bz2/src/idvid -> tovid-0.34.tar.bz2/src/idvid Changed
180
 
1
@@ -126,10 +126,10 @@
2
             echo $SEPARATOR
3
             echo "Identifying video with mplayer..."
4
             echo $SEPARATOR
5
-            mplayer -vo null -ao null -frames 30 -channels 6 -identify \
6
+            mplayer -nomsgcolor -vo null -ao null -frames 30 -channels 6 -identify \
7
                 -noconsolecontrols "$INFILE" 2>&1 | tee -a "$SCRATCH_FILE"
8
         else
9
-            mplayer -vo null -ao null -frames 30 -channels 6 -identify \
10
+            mplayer -nomsgcolor -vo null -ao null -frames 30 -channels 6 -identify \
11
                 -noconsolecontrols "$INFILE" > "$SCRATCH_FILE" 2>&1
12
         fi
13
     fi
14
@@ -209,6 +209,8 @@
15
     # (If you've got a problem with eval, give me an alternative that
16
     # works as well and is as readable :-) ... but no less safe :(
17
     # DONE :)
18
+    # get array of mplayer audio ids, used if no hextracks from ffmpeg
19
+    while read; do MPL_AIDS+=(${REPLY##*=}); done < <(grep ID_AUDIO_ID "$SCRATCH_FILE")
20
 
21
     ID_VIDEO_FRAMES=$(grep 'length:' "$SCRATCH_FILE" | \
22
         awk -F ' ' '{print $2}')
23
@@ -241,13 +243,13 @@
24
     ID_VIDEO_TRACK="${ID_VIDEO_TRACKS[0]}"
25
     # Find out what audio channels are available
26
     if test -n "$ID_AUDIO_ID"; then
27
-        AUDIO_INFO=$(grep "Audio:" "$SCRATCH_FILE")
28
+        AUDIO_INFO=$(grep -w "Audio:" "$SCRATCH_FILE")
29
         # ID_AUDIO_ID needs "TRACKS" var to remain in columns
30
         TRACKS=$(sed -r 's/.*Stream #([0-9]\.[0-9]+).*/\1/' <<< "$AUDIO_INFO")
31
         A_TRACKS=(${TRACKS//$'\n'/ })
32
         # Get hexadecimal track IDs, if present
33
         if grep -q "\[0x[0-9a-fA-F]*]" <<< $AUDIO_INFO; then
34
-            HEX_TRACKS=$(sed -r 's/Stream .*\[0x([0-9a-fA-F]*)]:.*$/\1/' <<< "$AUDIO_INFO")
35
+            HEX_TRACKS=$(awk -F [][] '{gsub("0x", ""); print $2}' <<< "$AUDIO_INFO")
36
             HEX_TRACKS=(${HEX_TRACKS//$'\n'/ })
37
             USE_HEX_TRACKS=:
38
         else
39
@@ -258,25 +260,26 @@
40
             CUR_CHAN=$(grep "Stream #${A_TRACKS[i]}" <<< "$AUDIO_INFO")
41
             A_SAMPRATES=("${A_SAMPRATES[@]}" "$(echo $CUR_CHAN | \
42
                 sed -r 's/.* ([0-9]+) Hz.*/\1/')")
43
+            ! test_is_number ${A_SAMPRATES[i]} && A_SAMPRATES[i]=?
44
             A_BITRATES=("${A_BITRATES[@]}" "$(echo $CUR_CHAN | \
45
                 sed -r 's/.* ([0-9]+) kb\/s.*/\1/')")
46
             # make sure the above is a number, else set  A_BITRATE to 0
47
-            if ! test_is_number ${A_BITRATES[i]}; then
48
-                A_BITRATES[i]=0
49
-            fi
50
+            ! test_is_number ${A_BITRATES[i]} && A_BITRATES[i]=0
51
             A_CODECS=("${A_CODECS[@]}" "$(echo $CUR_CHAN | \
52
                 sed -r 's/.*Audio: ([^,]+),.*/\1/')")
53
-                if $USE_HEX_TRACKS; then
54
+            if $USE_HEX_TRACKS; then
55
                 MP_TRACKNUM=$((16#${HEX_TRACKS[i]}))
56
             else
57
-                MP_TRACKNUM=$i
58
+                # use aids from mplayer output instead of hex tracks
59
+                MP_TRACKNUM=${MPL_AIDS[i]}
60
             fi
61
+            ID_AUDIO_IDS="$ID_AUDIO_IDS ${MP_TRACKNUM//$'\n'/ }"
62
 
63
             # last ditch efforts to get audio bitrate if we still don't have it
64
             if test ${A_BITRATES[i]} -eq 0; then
65
-                MP_ABITRATE=$(mplayer -vo null -ao null -frames 30 -channels 6 -identify \
66
-                -aid $MP_TRACKNUM -noconsolecontrols "$INFILE" 2>&1 |
67
-                grep ID_AUDIO_BITRATE|awk -F=  'END{print $2}')
68
+                MP_ABITRATE=$(mplayer -nomsgcolor -vo null -ao null -frames 30 \
69
+                -channels 6 -identify -aid $MP_TRACKNUM -noconsolecontrols \
70
+                "$INFILE" 2>&1 | grep ID_AUDIO_BITRATE|awk -F=  'END{print $2}')
71
                 if test_is_number $MP_ABITRATE; then
72
                     MP_ABITRATE=${MP_ABITRATE%.*}
73
                     A_BITRATES[i]=${MP_ABITRATE/000*}
74
@@ -288,12 +291,15 @@
75
             fi
76
             A_HEX_TRACKS=("${A_HEX_TRACKS[@]}" "$MP_TRACKNUM")
77
         done
78
+        # use comma separator and remove possible leading comma
79
+        ID_AUDIO_IDS=${ID_AUDIO_IDS// /,}
80
+        ID_AUDIO_IDS=${ID_AUDIO_IDS#,}
81
         # read output of grep into AUDIO_NCH array to get Audio: lines
82
         if [[ -n $ID_AUDIO_ID ]]; then
83
-            O=$IFS IFS=$'\n' AUDIO_NCH=($(grep Audio: "$SCRATCH_FILE")) IFS=$O
84
+            O=$IFS IFS=$'\n' AUDIO_NCH=($(grep -w Audio: "$SCRATCH_FILE")) IFS=$O
85
             for chn in ${!AUDIO_NCH[@]}; do
86
                 # TODO flesh this out with other possibilities: 7.1 etc
87
-                if grep -q 5:1 <<<  ${AUDIO_NCH[chn]}; then
88
+                if egrep -q '5:1|5.1' <<<  ${AUDIO_NCH[chn]}; then
89
                     ID_AUDIO_NCH[chn]=6
90
                elif grep -q channels <<< ${AUDIO_NCH[chn]}; then
91
                     ID_AUDIO_NCH[chn]=$(sed -r 's/.* ([0-9]+) channels.*/\1/' \
92
@@ -370,32 +376,49 @@
93
         if $FAST; then # skip this long process
94
             USE_MENCODER=false  # USE_NAV_LOG already set to false
95
         else
96
-            # check if tcdemux installed, and if extension is mpg (use mencoder for vob)
97
-            if [[ ${INFILE##*.} =~ [MmPpGg] ]] && hash tcdemux 2>/dev/null &&  [[ ${ID_VIDEO_FPS%%.*} -ne 0 ]]; then
98
+            # check if tcdemux present, and if mpg extension (vob uses mencoder)
99
+            if grep -qi mpg <<< "${INFILE##*.}" && hash tcdemux 2>/dev/null && \
100
+              [[ ${ID_VIDEO_FPS%%.*} -ne 0 ]]; then
101
                 NAVSEEK_CMD=(nice tcdemux  -f $ID_VIDEO_FPS -W -i "$INFILE")
102
-                "${NAVSEEK_CMD[@]}"  >  "$NAV_LOG" 2>/dev/null
103
-                if [[ -s  "$NAV_LOG" ]]; then # if non empty lets use it
104
-                    USE_MENCODER=false
105
-                    USE_NAVLOG=:
106
-                else
107
-                    # remove empty log and we will use mencoder in next code block
108
-                    [[ -e "$NAV_LOG" ]] && rm -f "$NAV_LOG"
109
-                    USE_MENCODER=:
110
-                fi
111
-            else # not $FAST and using tcdemux not possible, so usee mencoder
112
+            # or check if aviindex installed, and if extension is avi
113
+            elif grep -qi avi <<< "${INFILE##*.}" && hash aviindex 2>/dev/null && \
114
+              [[ ${ID_VIDEO_FPS%%.*} -ne 0 ]]; then
115
+                NAVSEEK_CMD=(nice aviindex -x -i "$INFILE" -o "$NAV_LOG")
116
+            else # not $FAST and indexing not possible, so use mencoder
117
+                USE_MENCODER=:
118
+            fi
119
+        fi
120
+        if [[ "${NAVSEEK_CMD[@]}" ]]; then
121
+            "${NAVSEEK_CMD[@]}"  >  "$NAV_LOG" 2>/dev/null
122
+            if [[ -s  "$NAV_LOG" ]]; then # if non empty lets use it
123
+                USE_MENCODER=false
124
+                USE_NAVLOG=:
125
+            else
126
+                # remove empty log and we will use mencoder in next code block
127
+                [[ -e "$NAV_LOG" ]] && rm -f "$NAV_LOG"
128
                 USE_MENCODER=:
129
             fi
130
         fi
131
     fi
132
+    # set variables from NAV_LOG results
133
     if $USE_NAVLOG; then
134
-        ID_VIDEO_FRAMES=$(cat "$NAV_LOG" | awk 'END{print NR}')
135
-        V_DUR=$(bc <<< "$ID_VIDEO_FRAMES / $ID_VIDEO_FPS")
136
-        V_DURATION=${V_DUR%%.*} # final value is integer ( seconds )
137
+        if grep -qi mpg <<< "${INFILE##*.}"; then
138
+            ID_VIDEO_FRAMES=$(cat "$NAV_LOG" | awk 'END{print NR}')
139
+            V_DUR=$(bc <<< "$ID_VIDEO_FRAMES / $ID_VIDEO_FPS")
140
+            V_DURATION=${V_DUR%%.*} # final value is integer ( seconds )
141
+        else
142
+            V_DURATION=$(awk '($2==1) { field = $NF }; END{ print field/1000 }' "$NAV_LOG")
143
+            ID_VIDEO_FRAMES=$(bc <<< "$V_DURATION * $ID_VIDEO_FPS")
144
+            ID_VIDEO_FRAMES=${ID_VIDEO_FRAMES%%.*}
145
+            # final value is in seconds
146
+            V_DURATION=${V_DURATION%%.*} # integer
147
+        fi
148
+        # if no usable value, use mencoder
149
+        { ! test_is_number $V_DURATION || ((V_DURATION == 0)) ; } && USE_MENCODER=:
150
     fi
151
-
152
-    if $USE_MENCODER; then # any of: no/empty log file, ! $FAST, no tcdemux, or not an mpg
153
-        # Determine duration by playing the video into /dev/null
154
-        # Time consuming, but presumably more accurate.
155
+    # find duration by playing the video with mencoder into /dev/null
156
+    # any of: no/empty log file, ! $FAST, no tcdemux/aviindex, or not an mpg/avi
157
+    if $USE_MENCODER; then
158
         MENCODER_STATS=$(LC_ALL=C mencoder -ovc copy -nosound -noskiplimit \
159
         "$INFILE" -o /dev/null 2>/dev/null)
160
         V_DURATION=$(awk 'END{print $(NF-3)}' <<< "$MENCODER_STATS")
161
@@ -482,6 +505,7 @@
162
         echo "ID_AUDIO_NCH=$ID_AUDIO_NCH"
163
         echo "ID_AUDIO_TRACKS=$ID_AUDIO_TRACKS"
164
         echo "ID_VIDEO_TRACK=$ID_VIDEO_TRACK"
165
+        echo "ID_AUDIO_IDS=$ID_AUDIO_IDS"
166
         echo "ID_AUDIO_RATE=$ID_AUDIO_RATE"
167
         echo "V_ASPECT_WIDTH=$V_ASPECT_WIDTH"
168
         echo "ID_VIDEO_FRAMES=$ID_VIDEO_FRAMES"
169
@@ -745,6 +769,10 @@
170
                         test "$V_TV" = "PAL" && MATCH=:
171
                     fi
172
                     ;;
173
+                * )
174
+                    usage_error "'$MATCH_FORMAT' \
175
+                        is not a recognized argument to '-isformat'"
176
+                    ;;
177
             esac
178
         fi
179
 
180
tovid-0.33.tar.bz2/src/makedvd -> tovid-0.34.tar.bz2/src/makedvd Changed
74
 
1
@@ -54,6 +54,7 @@
2
 
3
   -author              Create DVD filesystem from FILE.xml
4
   -burn                Burn DVD filesystem from DVD_DIR
5
+  -eject               Eject the DVD tray after burning
6
   -device DEVFS_NAME   DVD recorder device name (Default: /dev/dvdrw)
7
   -speed NUM           Burn speed (Default: automatic)
8
   -label DISC_LABEL    Disc label (Default: base name of FILE)
9
@@ -105,6 +106,9 @@
10
 BURN_SPEED=""
11
 OUT_DIR="makedvd_out"
12
 DISC_LABEL=""
13
+# Undocumented growisofs feature to prevent ejecting after burning
14
+# (Default behavior of growisofs is to reload the tray after burning)
15
+PREVENT_EJECT="-use-the-force-luke=notray"
16
 
17
 # Grab DVD media information
18
 # Returns nothing, but sets the 'global' variables
19
@@ -181,8 +185,8 @@
20
     usage_error "Please provide a filename (.xml, or dvd filesystem folder)"
21
 fi
22
 # check for valid DVD burner.  This may fail but at least we tried
23
-OIFS=$IFS \
24
-IFS=$'\n' device=($(find -L /dev -type b -name 'dvdrw*' 2>/dev/null )) IFS=$OIFS
25
+OIFS=$IFS IFS=$'\n' device=\
26
+($(find -L /dev  -maxdepth 1 -type b -name 'dvdrw*' 2>/dev/null )) IFS=$OIFS
27
 DVDRW_DEVICE=${device:-$DVDRW_DEVICE}
28
 
29
 while test $# -gt 1; do
30
@@ -191,6 +195,9 @@
31
         "-noask" ) NOASK=: ;;
32
         "-author" ) DO_AUTHOR=: ;;
33
         "-burn" )   DO_BURN=: ;;
34
+        "-eject" )
35
+            PREVENT_EJECT=""
36
+            ;;
37
         "-device" )
38
             # Get device name
39
             shift
40
@@ -321,6 +328,24 @@
41
        echo "Current DVD image is ${DISC_SUM}MB."
42
     fi
43
 
44
+    # dvdauthor program needs VIDEO_FORMAT set or it will give warnings
45
+    if grep -q 'format="ntsc"' "$DVDAUTHOR_XML"; then
46
+        export VIDEO_FORMAT=ntsc
47
+    elif grep -q 'format="pal"' "$DVDAUTHOR_XML"; then
48
+        export VIDEO_FORMAT=pal
49
+    elif [[ $VIDEO_FORMAT ]]; then # allow user set env value otherwise
50
+        :
51
+    else
52
+        export VIDEO_FORMAT=ntsc
53
+        echo -e '\n***'
54
+        echo "No default video format defined!!!"
55
+        echo "Was this xml created by a recent version of tovid/makexml?"
56
+        echo "Using default video format of 'ntsc'."
57
+        echo "Run 'export VIDEO_FORMAT=\"pal\"' if this is wrong for your disc."
58
+        echo -e '\n***'
59
+        sleep 10
60
+    fi
61
+
62
     # Create disc structure
63
     DVDAUTHOR_CMD="dvdauthor -x \"$DVDAUTHOR_XML\""
64
     echo $SEPARATOR
65
@@ -444,7 +469,7 @@
66
     fi
67
 
68
     # Burn it already!
69
-    BURN_CMD="growisofs -use-the-force-luke=dao -dvd-compat $BURN_SPEED -Z $DVDRW_DEVICE -dvd-video -V \"$VOLID\" \"$OUT_DIR\""
70
+    BURN_CMD="growisofs -use-the-force-luke=dao $PREVENT_EJECT -dvd-compat $BURN_SPEED -Z $DVDRW_DEVICE -dvd-video -V \"$VOLID\" \"$OUT_DIR\""
71
     echo $SEPARATOR
72
     echo "Burning with growisofs $GROWISOFS_VER using the following command:"
73
     echo "$BURN_CMD"
74
tovid-0.33.tar.bz2/src/makemenu -> tovid-0.34.tar.bz2/src/makemenu Changed
105
 
1
@@ -7,7 +7,7 @@
2
 echo -e "Please run makemenu as:\ntovid menu OPTIONS"
3
 exit 1 ; }
4
 
5
-# version $Id: makemenu 3060 2010-05-18 06:07:22Z wapcaplet88 $
6
+# version $Id: makemenu 3336 2011-06-30 21:49:22Z grepper $
7
 # makemenu
8
 # Part of the tovid suite
9
 # =======================
10
@@ -152,6 +152,12 @@
11
 else
12
     IM_LISTARG='type'
13
 fi
14
+# imagemagick's font listing structure depends on version
15
+if test_version $IM_VERSION 6.4.0.0; then
16
+    im_field=2
17
+else
18
+    im_field=1
19
+fi
20
 PPM_OPTS="-S $CHROMA_MODE -A 10:11 -F 30000:1001"
21
 # Direct stuff to /dev/null
22
 REDIR="/dev/null"
23
@@ -458,14 +464,14 @@
24
     # Check to see if the given font name is available in ImageMagick
25
     # (only return the first exact match)
26
     USE_TITLE_FONT=$( convert -list $IM_LISTARG | \
27
-    grep -m 1 "$TITLE_FONT" | awk '{print $1}' )
28
+    grep -m 1 "$TITLE_FONT" | awk -v f=$im_field '{print $f}' )
29
 
30
    # If not available, try to use something similar
31
     if test -z $USE_TITLE_FONT ; then
32
         echo $SEPARATOR
33
         echo "Font: \"$TITLE_FONT\" does not appear to be either a font file or registered with ImageMagick."
34
         USE_TITLE_FONT=$( convert -list $IM_LISTARG | \
35
-        grep -i -m 1 "${TITLE_FONT:0:20}" | awk '{print $1}' )
36
+        grep -i -m 1 "${TITLE_FONT:0:20}" | awk -v f=$im_field '{print $f}' )
37
 
38
         # If a similarly-named one does't exist, default to Helvetica
39
         if test -z "$USE_TITLE_FONT"; then
40
@@ -490,14 +496,14 @@
41
         # Check to see if the given button font is available in ImageMagick
42
         # (only return the first exact match)
43
         USE_BUTTON_FONT=$( convert -list $IM_LISTARG | \
44
-        grep -m 1 "$BUTTON_FONT" | awk '{print $1}' )
45
+        grep -m 1 "$BUTTON_FONT" | awk -v f=$im_field '{print $f}' )
46
 
47
         # If not available, try to use something similar
48
         if test -z $USE_BUTTON_FONT ; then
49
             echo $SEPARATOR
50
             echo "Button: \"$BUTTON_FONT\" does not appear to be either a font file or registered with ImageMagick."
51
             USE_BUTTON_FONT=$( convert -list $IM_LISTARG | \
52
-            grep -i -m 1 "${BUTTON_FONT:0:20}" | awk '{print $1}' )
53
+            grep -i -m 1 "${BUTTON_FONT:0:20}" | awk -v f=$im_field '{print $f}' )
54
 
55
             # If a similarly-named one does't exist, default to Helvetica
56
             if test -z "$USE_BUTTON_FONT"; then
57
@@ -532,7 +538,7 @@
58
 #
59
 
60
 # Measure the font's vertical height
61
-TILE_HEIGHT=$(convert -size 720x200 xc:none -fill white -pointsize $TITLE_SIZE -font $TITLE_FONT -antialias $FONT_DECO -annotate +20+80 "Al" -trim +repage info: | awk '{print $3}' | awk -F 'x' '{print $2}')
62
+TILE_HEIGHT=$(convert -format %h -size 720x200 xc:none -fill white -pointsize $TITLE_SIZE -font $TITLE_FONT -antialias $FONT_DECO -annotate +20+80 "Al" -trim +repage info:)
63
 
64
 let "TILE_HEIGHT=TILE_HEIGHT+TITLE_BOTTOM_SPACE"
65
 
66
@@ -547,7 +553,7 @@
67
         ENTRY="${j}. ${TITLES[i]}"
68
 
69
         # Get the width of text and pad it
70
-        TILE_WIDTH=$(convert -size 720x200 xc:none -fill $TEXT_COLOR -pointsize $TITLE_SIZE -font $TITLE_FONT -antialias $FONT_DECO -annotate +20+80 "$ENTRY" -trim +repage info: | awk '{print $3}' | awk -F 'x' '{print $1}')
71
+        TILE_WIDTH=$(convert -format %w -size 720x200 xc:none -fill $TEXT_COLOR -pointsize $TITLE_SIZE -font $TITLE_FONT -antialias $FONT_DECO -annotate +20+80 "$ENTRY" -trim +repage info:)
72
         let "TILE_WIDTH=TILE_WIDTH+TITLE_LEFT_SPACE"
73
 
74
         # Draw the text, and put it on a blank tile
75
@@ -561,7 +567,7 @@
76
         ENTRY="${TITLES[i]}"
77
 
78
         # Get the width of the text and pad it
79
-        TILE_WIDTH=$(convert -size 720x200 xc:none -fill $TEXT_COLOR -pointsize $TITLE_SIZE -font $TITLE_FONT -antialias $FONT_DECO -annotate +20+80 "$ENTRY" -trim +repage info: | awk '{print $3}' | awk -F 'x' '{print $1}')
80
+        TILE_WIDTH=$(convert -format %w -size 720x200 xc:none -fill $TEXT_COLOR -pointsize $TITLE_SIZE -font $TITLE_FONT -antialias $FONT_DECO -annotate +20+80 "$ENTRY" -trim +repage info:)
81
         let "TILE_WIDTH=TILE_WIDTH+TITLE_LEFT_SPACE"
82
 
83
         # Draw the text, and put it on a blank tile
84
@@ -583,9 +589,8 @@
85
     echo "Making the DVD buttons...   "
86
 
87
     # Get the dimensions of the button
88
-    TILE_WIDTH=$(convert -size 720x200 xc:none -fill white -stroke $BTN_STROKE -strokewidth 1 -pointsize $TITLE_SIZE -font $BUTTON_FONT +antialias -weight bold -annotate +20+80 "$BUTTON_CHAR" -trim +repage info: | awk '{print $3}' | awk -F 'x' '{print $1}')
89
-    BUTTON_HEIGHT=$(convert -size 720x200 xc:none -fill white -stroke $BTN_STROKE -strokewidth 1 -pointsize $TITLE_SIZE -font $BUTTON_FONT +antialias -weight bold -annotate +20+80 "$BUTTON_CHAR" -trim +repage info: | awk '{print $3}' | awk -F 'x' '{print $2}')
90
-
91
+    TILE_WIDTH=$(convert -format %w -size 720x200 xc:none -fill white -stroke $BTN_STROKE -strokewidth 1 -pointsize $TITLE_SIZE -font $BUTTON_FONT +antialias -weight bold -annotate +20+80 "$BUTTON_CHAR" -trim +repage info:)
92
+    BUTTON_HEIGHT=$(convert -format %w -size 720x200 xc:none -fill white -stroke $BTN_STROKE -strokewidth 1 -pointsize $TITLE_SIZE -font $BUTTON_FONT +antialias -weight bold -annotate +20+80 "$BUTTON_CHAR" -trim +repage info:)
93
     # Find how much to pad the top of the button and make the pad
94
     let "BUTTON_PADDING=(TILE_HEIGHT-BUTTON_HEIGHT-TITLE_BOTTOM_SPACE)/2"
95
     convert -size ${TILE_WIDTH}x${BUTTON_PADDING} xc:none "$BUTTON_PAD"
96
@@ -785,7 +790,7 @@
97
 fi
98
 
99
 # Calculate video length from length of audio
100
-VID_LENGTH=$(mplayer -quiet -identify -frames 0 -vo null -ao null \
101
+VID_LENGTH=$(mplayer -quiet -nomsgcolor -identify -frames 0 -vo null -ao null \
102
     "$AUDIO_STREAM" 2>&1 | grep '^ID_LENGTH' | awk -F '=' '{print $2}' | \
103
     sed -e "s/\.[0-9]*//g")
104
 VID_LENGTH=$(expr "$VID_LENGTH" \* $FPS \/ 100)
105
tovid-0.33.tar.bz2/src/makempg -> tovid-0.34.tar.bz2/src/makempg Changed
201
 
1
@@ -202,6 +202,7 @@
2
 ID_VIDEO_HEIGHT="0"
3
 ID_VIDEO_FPS="0.000"
4
 V_DURATION="0"
5
+ID_AUDIO_BITRATE="0"
6
 # mplayer executable to use
7
 MPLAYER="mplayer"
8
 # No custom mplayer opts
9
@@ -287,12 +288,7 @@
10
 # ******************************************************************************
11
 # Execute the given command-line string, with appropriate stream redirection
12
 # Args: $@ == text string containing complete command-line
13
-# To filter/prettify the subprocess output before writing it to the log file,
14
-# set the LOG_FILTER variable before calling this function, to e.g.
15
-#    LOG_FILTER="sed {s/\r/\n/g}"    # Replace LF with CR/LF
16
 # ******************************************************************************
17
-CRLF="sed {s/\r/\n/g}"  # Turn carriage-returns into newlines
18
-FOLD="fold -bs"
19
 function cmd_exec()
20
 {
21
     if $FAKE; then
22
@@ -301,8 +297,7 @@
23
         yecho
24
         return
25
     else
26
-        LOG_FILTER="$CRLF"
27
-        eval "$@" 2>&1 | $LOG_FILTER >> "$LOG_FILE" &
28
+        eval "$@" 2>&1 | strings >> "$LOG_FILE" &
29
         PIDS="$PIDS $!"
30
     fi
31
 }
32
@@ -652,7 +647,7 @@
33
             yecho
34
             yecho "Do you want to keep the temporary files that were created ?"
35
             yecho "Please type \"yes\", or else they will be deleted"
36
-            yecho "(add '-noask' to your ~/.tovid/makempg.config to avoid"
37
+            yecho "(add '-noask' to the [mpg] section of ~/.tovid/tovid.ini to avoid"
38
             yecho "being asked this question in the future)"
39
             read input
40
             echo
41
@@ -806,8 +801,8 @@
42
         yecho "Your encoded video should be in the file(s) $OUT_FILENAME."
43
         echo
44
         echo "You can author a disc with this video on it by running:"
45
-        echo "    makexml $OUT_FILENAME -out MyDisc"
46
-        echo "    makedvd MyDisc.xml"
47
+        echo "    tovid xml $OUT_FILENAME -out MyDisc"
48
+        echo "    tovid dvd MyDisc.xml"
49
         echo "You can also use todisc or makemenu to create menus for your disc."
50
         echo "See the tovid manual page ('man tovid') for more information."
51
         echo
52
@@ -1230,6 +1225,11 @@
53
     LENGTH=$V_DURATION
54
     MPEG_OVERHEAD=$(bc_math "$FIT_SIZE / 100")
55
     AUD_VID_SIZE=$(bc_math "$FIT_SIZE - $MPEG_OVERHEAD")
56
+    # When the audio is already compliant and the bitrate is known we
57
+    # can calculate a more accurate size.
58
+    if $AUDIO_OK && test "$ID_AUDIO_BITRATE" != "0"; then
59
+        AUD_BITRATE=$(echo "scale = 0; $ID_AUDIO_BITRATE / 1000" | bc)
60
+    fi
61
     AUDIO_SIZE=$(bc_math "$AUD_BITRATE * $LENGTH / (8 *1024)")
62
     VIDEO_SIZE=$(bc_math "$AUD_VID_SIZE - $AUDIO_SIZE")
63
     VID_BITRATE=$(bc_math "$VIDEO_SIZE*8*1024 / $LENGTH")
64
@@ -1578,7 +1578,6 @@
65
     fi
66
 fi
67
 
68
-
69
 # Do fast encoding if requested. Sacrifice quality for encoding speed.
70
 # NOT IMPLEMENTED IN COMMAND-LINE YET!
71
 if $FAST_ENCODING; then
72
@@ -1609,20 +1608,41 @@
73
     ASPECT_RATIO=$AUTO_ASPECT_RATIO
74
 fi
75
 
76
+# ffmpeg's -vf aspect is more dependable than -aspect, if ffmpeg is new enough
77
+FF_FILTERS=$(ffmpeg -filters 2>&1)
78
+# newer ffmpeg's use setdar= and setsar=
79
+if grep -qw ^setdar <<< "$FF_FILTERS"; then
80
+    FF_ASPECT="setdar="
81
+# somewhat older rev's used aspect=
82
+elif grep -qw ^aspect <<< "$FF_FILTERS"; then
83
+    FF_ASPECT="aspect="
84
+else
85
+    FF_ASPECT='-aspect '
86
+fi
87
+# newer ffmpegs using filters use "-vf"
88
+FF_HELP=$(ffmpeg -h 2>&1)
89
+if grep -qw -- -vf <<< "$FF_HELP"; then
90
+    VF="-vf"
91
+# somewhat older is "-vfilters"
92
+elif grep -qw -- -vfilters <<< "$FF_HELP"; then
93
+    VF="-vfilters"
94
+else
95
+    VF=""
96
+fi
97
 
98
 # Anamorphic widescreen (16:9 output)
99
 # Used if the format supports it, and it will minimize the number of pixels
100
 # wasted on letterbox bars (or if the user requested -widetv output).
101
 if $ANAMORPH && { ((V_ASPECT_WIDTH >= 153)) || $WIDE_TV ; }; then
102
     TGT_ASPECT_WIDTH=177
103
-    FF_ASPECT="-aspect 16:9"
104
+    FF_ASPECT="${FF_ASPECT}16:9"
105
     ASPECT_FMT="--aspect 3"
106
 # For all others, use "non-anamorphic" (4:3 output)
107
 # Aspects from 133:100 to 153:100 have minimum pixel wastage
108
 # when letterboxed in 4:3
109
 else
110
     TGT_ASPECT_WIDTH=133
111
-    FF_ASPECT="-aspect 4:3"
112
+    FF_ASPECT="${FF_ASPECT}4:3"
113
     ASPECT_FMT="--aspect 2"
114
 fi
115
 
116
@@ -1849,12 +1869,30 @@
117
     [[ $TARGET = "DVD-VCD" ]] && FF_ADD_ARGS="$FF_ADD_ARGS -g 12" # experiment FIXME
118
 
119
     # Padding, for any letterboxing to be done
120
-    FF_VPAD=""
121
-    FF_HPAD=""
122
-    FF_VPIX=$(expr \( $TGT_HEIGHT \- $INNER_HEIGHT \) \/ 2)
123
-    FF_HPIX=$(expr \( $TGT_WIDTH \- $INNER_WIDTH \) \/ 2)
124
-    test "$FF_VPIX" -ne 0 && FF_VPAD="-padtop $FF_VPIX -padbottom $FF_VPIX"
125
-    test "$FF_HPIX" -ne 0 && FF_HPAD="-padleft $FF_HPIX -padright $FF_HPIX"
126
+    FF_PAD=''
127
+    FF_VPIX=0
128
+    FF_HPIX=0
129
+    FF_VPIX=$(( (TGT_HEIGHT - INNER_HEIGHT) / 2 ))
130
+    FF_HPIX=$(( (TGT_WIDTH - INNER_WIDTH) / 2 ))
131
+    (( FF_VPIX )) || (( FF_HPIX )) && PAD=1
132
+    # changed options: -pad{side} to -vf(ilters) pad= .
133
+    if ((PAD)); then
134
+        if [[ $VF ]]; then
135
+            FF_PAD="pad=${TGT_WIDTH}:${TGT_HEIGHT}:${FF_HPIX}:${FF_VPIX}"
136
+        else
137
+            ((FF_HPIX)) && FF_HPAD="-padleft $FF_HPIX -padright $FF_HPIX"
138
+            ((FF_VPIX)) && FF_VPAD="-padtop $FF_VPIX -padbottom $FF_VPIX"
139
+            FF_PAD="$FF_HPAD $FF_VPAD"
140
+        fi 
141
+    fi
142
+
143
+    # use single variable for current, or legacy ffmpeg: VF_FILTERS and OLD_OPTS
144
+    if [[ $VF ]]; then # libavfilter is being used, FF_ASPECT always passed
145
+        VF_FILTERS="${FF_PAD},${FF_ASPECT}"
146
+        VF_FILTERS="$VF ${VF_FILTERS#,}" # add -vf*, axe possible leading comma
147
+    else # legacy ffmpeg
148
+        OLD_OPTS="$FF_PAD $FF_ASPECT"
149
+    fi
150
 
151
     # Target TV system
152
     test "$TVSYS" = "PAL" && FF_TARGET="-target pal"
153
@@ -1882,13 +1920,12 @@
154
     FF_BITRATE="-b ${VID_BITRATE}k -ab ${AUD_BITRATE}k ${AUDIO_CHAN[chan1-1]} "
155
     FF_ENC_CMD="$PRIORITY ffmpeg -i \"$IN_FILE\" $FF_THREAD $CLIP_SEEK $FF_LENGTH $ASYNC $ASYNC1 \
156
         $FF_TARGET $FF_QUANT $FF_BITRATE $FF_ADD_ARGS $FF_FPS $FF_ILACE \
157
-        $FF_SIZE $FF_VPAD $FF_HPAD $FF_ASPECT $FF_CHANNEL_MAP"
158
+        $FF_SIZE $VF_FILTERS $OLD_OPTS $FF_CHANNEL_MAP"
159
     $OVERWRITE && FF_ENC_CMD="$FF_ENC_CMD -y "
160
     FF_ENC_CMD="$FF_ENC_CMD \"$OUT_FILENAME\" ${NEW_AUDIO[@]}"
161
     yecho "Encoding video and audio with the following command:"
162
     yecho "$FF_ENC_CMD"
163
 
164
-    LOG_FILTER="$CRLF"
165
     cmd_exec "$FF_ENC_CMD"
166
 
167
     if $FAKE; then
168
@@ -1930,7 +1967,6 @@
169
     #AUDIO_CMD="$PRIORITY mplayer $MPLAYER_OPTS \"$IN_FILE\" -dumpaudio -dumpfile \"$AUDIO_STREAM\""
170
     run_audio_cmd()
171
     {
172
-        LOG_FILTER="$CRLF"
173
         "${AUDIO_CMD[@]}" >> "$LOG_FILE" 2>&1 &
174
         #$PRIORITY ffmpeg $CLIP_SEEK $FF_LENGTH -i "$IN_FILE" -vn -acodec copy \
175
         #$AUDIO_MAP "${AUDIO_STREAM[@]}" >> "$LOG_FILE" 2>&1
176
@@ -2043,7 +2079,6 @@
177
 
178
 
179
     # Copy the video stream
180
-    LOG_FILTER="$CRLF"
181
     cmd_exec "$VID_COPY_CMD"
182
 
183
 
184
@@ -2060,7 +2095,7 @@
185
     fi
186
     VID_PLAY_CMD="$PRIORITY $MPLAYER $NOCONSOLE_CONTROLS -benchmark -nosound -noframedrop $SUBTITLES -vo yuv4mpeg:file=\"$YUV_STREAM\"${YUV4MPEG_ILACE} $VID_FILTER $MPLAYER_OPTS \"$IN_FILE\" $CLIP_SEEK $MP_FRAMES"
187
     if $USE_FFMPEG ; then
188
-        VID_ENC_CMD="ffmpeg -i \"$IN_FILE\" $FF_THREAD $CLIP_SEEK $FF_LENGTH -an $FF_TARGET $FF_CODEC $FF_QUANT $FF_BITRATE $FF_ADD_ARGS $FF_ILACE $FF_SIZE $FF_VPAD $FF_HPAD $FF_ASPECT -y \"$VIDEO_STREAM\""
189
+        VID_ENC_CMD="ffmpeg -i \"$IN_FILE\" $FF_THREAD $CLIP_SEEK $FF_LENGTH -an $FF_TARGET $FF_CODEC $FF_QUANT $FF_BITRATE $FF_ADD_ARGS $FF_ILACE $FF_SIZE $VF_FILTERS $OLD_OPTS -y \"$VIDEO_STREAM\""
190
     else
191
         VID_ENC_CMD="cat \"$YUV_STREAM\" | $YUVDENOISE $ADJUST_FPS $PRIORITY mpeg2enc --sequence-length $DISC_SIZE --nonvideo-bitrate $NONVIDEO_BITRATE $MTHREAD $ASPECT_FMT $MPEG2_FMT $VID_FPS $VERBOSE $VID_NORM $MPEG2_QUALITY -o \"$VIDEO_STREAM\""
192
     fi
193
@@ -2078,7 +2113,6 @@
194
         file_output_progress "$YUV_STREAM" "Ripping raw uncompressed video stream"
195
     fi
196
 
197
-    LOG_FILTER="$CRLF"
198
     cmd_exec "$VID_ENC_CMD"
199
 
200
     # For parallel encoding, nothing further yet
201
tovid-0.33.tar.bz2/src/makexml -> tovid-0.34.tar.bz2/src/makexml Changed
65
 
1
@@ -122,6 +122,7 @@
2
 STANDARD=133
3
 WIDESCREEN=177
4
 NOPANSCAN=''
5
+TV_FORMAT=ntsc
6
 PAUSE=0
7
 
8
 # ==========================================================
9
@@ -169,6 +170,13 @@
10
 
11
 }
12
 
13
+function getFormat ()
14
+{
15
+    # Set TV format - default is ntsc
16
+    VID_INFO=$(tovid id -fast -terse "$1")
17
+    grep -q PAL_DVD <<< "$VID_INFO" && TV_FORMAT=pal
18
+}
19
+
20
 # ==========================================================
21
 # Add a top-level VMGM menu to the DVD
22
 # Args: $1 = video file to use for top menu
23
@@ -182,7 +190,6 @@
24
   if test $XML_FORMAT = "dvd"; then
25
     # Set NOPANSCAN
26
     noPanScan "$1"
27
-
28
     # Generate XML for the top menu, with a placeholder for
29
     # the titleset menu buttons (to be replaced later by sed)
30
     TOP_MENU_XML=`cat << EOF
31
@@ -236,12 +243,14 @@
32
 
33
     # Set NOPANSCAN
34
     noPanScan "$1"
35
+    # Set TV_FORMAT
36
+    getFormat "$1"
37
 
38
     # Generate XML for the menu header, with a placeholder for
39
     # the video segment buttons (to be replaced later by sed)
40
     MENU_XML=`cat << EOF
41
   <menus>
42
-    <video $NOPANSCAN />
43
+    <video $NOPANSCAN format="$TV_FORMAT"/>
44
     <pgc entry="root">
45
       <vob file="$1" />
46
 __MENU_BUTTONS__
47
@@ -521,7 +530,7 @@
48
 <titleset>
49
 $MENU_XML
50
   <titles>
51
-    <video $NOPANSCAN />
52
+    <video $NOPANSCAN format="$TV_FORMAT" />
53
 $TS_TITLES
54
   </titles>
55
 </titleset>
56
@@ -539,7 +548,7 @@
57
     </pgc>
58
   </menus>
59
   <titles>
60
-    <video $NOPANSCAN />
61
+    <video $NOPANSCAN format="$TV_FORMAT"/>
62
 $TS_TITLES
63
   </titles>
64
 </titleset>
65
tovid-0.34.tar.bz2/src/set_chapters Added
29
 
1
@@ -0,0 +1,27 @@
2
+#!/usr/bin/env python
3
+
4
+import sys
5
+import Tkinter as tk
6
+from libtovid.guis.helpers import SetChapters
7
+from os import path
8
+
9
+if len(sys.argv) < 2:
10
+    print("Usage: set_chapters.py video")
11
+    exit()
12
+
13
+video = sys.argv[1]
14
+if not path.exists(video):
15
+    print('Error: %s does not exist' %video)
16
+    exit()
17
+
18
+def print_chapters():
19
+    if app.get_chapters():
20
+        sys.stdout.write(app.get_chapters() + '\n')
21
+
22
+root = tk.Tk()
23
+app = SetChapters(root, '-menu', 'Mplayer', print_chapters, style='standalone')
24
+app.run(video)
25
+app.pack()
26
+
27
+root.mainloop()
28
+
29
tovid-0.33.tar.bz2/src/titleset-wizard -> tovid-0.34.tar.bz2/src/titleset-wizard Changed
1948
 
1
@@ -1,752 +1,1233 @@
2
 #!/usr/bin/env python
3
 
4
+import os.path
5
+import shlex
6
+import commands
7
+import tkFont
8
+import re
9
 from Tkinter import *
10
-from tkFileDialog import askopenfilename
11
+from tkMessageBox import *
12
+from tkSimpleDialog import askstring
13
+from tkFileDialog import asksaveasfilename
14
 from subprocess import Popen, PIPE
15
-import os.path
16
 from libtovid.metagui import Style
17
-from libtovid.cli import _enc_arg
18
-from tkMessageBox import *
19
+from libtovid.metagui.support import PrettyLabel, show_icons, get_photo_image
20
+from libtovid.cli import _enc_arg, Command
21
+from libtovid.util import trim
22
 from time import sleep
23
 from tempfile import mktemp
24
-from sys import argv
25
-import shlex
26
-import signal
27
-
28
-todisc_cmds = []
29
-all_options = []
30
-error_msg = 'This is not a saved GUI script\n' + \
31
-  'Please select the file that you saved'
32
-labels = ['General', 'VMGM menu', 'Titlesets']
33
-curdir = os.path.abspath('')
34
-newname = mktemp(suffix='.bash', prefix='todisc_commands.', dir=curdir)
35
-pid_file = mktemp(suffix='.pid', prefix='todiscgui.', dir='/tmp')
36
-os.environ['METAGUI_WIZARD'] = '1'
37
-
38
-# get metagui font configuration
39
-def get_font(name='', size='', _style=''):
40
-    font = [name, size, _style]
41
-    for i in range(len(style.font)):
42
-        if not font[i]:
43
-            font[i] = style.font[i]
44
-    return font
45
-
46
-def move(amt):
47
-    global current
48
-    ind = pages.index(current) + amt
49
-    if not 0 <= ind < len(pages):
50
-        return
51
-    current.pack_forget()
52
-    current = pages[ind]
53
-    # when move is called, change the page number displayed
54
-    pg1_label4.configure(text='Page %s' %int(ind+1))
55
-    current.pack(side=TOP, fill=BOTH, expand=1)
56
-
57
-def next():
58
-    # Page 1
59
-    # if 1st page (general) then
60
-    # move forward and unless cancelled, append anything added in current
61
-    # page to [todisc_cmds], removing todisc_cmds[current] first
62
-    global todisc_cmds
63
-    mv_amt = +1
64
-    if pages.index(current) == 0:
65
-        pass
66
-    elif pages.index(current) == 1:
67
-    # Page 2
68
-        # if todisc_commands.bash exists in current dir, prompt for rename
69
-        if os.path.exists(script_file):
70
-            rename_msg = 'The option file we will use:\n' + \
71
-            'todisc_commands.bash\n' + \
72
-            'exists in the current directory.\n' + \
73
-            'It will be renamed to:\n' + \
74
-            '%s' + \
75
-            '\nProceed ?'
76
-            rename_msg = rename_msg % (os.path.basename(newname))
77
-            if askokcancel(message=rename_msg):
78
-                os.rename(script_file, newname)
79
+from sys import argv, exit
80
+from base64 import b64encode
81
+from copy import deepcopy
82
+
83
+class Wizard(Frame):
84
+    """A frame to hold the wizard pages.  It will also hold the commands
85
+       that will  be processed and written out as a script.  Its base frame
86
+       holds a frame common to all pages that displays an icon, title, and
87
+       status panel.  It also has a bottom frame that contains the [Next] and
88
+       [Exit] buttons.  It will hold a list of all of the wizard pages.
89
+
90
+       master: the Tk() instance called by __main__
91
+       icon: Path to an image file (gif) to display on the left frame
92
+       text: The text for the wizard title above and/or below the icon
93
+             Use \n to break title into above\nbelow.
94
+       
95
+    """
96
+    def __init__(self, master, text, icon):
97
+        Frame.__init__(self, master)
98
+        self.pages = []
99
+        self.index = IntVar()
100
+        self.text = text
101
+        self.icon = icon
102
+        self.master = master
103
+        self.root = self._root()
104
+        self.commands = []
105
+        # for cancelling run_gui if exit is called
106
+        self.is_running = BooleanVar()
107
+        self.is_running.set(True)
108
+        # for waiting on [Next>>>] being pushed to continue titleset loop
109
+        self.waitVar = BooleanVar()
110
+        self.waitVar.set(False)
111
+        # pid for xterm, to allow clean exit
112
+        # need this to make sure we don't have zombie processes
113
+        self.xterm_is_running = BooleanVar()
114
+        self.check = ''
115
+        self.xterm_is_running.set(False)
116
+        # bindings for exit
117
+        self.root.protocol("WM_DELETE_WINDOW", self.confirm_exit)
118
+        self.root.bind('<Control-q>', self.confirm_exit)
119
+        self.root.title('Tovid titleset wizard')
120
+
121
+        # button frame
122
+        self.button_frame = Frame(master)
123
+        self.button_frame.pack(side='bottom', fill='x', expand=1,  anchor='se')
124
+        self.exit_button = Button(self.button_frame, text='Exit',
125
+                                       command=self.confirm_exit)
126
+        self.exit_button.pack(side='left', anchor='sw')
127
+        self.next_button = Button(self.button_frame, text='Next >>',
128
+                                                  command=self.next)
129
+        self.next_button.pack(side='right', anchor='se')
130
+        self.prev_button = Button(self.button_frame, text='<< Back',
131
+                                                    command=self.previous)
132
+        # frame for icon and status display
133
+        self.frame1 = Frame(master)
134
+        self.frame1.pack(side='left', anchor='nw', padx=10, pady=80)
135
+        inifile = os.path.expanduser('~/.metagui/config')
136
+        style = Style()
137
+        style.load(inifile)
138
+        self.font = style.font
139
+        self.draw()
140
+
141
+    def draw(self):
142
+        # get fonts
143
+        font = self.font
144
+        self.lrg_font = self.get_font(font, size=font[1]+4, _style='bold')
145
+        self.medium_font = self.get_font(font, size=font[1]+2)
146
+        self.heading_font = self.get_font(font, size=font[1]+8, _style='bold')
147
+        fixed =  '-misc-fixed-medium-r-normal--13-100-100-100-c-70-iso8859-1'
148
+        self.fixed_font = tkFont.Font(font=fixed)
149
+        self.background = self.root.cget('background')
150
+        if self.text:
151
+            txt = self.text.split('\n')
152
+            app_label1 = Label(self.frame1, text=txt[0], font=self.heading_font)
153
+            app_label1.pack(side='top', fill='both', expand=1, anchor='nw')
154
+        # icons and image
155
+        if os.path.isfile(self.icon):
156
+            img = get_photo_image(self.icon, 0, 0, self.background)
157
+            self.img = img
158
+            # Display the image in a label on all pages
159
+            img_label = Label(self.frame1, image=self.img)
160
+            img_label.pack(side='top', fill='both', expand=1,
161
+                                        anchor='nw', pady=20)
162
+            # If Tcl supports it, generate an icon for the window manager
163
+            show_icons(self.master, img_file)
164
+        # No image file? Print a message and continue
165
+        else:
166
+            print('%s does not exist' % img_file)
167
+        # if 2 lines of text for image, split top and bottom
168
+        if self.text and len(txt) > 1:
169
+            app_label2 = Label(self.frame1, text=txt[1], font=self.lrg_font)
170
+            app_label2.pack(side='top', fill='both', expand=1, anchor='nw')
171
+
172
+    def next(self):
173
+        """Move to the next wizard page"""
174
+        index = self.index.get()
175
+        try:
176
+            self.pages[index].hide_page()
177
+            self.pages[index+1].frame.pack(side='right')
178
+            self.pages[index+1].show_page()
179
+        except IndexError:
180
+            pass
181
+
182
+    def previous(self):
183
+        index = self.index.get()
184
+        self.pages[index].previous()
185
+
186
+    def set_pages(self, page):
187
+        """Accept incoming list of wizard page instances"""
188
+        self.pages.append(page)
189
+
190
+    def get_font(self, font_descriptor, name='', size='', _style=''):
191
+        """Get metagui font configuration
192
+        """
193
+        font = [name, size, _style]
194
+        for i in range(len(font_descriptor)):
195
+            if not font[i]:
196
+                font[i] = font_descriptor[i]
197
+        return tuple(font)
198
+
199
+    def show_status(self, status):
200
+        """Show status label on all pages, with timeout
201
+        """
202
+        if status == 0:
203
+            text='\nOptions saved!\n'
204
+        else:
205
+            text='\nCancelled!\n'
206
+        font = self.medium_font
207
+        status_frame = Frame(self.frame1, borderwidth=1, relief=RAISED)
208
+        status_frame.pack(pady=40)
209
+        label1 = Label(status_frame, text=text, font=font, fg='blue')
210
+        label1.pack(side='top')
211
+        label2 = Label(status_frame, text='ok', borderwidth=2, relief=GROOVE)
212
+        label2.pack(side='top')
213
+        self.root.after(1000, lambda: label2.configure(relief=SUNKEN))
214
+        self.root.after(2000, lambda: status_frame.pack_forget())
215
+
216
+    def confirm_exit(self, event=None):
217
+        """Exit the GUI, with confirmation prompt.
218
+        """
219
+        mess = 'Xterm is still open: is todisc still running?  ' + \
220
+          'If so, please ctrl-c in the terminal if you wish to quit.  ' + \
221
+          'In any case, you will need to close the terminal ' + \
222
+          'by pressing <ENTER> in it.'
223
+        if self.xterm_is_running.get() == True:
224
+            showwarning(message=mess)
225
+            return
226
+        if askyesno(message="Exit?"):
227
+            # set is_running to false so the gui doesn't get run
228
+            self.is_running.set(False)
229
+            # waitVar may cause things to hang, spring it
230
+            self.set_waitvar()
231
+            self.root.quit()
232
+
233
+    # unused
234
+    def kill_pid(self, pid):
235
+        """Test and kill xterm pid in case of premature exit"""
236
+        if not pid:
237
+            return
238
+        test_pid = commands.getstatusoutput('kill -0 %s' %pid)
239
+        if test_pid[0] == 0:
240
+            cmd = ['kill', '%s' %pid]
241
+            Popen(cmd, stderr=PIPE)
242
+
243
+    def set_waitvar(self):
244
+        """Set a BooleanVar() so tk.wait_var can exit
245
+        """
246
+        self.waitVar.set(True)
247
+
248
+
249
+class WizardPage(Frame):
250
+    """Base class for the wizard pages.  As such it contains everythig
251
+       common to all wizard pages.
252
+    """
253
+    def __init__(self, master):
254
+        Frame.__init__(self, master)
255
+        Frame.pack(master)
256
+        self.master = master
257
+        self.root = self._root()
258
+        # a temp file name for the final script name if it exists already
259
+        curdir = os.path.abspath('')
260
+        self.newname = mktemp(suffix='.bash', prefix='todisc_commands.',
261
+                                                             dir=curdir)
262
+        # get tovid prefix
263
+        tovid_prefix = commands.getoutput('tovid -prefix')
264
+        self.tovid_prefix = os.path.join(tovid_prefix, 'lib', 'tovid')
265
+        os.environ['PATH'] = self.tovid_prefix + os.pathsep + os.environ['PATH']
266
+        # the script we will be using for options
267
+        cur_dir = os.path.abspath('')
268
+        self.script_file = cur_dir + '/todisc_commands.bash'
269
+        # get script header
270
+        shebang = '#!/usr/bin/env bash'
271
+        _path = 'PATH=' + self.tovid_prefix + ':$PATH'
272
+        _cmd = ['tovid', '--version']
273
+        _version = Popen(_cmd, stdout=PIPE).communicate()[0].strip()
274
+        identifier = '# tovid project script\n# tovid version %s' % _version
275
+        self.header = '%s\n\n%s\n\n%s\n\n' % (shebang, identifier, _path )
276
+        # ititialize a frame, but don't pack yet
277
+        self.frame = Frame(self.master)
278
+        # initialize widgets, but don't show yet
279
+        self.master.set_pages(self)
280
+
281
+    def show_page(self):
282
+        wizard = self.master
283
+        index = wizard.pages.index(self)
284
+        wizard.index.set(index)
285
+        self.draw()
286
+        wizard.next_button.configure(command=self.page_controller)
287
+
288
+    def hide_page(self):
289
+        self.frame.pack_forget()
290
+
291
+    def run_gui(self, args=[], index='', script=''):
292
+        """Run the tovid GUI, collecting options, and saving to wizard
293
+        """
294
+        title = 'load saved script'
295
+        script = 'todisc_commands.bash'
296
+        set_env = []
297
+        if index:
298
+            os.environ['METAGUI_WIZARD'] = '%s' %index
299
+        cmd = ['todiscgui'] + args
300
+        todiscgui_cmd = Popen(cmd, stdout=PIPE)
301
+        # sleep to avoid the 'void' of time before the GUI loads
302
+        sleep(0.5)
303
+        if self.root.state() is not 'withdrawn':
304
+            self.root.withdraw()
305
+        status = todiscgui_cmd.wait()
306
+        if status == 200:
307
+        # if script doesn't exist prompt for load.
308
+            if os.path.exists(self.script_file):
309
+                script = self.script_file
310
             else:
311
-                show_status(1)
312
+                err = 'A problem has occured with saving your options.  ' + \
313
+                  'The saved script file was not found.  ' + \
314
+                  'Please submit a bug report'
315
+                showerror(message=err)
316
                 return
317
+            # Read lines from the file and reassemble the command
318
+            todisc_opts = self.script_to_list(script)
319
+            os.remove(script)
320
+        else:
321
+            todisc_opts  = []
322
+        return todisc_opts
323
+
324
+    def page_controller(self):
325
+        self.master.next()
326
 
327
-        # withdraw the wizard and run the GUI, collecting commands
328
-        get_commands = run_gui()
329
+    def script_to_list(self, infile):
330
+        """File contents to a list, trimming '-from-gui' and header
331
+        """
332
+        add_line = False
333
+        command = ''
334
+        for line in open(infile, 'r'):
335
+            if line.startswith('-'):
336
+                add_line = True
337
+            if add_line and not line.startswith('-from-gui'):
338
+                line = line.strip()
339
+                command += line.rstrip('\\')
340
+        return shlex.split(command)
341
+
342
+    def write_script(self):
343
+        """Write out the final script to todisc_commands.bash
344
+        """
345
+        commands = self.master.commands
346
+        header = self.header
347
+        cmdout = open(self.script_file, 'w')
348
+        os.chmod(self.script_file, 0775)
349
+        # add the shebang, PATH, and 'todisc \' lines
350
+        cmdout.writelines(header)
351
+        # flatten the list
352
+        all_lines = [line for sublist in commands for line in sublist]
353
+        # put the program name back into the beginning of the list
354
+        all_lines.insert(0, 'todisc')
355
+        words = [_enc_arg(arg) for arg in all_lines]
356
+        all_lines = words
357
+        # write every line with a '\' at the end, except the last
358
+        for line in all_lines[:-1]:
359
+            cmdout.write(line + ' \\\n')
360
+        # write the last line
361
+        cmdout.write(all_lines[-1])
362
+        cmdout.close()
363
+
364
+    def trim_list_header(self, cmds):
365
+            """Trim header (items before 1st '-' type option) from a list
366
+            """
367
+            # remove shebang, identifier and PATH
368
+            try:
369
+                while not cmds[0].startswith('-'):
370
+                    cmds.pop(0)
371
+            except IndexError:
372
+                pass
373
+            return cmds
374
+
375
+    def get_chunk(self, items, start, end):
376
+        """Extract a chunk [start ... end] from a list, and return the chunk.
377
+        The original list is modified in place.
378
+        """
379
+        # Find the starting index and test for 'end'
380
+        try:
381
+            index = items.index(start)
382
+            items.index(end)
383
+        # If start or end isn't in list, return empty list
384
+        except ValueError:
385
+            return []
386
+        # Pop items until end is reached
387
+        chunk = []
388
+        while items and items[index] != end:
389
+            chunk.append(items.pop(index))
390
+        # Pop the last item (==end)
391
+        chunk.append(items.pop(index))
392
+        return chunk
393
+
394
+    def get_list_args(self, items, option):
395
+        """Get option arguments from a list (to next item starting with '-')
396
+        """
397
+        try:
398
+            index = items.index(option)
399
+        # If item isn't in list, return empty list
400
+        except ValueError:
401
+            return []
402
+        # Append items until end is reached
403
+        chunk = []
404
+        try:
405
+            while items and not items[index+1].startswith('-'):
406
+                chunk.append(items[index+1])
407
+                index += 1
408
+        except IndexError:
409
+            pass
410
+        return chunk
411
+
412
+    def see_me(self, widget):
413
+        """Bring attention to widget by changing text colour
414
+        """
415
+        # 3000 and 4000 ms because show_status uses up 3000 already
416
+        self.root.after(3000, lambda: widget.configure(foreground='blue'))
417
+        widget.update()
418
+        self.root.after(4000, lambda: widget.configure(foreground='black'))
419
+
420
+
421
+    def refill_listbox(self, listbox, opts):
422
+        """Repopulate the rerun listbox with option list titles
423
+        """
424
+        if '-titles' in opts:
425
+            new_titles = self.get_list_args(opts, '-titles')
426
+        else:
427
+            new_titles = opts
428
+        listbox.delete(0, 'end')
429
+        # insert or reinsert options list into titleset listbox
430
+        listbox.insert('end', 'General options')
431
+        listbox.insert('end', 'Root menu')
432
+        numtitles = len(new_titles)
433
+        for i in xrange(numtitles):
434
+            listbox.insert('end', new_titles[i])
435
+
436
+    def rename_script(self):
437
+        # if todisc_commands.bash exists in current dir, prompt for rename
438
+        rename_msg = 'The option file we will use:\n' + \
439
+          '"todisc_commands.bash"\n' + \
440
+          'exists in the current directory.\n' + \
441
+          'It will be renamed to:\n' + \
442
+          '"%s"' + \
443
+          '\nPress Ok to rename it.\nPress Cancel to overwrite it'
444
+        rename_msg = rename_msg % (os.path.basename(self.newname))
445
+        if askokcancel(message=rename_msg):
446
+            os.rename(self.script_file, self.newname)
447
+        else:
448
+            self.master.show_status(1)
449
+            return
450
+
451
+
452
+class Page1(WizardPage):
453
+    """Wizard intro page"""
454
+    def __init__(self, master):
455
+        WizardPage.__init__(self, master)
456
+        # draw the page by default unless script file arg passed
457
+        if len(argv) < 2:
458
+            self.draw()
459
+        index = self.master.pages.index(self)
460
+        self.master.index.set(index)
461
+
462
+    def draw(self):
463
+        self.frame.pack(side='right', fill='both', expand=1, anchor='nw')
464
+        text = '''INTRODUCTION
465
+
466
+        Welcome to the tovid titleset wizard.  We will be making a complete DVD,
467
+        with multiple levels of menus including a root menu (VMGM menu) and
468
+        lower level titleset menus.  We will be using 'tovid gui', which uses
469
+        the 'todisc' script.  Any of these menus can be either static or
470
+        animated, and use thumbnail menu links or plain text links.  Titleset
471
+        menus can also have chapter menus.
472
+
473
+        Though the sheer number of options can be daunting when the GUI first
474
+        loads, it is important to remember that there are very few REQUIRED
475
+        options, and in all cases the required options are on the opening tab.  
476
+        The required options will be listed for you for each run of the GUI.
477
+
478
+        But please have fun exploring the different options using the preview
479
+        to test.  A great many options of these menus are configurable, 
480
+        including fonts, shapes and effects for thumbnails, fade-in/fade-out
481
+        effects, "switched menus", the addition of a "showcased" image/video, 
482
+        animated or static background image or video, audio background ... 
483
+        etc.  There are also playback options including the supplying of
484
+        chapter points, special navigation features like "quicknav", and
485
+        configurable DVD button links.
486
+        '''
487
+        text = trim(text)
488
+        self.label = PrettyLabel(self.frame, text, self.master.font)
489
+        self.label.pack(fill='both', expand=1, anchor='nw')
490
+
491
+    def page_controller(self):
492
+        self.master.next()
493
+
494
+
495
+class Page2(WizardPage):
496
+    """Wizard general options page"""
497
+    def __init__(self, master):
498
+        WizardPage.__init__(self, master)
499
+
500
+    def draw(self):
501
+        self.frame.pack(side='right', fill='both', expand=1, anchor='nw')
502
+        text = '''GENERAL OPTIONS
503
+
504
+        When you press the  "Next >>>"  button at the bottom of the wizard, we
505
+        will start the GUI and begin with general options applying to all
506
+        titlesets.  For example you may wish to have all menus share a common
507
+        font and fontsize of your choosing, for the menu link titles and/or the
508
+        menu title.
509
+
510
+        The only REQUIRED option here is specifying an Output directory at the
511
+        bottom of the GUI's main tab.  Options you enter will be overridden if
512
+        you use the same option again later for titlesets.
513
+
514
+        After making your selections, press [ Save to wizard ] in the GUI
515
+
516
+        Press  "Next >>>"  to begin ...
517
+        '''
518
+        text = trim(text)
519
+        self.label = PrettyLabel(self.frame, text, self.master.font)
520
+        self.label.pack(fill='both', expand=1, anchor='nw')
521
+
522
+    def page_controller(self):
523
+        if os.path.exists(self.script_file):
524
+            self.rename_script()
525
+        wizard = self.master
526
+        index = wizard.index.get()
527
+        move = True
528
+        cmds = self.run_gui([], index)
529
         # append to list and go to next page unless GUI was cancelled out of
530
-        if not get_commands:
531
+        if not cmds:
532
             status = 1
533
-            mv_amt = 0
534
+            move = False
535
         else:
536
             status = 0
537
-            if len(todisc_cmds) > 0:
538
-                todisc_cmds.pop(0)
539
-            cmds = [l for l in get_commands if l]
540
-            todisc_cmds.append(cmds)
541
-        tk.deiconify()
542
-        show_status(status)
543
-    elif pages.index(current) == 2:
544
-    # Page 3
545
-        run_cmds = list(pg3_listbox1.get(0, END))
546
+            cmds = [l for l in cmds if l]
547
+            wizard.commands.append(cmds)
548
+        wizard.show_status(status)
549
+        self.root.deiconify()
550
+        if move:
551
+            wizard.next()
552
+
553
+
554
+class Page3(WizardPage):
555
+    """Wizard root menu page"""
556
+    def __init__(self, master):
557
+        WizardPage.__init__(self, master)
558
+
559
+    def draw(self):
560
+        self.frame.pack(side='right', fill='both', expand=1, anchor='nw')
561
+        text = '''ROOT MENU (VMGM)
562
+
563
+        Now we will save options for your root (VMGM) menu.  The only REQUIRED
564
+        option is the titleset titles.  You need to enter them here.  These
565
+        names will appear as menu titles for the respective menu in your DVD.
566
+        Enter the names of your titlesets, one per line, pressing <ENTER> each
567
+        time.  Do not use quotes unless you want them to appear literally in
568
+        the title.
569
+
570
+        Press  [Next >>>]  when you are finished, and the tovid gui will come
571
+        up so you can enter any other options you want.  You can not enter
572
+        video files here, but most other options can be used.  There are now no
573
+        REQUIRED options however, as you will have already entered your root
574
+        menu link titles. Hint: try using background audio or image/video, or
575
+        use a -showcase FILE for an image or video centrally displayed.
576
+
577
+        After making your selections, press [ Save to wizard ] in the GUI
578
+        '''
579
+        text = trim(text)
580
+        label1 = PrettyLabel(self.frame, text, self.master.font, height=18)
581
+        label1.pack(fill='both', expand=True, side='top', anchor='nw')
582
+        # create the listbox (note that size is in characters)
583
+        self.titlebox = TitleBox(self.frame, text="Root 'menu link' titles")
584
+
585
+    def save_list(self):
586
+        """Save the current listbox contents
587
+        """
588
+        # get a list of listbox lines
589
+        temp_list = list(self.titlebox.get(0, 'end'))
590
+        return [ l for l in temp_list if l]
591
+
592
+    def page_controller(self):
593
+        wizard = self.master
594
+        run_cmds = list(self.titlebox.get(0, 'end'))
595
         run_cmds = [l for l in run_cmds if l]
596
-        # withdraw the wizard and run the GUI, collecting commands
597
-        run_cmds.insert(0,  '-titles')
598
-        get_commands = run_gui(run_cmds)
599
-        # append to list and go to next page unless GUI was cancelled out of
600
-        if not get_commands:
601
-            status = 1
602
+        if len(run_cmds) < 2:
603
+            showerror(message=\
604
+              'At least two titlesets (titles) must be defined')
605
             return
606
         else:
607
-            status = 0
608
-            if len(todisc_cmds) > 1:
609
-                todisc_cmds.pop(1)
610
-            trim_list_header(get_commands)
611
-            cmds = ['-vmgm']
612
-            cmds.extend(get_commands)
613
-            cmds.append('-end-vmgm')
614
-            todisc_cmds.append(cmds)
615
-        tk.deiconify()
616
-        show_status(status) 
617
-    elif pages.index(current) == 3:
618
-    # Page 4
619
-        tk.withdraw()
620
-        options_list = save_list()
621
-        numtitles = len(save_list())
622
-        # set [ Next >>> ] button to set waitVar, allowing loop to continue
623
-        button1.configure(command=setVar)
624
+            # withdraw the wizard and run the GUI, collecting commands
625
+            run_cmds.insert(0,  '-titles')
626
+            index = wizard.index.get()
627
+            get_commands = self.run_gui(run_cmds, index)
628
+            # append to list and go to next page unless GUI was cancelled out of
629
+            if not get_commands:
630
+                status = 1
631
+                self.root.deiconify()
632
+                return
633
+            else:
634
+                status = 0
635
+                self.trim_list_header(get_commands)
636
+                cmds = ['-vmgm']
637
+                cmds.extend(get_commands)
638
+                cmds.append('-end-vmgm')
639
+                wizard.commands.append(cmds)
640
+            wizard.next()
641
+            self.root.deiconify()
642
+            wizard.show_status(status)
643
+
644
+
645
+class Page4(WizardPage):
646
+    """Wizard titleset menu page"""
647
+    def __init__(self, master):
648
+        WizardPage.__init__(self, master)
649
+
650
+    def draw(self):
651
+        self.frame.pack(side='right', fill='both', expand=1, anchor='nw')
652
+        text1 = '''TITLESET MENUS
653
+
654
+        Okay, now you will enter options for each of your titlesets.  
655
+        The only REQUIRED option here is to load one or more video
656
+        files, but of course you should spruce up your menu by
657
+        exploring some of the other options!  The menu title for each
658
+        has been changed to the text you used for the menu links in 
659
+        the root menu - change this to whatever you want.
660
+
661
+        Follow the simple instructions that appear in the next and 
662
+        subsequent pages: 
663
+
664
+        you will need to press  [Next >>>]  for each titleset.
665
+        '''
666
+        text1 = trim(text1)
667
+        self.label1 = PrettyLabel(self.frame, text1, self.master.font)
668
+        self.label1.pack(fill='both', expand=True, side='top', anchor='nw')
669
+        self.frame2 = Frame(self.frame, borderwidth=2, relief=GROOVE)
670
+        self.label2 = Label(self.frame2, text='', font=self.master.font,
671
+                                       justify='left', padx=10, pady=10)
672
+        self.label2.pack(fill='both', expand=True, side='top', anchor='nw')
673
+
674
+    def page_controller(self):
675
+        wizard = self.master
676
+        self.root.withdraw()
677
+        options_list = self.get_list_args(wizard.commands[1], '-titles')
678
+        numtitles = len(options_list)
679
+        # set [Next >>>] button to set waitVar, allowing loop to continue
680
+        wizard.next_button.configure(command=wizard.set_waitvar)
681
+
682
         for i in range(numtitles):
683
             run_cmds = ['-menu-title']
684
             run_cmds.append(options_list[i])
685
             if i < numtitles:
686
-                pg4_txt2 = 'Now we will work on titleset %s:\n"%s"\n\n'
687
-                pg4_txt2 += 'Press  [ Next >>> ]  to continue'
688
-                pg4_txt2 = pg4_txt2 % (int(i+1), options_list[i])
689
-                pg4_label2.configure(text=pg4_txt2)
690
-                # remove original text on the page
691
-                pg4_label1.pack_forget()
692
-                # fake press the next button to show action is needed
693
-                fake_press(button1)
694
+                text2 = 'Now we will work on titleset %s:\n"%s"\n\n' + \
695
+                  'Press  [Next >>>]  to continue'
696
+                text2 = text2 % (int(i+1), options_list[i])
697
+                self.label2.configure(text=text2)
698
+                self.frame2.pack()
699
+                self.see_me(self.label2)
700
             # withdraw the wizard and run the GUI, collecting commands
701
-            tk.deiconify()
702
+            self.root.deiconify()
703
             # pressing 'Next' sets the waitVar and continues
704
-            tk.wait_variable(waitVar)
705
-            get_commands = run_gui(run_cmds)
706
+            wizard.wait_variable(wizard.waitVar)
707
+            if wizard.is_running.get() == 1:
708
+                get_commands = self.run_gui(run_cmds, '%s' %(i+3))
709
+            else:
710
+                quit()
711
             if get_commands:
712
                 status = 0
713
-                get_commands = trim_list_header(get_commands)
714
+                get_commands = self.trim_list_header(get_commands)
715
                 # wrap the commands in titleset 'tags', then write out script
716
                 cmds = ['-titleset']
717
                 cmds.extend(get_commands)
718
                 cmds.append('-end-titleset')
719
-                todisc_cmds.append(cmds)
720
+                wizard.commands.append(cmds)
721
             else:
722
-                status = 1 
723
-            show_status(status)
724
-        tk.deiconify()
725
-        # set button1 back to next command and set waitVar back to false
726
-        button1.configure(command=next)
727
-        waitVar.set(False)
728
-        write_script()
729
-
730
-        ####################  prepare the next pages listbox ##################
731
-
732
-        # allow editing the saved lists with the GUI
733
-        # delete titleset listbox contents else it increases with page movement
734
-        # insert or reinsert options list into titleset listbox
735
-        pg5_listbox1.pack(side=TOP, anchor='w', fill=BOTH, expand=1)
736
-        refill_listbox(pg5_listbox1, options_list)
737
-        if (numtitles > 10): numtitles = 10
738
-        options_list = save_list()
739
-        numtitles = len(options_list)
740
-        pg5_listbox1.configure(height=numtitles+2)
741
-        set_last_page()
742
-    elif pages.index(current) == 4:
743
-    # Page 5
744
-        root = Tk()
745
-        root.option_add("*Dialog.msg.wrapLength", "10i")
746
-        root.withdraw()
747
-        if askyesno(message="Run saved script in xterm now?"):
748
-            run_in_xterm(script_file)
749
-        else:
750
-            show_status(1)
751
-        root.destroy()
752
-    move(mv_amt)
753
-
754
-def prev():
755
-    move(-1)
756
-
757
-def get_list(event):
758
-    """
759
-    function to read the listbox selection
760
-    and put the result in an entry widget
761
-    """
762
-    try:
763
-        # get selected line index
764
-        index = pg3_listbox1.curselection()[0]
765
-        # get the line's text
766
-        seltext = pg3_listbox1.get(index)
767
-        # delete previous text in enter1
768
-        enter1.delete(0, END)
769
-        # now display the selected text
770
-        enter1.insert(0, seltext)
771
-        enter1.focus_set()
772
-    except IndexError:
773
-        pass
774
-
775
-def set_list(event):
776
-    """
777
-    insert an edited line from the entry widget
778
-    back into the listbox
779
-    """
780
-    try:
781
-        index = pg3_listbox1.curselection()[0]
782
-        # delete old listbox line
783
-        pg3_listbox1.delete(index)
784
-    except IndexError:
785
-        index = END
786
-    # insert edited item back into pg3_listbox1 at index
787
-    pg3_listbox1.insert(index, enter1.get())
788
-    enter1.delete(0, END)
789
-    # don't add more than one empty index
790
-    next2last = pg3_listbox1.size() -1
791
-    if not pg3_listbox1.get(next2last) and not pg3_listbox1.get(END):
792
-        pg3_listbox1.delete(END)
793
-    # add a new empty index if we are at end of list
794
-    if pg3_listbox1.get(END):
795
-        pg3_listbox1.insert(END, enter1.get())
796
-    pg3_listbox1.selection_set(END)
797
-
798
-def save_list():
799
-    """
800
-    save the current listbox contents
801
+                status = 0
802
+                wizard.commands.extend(run_cmds)
803
+                message='You have cancelled out of a titleset run. ' + \
804
+                  'The titleset will still appear in the listbox on the ' + \
805
+                  'last page, you may edit, remove or reorder it there.'
806
+                showinfo(message=message)
807
+            wizard.show_status(status)
808
+        self.write_script()
809
+        self.root.deiconify()
810
+        wizard.next()
811
+
812
+
813
+class Page5(WizardPage):
814
+    """Final wizard page.  Here you can rerun options that have been saved
815
+       from the tovid GUI, and add or remove titlesets.  You can also
816
+       choose to run the final project
817
     """
818
-    # get a list of listbox lines
819
-    temp_list = list(pg3_listbox1.get(0, END))
820
-    return [ l for l in temp_list if l]
821
-
822
-def run_gui(args=[]):
823
-    # TODO change todisc_cmds (is global) to todisc_opts
824
-    # TODO deiconfiy() in run_gui() using tk.after(100, tk.deiconify()) or so
825
-    title = 'load saved script'
826
-    script = 'todisc_commands.bash'
827
-    cmd = ['tovid', 'gui'] + args
828
-    todiscgui_cmd = Popen(cmd, stdout=PIPE)
829
-    # sleep to avoid the 'void' of time before the GUI loads
830
-    sleep(0.5)
831
-    pid = todiscgui_cmd.pid
832
-    # we need the pid later in case of interupt during wait_variable loop
833
-    write_pid = open(pid_file, 'w')
834
-    write_pid.write(str(pid))
835
-    write_pid.close()
836
-    if tk.state() is not 'withdrawn':
837
-        tk.withdraw()
838
-    status = todiscgui_cmd.wait()
839
-    if status == 200:
840
-    # if script doesn't exist prompt for load.
841
-        if os.path.exists(script_file):
842
-            script = script_file
843
-        else:
844
-            err = 'A problem has occured with saving your options.\n'
845
-            err += 'The saved script file was not found.\n'
846
-            err += 'Please submit a bug report'
847
-            showerror(message=err)
848
-        # Read lines from the file and reassemble the command
849
-        todisc_cmds = script_to_list(script)
850
-        os.remove(script)
851
-    else:
852
-        todisc_cmds = []
853
-    return todisc_cmds
854
-
855
-def run_in_xterm(script):
856
-    ''' run the final script in an xterm, completing the project
857
-    '''
858
-    cmd = ['xterm', '-fn', '10x20', '-sb', '-title', 'todisc', '-e', 'sh', '-c']
859
-    wait_cmd = ';echo ;echo "Press Enter to exit terminal"; read input'
860
-    tovid_cmd = 'bash %s' % script
861
-    cmd.append(tovid_cmd + wait_cmd)
862
-    tk.withdraw()
863
-    command = Popen(cmd, stderr=PIPE)
864
-    tk.deiconify()
865
-
866
-
867
-def rerun_options(Event=None):
868
-    ''' run the gui with the selected options
869
-    '''
870
-    try:
871
-        index = int(pg5_listbox1.curselection()[0])
872
-    except IndexError:
873
-        showerror('Please select an options line first')
874
-    rerun_opts = []
875
-    #mess='Rerun GUI for the "%s" options?' % pg5_listbox1.get(index)
876
-    #if askyesno(message=mess):
877
-    # the GUI doesn't understand the titleset type options
878
-    remove = ['-vmgm', '-end-vmgm', '-titleset', '-end-titleset']
879
-    options = [ i for i in todisc_cmds[index] if not i in remove ]
880
-    rerun_opts = run_gui(options)
881
-    if rerun_opts:
882
-        status = 0
883
-        # trim header from todisc_cmds
884
-        rerun_opts = trim_list_header(rerun_opts)
885
-        # fill the listbox again if vmgm opts changed
886
-        # add the 'tags' back around the option list if needed
887
-        if index == 1:
888
-            refill_listbox(pg5_listbox1, rerun_opts)
889
-            rerun_opts = ['-vmgm'] + rerun_opts + ['-end-vmgm']
890
-        elif index >= 2:
891
-            rerun_opts = ['-titleset'] + rerun_opts + ['-end-titleset']
892
-        todisc_cmds[index] = rerun_opts
893
-        # rewrite the saved script file
894
-        write_script()
895
-    else:
896
-        status = 1
897
-    tk.deiconify()
898
-
899
-    show_status(status)
900
-
901
-def refill_listbox(listbox, opts):
902
-    ''' repopulate the rerun listbox with option list titles
903
-    '''
904
-    if '-titles' in opts:
905
-        new_titles = get_list_args(opts, '-titles')
906
-    else:
907
-        new_titles = opts
908
-    listbox.delete(0, END)
909
-    # insert or reinsert options list into titleset listbox
910
-    listbox.insert(END, 'General options')
911
-    listbox.insert(END, 'Root menu')
912
-    numtitles = len(new_titles)
913
-    listbox.configure(height=numtitles+2)
914
-    for i in xrange(numtitles):
915
-        listbox.insert(END, new_titles[i])
916
-
917
-
918
-def trim_list_header(cmds):
919
-        # remove shebang, identifier and PATH
920
+    def __init__(self, master):
921
+        WizardPage.__init__(self, master)
922
+        self.curindex = 0
923
+        self.lastindex = 0
924
+        # set commands and draw this page if script file arg passed
925
+        if len(argv) > 1:
926
+            self.set_project_commands()
927
+            self.draw()
928
+            index = self.master.pages.index(self)
929
+            self.master.index.set(index)
930
+            # draw must be called before load_project
931
+            self.load_project()
932
+
933
+    def draw(self):
934
+        wizard = self.master
935
+        self.frame.pack(side='right', fill='both', expand=1, anchor='nw')
936
+        text = '''
937
+        Edit or reorder your selections using the listbox below.  (Note
938
+        that menu link titles as shown in listbox are saved as titles
939
+        in the "Root menu" options.)  If you are happy with your saved
940
+        options, run the script now , or exit and run it later.
941
+        You can run it later with:
942
+
943
+        bash %s
944
+
945
+        You may edit the file with a text editor but do not 
946
+        change the headers (first 3 lines of text) or change the 
947
+        order of the sections:
948
+
949
+        1. General opts  2. Root menu (-vmgm)  3. Titleset menus (-titleset)
950
+
951
+        You may reload the file using the command:
952
+
953
+        tovid titlesets %s
954
+
955
+        Edit your selections, or press [Run script now] or [Exit].
956
+        ''' % (self.script_file, self.script_file)
957
+        text = trim(text)
958
+        self.heading_label = Label(self.frame, text='Finished!',
959
+                                      font=wizard.lrg_font)
960
+        self.label = PrettyLabel(self.frame, text,
961
+                      wizard.font, height=18)
962
+        self.heading_label.pack(fill='both', expand=1, anchor='nw', pady=5)
963
+        self.label.pack(fill='both', expand=1, anchor='nw')
964
+        # create the listbox (note that size is in characters)
965
+        frame_text = "Edit items, or add, remove or drag/drop titlesets"
966
+        frame2 = LabelFrame(self.frame, text=frame_text)
967
+        button_frame = Frame(frame2)
968
+        button_frame.pack(side='bottom', fill=X, expand=1, anchor='sw')
969
+        button2 = Button(button_frame, text='Add titleset',
970
+                                 command=self.add_titleset)
971
+        button2.pack(side='left', anchor='w')
972
+        button1 = Button(button_frame, text='Edit', command=self.rerun_options)
973
+        button1.pack(side='left', fill='x', expand=1)
974
+        button3 = Button(button_frame, text='Remove titleset',
975
+                                 command=self.remove_titleset)
976
+        button3.pack(side='right', anchor='e')
977
+        self.listbox = Listbox(frame2, width=50, exportselection=0)
978
+        self.listbox.pack(side='left', fill='both', expand=1)
979
+        self.listbox.bind('<Double-Button-1>', self.rerun_options)
980
+        # create a vertical scrollbar to the right of the listbox
981
+        yscroll = Scrollbar(frame2, command=self.listbox.yview,
982
+                                             orient='vertical')
983
+        yscroll.pack(side='right', fill='y', anchor='ne')
984
+        self.listbox.configure(yscrollcommand=yscroll.set)
985
+        frame2.pack(side='left', fill='y', expand=False)
986
+        # the 2nd index contains the titleset titles (VMGM menu)
987
+        self.refill_listbox(self.listbox, wizard.commands[1])
988
+        self.listbox.selection_set('end')
989
+        # set next button to run gui etc before moving forward
990
+        wizard.next_button.configure\
991
+          (command=self.page_controller, text='Run script')
992
+        # Add bindings for drag/drop
993
+        self.listbox.bind('<Button-1>', self.set_index)
994
+        self.listbox.bind('<B1-Motion>', self.drag)
995
+        self.listbox.bind('<ButtonRelease-1>', self.drop)
996
+        self.selectbackground = self.listbox.cget('selectbackground')
997
+        self.selectforeground = self.listbox.cget('selectforeground')
998
+        self.foreground = self.listbox.cget('foreground')
999
+
1000
+
1001
+    def drag(self, event):
1002
+        """Event handler when an item in the list is dragged.
1003
+        """
1004
+        # If item is dragged to a new location, swap
1005
+        loc = self.listbox.nearest(event.y)
1006
+        # disable 1st two items which can not be dragged to
1007
+        if loc <=1 and self.curindex >1:
1008
+            self.listbox.itemconfig(1,selectbackground=self.master.background,
1009
+                             selectforeground=self.foreground)
1010
+            self.listbox.itemconfig(0,selectbackground=self.master.background,
1011
+                             selectforeground=self.foreground)
1012
+        if loc > 1 and self.curindex > 1:
1013
+            if loc != self.curindex and self.listbox.size() > 0:
1014
+                self.swap(self.curindex, loc)
1015
+                self.curindex = loc
1016
+
1017
+    def swap(self, index_a, index_b):
1018
+        """Swap the element at ``index_a`` with the one at ``index_b``.
1019
+        Calls ``swap`` callbacks for the swapped items.
1020
+        """
1021
+        wizard = self.master
1022
+        # Use temporary lists
1023
+        temp_commands = deepcopy(wizard.commands)
1024
+        wizard.commands[index_a] = temp_commands[index_b]
1025
+        wizard.commands[index_b] = temp_commands[index_a]
1026
+        # modify sublist (commands[1]) 
1027
+        self.mod_sublist('', index_a,index_b)
1028
+        temp_list = self.listbox.get(0, 'end')
1029
+        temp_list = list(temp_list)
1030
         try:
1031
-            while not cmds[0].startswith('-'):
1032
-                cmds.pop(0)
1033
+            item_a = temp_list[index_a]
1034
+            item_b = temp_list[index_b]
1035
+            temp_list[index_a] = item_b
1036
+            temp_list[index_b] = item_a
1037
+        except IndexError:
1038
+            # should not happen
1039
+            print 'index out of range!'
1040
+        # Set the updated list
1041
+        self.listbox.delete(0, 'end')
1042
+        self.listbox.insert(0, *temp_list)
1043
+
1044
+    def drop(self, event):
1045
+        """Event handler when an item in the list is "dropped".
1046
+        """
1047
+        # Change the mouse cursor back to the default arrow.
1048
+        self.root.config(cursor="")
1049
+        # since we are not in drag mode anymore, 'enable' 1st 2 indexes again
1050
+        self.listbox.itemconfig(1,selectbackground=self.selectbackground,
1051
+                                  selectforeground=self.selectforeground)
1052
+        self.listbox.itemconfig(0,selectbackground=self.selectbackground,
1053
+                                   selectforeground=self.selectforeground)
1054
+        # curindex and lastindex are the same if no drag occured
1055
+        if self.curindex != self.lastindex:
1056
+            # rewrite script
1057
+            self.write_script()
1058
+
1059
+    def set_index(self, Event=None):
1060
+        """Called when item in listbox selected.  Set curindex and change
1061
+           cursor to double-arrow.  lastindex==curindex if no drag occurs.
1062
+        """
1063
+        self.curindex = self.listbox.nearest(Event.y)
1064
+        self.lastindex = self.curindex
1065
+        # delay 50ms so double-click doesn't look strange
1066
+        self.after(50, lambda:self.root.config(cursor="double_arrow"))
1067
+
1068
+    def page_controller(self):
1069
+        wizard = self.master
1070
+        index = wizard.index.get()
1071
+        self.frame.pack_forget()
1072
+        wizard.index.set(index + 1)
1073
+        wizard.pages[index+1].frame.pack(side='right')
1074
+        wizard.pages[index+1].show_page()
1075
+        wizard.pages[index+1].set_cmd_label()
1076
+
1077
+    # used to repopulate titleset titles after adding new one
1078
+    def get_option(self, items, option):
1079
+        """Get option and arguments from a list (to next item starting with '-')
1080
+        The list is modified in place.
1081
+        """
1082
+        try:
1083
+            index = items.index(option)
1084
+        # If item isn't in list, return empty list
1085
+        except ValueError:
1086
+            return []
1087
+        # Append items until end is reached
1088
+        chunk = []
1089
+        try:
1090
+            while items and not items[index+1].startswith('-'):
1091
+                chunk.append(items.pop(index+1))
1092
+            opt = items.index(option)
1093
+            chunk.insert(0, items.pop(opt))
1094
+            return chunk
1095
         except IndexError:
1096
             pass
1097
-        return cmds
1098
-
1099
-def script_to_list(infile):
1100
-    add_line = False
1101
-    command = ''
1102
-    for line in open(infile, 'r'):
1103
-        if line.startswith('-'):
1104
-            add_line = True
1105
-        if add_line and not line.startswith('-from-gui'):
1106
-            line = line.strip()
1107
-            command += line.rstrip('\\')
1108
-    return shlex.split(command)
1109
-
1110
-def write_script():
1111
-    cmdout = open(script_file, 'w')
1112
-    # add the shebang, PATH, and 'todisc \' lines
1113
-    cmdout.writelines(header)
1114
-    # flatten the list
1115
-    all_lines = [line for sublist in todisc_cmds for line in sublist]
1116
-    # put the program name back into the beginning of the list
1117
-    all_lines.insert(0, 'todisc')
1118
-    words = [_enc_arg(arg) for arg in all_lines]
1119
-    all_lines = words
1120
-    #
1121
-    # write every line with a '\' at the end, except the last
1122
-    for line in all_lines[:-1]:
1123
-        cmdout.write(line + ' \\\n')
1124
-    # write the last line
1125
-    cmdout.write(all_lines[-1])
1126
-    cmdout.close()
1127
-
1128
-# get_chunk and get_list_args are
1129
-# for parsing args from a loaded titleset script
1130
-# thanks to Eric Pierce for providing these
1131
-def get_chunk(items, start, end):
1132
-    """Extract a chunk [start ... end] from a list, and return the chunk.
1133
-   The original list is modified in place.
1134
-   """
1135
-    # Find the starting index and test for 'end'
1136
-    try:
1137
-        index = items.index(start)
1138
-        items.index(end)
1139
-    # If start or end isn't in list, return empty list
1140
-    except ValueError:
1141
-        return []
1142
-    # Pop items until end is reached
1143
-    chunk = []
1144
-    while items and items[index] != end:
1145
-        chunk.append(items.pop(index))
1146
-    # Pop the last item (==end)
1147
-    chunk.append(items.pop(index))
1148
-    return chunk
1149
 
1150
-def get_list_args(items, option):
1151
-    try:
1152
-        index = items.index(option)
1153
-    # If item isn't in list, return empty list
1154
-    except ValueError:
1155
-        return []
1156
-    # Pop items until end is reached
1157
-    chunk = []
1158
-    try:
1159
-        while items and not items[index+1].startswith('-'):
1160
-            chunk.append(items[index+1])
1161
-            index += 1
1162
-        return chunk
1163
-    except IndexError:
1164
-        pass
1165
-
1166
-def load_project():
1167
-    ''' Load a saved project script for editing with the wizard and GUI
1168
-    '''
1169
-    global todisc_cmds
1170
-    page5_label1.configure(text='Editing a saved project')
1171
-    error_msg2 = 'This is not a saved tovid project script\n'
1172
-    error_msg2 += 'Do you want to try to load it anyway?'
1173
-    if not '# tovid project script\n' in open(argv[1], 'r'):
1174
-        if not askyesno(message=error_msg2):
1175
-            showinfo(message='Cancelled')
1176
-            quit()
1177
-    in_contents = script_to_list(argv[1])
1178
-    in_cmds = in_contents[:]
1179
-    all = [get_chunk(in_cmds, '-vmgm', '-end-vmgm')]
1180
-    while '-titleset' in in_cmds:
1181
-        all.append( get_chunk(in_cmds, '-titleset', '-end-titleset') )
1182
-    all.insert(0, in_cmds)
1183
-    todisc_cmds = all[:]
1184
-    numtitles = len(todisc_cmds[2:])
1185
-    menu_titles = []
1186
-    for l in todisc_cmds[2:]:
1187
-        menu_titles.extend(get_list_args(l, '-menu-title'))
1188
-    pg5_listbox1.pack(side=LEFT, anchor='w', fill=X, expand=1)
1189
-    refill_listbox(pg5_listbox1, menu_titles)
1190
-    set_last_page()
1191
-    # write out todisc_commands.bash in current dir
1192
-    write_script()
1193
-    move(4)
1194
-    return todisc_cmds
1195
-
1196
-def set_last_page():
1197
-    ''' dynamic configuration for the last page
1198
-    '''
1199
-    # set label for running in xterm
1200
-    page5_label3 = Label(pg5_frame1, text=pg5_txt3, justify=LEFT)
1201
-    page5_label3.pack(side=BOTTOM, anchor='w')
1202
-    # change 'Next' button to 'Run' and reposition buttons
1203
-    button1.pack_forget()
1204
-    button2 = Button(button_frame, text='Exit', command=confirm_exit)
1205
-    button2.pack(side=RIGHT, fill=Y, expand=1, anchor='e')
1206
-    button1.pack(side=RIGHT, fill=Y, expand=1, anchor='e')
1207
-    button1.configure(text='Run script now')
1208
-
1209
-def setVar():
1210
-    ''' set a BooleanVar() so tk.wait_var can exit
1211
-    '''
1212
-    waitVar.set(True)
1213
-
1214
-def fake_press(widget):
1215
-    """ cause widget to blink
1216
-    """
1217
-    # 3000 and 4000 ms because show_status uses up 3000 already
1218
-    tk.after(3000, lambda: widget.configure(relief=SUNKEN))
1219
-    widget.update()
1220
-    tk.after(4000, lambda: widget.configure(relief=RAISED))
1221
-
1222
-def show_status(status):
1223
-    if status == 0:
1224
-        text='\nOptions saved!\n'
1225
-    else:
1226
-        text='\nCancelled!\n'
1227
-    frame2 = Frame(frame1, borderwidth=1, relief=RAISED)
1228
-    frame2.pack(pady=80)
1229
-    pg2_label2 = Label(frame2, text=text, font=medium_font, fg='blue')
1230
-    pg2_label2.pack(side=TOP)
1231
-    pg2_label3 = Label(frame2, text='ok', borderwidth=2, relief=GROOVE)
1232
-    pg2_label3.pack(side=TOP)
1233
-    #frame2 = Frame(frame1)
1234
-    #frame2.pack(pady=80)
1235
-    #pg2_label2 = Label(frame2, text=text, \
1236
-    #  font=medium_font, fg='blue', borderwidth=2, relief=GROOVE)
1237
-    #pg2_label2.pack(side=BOTTOM, fill=BOTH, expand=1, anchor='w')
1238
-    tk.after(1000, lambda: pg2_label3.configure(relief=SUNKEN))
1239
-    tk.after(2000, lambda: frame2.pack_forget())
1240
-
1241
-def confirm_exit(event=None):
1242
-        """Exit the GUI, with confirmation prompt.
1243
+    def add_titleset(self, Event=None):
1244
+        wizard = self.master
1245
+        mess = 'Please select an options line first.  ' + \
1246
+          'The new titleset will be inserted after the selected option'
1247
+        try:
1248
+            ind = int(self.listbox.curselection()[0])
1249
+        except IndexError:
1250
+            showerror(message=mess)
1251
+            return
1252
+        if ind < 1:
1253
+            err = 'Your titleset will be inserted AFTER the selected item: ' + \
1254
+              'Titlesets can not be inserted here.'
1255
+            showerror(message=err)
1256
+            return
1257
+        text = 'Please enter a menu link title for your titleset'
1258
+        title = askstring('Titleset title', text)
1259
+        # if nothing entered, return without changes
1260
+        if not title:
1261
+            wizard.show_status(1)
1262
+            return
1263
+        self.mod_sublist(title, ind)
1264
+        new_titleset = ['-titleset', '-menu-title', title, '-end-titleset']
1265
+        # add new titleset with just the 'tags' surrounding the new title
1266
+        wizard.commands.insert(ind+1, new_titleset)
1267
+        self.listbox.insert(ind+1, title)
1268
+        self.set_selection(ind)
1269
+        status = self.rerun_options(index=ind+1)
1270
+        self.set_selection(index='end')
1271
+        if status == 1:
1272
+            # remove new title from listbox
1273
+            self.listbox.delete('end')
1274
+            self.set_selection(index='end')
1275
+            wizard.commands.pop(-1)
1276
+            try:
1277
+                wizard.commands[1].remove(title)
1278
+            except ValueError:
1279
+                print('%s not in Root menu options' %title)
1280
+            return
1281
+        self.write_script()
1282
+
1283
+    def remove_titleset(self, Event=None):
1284
+        try:
1285
+            ind = int(self.listbox.curselection()[0])
1286
+        except IndexError:
1287
+            showerror(message='Please select an options line first')
1288
+            return
1289
+        mess1='You can only remove titlesets'
1290
+        mess2='You must have at least 2 titlesets.  Please add ' + \
1291
+          'a new titleset [ Add titleset ]  before deleting one.'
1292
+        if ind < 2:
1293
+            showerror(message=mess1)
1294
+            return
1295
+        elif self.listbox.size() < 5:
1296
+            showerror(message=mess2)
1297
+            return
1298
+        if not askyesno(message='Remove titleset %s ?' % (ind - 1) ):
1299
+            return
1300
+        # delete the index from the listbox
1301
+        self.listbox.delete(ind)
1302
+        self.listbox.selection_set('end')
1303
+        # delete index and remove the menu title from vmgm options
1304
+        self.master.commands.pop(ind)
1305
+        self.mod_sublist('', ind)
1306
+        self.write_script()
1307
+
1308
+    def mod_sublist(self, item='', *index):
1309
+        """Modify commands sublist.  If 2 indexes, just swap items.  If one
1310
+           index the default behavior is to delete the index from the sublist
1311
+           and remove it from commands, but if item is passed, add it as a
1312
+           new index instead.
1313
         """
1314
-        if askyesno(message="Exit?"):
1315
-            # waitVar will cause things to hang, check if set and spring it
1316
-            if waitVar.get() == 1:
1317
-                setVar()
1318
-            # springing the var will cause the GUI to run, we need to kill it
1319
-        if os.path.exists(pid_file):
1320
-            pid = open(pid_file).read().strip()
1321
-            if pid:
1322
-                    try:
1323
-                        os.kill(int(pid), signal.SIGTERM)
1324
-                    except OSError:
1325
-                        pass
1326
-            quit()
1327
-
1328
-class BigLabel (Text):
1329
-    """Looks similar to a Label widget, but with automatic word-wrap.
1330
+        wizard = self.master
1331
+        vmgm_cmds = [w for w in wizard.commands[1]]
1332
+        # get options ( -titles title1 title2 ... ), removing them from original
1333
+        vmgm_titles = self.get_option(vmgm_cmds, '-titles')
1334
+        # remove -end-vmgm, remove title , add -end-vmgm
1335
+        # index-1 instead of ind-2 because '-titles' is in vmgm_titles
1336
+        vmgm_cmds.pop(-1)
1337
+        if len(index) > 1:
1338
+            temp_list = [i for i in vmgm_titles]
1339
+            vmgm_titles[index[0]-1] = temp_list[index[1]-1]
1340
+            vmgm_titles[index[1]-1] = temp_list[index[0]-1]
1341
+        else:
1342
+            index = index[0]
1343
+            # if item is passed, add it as a title
1344
+            if item:
1345
+                vmgm_titles.insert(index, item) 
1346
+            else:
1347
+                vmgm_titles.pop(index-1)
1348
+        vmgm_cmds.extend(vmgm_titles)
1349
+        vmgm_cmds.append('-end-vmgm')
1350
+        # delete old vmgm options from todisc_cmds and insert new
1351
+        wizard.commands.pop(1)
1352
+        wizard.commands.insert(1, vmgm_cmds)
1353
+
1354
+    def rerun_options(self, Event=None, index=None):
1355
+        """Run the gui with the selected options
1356
+        """
1357
+        # self.master is the WizardPage
1358
+        commands = self.master.commands
1359
+        if not index:
1360
+            try:
1361
+                index = int(self.listbox.curselection()[0])
1362
+            except IndexError:
1363
+                showerror(message='Please select an options line first')
1364
+                return
1365
+        rerun_opts = []
1366
+        os.environ['METAGUI_WIZARD'] = str(index+1)
1367
+        # the GUI doesn't understand the titleset type options
1368
+        remove = ['-vmgm', '-end-vmgm', '-titleset', '-end-titleset']
1369
+        options = [ i for i in commands[index] if not i in remove ]
1370
+        rerun_opts = self.run_gui(options, '%s' %(index+1))
1371
+        if rerun_opts:
1372
+            status = 0
1373
+            # trim header from todisc_cmds
1374
+            rerun_opts = self.trim_list_header(rerun_opts)
1375
+            # fill the listbox again if vmgm opts changed
1376
+            # add the 'tags' back around the option list if needed
1377
+            if index == 1:
1378
+                self.refill_listbox(self.listbox, rerun_opts)
1379
+                rerun_opts = ['-vmgm'] + rerun_opts + ['-end-vmgm']
1380
+            elif index >= 2:
1381
+                rerun_opts = ['-titleset'] + rerun_opts + ['-end-titleset']
1382
+            commands[index] = rerun_opts
1383
+            # rewrite the saved script file
1384
+            self.write_script()
1385
+        else:
1386
+            status = 1
1387
+
1388
+        self.root.deiconify()
1389
+        self.master.show_status(status)
1390
+        self.set_selection(index)
1391
+        return status
1392
+
1393
+    def set_selection(self, index='end'):
1394
+        self.listbox.selection_clear(0, index)
1395
+        self.listbox.selection_set(index)
1396
+
1397
+    def set_project_commands(self):
1398
+        in_contents = self.script_to_list(argv[1])
1399
+        in_cmds = in_contents[:]
1400
+        all = [self.get_chunk(in_cmds, '-vmgm', '-end-vmgm')]
1401
+        while '-titleset' in in_cmds:
1402
+            all.append( self.get_chunk(in_cmds, '-titleset', '-end-titleset') )
1403
+        all.insert(0, in_cmds)
1404
+        self.master.commands = all
1405
+
1406
+    def load_project(self):
1407
+        """Load a saved project script for editing with the wizard and GUI
1408
+        """
1409
+        self.heading_label.configure(text='Editing a saved project')
1410
+        error_msg = 'This is not a saved tovid project script.  ' + \
1411
+          'Do you want to try to load it anyway?'
1412
+        if not '# tovid project script\n' in open(argv[1], 'r'):
1413
+            if not askyesno(message=error_msg):
1414
+                quit()
1415
+        numtitles = len(self.master.commands[2:])
1416
+        menu_titles = []
1417
+        l = self.master.commands[1]
1418
+        menu_titles.extend(self.get_list_args(l, '-titles'))
1419
+        self.refill_listbox(self.listbox, menu_titles)
1420
+        self.listbox.selection_set('end')
1421
+        # write out todisc_commands.bash in current dir
1422
+        # if it exists in current dir, prompt for rename
1423
+        if os.path.exists(self.script_file):
1424
+            mess = '%s has been loaded for editing.  Your ' %self.script_file + \
1425
+              'new edits will be saved to the same file.  Continue?'
1426
+            if askokcancel\
1427
+              (message=mess):
1428
+                pass
1429
+            else:
1430
+                quit()
1431
+        self.write_script()
1432
+
1433
+class Page6(WizardPage):
1434
+    def __init__(self, master):
1435
+        WizardPage.__init__(self, master)
1436
+
1437
+    def draw(self):
1438
+        self.frame.pack(side='right', fill='both', expand=1, anchor='nw')
1439
+        self.container = None
1440
+        wizard = self.master
1441
+        # next/previous button becomes 'Back<<' again
1442
+        wizard.next_button.pack_forget()
1443
+        wizard.prev_button.pack(side='right', anchor='se')
1444
+
1445
+        text1='Running saved project'
1446
+        self.label = Label(self.frame, text=text1, font=wizard.lrg_font)
1447
+        self.label.pack(side='top', fill='both', expand=1, anchor='nw', pady=5)
1448
+        cmd_labelfont = wizard.get_font(wizard.font, _style='bold')
1449
+        self.cmd_title = Label(self.frame,
1450
+          font=cmd_labelfont, text='\n\n\nThe command that will run:')
1451
+        self.cmd_title.pack(fill='both', expand=1)
1452
+        self.cmd_str = ''
1453
+        index = wizard.index.get()
1454
+        self.cmd_label = Label(self.frame, text=self.cmd_str, justify='left',
1455
+        font=wizard.fixed_font, wraplength=560, fg='white', bg='black')
1456
+        self.cmd_label.pack(fill='both', expand=1)
1457
+        self.termtitle = Label(self.master, text='\nFocus mouse in terminal')
1458
+        self.button_frame = Frame(self.frame, borderwidth=2, relief='groove')
1459
+        self.button_frame.pack(side='bottom', fill='both', expand=1)
1460
+        self.run_button = Button(self.button_frame, text='Run project now',
1461
+                                            command=self.run_in_xterm)
1462
+        self.run_button.pack(side='left', fill='both', expand=1)
1463
+        self.save_button = Button(self.button_frame, text='Save log',
1464
+                                            command=self.save_log)
1465
+        self.save_button.pack(side='left', fill='both', expand=1)
1466
+        # disable the save log button till xterm is run
1467
+        self.save_button.configure(state='disabled')
1468
+
1469
+    def set_cmd_label(self):
1470
+        cmds = self.master.commands
1471
+        all_lines = [_enc_arg(line) for sublist in cmds for line in sublist]
1472
+        cmd = ''
1473
+        for line in all_lines:
1474
+            cmd += ' ' + line
1475
+        prompt = commands.getoutput('printf "[${USER}@$(hostname -s) ] $ "')
1476
+        # probably not necessary, but ...
1477
+        if 'not found' in prompt:
1478
+            prompt = '[me@mymachine ] $ '
1479
+        self.cmd = '\n%stodisc%s\n' %(prompt, cmd)
1480
+        self.cmd_label.configure(text=self.cmd)
1481
+
1482
+    def previous(self):
1483
+        """Move to the previous wizard page"""
1484
+        self.frame.pack_forget()
1485
+        wizard = self.master
1486
+        index = wizard.index.get()
1487
+        prev = wizard.pages[index-1]
1488
+        wizard.index.set(index-1)
1489
+        # next/previous button becomes 'Next>>' again
1490
+        wizard.prev_button.pack_forget()
1491
+        prev.frame.pack(side='right')
1492
+        wizard.next_button.pack(side='right', anchor='se')
1493
+        # the next button from previous page runs a new function now
1494
+        wizard.next_button.configure\
1495
+        (command=self.repack, text='Run script')
1496
+
1497
+    def repack(self):
1498
+        wizard = self.master
1499
+        cur = wizard.index.get()
1500
+        wizard.pages[cur].hide_page()
1501
+        index = wizard.pages.index(self)
1502
+        wizard.index.set(index)
1503
+        self.frame.pack(side='right', fill='both', expand=1, anchor='nw')
1504
+        self.set_cmd_label()
1505
+        wizard.prev_button.pack(side='right', anchor='se')
1506
+        wizard.next_button.pack_forget()
1507
+
1508
+    def run_in_xterm(self):
1509
+        ''' run the final script in an xterm, completing the project '''
1510
+        self.frame.pack_forget()
1511
+        self.master.prev_button.configure(state='disabled')
1512
+        self.termtitle.pack(side='top')
1513
+        self.container = Frame(self.master, container=1, height=600, width=600)
1514
+        self.container.pack(side='right', fill='both',
1515
+              padx=20, expand=1, anchor='nw')
1516
+        lines = '80x44+0+0'
1517
+        cmd = 'xterm -sb -si -fn %s -rv -sb -rightbar -g %s -e sh -c' \
1518
+          %(self.master.fixed_font, lines)
1519
+        cmd = shlex.split(cmd)
1520
+        try:
1521
+            id = self.root.tk.call('winfo', 'id', self.container)
1522
+            frame_id = '%s' %int(id, 16)
1523
+            self.master.xterm_is_running.set(True)
1524
+        except TclError, ValueError:
1525
+            self.master.xterm_is_running.set(False)
1526
+            frame_id = ''
1527
+        help = commands.getoutput('xterm -help')
1528
+        self.logfile = mktemp(suffix='.log', prefix='todisc_commands.',
1529
+                                                             dir='/tmp')
1530
+        if re.search('-into ', help) and frame_id:
1531
+            cmd.insert(1, frame_id)
1532
+            cmd.insert(1, '-into')
1533
+        tovid_cmd = """
1534
+        bash %s | tee -a %s
1535
+        echo
1536
+        echo "Press Enter to exit terminal"
1537
+        read input
1538
+        """ %(self.script_file, self.logfile)
1539
+        cmd.append(tovid_cmd)
1540
+        command = Popen(cmd, stderr=PIPE)
1541
+        self.after(200, self.poll)
1542
+
1543
+    def poll(self):
1544
+        # return if container is not created yet, or xterm is not running
1545
+        if not self.container or not self.master.xterm_is_running.get():
1546
+            return
1547
+        try:
1548
+            # bogus call to container to see if it has been destroyed
1549
+            self.container.winfo_class()
1550
+        except TclError:
1551
+            self.termtitle.pack_forget()
1552
+            self.master.xterm_is_running.set(False)
1553
+            self.frame.pack(fill='both', expand=1, anchor='nw')
1554
+            self.master.prev_button.configure(state='normal')
1555
+            self.log_contents = commands.getoutput('tr "\r" "\n" < %s' \
1556
+              %self.logfile)
1557
+            os.remove(self.logfile)
1558
+            self.save_button.configure(state='normal')
1559
+        self.root.check = self.root.after(200, self.poll)
1560
+
1561
+    def save_log(self, event=None):
1562
+        logfile = asksaveasfilename(initialfile='todisc_output.log')
1563
+        if logfile:
1564
+            log = open(logfile, 'w')
1565
+            log.writelines(self.log_contents)
1566
+
1567
+# unfinished and unused
1568
+class Messagebox(Frame):
1569
+    def __init__(self, master, use=None, text='', boolean_var=None):
1570
+        Frame.__init__(self, master)
1571
+        self.master = master
1572
+        self.use = use
1573
+        self.var = boolean_var
1574
+        #self.overrideredirect(1)
1575
+        self.top = Toplevel(self.master, use=use)
1576
+        text = text
1577
+        label = Label(self.top, text=text, wraplength=400)
1578
+        label.pack()
1579
+        button1 = Button(self.top, text='Yes', command=self.yes)
1580
+        button2 = Button(self.top, text='No', command=self.no)
1581
+        button1.pack(side='left')
1582
+        button2.pack(side='left')
1583
+
1584
+    def yes(self, event=None):
1585
+        #self.var.set(True)
1586
+        print 'from yes() return_code is: ', self.master.return_code.get()
1587
+        self.quit()
1588
+        return True
1589
+
1590
+    def no(self, event=None):
1591
+        #self.var.set(False)
1592
+        self.quit()
1593
+        return False
1594
+
1595
+class TitleBox(Frame):
1596
+    """A Listbox in a LabelFrame with Entry associated with it
1597
+       text: the label for the frame
1598
     """
1599
-    def __init__(self, master, text, font):
1600
-        """Create a text widget with the given text and font,
1601
-        and the same background color as the master widget.
1602
+    def __init__(self, master=None, text=''):
1603
+        Frame.__init__(self, master)
1604
+        self.master = master
1605
+        self.text = text
1606
+        self.draw()
1607
+
1608
+    def draw(self):
1609
+        # create the listbox (note that size is in characters)
1610
+        frame1 = LabelFrame(self.master, text=self.text)
1611
+        frame1.pack(side='left', fill='y', expand=False)
1612
+        # use entry widget to display/edit selection
1613
+        self.enter1 = Entry(frame1, width=50)
1614
+        self.enter1.pack(side='bottom', fill='both', expand=False)
1615
+        self.listbox = Listbox(frame1, width=50, height=12)
1616
+        self.listbox.pack(side='left', fill='y', expand=False, anchor='nw')
1617
+        self.get = self.listbox.get
1618
+
1619
+        # create a vertical scrollbar to the right of the listbox
1620
+        yscroll = Scrollbar(frame1, command=self.listbox.yview,
1621
+                                             orient='vertical')
1622
+        yscroll.pack(side='right', fill='y', anchor='ne')
1623
+        self.listbox.configure(yscrollcommand=yscroll.set)
1624
+        # set focus on entry
1625
+        self.enter1.select_range(0, 'end')
1626
+        self.enter1.focus_set()
1627
+        # pressing the return key will update edited line
1628
+        self.enter1.bind('<Return>', self.set_list)
1629
+        self.listbox.bind('<ButtonRelease-1>', self.get_list)
1630
+
1631
+    def set_list(self, event):
1632
+        """Insert an edited line from the entry widget back into the listbox
1633
         """
1634
-        # Text widget with the same background color as the master
1635
-        Text.__init__(self, master, font=font, wrap='word', width=70,
1636
-                      background=tk.cget('background'), borderwidth=0, padx=10)
1637
-        # Try to intelligently group the text into paragraphs.
1638
-        # Two consecutive newlines start a new paragraph; a single
1639
-        # newline should be treated as a single space. Strip leading
1640
-        # and trailing whitespace from each paragraph.
1641
-        paragraphs = [para.replace('\n', ' ').strip()
1642
-                      for para in text.split('\n\n')]
1643
-        # Rejoin paragraphs into a single block of text
1644
-        self.insert('end', '\n\n'.join(paragraphs))
1645
-        # Make the text widget read-only
1646
-        self.config(state='disabled')
1647
-
1648
-###################### get/set some external variables #######################
1649
-
1650
-# get tovid prefix
1651
-path_cmd = ['tovid', '--prefix']
1652
-tovid_prefix = Popen(path_cmd, stdout=PIPE)
1653
-tovid_prefix = tovid_prefix.communicate()[0].strip()
1654
-
1655
-# get script header
1656
-shebang = '#!/usr/bin/env bash'
1657
-_path = 'PATH=' + tovid_prefix + ':$PATH'
1658
-_cmd = ['tovid', '--version']
1659
-_version = Popen(_cmd, stdout=PIPE).communicate()[0].strip()
1660
-identifier = '# tovid project script\n# tovid version %s' % _version
1661
-header = '%s\n\n%s\n\n%s\n\n' % (shebang, identifier, _path )
1662
-
1663
-# the script we will be using for options
1664
-cur_dir = os.path.abspath('')
1665
-script_file = cur_dir + '/todisc_commands.bash'
1666
-
1667
-
1668
-##############################################################################
1669
-##################### GUI initialization and execution #######################
1670
-##############################################################################
1671
-
1672
-tk = Tk()
1673
-tkframe = Frame(tk)
1674
-tkframe.pack(side=LEFT, fill=Y, anchor='w')
1675
-tk.title('Tovid titleset wizard')
1676
-tk.minsize(width=800, height=660)
1677
-waitVar = BooleanVar()
1678
-waitVar.set(False)
1679
-button_frame = Frame(tk)
1680
-button_frame.pack(expand=1, fill=X, side=BOTTOM, anchor='s')
1681
-button1 = Button(button_frame, text='Next >>>', command=next)
1682
-button1.pack(side=RIGHT, fill=Y, expand=1, anchor='e')
1683
-# get fonts
1684
-inifile = os.path.expanduser('~/.metagui/config')
1685
-style = Style()
1686
-style.load(inifile)
1687
-heading_font = get_font(size=style.font[1]+8, _style='bold')
1688
-lrg_font = get_font(size=style.font[1]+4, _style='bold')
1689
-medium_font = get_font(size=style.font[1]+2)
1690
-bold_font = get_font(_style='bold')
1691
-
1692
-# bindings for exit
1693
-tk.protocol("WM_DELETE_WINDOW", confirm_exit)
1694
-tk.bind('<Control-q>', confirm_exit)
1695
-
1696
-############################ Page 1 of wizard ############################
1697
-pg1_txt1 = '''
1698
-INTRODUCTION
1699
-
1700
-Welcome to the tovid titleset wizard.  We will be making a complete DVD, with
1701
-multiple levels of menus including a root menu (VMGM menu) and lower level
1702
-titleset menus.  We will be using 'tovid gui', which uses the 'todisc' script.
1703
-Any of these menus can be either static or animated, and use thumbnail menu
1704
-links or plain text links.  In addition the titleset menus can have chapter
1705
-selection menus ("submenus") which by default have only thumbnail menu links.
1706
-
1707
-Though the sheer number of options can be daunting when the GUI first loads, it
1708
-is important to remember that there are very few REQUIRED options, and in all
1709
-cases the required options are on the opening tab. Below is a table of
1710
-'required' options for each run of the GUI:
1711
-
1712
-General:  only the "Output name" is required.  Root menu: only the titleset
1713
-titles (menu link text) are required.  Titleset menus: only videos to include
1714
-in the titleset are required.
1715
-
1716
-But if you include only those options your menu might be boring ! Please have
1717
-fun exploring the different options using the preview to test.
1718
-
1719
-A great many options of these menus are configurable, including fonts, shapes
1720
-and effects for thumbnails, fade-in/fade-out effects, "switched menus", the
1721
-addition of a "showcased" image/video, animated or static background image or
1722
-video, audio background ... etc.  There are also playback options including the
1723
-supplying of chapter points, special navigation features like "quicknav", and
1724
-configurable DVD button links.
1725
-'''
1726
-page1 = Frame(tk)
1727
-frame1 = Frame(tkframe)
1728
-img_file = tovid_prefix + '/tovid.gif'
1729
-if os.path.isfile(img_file):
1730
-    img = PhotoImage(file=img_file)
1731
-    pg1_label1 = Label(frame1, text='Tovid', font=heading_font)
1732
-    pg1_label1.pack(side=TOP, pady=40)
1733
-else:
1734
-    print img_file, ' does not exist'
1735
-pg1_label2 = Label(frame1, image=img).pack(side=TOP)
1736
-pg1_label3 = Label(frame1, text='Titleset Wizard', font=lrg_font)
1737
-pg1_label3.pack(side=TOP, pady=40)
1738
-pg1_label4 = Label(frame1, text='Page 1', font=lrg_font)
1739
-pg1_label4.pack(side=BOTTOM, anchor='s')
1740
-frame1.pack(side=LEFT, padx=30, anchor='nw', fill=Y, expand=1)
1741
-page1.pack(fill=BOTH, expand=1)
1742
-
1743
-# Use a BigLabel widget to get automatic word-wrap that adjusts to window size
1744
-pg1_label5 = BigLabel(page1, pg1_txt1, style.font)
1745
-pg1_label5.pack(fill=BOTH, expand=1, side=TOP, anchor='w')
1746
-
1747
-############################## Page 2 of wizard ##############################
1748
-next_txt = '''
1749
-After making your selections, press [ Save to wizard ] in the GUI
1750
-'''
1751
-pg2_txt1 = '''
1752
-GENERAL OPTIONS
1753
-
1754
-When you press the  [ Next >>> ]  button at the bottom of the wizard, we will
1755
-start the GUI and begin with general options applying to all titlesets.  For
1756
-example you may wish to have all menus share a common font and fontsize of your
1757
-choosing, for the menu link titles and/or the menu title.
1758
-
1759
-The only REQUIRED option here is specifying an Output directory at the bottom
1760
-of the GUI's main tab.  Options you enter will be overridden if you use the
1761
-same option again later for titlesets.
1762
-
1763
-After making your selections, press [ Save to wizard ] in the GUI
1764
-
1765
-Press  [ Next >>> ]  to begin ...
1766
-'''
1767
-
1768
-page2 = Frame(tk)
1769
-pg2_label1 = Label(page2, text=pg2_txt1, justify=LEFT, font=style.font)
1770
-pg2_label1.pack(fill=BOTH, expand=1, side=TOP, anchor='w')
1771
-
1772
-############################## Page 3 of wizard ##############################
1773
-pg3_txt1 = '''
1774
-ROOT MENU (VMGM)
1775
-
1776
-Now we will save options for your root (VMGM) menu.  The only option you really
1777
-need is the titleset titles.  Since you can not save titles in the GUI without
1778
-loading videos you need to enter them here.  These titleset names will appear
1779
-as menu titles for the respective menu in your DVD.
1780
-
1781
-Enter the names of your titlesets, one per line, pressing <ENTER> each time.
1782
-Do not use quotes unless you want them to appear literally in the title.
1783
-
1784
-Press  [ Next >>> ]  when you are finished, and the tovid gui will come up so
1785
-you can enter any other options you want.  You can not enter video files here,
1786
-but most other options can be used.  There are no REQUIRED options however, as
1787
-you have already entered your root menu link titles.
1788
-%s
1789
-''' % next_txt
1790
-
1791
-page3 = Frame(tk)
1792
-pg3_label1 = Label(page3, text=pg3_txt1, justify=LEFT, font=style.font)
1793
-pg3_label1.pack(side=TOP, fill=BOTH, expand=1, anchor='w')
1794
-# create the listbox (note that size is in characters)
1795
-pg3_frame1 = LabelFrame(page3, text="Root 'menu link' titles")
1796
-pg3_frame1.pack(side=TOP, fill=Y, expand=1)
1797
-pg3_listbox1 = Listbox(pg3_frame1, width=50, height=12)
1798
-#listbox1.insert(0, '')
1799
-pg3_listbox1.pack(side=LEFT, fill=Y, expand=1, anchor='w')
1800
-
1801
-# create a vertical scrollbar to the right of the listbox
1802
-yscroll = Scrollbar(pg3_frame1, command=pg3_listbox1.yview, orient=VERTICAL)
1803
-yscroll.pack(side=LEFT, fill=Y, anchor='nw')
1804
-pg3_listbox1.configure(yscrollcommand=yscroll.set)
1805
-
1806
-# use entry widget to display/edit selection
1807
-enter1 = Entry(page3, width=50, text='Enter titles here')
1808
-enter1.pack(fill=Y, expand=0)
1809
-# set focus on entry
1810
-enter1.select_range(0, 'end')
1811
-enter1.focus_set()
1812
-# pressing the return key will update edited line
1813
-enter1.bind('<Return>', set_list)
1814
-pg3_listbox1.bind('<ButtonRelease-1>', get_list)
1815
-
1816
-############################ Page 4 of wizard ############################
1817
-
1818
-page4 = Frame(tk)
1819
-pg4_txt1 = '''
1820
-TITLESET MENUS
1821
-
1822
-Okay, now you will enter options for each of your titlesets.  The only REQUIRED
1823
-option here is to load one or more video files, but of course you should spruce
1824
-up your menu by exploring some of the other options!  The menu title for each
1825
-has been changed to the text you used for the menu links in the root menu -
1826
-change this to whatever you want.
1827
-
1828
-Follow the simple instructions that appear in the next and subsequent pages:
1829
-you will need to press  [ Next >>> ]  for each titleset.
1830
-'''
1831
-pg4_frame1 = Frame(page4)
1832
-pg4_frame1.pack(side=TOP, fill=BOTH, expand=1)
1833
-pg4_frame2 = Frame(pg4_frame1, borderwidth=1)
1834
-pg4_frame2.pack(fill=BOTH, expand=1)
1835
-pg4_label1 = Label(pg4_frame2, text=pg4_txt1, justify=LEFT, font=style.font)
1836
-pg4_label1.pack(fill=BOTH, expand=1)
1837
-pg4_txt2 = ''
1838
-pg4_label2 = \
1839
-  Label(pg4_frame1, text=pg4_txt2, justify=LEFT, font=style.font)
1840
-pg4_label2.pack(fill=BOTH, expand=1)
1841
-
1842
-############################ Page 5 of wizard ############################
1843
-
1844
-page5 = Frame(tk)
1845
-pg5_txt2 = '''
1846
-If you wish to go back and change any options with the GUI, you can select
1847
-an item from the options listbox and press [ Rerun Options ].  The titleset
1848
-options are listed by the name you gave for the root menu links.
1849
-'''
1850
-pg5_txt3 = '''
1851
-If you are happy with your saved options, now you can either choose to run
1852
-the script now in an xterm, or exit and run it later in your favorite terminal.
1853
-
1854
-You can run it with:
1855
-bash %s
1856
-
1857
-You may also edit the file with a text editor but do not change the headers
1858
-(first 3 lines of text) or change the order of the sections:
1859
-1. General opts, 2. Root menu 3. Titleset menus
1860
-
1861
-Press [Run script now] or [Exit].
1862
-''' % script_file
1863
-pg5_frame1 = Frame(page5)
1864
-pg5_frame1.pack()
1865
-page5_label1 = Label(pg5_frame1, text='Finished!', font=heading_font)
1866
-page5_label1.pack()
1867
-page5_label2 = Label(pg5_frame1, text=pg5_txt2, justify=LEFT)
1868
-page5_label2.pack(side=TOP, anchor='w')
1869
-# create the listbox
1870
-pg5_frame2 = LabelFrame(pg5_frame1, \
1871
-  text="Choose an item to edit with the GUI and press [ Rerun Options ]")
1872
-pg5_frame2.pack(fill=X, expand=1)
1873
-pg5_listbox1 = Listbox(pg5_frame2)
1874
-pg5_listbox1.bind('<Double-Button-1>', rerun_options)
1875
-# create a vertical scrollbar to the right of the listbox
1876
-yscroll2 = Scrollbar(pg5_frame2, command=pg5_listbox1.yview, orient=VERTICAL)
1877
-yscroll2.pack(side=LEFT, fill=Y)
1878
-pg5_listbox1.configure(yscrollcommand=yscroll.set)
1879
-# button to rerun the GUI to edit selected options
1880
-pg5_button1 = Button(pg5_frame2, text='Rerun Options', command=rerun_options)
1881
-pg5_button1.pack(side=BOTTOM)
1882
-
1883
-######################### Run the darn thing already #########################
1884
-
1885
-pages = [page1, page2, page3, page4, page5]
1886
-current = page1
1887
+        try:
1888
+            index = self.listbox.curselection()[0]
1889
+            # delete old listbox line
1890
+            self.listbox.delete(index)
1891
+        except IndexError:
1892
+            index = 'end'
1893
+        # insert edited item back into self.listbox at index
1894
+        self.listbox.insert(index, self.enter1.get())
1895
+        self.enter1.delete(0, 'end')
1896
+        # don't add more than one empty index
1897
+        next2last = self.listbox.size() -1
1898
+        if not self.listbox.get(next2last) and not self.listbox.get('end'):
1899
+            self.listbox.delete('end')
1900
+        # add a new empty index if we are at end of list
1901
+        if self.listbox.get('end'):
1902
+            self.listbox.insert('end', self.enter1.get())
1903
+        self.listbox.selection_set('end')
1904
+
1905
+    def get_list(self, event):
1906
+        """Read the listbox selection and put the result in an entry widget
1907
+        """
1908
+        try:
1909
+            # get selected line index and text
1910
+            index = self.listbox.curselection()[0]
1911
+            seltext = self.listbox.get(index)
1912
+            # delete previous text in enter1
1913
+            self.enter1.delete(0, 'end')
1914
+            # now display the selected text
1915
+            self.enter1.insert(0, seltext)
1916
+            self.enter1.focus_set()
1917
+        except IndexError:
1918
+            pass
1919
+
1920
+
1921
+# Execution
1922
 if __name__ == '__main__':
1923
-    if len(argv) > 1:
1924
-        if os.path.exists(argv[1]):
1925
-            todisc_cmds = load_project()
1926
-    mainloop()
1927
+    # get tovid prefix so we can find the app image file
1928
+    tovid_prefix = commands.getoutput('tovid -prefix')
1929
+    tovid_prefix = os.path.join(tovid_prefix, 'lib', 'tovid')
1930
+    os.environ['PATH'] = tovid_prefix + os.pathsep + os.environ['PATH']
1931
+    img_file = os.path.join(tovid_prefix, 'titleset-wizard.png')
1932
+    # instantiate Tk and Wizard
1933
+    root = Tk()
1934
+    root.minsize(width=800, height=660)
1935
+    app = Wizard(root, 'Tovid\nTitleset Wizard', img_file)
1936
+    # instantiate pages
1937
+    page1 = Page1(app)
1938
+    page2 = Page2(app)
1939
+    page3 = Page3(app)
1940
+    page4 = Page4(app)
1941
+    page5 = Page5(app)
1942
+    page6 = Page6(app)
1943
+    # run it
1944
+    try:
1945
+        mainloop()
1946
+    except KeyboardInterrupt:
1947
+        exit(1)
1948
tovid-0.33.tar.bz2/src/todisc -> tovid-0.34.tar.bz2/src/todisc Changed
1964
 
1
@@ -61,6 +61,8 @@
2
 EOF`
3
 # check that needed todisc deps are installed
4
 assert_dep "$todisc_deps"
5
+assert_dep strings "'strings' is part of binutils.  In most distros the package
6
+is called  by the same name. http://www.gnu.org/software/binutils/ ."
7
 SCRIPT_START_TIME=`date +%s`
8
 
9
 # check if symlink in /tmp exists and use time stamped link if so
10
@@ -69,6 +71,7 @@
11
 LOG_FILE=$(readlink -f todisc.log)
12
 OUT_PREFIX=""
13
 TV_STANDARD=ntsc
14
+PIXEL_AR="10:11"
15
 MENU_LEN=( 20 )
16
 USER_MENU_LEN=false
17
 USER_SUBMENU_LEN=false
18
@@ -110,8 +113,8 @@
19
 THUMB_BLUR=1
20
 SC_BLUR=1
21
 SUB_MENU_FEATHER=false
22
-IMG_FMT="jpg"
23
-SM_IMG_FMT="jpg"  # submenu image format
24
+IMG_FMT="png"
25
+SM_IMG_FMT="png"  # submenu image format
26
 KEEP_FILES=false
27
 THUMB_SHAPE=""
28
 SEEK_VAL=2
29
@@ -205,6 +208,7 @@
30
 MENU_AUDIOLEN=""
31
 USER_AUDIOLENGTH=false
32
 BURN=false
33
+EJECT=''
34
 BURN_DEVICE="/dev/dvdrw"
35
 QUICK_MENU=false
36
 BG_CLR='#101010'
37
@@ -240,11 +244,18 @@
38
 DEBUG=false
39
 pngpipe="-quality 01 png:-"
40
 ani_pics=0
41
+use_vhooks=false
42
+use_overlay_filter=false
43
 JUSTIFY="center"
44
 CONTRAST_CLR='gray'
45
 NOMENU=false
46
 SC_AR=133
47
 THUMB_COLUMNS=""
48
+FAST_SEEK=false # ffmpeg: default:decode during seek (more accurate but slower)
49
+USER_THUMBS=false # is user providing images for the menu link thumbs ?
50
+FRAME_SAFE=false # (-static) if true take the best of 9 frames. default: 1 frame
51
+PIPE_FORMAT="-pix_fmt yuv420p -f yuv4mpegpipe"
52
+IMG_DEPTH="-depth 8" # when converting to png: ppmtoy4m needs 8 bit
53
 TOVID_PREFIX=$(tovid -prefix)
54
 
55
 ##############################################################################
56
@@ -310,7 +321,7 @@
57
     yecho "Part of the title may not be visible on your tv screen"
58
     yecho "Perhaps use a smaller -titles-fontsize, or shorten \"${TITLES[i]}\""
59
     $SHOWCASE && [[ -z $SHOWCASE_FILE ]] && \
60
-    yecho "You may also use '-showcase-titles-align-east' since you are not
61
+    yecho "You may also use '-showcase-titles-align east' since you are not
62
     using a -showcase FILE."
63
     echo "****************************"
64
     $WARN && sleep 5
65
@@ -341,10 +352,15 @@
66
     L=$(mencoder -nosound -mc 0 -oac pcm -ovc copy $check_frames \
67
     -o /dev/null "$1" 2> /dev/null)
68
     awk 'END{print $(NF-3)}' <<< "$L"
69
+    # awk '{for (i=0; i<NF; i++) { if ($i=="secs") {print $(i-1); break} } }' \
70
+    # <<< "$L"
71
 }
72
 audio_length()
73
 {
74
-    mplayer -noconsolecontrols -vo null -ao pcm:fast:file=/dev/null "$1" \
75
+    # optional 2nd arg is maximum length checked in file (seconds)
76
+    end=""
77
+    [[ -n $2 ]] && end="-endpos $2"
78
+    mplayer -nomsgcolor -noconsolecontrols -vo null -ao pcm:fast:file=/dev/null $end "$1" \
79
     2>&1 | tr '\r' '\n' | grep ^A: | tail -1 | sed s/^.*A:// | awk '{print $1}'
80
 }
81
 cleanup()
82
@@ -418,15 +434,14 @@
83
 # ******************************************************************************
84
 runtime_error()
85
 {
86
-    # Uncomment if needed later
87
-    #killsubprocs
88
     echo
89
     echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
90
     yecho "todisc encountered an error:"
91
     yecho "    $@"
92
     echo
93
-    echo "Check the contents of $LOG_FILE to see what went wrong."
94
-    echo "See the tovid website ($TOVID_HOME_PAGE) for what to do next."
95
+    echo "The error should be shown above, also check the contents of 
96
+    $LOG_FILE to see what went wrong." |format_output
97
+    echo "See the tovid website ($TOVID_HOME_PAGE) for possible further info."
98
     echo "Sorry for the inconvenience!"
99
     echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
100
     cleanup
101
@@ -478,7 +493,8 @@
102
         echo "without seeing more previews, then type: 'exit', else you will "
103
         echo "continue on with other previews even if you don't type 'yes'."
104
         echo
105
-        confirm_msg="read above paragraph and then $confirm_msg"
106
+        confirm_msg="Type yes to continue, press <ENTER> to abort but see "
107
+        confirm_msg="$confirm_msg other previews, or type 'exit' to quit."
108
     fi
109
     echo "If you are happy with the preview, $confirm_msg"
110
     read input
111
@@ -510,6 +526,8 @@
112
         echo "try a larger font, or setting -title-stroke and -titles-stroke"
113
         echo "to a contrasting color.  Or set the strokes to the same color"
114
         echo "as your titles.  For black frames look at the -seek option."
115
+        echo "For corrupt or gray frames try using the -frame-safe option, or "
116
+        echo "use your own images for thumbnail buttons with -user-thumbs."
117
         echo "For other fine-tuning options, see 'man tovid'."
118
         echo
119
         [ ! -z "$input" -a "$input" = "exit" ] && killall_instances
120
@@ -550,35 +568,9 @@
121
 awk 'END{print NR}' "$LOG_FILE"
122
 }
123
 
124
-# hack to check if transcode is stalling and set it a HUP if so
125
-# usage: check_stall PID
126
-check_stall()
127
-{
128
-    PIDOF_TRANSCODE=$1
129
-    newlines=$(stat_logfile)
130
-    while ps -p $PIDOF_TRANSCODE >/dev/null; do
131
-        # Check for transcode output every 10 seconds
132
-        sleep 10
133
-        age=$newage
134
-        newage=$(stat_logfile)
135
-        # If no new output, sleep 20s and check again
136
-        [[ $newage = $age ]] && sleep 20 && newage=$(stat_logfile)
137
-        # If still no new lines, send a HUP signal to transcode
138
-        if [[ $newage == $age ]] \
139
-        && kill -0 $PIDOF_TRANSCODE > /dev/null 2>&1; then
140
-            echo
141
-            echo "*** transcode appears to be stalled ***"
142
-            echo "*** Sending transcode a HUP and hoping for the best ***"
143
-            sleep 5
144
-            $(kill -0 $PIDOF_TRANSCODE > /dev/null 2>&1) && \
145
-            kill -HUP $PIDOF_TRANSCODE
146
-            echo
147
-        fi
148
-    done
149
-}
150
 check_filetype()
151
 {
152
-    fstats=$(file -L "$1")
153
+    fstats=$(file -L "$1" | awk '{ $1 = ""; print }')
154
     if [[ $fstats =~ "image" || $fstats =~ "bitmap" ]]; then
155
         TYPE="image"
156
         CONVRT=:
157
@@ -813,11 +805,11 @@
158
     VIDEO_IN_SEEK="$2"
159
     video_type=$3
160
     yecho
161
-    yecho "$VIDEO_IN is not compliant - re-encoding
162
+    yecho "$VIDEO_IN is not compliant - re-encoding \
163
       $(bc <<< "$VIDEO_IN_SEEK + ${MENU_LEN[MENU_NUM-1]}" 2>/dev/null)
164
         second slice to DVD compliant file"
165
-    yecho "For long seeks this will take some time and produce a large file."
166
-    yecho "But if the file is not encoded this way there may be sync problems."
167
+    yecho "This is not strictly necessary and will reduce quality, but it may"
168
+    yecho "help with sync problems if using the same file for audio and video."
169
     yecho "Do you want to continue encoding this file?, type 'yes' to do so"
170
     if ! $NOASK; then
171
         read response
172
@@ -991,8 +983,8 @@
173
     IN_IMAGE="$1"
174
     OUT_MPEG="$2"
175
     # remove symlinks, as otherwise we overwrite symlink target
176
-    IMAGE_ENC_CMD=(ffmpeg -f image2 -loop_input -vframes $vlength \
177
-    -i "$IN_IMAGE" -s $VIDSIZE -f s16le -i /dev/zero -t $alength \
178
+    IMAGE_ENC_CMD=(ffmpeg -f image2 $LOOP -vframes $vlength \
179
+    -i "$IN_IMAGE" -s $VIDSIZE -f s16le -ar 48000 -i /dev/zero -t $alength \
180
     -ar $SAMPLERATE -ac 2 -ab 224k -target ${TV_STANDARD}-${TARGET} \
181
     -aspect $ASPECT_RATIO -y "$OUT_MPEG")
182
     echo "Running ${IMAGE_ENC_CMD[@]}" | format_output >> "$LOG_FILE"
183
@@ -1015,7 +1007,6 @@
184
         yecho
185
         yecho "Working on switched menu 1"
186
         yecho
187
-#    exit
188
 }
189
 carousel_menu_mode()
190
 # call todisc recursively to make animated slideshow menu
191
@@ -1225,7 +1216,7 @@
192
 <dvdauthor dest="$OUT_DIR" jumppad="0">
193
   <vmgm>
194
     <menus>
195
-      <video aspect="4:3"/>
196
+      <video format="$TV_STANDARD" aspect="4:3"/>
197
       <pgc entry="title">
198
         <pre>
199
 $(echo -e "$VMGM_PRE")
200
@@ -1282,7 +1273,7 @@
201
     # this unfortunate block helps user by testing for incompatible options
202
     # within titlesets, exiting BEFORE having done previous titlesets
203
     general_options="-no-vmgm -skip-vmgm -out -quick-nav -burn -device
204
-    -speed -no-confirm-backup"
205
+    -speed -eject -no-confirm-backup"
206
     GREP="egrep -w -q --"
207
     for opt in $general_options; do
208
         if $GREP $opt <<< "${tsetopts[@]} ${vmgmopts[@]}" \
209
@@ -1389,7 +1380,8 @@
210
                 done
211
                 titleset_cmd=( todisc -titleset-mode -basedir "$WORK_DIR" \
212
                 -title_count "$num_titles" -tset_num ${count}-${tset} \
213
-                "${GEN_OPTS[@]}" $NO_CONFIRM_BACKUP "${TITLESET_OPTS[@]}" $vmgm_playall )
214
+                "${GEN_OPTS[@]}" $NO_CONFIRM_BACKUP "${TITLESET_OPTS[@]}" \
215
+                $vmgm_playall )
216
                 yecho
217
                 yecho "Working on the menu for titleset number $tset"
218
                 yecho
219
@@ -1428,7 +1420,8 @@
220
 
221
 burn_disc()
222
 {
223
-    BURN_CMD=(tovid dvd -burn -device "$BURN_DEVICE" $BURN_SPEED \"$BURN_TGT\")
224
+    BURN_CMD=(tovid dvd -burn -device $EJECT "$BURN_DEVICE" \
225
+    $BURN_SPEED \"$BURN_TGT\")
226
     yecho
227
     echo "You have indicated you want to burn the $BURN_TGT_STR"
228
     echo "Would you like to burn the ${BURN_TGT_STR/ *} now ?"
229
@@ -1541,123 +1534,142 @@
230
 
231
 quick_menu()
232
 {
233
+    funct_arg=$1
234
     unset LEFTPAD TOPPAD RIGHTPAD BOTTOMPAD
235
-    # get width and height of background: we may need to resize it to $VIDSIZE
236
-    if $QUICKMENU_IS_BACKGROUND; then
237
-        BG_VIDEO_STATS=$(idvid -fast "$BG_VIDEO" 2>/dev/null)
238
-        BG_VIDEO_WIDTH=$(awk '/Width:/ {print $2}' <<< "$BG_VIDEO_STATS")
239
-        BG_VIDEO_HEIGHT=$(awk '/Height:/ {print $2}' <<< "$BG_VIDEO_STATS")
240
-        if [[ ${BG_VIDEO_WIDTH}x${BG_VIDEO_HEIGHT} != $VIDSIZE ]]; then
241
-            RESIZE_BG=:
242
-        fi
243
-    fi
244
-    if [[ -n $1 && $1 = "preview" ]]; then
245
+    # is it a preview or main run of menu creation
246
+    if [[ -n $funct_arg && $funct_arg = "preview" ]]; then
247
         QM_MENU_TIME=2 && QM_PREVIEW=:
248
     else
249
         QM_MENU_TIME=${MENU_LEN[MENU_NUM-1]} && QM_PREVIEW=false
250
     fi
251
-    # if QUICK_MENU_FILE is a showcase video then we need a temp avi file
252
+    # test for filters and vhook
253
+    filters=$(ffmpeg -filters 2>/dev/null)
254
+    if grep -q -w '^movie' <<< "$filters" && \
255
+      grep -q -w '^crop' <<< "$filters"; then
256
+        echo "libavfilter overlay and crop filters are present"
257
+        use_overlay_filter=:
258
+        $use_overlay_filter && echo "Using libavfilter for -quick-menu"
259
+    elif grep -q ^-vhook <<< "$(ffmpeg -h 2>&1)"; then
260
+        # find out where vhook lives for ffmpeg
261
+        local config=$(ffmpeg -version 2>&1 | grep -- --prefix=)
262
+        config=${ffmpeg_prefix//*--prefix=}
263
+        ffmpeg_prefix=${config// *}
264
+        # empty var means no --prefix passed, use default prefix of /usr/local
265
+        ffmpeg_prefix=${ffmpeg_prefix:-/usr/local}
266
+        imlib2_vhook="${ffmpeg_prefix}/lib/vhook/imlib2.so"
267
+        if [[ -s "$imlib2_vhook" ]]; then
268
+            use_vhooks=:
269
+        else
270
+            yecho "!!!!! $imlib2_vhook not found, can not continue !!!!!"
271
+        fi
272
+    fi
273
+
274
+    # FIXME this will not be needed when the overlay filter is in SVN proper
275
+    if ! $use_vhooks && ! $use_overlay_filter; then
276
+        runtime_error "You are not able to use -quick-menu:
277
+        you must use the experimental ffmpeg with libavfilter 
278
+        or an older (0.52 for example) version of ffmpeg with vhooks.
279
+        See this post for details on installing ffmpeg with filters: 
280
+        http://ubuntuforums.org/showthread.php?p=9021636"
281
+    fi
282
     if $QUICKMENU_IS_SHOWCASE; then
283
-        PRE_VHOOK_FILE="$WORK_DIR/quick_tmp.avi" # not needed for mix
284
+        yecho
285
+        yecho "resizing and padding showcase file: $SHOWCASE_VIDEO"
286
+        LEFTPAD=$SC_X
287
+        TOPPAD=$SC_Y
288
+        RIGHTPAD="-padright \
289
+        $(( ${VIDSIZE%%x*} - $LEFTPAD - ${SHOWCASE_SIZE%%x*} ))"
290
+        BOTTOMPAD="-padbottom \
291
+        $(( ${VIDSIZE##*x} - $TOPPAD - ${SHOWCASE_SIZE##*x} ))"
292
+        LEFTPAD="-padleft $SC_X"
293
+        TOPPAD="-padtop $SC_Y"
294
+        local VF_PADX=$SC_X
295
+        local VF_PADY=$SC_Y
296
+        QM_FRAMESIZE=$SHOWCASE_SIZE
297
         outdir="$WORK_DIR/showcase"
298
         if $SWITCHED; then
299
             qm_seek="-ss ${SEEK_VAL[MENU_NUM-1]}"
300
         else
301
             qm_seek="-ss $SHOWCASE_SEEK_VAL"
302
         fi
303
-    # else if we have background file maybe no need for the 1st resize step
304
     elif $QUICKMENU_IS_BACKGROUND; then
305
-        if ! $RESIZE_BG; then
306
-            PRE_VHOOK_FILE="$BG_VIDEO"
307
-        else
308
-            PRE_VHOOK_FILE="$WORK_DIR/quick_tmp.avi"
309
-        fi
310
+        QM_FRAMESIZE=$VIDSIZE
311
         outdir="$WORK_DIR/bg"
312
         qm_seek="-ss $BG_SEEK"
313
     fi
314
-    # find out where vhook lives for ffmpeg
315
-    ffmpeg_prefix=$(which ffmpeg)
316
-    ffmpeg_prefix=$(sed 's/\/bin\/ffmpeg//g' <<< "$ffmpeg_prefix")
317
-    imlib2_vhook="$ffmpeg_prefix/lib/vhook/imlib2.so"
318
-
319
-    # check for badly compiled or otherwise unusable vhook
320
-    if $QM_PREVIEW && [[ $MENU_NUM -eq $MN ]]; then
321
-        ! [[ -s "$imlib2_vhook" ]] && runtime_error "Missing ffmpeg's vhook's"
322
-        yecho
323
-        yecho "Making a MPEG for testing ffmpeg's imlib2 vhook"
324
-        convert  -resize $VIDSIZE! xc:"#101010" "$WORK_DIR/dummy.jpg"
325
-        dummy_cmd=(ffmpeg -t 2 -loop_input -i "$WORK_DIR/dummy.jpg" \
326
-        -aspect 4:3  -f mpeg1video -r 29.970 -vcodec mpeg2video -b 5000k \
327
-        -f s16le  -i /dev/zero -acodec ac3 -ac 2 -ar 48000 -ab 224k \
328
-        -y "$WORK_DIR/dummy.mpg")
329
-        if ! "${dummy_cmd[@]}" 2>> "$LOG_FILE"; then
330
-            runtime_error "There was a problem making a dummy.mpg with ffmpeg"
331
-        fi
332
-        if ! ffmpeg -vhook "$imlib2_vhook -i "$WORK_DIR/dummy.jpg"" \
333
-        -i "$WORK_DIR/dummy.mpg" -y "$WORK_DIR/test.mpg" 2>> "$LOG_FILE"; then
334
-            runtime_error "Your ffmpeg's vhook is broken.  No 'quick-menu' :("
335
-        fi
336
-        yecho
337
-    fi
338
-    $QM_PREVIEW && yecho "Creating a quick-menu preview image"
339
-    # convert and resize the bgvideo so that is is framed by ntsc-safe black bg
340
-    if $QUICKMENU_IS_SHOWCASE || $RESIZE_BG; then
341
-        yecho
342
-        if $RESIZE_BG; then
343
-            yecho "resizing background video: $BG_VIDEO"
344
-            QM_TMP_FRAMESIZE=$VIDSIZE
345
-        else
346
-            yecho "resizing and padding showcase file: $SHOWCASE_VIDEO"
347
-            LEFTPAD=$SC_X
348
-            TOPPAD=$SC_Y
349
-            RIGHTPAD="-padright \
350
-            $(( ${VIDSIZE%%x*} - $LEFTPAD - ${SHOWCASE_SIZE%%x*} ))"
351
-            BOTTOMPAD="-padbottom \
352
-            $(( ${VIDSIZE##*x} - $TOPPAD - ${SHOWCASE_SIZE##*x} ))"
353
-            LEFTPAD="-padleft $SC_X"
354
-            TOPPAD="-padtop $SC_Y"
355
-            QM_TMP_FRAMESIZE=$SHOWCASE_SIZE
356
-        fi
357
-        PAD_CMD=(ffmpeg -r $FRAME_RATE -async 1 $qm_seek \
358
-        -t "$QM_MENU_TIME" -i "$QUICK_MENU_FILE" -s $QM_TMP_FRAMESIZE \
359
-        -acodec copy $TOPPAD $BOTTOMPAD $LEFTPAD $RIGHTPAD \
360
-        -r $FRAME_RATE -b 15000k -padcolor $BG_CLR \
361
-        -y  "$WORK_DIR/quick_tmp.avi")
362
-        yecho
363
-        yecho "Running ${PAD_CMD[@]}"|fold -bs
364
-        "${PAD_CMD[@]}" 2>&1 |strings >> "$LOG_FILE"
365
+    if $FAST_SEEK; then
366
+        qm_pre_seek=$qm_seek && unset qm_post_seek
367
+    else
368
+        qm_post_seek=$qm_seek && unset qm_pre_seek
369
     fi
370
 
371
-    # use vhook to add the titles in
372
+    $QM_PREVIEW && yecho "Creating a quick-menu preview image"
373
+    # pad/resize if needed, use overlay filter (or vhook) to add menu graphics
374
+    # framing (if showcase) by ntsc-safe black bg
375
     ! $QM_PREVIEW && yecho
376
     if ! $QM_PREVIEW; then
377
-        yecho "Using ffmpeg's vhook to add titles and background"
378
+        yecho "Using ffmpeg to add titles and background"
379
     fi
380
-    # don't seek if we already made a padded video with a seek
381
-    $QUICKMENU_IS_SHOWCASE || $RESIZE_BG && qm_seek=""
382
-    VHOOK_CMD=(ffmpeg -t "$QM_MENU_TIME" $qm_seek -s $VIDSIZE -i  \
383
-    "$PRE_VHOOK_FILE" -an -f mpeg2video -r $FRAME_RATE -tvstd $TV_STANDARD \
384
-    -b 7000k -maxrate 8000k -bufsize 224KiB -aspect 4:3 \
385
-    -vhook "$imlib2_vhook -x 0 -y 0 -i $WORK_DIR/quick_menu_bg.png" \
386
-    -y "$WORK_DIR/intro.m2v")
387
+    if $use_overlay_filter; then
388
+        local overlay="$WORK_DIR/quick_menu_bg.png"
389
+        local PADDING="$VF pad=720:480:$VF_PADX:$VF_PADY"
390
+        local aspect=""
391
+        overlay_filter="movie=$overlay [wm];[in][wm] overlay=0:0:1 [wm2]"
392
+        ffmpeg_filter=($VF "$overlay_filter; [wm2] setdar=4:3 [out]")
393
+    elif $use_vhooks; then
394
+        local PADDING="$TOPPAD $BOTTOMPAD $LEFTPAD $RIGHTPAD"
395
+        local aspect="-aspect 4:3"
396
+        local PAD_CLR="-padcolor $BG_CLR"
397
+        ffmpeg_filter=(-vhook "$imlib2_vhook -x 0 -y 0 -i $WORK_DIR/quick_menu_bg.png")
398
+    fi
399
+    # no padding needed for background video, just resizing
400
+    $QUICKMENU_IS_BACKGROUND && PADDING=""
401
+    # create fifo
402
+    yuvout="$WORK_DIR/out.yuv"
403
+    rm -f  "$yuvout"  && mkfifo "$yuvout"
404
+    # run the commands to make the final menu m2v video
405
+    PAD_CMD=(ffmpeg -r $FRAME_RATE -async 1 $qm_pre_seek \
406
+    -t "$QM_MENU_TIME" -i "$QUICK_MENU_FILE" $qm_post_seek \
407
+    -s $QM_FRAMESIZE -an $PADDING -r $FRAME_RATE \
408
+    $PAD_CLR -f yuv4mpegpipe -vcodec rawvideo -y "$yuvout")
409
+    QUICKMENU_CMD=(ffmpeg -s $VIDSIZE -f yuv4mpegpipe \
410
+    -i "$yuvout" -an -f mpeg2video -r $FRAME_RATE \
411
+    -tvstd $TV_STANDARD -b 7000k -maxrate 8000k -bufsize 224KiB \
412
+    $aspect "${ffmpeg_filter[@]}" -y "$WORK_DIR/intro.m2v")
413
     $QM_PREVIEW && yecho
414
-    $QM_PREVIEW && yecho "Running ${VHOOK_CMD[@]}" | fold -bs
415
-    "${VHOOK_CMD[@]}" 2>&1 | strings >> "$LOG_FILE"
416
+    yecho "Running ${PAD_CMD[@]}"|fold -bs
417
+    echo "${QUICKMENU_CMD[@]}" | fold -bs | tee -a "$LOG_FILE"
418
+    "${PAD_CMD[@]}" < /dev/null  > "${LOG_FILE}-1.tmp" 2>&1 &
419
+    "${QUICKMENU_CMD[@]}" < /dev/null  > "${LOG_FILE}-2.tmp" 2>&1 &
420
+    ffmpeg_pid=$!
421
+    yecho
422
+    while ps -p $ffmpeg_pid >/dev/null; do
423
+        sleep 1
424
+        [[ -s "$WORK_DIR/intro.m2v" ]] && txt="Writing" || txt="Seeking"
425
+        spin $txt $SPINNER
426
+    done
427
+    wait
428
+    yecho
429
+    # remove control characters and seeking lines
430
+    strings "${LOG_FILE}-1.tmp" |   sed '/time=10000000000.00/d' >> "$LOG_FILE"
431
+    strings "${LOG_FILE}-2.tmp" | sed '/time=10000000000.00/d' >> "$LOG_FILE"
432
+    if [[ ! -s "$WORK_DIR/intro.m2v" ]]; then
433
+        runtime_error "There was a problem creating the menu video $funct_arg"
434
+    fi
435
+    rm -f "${LOG_FILE}*.tmp"
436
     ! $QM_PREVIEW && yecho
437
-    # create preview images if called for
438
+    # create preview images if called for, taking largest of 10 images
439
     if $QM_PREVIEW; then
440
-        FFMPEG_CMD=(ffmpeg -ss 1 -i "$WORK_DIR/intro.m2v" -an -vframes 30 \
441
-        "$outdir"/%06d.png)
442
-        yecho "${FFMPEG_CMD[@]}" | strings
443
+        FFMPEG_CMD=(ffmpeg -i "$WORK_DIR/intro.m2v" -an -vframes 10 \
444
+        -f image2 -y "$outdir"/%06d.$IMG_FMT)
445
+        yecho "Running ${FFMPEG_CMD[@]}" | strings
446
         "${FFMPEG_CMD[@]}" 2>&1 | strings >> "$LOG_FILE"
447
-        largest_png=$(du -s "$outdir"/*.png|sort -r |
448
-        awk 'NR>1{exit};1 {print $2}')
449
-        mv "$largest_png" "$PREVIEW_IMG"
450
+        # take the largest image (best quality?) of a 10 frame sampling
451
+        largest_img=$(get_largest 6 10 "$outdir" )
452
+        mv "$largest_img" "$PREVIEW_IMG"
453
         yecho "Removing temporary preview files"
454
         rm -f "$WORK_DIR/intro.m2v"
455
-        $QUICKMENU_IS_SHOWCASE && rm -f "$WORK_DIR/quick_tmp.avi" \
456
-        "$WORK_DIR"/showcase/*.png
457
-        $QUICKMENU_IS_BACKGROUND && rm -f  "$WORK_DIR"/bg/*.png
458
+        rm -f "$WORK_DIR"/showcase/*.$IMG_FMT "$WORK_DIR"/bg/*.$IMG_FMT
459
     fi
460
     $QM_PREVIEW && yecho
461
 }
462
@@ -1711,8 +1723,8 @@
463
 {
464
     yecho "Creating a blank mpeg for the vmgm menu"
465
     convert  -resize $VIDSIZE! xc:"#101010" "$WORK_DIR/dummy.jpg"
466
-    ENC_CMD1=(jpeg2yuv -v 1 -f $FRAME_RATE -I p -n 1 -l 30 -L 1 -b1 \
467
-    -j "$WORK_DIR/dummy.jpg")
468
+    ENC_CMD1=(jpeg2yuv -v 1 -f $FRAME_RATE -I p -n 1 -l 30 \
469
+    -L 1 -b1 -j "$WORK_DIR/dummy.jpg")
470
     ENC_CMD2=(ffmpeg -f yuv4mpegpipe -i - -an -r $FRAME_RATE -s $VIDSIZE \
471
     -tvstd $TV_STANDARD $FFMPEG_OPTS -y "$WORK_DIR/dummy.m2v")
472
     echo "Running: ${ENC_CMD1[@]} | ${ENC_CMD2[@]}" |
473
@@ -1723,9 +1735,7 @@
474
     fi
475
     VMGM_TIME=$(vid_length "$WORK_DIR/dummy.m2v")
476
     yecho
477
-    # temporarily use mp2enc for svcd audio as ffmpeg broken # FIXME
478
-    # see r2162 todisc or older for how to fix this block when ffmpeg is fixed
479
-    BGAUDIO_CMD=(ffmpeg -f s16le -i /dev/zero -t $VMGM_TIME \
480
+    BGAUDIO_CMD=(ffmpeg -f s16le -ar 48000 -i /dev/zero -t $VMGM_TIME \
481
     $AUDIO_OPTS -y "$WORK_DIR/dummy.$AUDIO_EXT")
482
     yecho "${BGAUDIO_CMD[@]}"
483
     "${BGAUDIO_CMD[@]}" 2>&1 | strings >> "$LOG_FILE"
484
@@ -1773,7 +1783,7 @@
485
                 OUTBASE=${IN_FILE##*/} # basename of file
486
                 OUTFILE=${OUTBASE%.*} # basename of file less extention
487
                 OUTFILE_GRP=${grouping[i]##*/} # basename of link
488
-                OUTFILE_GRP=$OUTFILE_GRP%.*} # basename of link less extension
489
+                OUTFILE_GRP=${OUTFILE_GRP%.*} # basename of link less extension
490
                 OUTFILE_GRP=$(cut -f3-4 -d- <<< "$OUTFILE_GRP")
491
                 OUTFILE_GRP=$(cut -f 1 -d. <<< "$OUTFILE_GRP") # group number
492
                 if [[ $verify_type = "group" ]]; then
493
@@ -1963,7 +1973,7 @@
494
         transition_pids="$transition_pids $!"
495
         ((num_procs++))
496
         if ((num_procs == max_procs || i == fade_frames-1)); then
497
-            wait $transition_pids
498
+            wait $transition_pids 2>/dev/null
499
             unset transition_pids num_procs
500
         fi
501
         let fade_slide=fade_slide+1
502
@@ -2195,12 +2205,55 @@
503
         ;;
504
     esac
505
 }
506
+
507
+wait_for()
508
+{
509
+    # wait for file to appear
510
+    while true; do
511
+        if test -e $1; then
512
+            return
513
+        fi
514
+        sleep .1
515
+    done
516
+}
517
+
518
+# HACK: transcode produces some scary output when run from python
519
+print_tcode_info()
520
+{
521
+    echo -e "\n****\n$ME You can probably ignore 'critical' 'errors' from \
522
+    transcode shown below if it shows transcode finishing the last image. \
523
+    These harmless 'broken pipe' messages from transcode appear to be a \
524
+    subtle bug in transcode when running it (or a script) from python. \
525
+    \n****\n" | sed "s/    */ /g;s/^ *//" |fold -bs >> "$LOG_FILE"
526
+}
527
+
528
+# get the largest PNG (1st match sequentially if more than one are same size)
529
+# images must be padded numbers as in 000001.png
530
+#args: width [6] (pad width), last [10] (last img to test), img_dir [pwd] (dir)
531
+# call without args to test from ./000000.png to ./000010.png
532
+get_largest()
533
+{
534
+    unset c largest result
535
+    local width=${1:-6}
536
+    local last=${2:-10}
537
+    local img_dir=${3:-$PWD}
538
+
539
+    for num in $(seq 0 $last); do
540
+        local img=$(printf %0${width}d $num)
541
+        if [[ -e $img_dir/${img}.$IMG_FMT ]]; then
542
+            c=$( du "$img_dir/${img}.$IMG_FMT" | cut -f1 )
543
+            ((c > largest)) && largest=$c && result="$img_dir/${img}.$IMG_FMT"
544
+        fi
545
+    done
546
+    echo $result
547
+}
548
+
549
 ##############################################################################
550
 #                               End of Functions                                #
551
 ##############################################################################
552
 
553
 
554
-trap 'cleanup; exit 13' TERM INT
555
+trap 'cleanup; exit 13' TERM INT HUP
556
 
557
 # ***********************************
558
 # EXECUTION BEGINS HERE
559
@@ -2373,9 +2426,6 @@
560
         "-keep-files" )
561
             KEEP_FILES=:
562
             ;;
563
-        "-dvd" )
564
-            usage_error "Option removed, as todisc only does DVD's now"
565
-            ;;
566
         "-svcd" )
567
             usage_error \
568
             "Todisc does only DVD's now.  Use the tovid, makemenu, makexml
569
@@ -2386,6 +2436,7 @@
570
             ;;
571
         "-pal" )
572
             TV_STANDARD="pal"
573
+            PIXEL_AR="59:54"
574
             ;;
575
         "-aspect" )
576
             unset ASPECT ASPECT_ARG
577
@@ -2394,6 +2445,7 @@
578
             if [[ ${#ASPECT_ARG[@]} -gt 0 ]]; then
579
             ASPECT_RATIO=$ASPECT_ARG
580
             [[ $ASPECT_RATIO = "16:9" ]] && AR=177 || AR=133
581
+            # below used by dvdauthor, not ffmpeg
582
             V_ASPECT="aspect=\"$ASPECT_RATIO\""
583
             fi
584
             ;;
585
@@ -2437,6 +2489,9 @@
586
         "-static" )
587
             STATIC=:
588
             ;;
589
+        "-animated" )
590
+            STATIC=false
591
+            ;;
592
         "-menu-fade" )
593
             shift
594
             get_listargs "$@"
595
@@ -2677,7 +2732,7 @@
596
             for f in  ${!ARGS_ARRAY[@]}; do
597
                 SM_BACKGROUND[f]=$(readlink -f "${ARGS_ARRAY[f]}")
598
                 ! [[ -e ${SM_BACKGROUND[f]} ]] && usage_error \
599
-                "submenu background \"$SM_BACKGROUND\" does not exist"
600
+                "submenu background \"${SM_BACKGROUND[f]}\" does not exist"
601
             done
602
             ;;
603
         "-intro" )
604
@@ -3187,6 +3242,9 @@
605
             SPEED="$1"
606
             BURN_SPEED="-speed $SPEED"
607
             ;;
608
+        "-eject" )
609
+            EJECT="-eject"
610
+            ;;
611
         "-quick-menu" )
612
             QUICK_MENU=:
613
             ;;
614
@@ -3198,6 +3256,22 @@
615
             shift
616
             SUBMENU_BG_CLR="$1"
617
             ;;
618
+        "-fast-seek" )
619
+            FAST_SEEK=:
620
+            ;;
621
+        "-frame-safe" )
622
+            FRAME_SAFE=:
623
+            ;;
624
+        "-user-thumbs" )
625
+            shift
626
+            get_listargs "$@"
627
+            for f in  ${!ARGS_ARRAY[@]}; do
628
+                USER_PICS[f]=$(readlink -f "${ARGS_ARRAY[f]}")
629
+                ! [[ -e ${USER_PICS[f]} ]] && usage_error \
630
+                "Your supplied thumb \"${USER_PICS[f]}\" does not exist"
631
+            done
632
+            USER_THUMBS=:
633
+            ;;
634
         "-config" | "-ntscfilm" | "-dvd-vcd" | "-half-dvd" | "-kvcd" | \
635
         "-kvcdx3" | "-kvcdx3a" | "-kdvd" | "-bdvd" | "-704" | "-normalize" | \
636
         "-amplitude" | "-overwrite" | "-panavision" | "-force" | "-fps" | \
637
@@ -3242,9 +3316,9 @@
638
 ##############################################################################
639
 #                      Sanity checks and preliminaries                       #
640
 ##############################################################################
641
+
642
 # get script pid so we can kill the parent if doing recursive todisc's
643
 TODISC_PIDS="$TODISC_PIDS $$"
644
-
645
 # make sure dvd-slideshow is installed if user passed -use-dvd-slideshow
646
 $USE_DVD_SLIDESHOW && assert_dep dvd-slideshow \
647
 "The program dvd-slideshow was not found - you can get it from
648
@@ -3265,7 +3339,7 @@
649
 # set some other vars now that depended on *WORK_DIR being set
650
 SPUMUX_XML="$WORK_DIR/spumux.xml"
651
 DVDAUTHOR_XML="$WORK_DIR/dvdauthor.xml"
652
-PREVIEW_IMG="$WORK_DIR/preview.jpg"
653
+PREVIEW_IMG="$WORK_DIR/preview.$IMG_FMT"
654
 
655
 # check for multiple cpus if -jobs not passed already
656
 #TODO always wait for either 1 or 2 processes - no need for if block later
657
@@ -3300,7 +3374,8 @@
658
         usage_error "$ERR"
659
     fi
660
 fi
661
-$SWITCHED && MN=2 || MN=1
662
+# for switched menus the 1st menu (MN) made is the 2nd, not the 1st
663
+{ $SWITCHED_MODE || $SWITCHED_MENUS ; } && MN=2 || MN=1
664
 
665
 if [[ ${#TITLES[@]} -eq 0 ]]; then
666
     if [[ $MENU_NUM = $MN ]] && ! $NOMENU \
667
@@ -3403,8 +3478,11 @@
668
 else
669
     usage_error "Please provide an output name with -out"
670
 fi
671
-# for dvdauthor.xml, if -intro was used
672
+### dvdauthor stuff
673
+# for xml, if -intro was used
674
 $DO_INTRO && INTRO="<vob file=\"$INTRO_CLIP\"/>"
675
+# strangely we need to export this even if we specify <video format=ntsc|pal...>
676
+export VIDEO_FORMAT=$TV_STANDARD
677
 
678
 # switched menus need more than one video file
679
 if $SWITCHED_MENUS && [[ ${#FILES[@]} -eq 1 ]]; then
680
@@ -3439,6 +3517,13 @@
681
     [[ -z $NR_AMT ]] && NR_AMT=200
682
     NR="$NR $NR_AMT"
683
 fi
684
+# check for -loop or -loop_input
685
+ffmpeg_help=$(ffmpeg -h 2>&1)
686
+if grep -q -- '^-loop ' <<< "$ffmpeg_help"; then
687
+    LOOP="-loop 1"
688
+else
689
+    LOOP="-loop_input"
690
+fi
691
 
692
 # assign values for slides
693
 # blurs
694
@@ -3487,14 +3572,39 @@
695
         #exit 1
696
     fi
697
 fi
698
-# get argument for transcode's progress reporting based on version
699
+# backend checks
700
+# transcode version >= 1.1.0 mandated
701
 _transcode_version=$(transcode -v 2>&1| awk '{gsub("v", ""); print $2}')
702
 _baseline_version=1.1.0
703
-if test_version $_transcode_version $_baseline_version; then
704
-    transcode_arg=--progress_rate
705
+if ! test_version $_transcode_version $_baseline_version; then
706
+    runtime_error \
707
+    "transcode version 1.1.0 or newer is required to run this script (todisc).
708
+    If you must use version $_transcode_version use tovid 0.34 or older."
709
+fi
710
+# ffmpeg has been buggy with setting AR with -aspect, use -vf aspect if present
711
+# "-vf" was "-vfilters" briefly, check
712
+FF_HELP=$(ffmpeg -h 2>&1)
713
+if grep -qw -- -vf <<< "$FF_HELP"; then
714
+    VF="-vf"
715
+# somewhat older is "-vfilters"
716
+elif grep -qw -- -vfilters <<< "$FF_HELP"; then
717
+    VF="-vfilters"
718
+fi
719
+# ffmpeg's -vf aspect is more dependable than -aspect, if ffmpeg is new enough
720
+FF_FILTERS=$(ffmpeg -filters 2>&1)
721
+# newer ffmpeg's use setdar= and setsar=
722
+if grep -qw ^setdar <<< "$FF_FILTERS"; then
723
+    ASPECT="$VF setdar=4:3"  # for menu.  Always 4:3 aspect
724
+    SS_ASPECT="$VF setdar=4:3" # for slideshows.  Always 4:3 aspect
725
+# somewhat older rev's used aspect=
726
+elif grep -qw ^aspect <<< "$FF_FILTERS"; then
727
+    ASPECT="$VF aspect=4:3"
728
+    SS_ASPECT="$VF aspect=4:3"
729
 else
730
-    transcode_arg=--print_status
731
+    ASPECT="-aspect 4:3"
732
+    SS_ASPECT="-aspect 4:3"
733
 fi
734
+ 
735
 # set some vars for switched menus so we know where we are
736
 $SWITCHED_MODE && SWITCHED_MENUS=false
737
 { $SWITCHED_MODE || $SWITCHED_MENUS ; } && SWITCHED=:
738
@@ -3538,16 +3648,6 @@
739
                 exit 1
740
             fi
741
         done
742
-        if $TITLESET_MODE && $VMGM_MENU && $PLAYALL && ! $SHOWCASE; then
743
-            BUTTON_STYLE="rect"
744
-            yecho
745
-            yecho "Warning ************"
746
-            yecho "You can not use text button style when using both \
747
-            playall and titlesets"
748
-            yecho "because of spumux and space limitations"
749
-            yecho "Changing to 'rect' style of buttons"
750
-            $WARN && sleep 15
751
-        fi
752
     fi
753
 fi
754
 if { $TEXTMENU || $QUICK_MENU ; } && [[ $BUTTON_STYLE = "rect" ]]; then
755
@@ -3689,8 +3789,7 @@
756
 echo >> "$LOG_FILE"
757
 
758
 # check aspect ratios of infiles so thumbs are in aspect without -aspect passed
759
-if [[ $MENU_NUM -eq 1 ]] && ! $TEXTMENU \
760
-  && ((inc_files)) && [[ -z "$V_ASPECT" ]]; then
761
+if ((inc_files)) && [[ -z "$V_ASPECT" ]]; then
762
     yecho
763
     yecho "Determining aspect ratio of videos"
764
     for ((i=0; i<${#FILES[@]}; i++)); do
765
@@ -3712,6 +3811,15 @@
766
     yecho
767
 fi
768
 
769
+# -user-thumbs is only compatible with static thumbs (-static)
770
+if $USER_THUMBS && ! $STATIC; then
771
+    if $SWITCHED_MENUS; then
772
+        usage_error "If doing switched menus -user-thumbs can only be used
773
+                    with a static menu (-static)"
774
+    else
775
+        usage_error "-user-thumbs option is for static buttons only (-static)"
776
+    fi
777
+fi
778
 
779
 ################################################
780
 #        recursive magic for titlesets,        #
781
@@ -3847,8 +3955,8 @@
782
 fi
783
 
784
 if [[ -z $BACKGROUND ]]; then
785
-    BACKGROUND="$WORK_DIR/bg.png"
786
-    convert  -size $VIDSIZE! xc:$BG_CLR "$BACKGROUND"
787
+    BACKGROUND="$WORK_DIR/bg.$IMG_FMT"
788
+    convert  -size $VIDSIZE! xc:$BG_CLR -depth 8 "$BACKGROUND"
789
 fi
790
 # check file type of background file and assign to BG_VIDEO or BG_IMAGE
791
 if [[ -n $BACKGROUND ]]; then
792
@@ -3996,7 +4104,7 @@
793
 ! $SHOWCASE && \
794
 [[ $BUTTON_GRAVITY = "center" ]] && ! $USER_TITLE_GEO && TITLE_GRAVITY="north"
795
 
796
-# dvdauthor stuff: make an array of possible vars for dvdauthor post calls
797
+# make an array of possible vars for dvdauthor post calls
798
 if $CHAIN_VIDEOS; then
799
     if [ -z "$post_play" ]; then
800
         for ((i=0; i<NUM_FILES; i++)); do
801
@@ -4160,6 +4268,9 @@
802
         [ -z "$MIN_CHAPTERS" ]  || ((chapt_val < MIN_VAL)) \
803
         && MIN_CHAPTERS=$chapt_val && min_chapt_key=$i
804
     done
805
+    if ((MAX_CHAPTERS > 35)); then
806
+        usage_error "Sorry, maximum 35 chapters for submenus (DVD button limit)"
807
+    fi
808
 fi
809
 
810
 # a quick way to allow user to make a dvd with no menus
811
@@ -4218,6 +4329,20 @@
812
     exit 0
813
 fi
814
 
815
+# make sure -user-thumbs matches the number of videos
816
+if  $USER_THUMBS && ((${#USER_PICS[@]} != ${#IN_FILES[@]})); then
817
+    usage_error "The number of images supplied with \"-user-thumbs\"
818
+    must match the number of videos"
819
+fi
820
+# pass -frame-safe and ffmpeg/transcode will output only 9 images for static
821
+$FRAME_SAFE && V_FRAMES=9 || V_FRAMES=1
822
+# -frame-safe is incompatible with -user-thumbs
823
+if $USER_THUMBS && $FRAME_SAFE; then
824
+    FRAME_SAFE=false
825
+    echo "-frame-safe and -user-thumbs incompatible, disabling -frame-safe"
826
+    sleep 5
827
+fi
828
+    
829
 yecho "Creating pics directories..."
830
 for ((i=0; i<=NUM_FILES; i++)); do
831
     mkdir -p "$REAL_WORK_DIR/pics/$i"
832
@@ -4226,6 +4351,7 @@
833
 # textmenu is static unless there is an animated background or showcase video
834
 if $TEXTMENU && [[ -z $SHOWCASE_VIDEO && -z $BG_VIDEO ]]; then STATIC=:; fi
835
 
836
+
837
 { $MENU_FADE || test -n "$BG_VIDEO" ; } && mkdir -v "$REAL_WORK_DIR/bg"
838
 mkdir "$REAL_WORK_DIR/animenu"
839
 if $ANI_SUB_MENU; then
840
@@ -4575,7 +4701,7 @@
841
 fi
842
 # TODO: Merge these globals with the ones up top
843
 # only the 1st 6 are mergable - keeping them here for debugging this beast :)
844
-# 9 /row
845
+# 9 /row  
846
 NTSC_1333_DVD=(420x280 300x200 192x128 192x128 186x124 186x124 132x88 132x88 \
847
 132x88 120x80 120x80 120x80 96x64 96x64 96x64 96x64 96x64 96x64 \
848
 96x64 96x64 84x56 84x56 84x56 84x56 84x56 84x56 84x56 \
849
@@ -4636,13 +4762,13 @@
850
     ((NUM_FILES >= 6)) && SPLIT=4
851
     ((NUM_FILES >= 8)) && SPLIT=5
852
 fi
853
-# Montage geometry: closer together for large arrangements
854
+
855
+
856
 AUDIO_EXT="ac3"
857
 SAMPLERATE="48000"
858
 MPLEX_FORMAT="8"
859
-FFMPEG_OPTS="-b 7000k  -maxrate 8000k -bufsize 224KiB -aspect 4:3"
860
-SS_FFMOPTS="-b 8000k -maxrate 9000k -bufsize 224KiB -aspect 4:3"
861
-ASPECT="-aspect $ASPECT_RATIO"
862
+FFMPEG_OPTS="-b 7000k  -maxrate 8000k -bufsize 224KiB $ASPECT"
863
+SS_FFMOPTS="-b 8000k -maxrate 9000k -bufsize 224KiB $SS_ASPECT"
864
 SHOWCASE_SIZE=384x256
865
 BURN_TGT="$OUT_DIR"
866
 BURN_TGT_STR="DVD directory"
867
@@ -4909,10 +5035,10 @@
868
 if $SHOWCASE && ! $TRANSPARENT; then TRANSPARENT=:; fi
869
 AUDIO_OPTS="-ab 224k -ar $SAMPLERATE -acodec $AUDIO_EXT"
870
 # spumux and dvdauthor vars
871
-$WIDE_SCRREN || [[ -n "$V_ASPECT" ]] && TITLES_VID_TAG="<video "
872
+TITLES_VID_TAG="<video format=\"$TV_STANDARD\""
873
 $WIDE_SCREEN && TITLES_VID_TAG=" $TITLES_VID_TAG widescreen=\"$WIDESCREEN\""
874
 [[ -n "$V_ASPECT" ]] && TITLES_VID_TAG="$TITLES_VID_TAG $V_ASPECT"
875
-[[ -n $TITLES_VID_TAG ]] && TITLES_VID_TAG="$TITLES_VID_TAG />"
876
+TITLES_VID_TAG="$TITLES_VID_TAG />"
877
 START="00:00:00.0"
878
 $PLAYALL && TITLESET_PRE="g4=0;"
879
 $ITLESET_MODE && TITLESET_PRE="$TITLESET_PRE g2=1;"
880
@@ -4971,18 +5097,17 @@
881
 if [ -z "$BG_PIC" ]; then
882
     echo
883
     echo "Creating a black background"
884
-    BG_PIC="$WORK_DIR/pics/template.png"
885
+    BG_PIC="$WORK_DIR/pics/template.$IMG_FMT"
886
     $QUICK_MENU && template_colour="none" || template_colour=$BG_CLR
887
     convert  -resize $VIDSIZE! xc:$template_colour "$BG_PIC"
888
 else
889
-    convert -resize $VIDSIZE! "$BG_PIC" "$WORK_DIR/pics/template.png"
890
+    convert -resize $VIDSIZE! "$BG_PIC" "$WORK_DIR/pics/template.$IMG_FMT"
891
 fi
892
 if $MENU_FADE; then
893
-    cp "$WORK_DIR/pics/template.png" "$WORK_DIR/pics/template.bk.png"
894
+    cp "$WORK_DIR/pics/template.$IMG_FMT" "$WORK_DIR/pics/template.bk.$IMG_FMT"
895
 fi
896
 
897
 if $MENU_FADE || $FEATHER; then
898
-    convert -size $VIDSIZE xc:"#101010" "$WORK_DIR/black.jpg"
899
     convert -depth 8 -size $VIDSIZE xc:"#101010" "$WORK_DIR/black.ppm"
900
 fi
901
 # now that we have a background we can do the polaroid stack if called for
902
@@ -5092,7 +5217,6 @@
903
     if ! $SINGLE_SLIDESHOW; then
904
         for ((i=0; i<=NUM_FILES; i++)); do
905
             spin "Working on video title $((i+1)) "
906
-            # if user needs -undercolor, make sure it contrasts the text colour
907
             THUMB_TITLE_CMD=(convert -size 620x300 xc:none -gravity $JUSTIFY \
908
             -font "$TITLES_FONT" -pointsize $TITLES_FONTSIZE \
909
             -fill $CONTRAST_CLR  -stroke $TITLES_STROKE \
910
@@ -5446,8 +5570,13 @@
911
 if [[ -n "$BG_VIDEO" ]] && ! $QUICKMENU_IS_BACKGROUND; then
912
     echo
913
     echo "Getting background video images from $BG_VIDEO"
914
-    FFMPEG_CMD=(ffmpeg -ss $BG_SEEK -i "$BG_VIDEO" -s $VIDSIZE -vframes 1 \
915
-    -vcodec png -an  -f rawvideo -y "$WORK_DIR/pics/template.png")
916
+    if $FAST_SEEK; then
917
+        bg_pre_seek="-ss $BG_SEEK" && unset bg_post_seek
918
+    else
919
+        bg_post_seek="-ss $BG_SEEK" && unset bg_pre_seek
920
+    fi
921
+    FFMPEG_CMD=(ffmpeg $bg_pre_seek -i "$BG_VIDEO" -s $VIDSIZE -vframes 1 \
922
+    -an $bg_post_seek -f image2 -y "$WORK_DIR/pics/template.$IMG_FMT")
923
     echo -e "\nRunning: "${FFMPEG_CMD[@]}"\n" | fold -bs >> "$LOG_FILE"
924
     SED_VAR="frame="
925
     if ! "${FFMPEG_CMD[@]}" 2>&1 |strings  >> "$LOG_FILE";then
926
@@ -5483,9 +5612,13 @@
927
         sc_3d_cmd=(convert - $SC_RAISE)
928
     fi
929
     if [[ -n "$SHOWCASE_VIDEO" ]]; then
930
-        echo "Getting video images from $SHOWCASE_VIDEO"
931
+        if $SWITCHED && $USER_THUMBS; then
932
+            echo "Using supplied image for showcased thumb"
933
+        else
934
+            echo "Getting video images from $SHOWCASE_VIDEO"
935
+        fi
936
         if [[ "$SC_FRAMESTYLE" = "glass" ]]; then
937
-            # some vars for get_framed_pics()
938
+            # some vars for get_framed_pics function
939
             D=2
940
             OUTDIR="$WORK_DIR/showcase"
941
             OUT="$WORK_DIR/showcase_img.png"
942
@@ -5495,9 +5628,8 @@
943
             $SWITCHED && MPLAYER_SEEK_VAL=${SEEK_VAL[MENU_NUM-1]}
944
             echo "Using mplayer to get framed images from the showcase video"
945
             get_framed_pics "$SHOWCASE_VIDEO" >> "$LOG_FILE" 2>&1
946
-            largest_png=$(du -s "$WORK_DIR"/000000*.png|sort -r |
947
-                                awk 'NR>1{exit};1 {print $2}')
948
-            mv -v "$largest_png" "$OUT"
949
+            largest_img=$(get_largest 8 30 )
950
+            mv -v "$largest_img" "$OUT"
951
             rm -f "$WORK_DIR"/00000*.png
952
             convert "$WORK_DIR/showcase_img.png" \
953
             -background none $ROTATE $WAVE miff:-|
954
@@ -5508,15 +5640,25 @@
955
             else
956
                 FFMPEG_SEEK_VAL=$SHOWCASE_SEEK_VAL
957
             fi
958
-
959
-            FFMPEG_CMD=(ffmpeg -ss $FFMPEG_SEEK_VAL -i "$SHOWCASE_VIDEO" \
960
-            -s $SHOWCASE_SIZE  -vframes 1 -vcodec png -an -f rawvideo -y \
961
-            "$WORK_DIR/showcase_img.png")
962
-            echo -e "\nRunning: "${FFMPEG_CMD[@]}"\n" | fold -bs \
963
-              |tee -a "$LOG_FILE"
964
-            SED_VAR="frame="
965
-            if ! "${FFMPEG_CMD[@]}" 2>&1 | strings >> "$LOG_FILE";then
966
-                runtime_error "Problem creating images from the video."
967
+            if $FAST_SEEK; then
968
+                ffm_pre_seek="-ss $FFMPEG_SEEK_VAL" && unset ffm_post_seek
969
+            else
970
+                ffm_post_seek="-ss $FFMPEG_SEEK_VAL" && unset ffm_pre_seek
971
+            fi
972
+            # if -user-thumbs passed we use the supplied thumb for the menu
973
+            if $SWITCHED && $USER_THUMBS; then
974
+                convert ${USER_PICS[MENU_NUM-1]} -resize $SHOWCASE_SIZE \
975
+                "$WORK_DIR/showcase_img.png"
976
+            else
977
+                FFMPEG_CMD=(ffmpeg $ffm_pre_seek -i "$SHOWCASE_VIDEO" \
978
+                -s $SHOWCASE_SIZE -an $ffm_post_seek -vframes 1 -f image2 -y \
979
+                "$WORK_DIR/showcase_img.png")
980
+                echo -e "\nRunning: "${FFMPEG_CMD[@]}"\n" | fold -bs \
981
+                  |tee -a "$LOG_FILE"
982
+                SED_VAR="frame="
983
+                if ! "${FFMPEG_CMD[@]}" 2>&1 | strings >> "$LOG_FILE";then
984
+                    runtime_error "Problem creating images from the video."
985
+                fi
986
             fi
987
             # SHOWCASE_FRAME includes size and colour, it is empty if size is 0
988
             if [[ -n $SHOWCASE_SHAPE ]]; then
989
@@ -5548,30 +5690,35 @@
990
         -resize $SHOWCASE_SIZE! "$WORK_DIR/showcase_img.png"
991
     fi
992
 fi
993
-# transcode makes it harder to switch between PNG and JPEG for output
994
-if [ $IMG_FMT = "jpg" ]; then
995
-    EXPORT="-y jpg,null"
996
-elif [ $IMG_FMT = "png" ]; then
997
-    EXPORT="-y im -F png -w 04"
998
+# transcode outputs yuv4mpeg which is piped to ffmpeg to make images (faster)
999
+EXPORT="-y yuv4mpeg,null"
1000
+if [ $IMG_FMT = "png" ]; then
1001
     QUALITY="-quality 01"
1002
 fi
1003
 
1004
 # create the preview images
1005
-if ! $TEXTMENU && ! $SINGLE_SLIDESHOW && $DO_MENU; then
1006
+if ! $TEXTMENU && ! $SINGLE_SLIDESHOW && $DO_MENU && ! $USER_THUMBS; then
1007
     for ((i=0; i<=NUM_FILES; i++)) ; do
1008
+        # fast seek disabled by default
1009
+        if $FAST_SEEK; then
1010
+            ffm_pre_seek="-ss ${SEEK_VAL[i]}" && unset ffm_post_seek
1011
+        else
1012
+            ffm_postseek="-ss ${SEEK_VAL[i]}" && unset ffm_pre_seek
1013
+        fi
1014
         # don't make titles if all input files are images
1015
         # pass -f image2 to ffmpeg if its an image (not always needed but ...)
1016
         [[ ${file_is_image[i]} = "yes" ]] && fmt="-f image2" || fmt=""
1017
         SV=${SEEK_VAL[i]}; CURFILE="${IN_FILES[i]##*/}"
1018
         spin "[$((i + 1)) of ${#FILES[@]}] Seeking to $SV seconds in $CURFILE"
1019
 
1020
-        FFMPEG_CMD=(ffmpeg $fmt -ss ${SEEK_VAL[i]} -i "${IN_FILES[i]}" -an \
1021
-        -vframes 1 -s $THUMB_SIZE $WORK_DIR/pics/$i/%06d.$IMG_FMT)
1022
+        FFMPEG_CMD=(ffmpeg $fmt $ffm_pre_seek -i "${IN_FILES[i]}" -an \
1023
+        $ffm_postseek -f image2 -vframes $V_FRAMES \
1024
+        -s $THUMB_SIZE -y $WORK_DIR/pics/$i/%06d.$IMG_FMT)
1025
         CMD=( "${FFMPEG_CMD[@]}" )
1026
         SED_VAR="frame="
1027
         ! [[ "$SC_FRAMESTYLE" = "glass" ]] \
1028
         && echo -e "\nRunning: "${CMD[@]}"\n" | fold -bs >> "$LOG_FILE"
1029
-        # some vars for get_framed_pics()
1030
+        # some vars for get_framed_pics function
1031
         VOUT="png:z=7"; FRAMES=30
1032
         FRAME_SIZE=$THUMB_SIZE
1033
         D=2
1034
@@ -5579,14 +5726,23 @@
1035
         if [ "$SC_FRAMESTYLE" = "glass" ]; then
1036
             MPLAYER_SEEK_VAL=${SEEK_VAL[i]}
1037
             get_framed_pics "${IN_FILES[i]}"  >> "$LOG_FILE" 2>&1
1038
-            largest_png=$(du -s $WORK_DIR/000*[0-9].png | sort -r |
1039
-                                        awk 'NR>1{exit};1 {print $2}')
1040
-            mv -f $largest_png $WORK_DIR/pics/$i/$(printf "%06d%s" 0 .$IMG_FMT)
1041
+            largest_img=$(get_largest 8 30)
1042
+            mv -f $largest_img "$WORK_DIR/pics/$i/$(printf "%06d%s" 0 .$IMG_FMT)"
1043
             rm -f "$WORK_DIR"/000*[0-9].png
1044
         elif [ "$SC_FRAMESTYLE" = "none" ]; then
1045
             if ! "${FFMPEG_CMD[@]}" 2>&1 |strings >> "$LOG_FILE";then
1046
                 runtime_error "Problem creating images from the video."
1047
             fi
1048
+            
1049
+            # get largest image of 9 if static menu and -frame-safe
1050
+            if $FRAME_SAFE; then #FIXME $STATIC not necessary, this is a preview!
1051
+                largest_img=$(get_largest 6 $V_FRAMES "$WORK_DIR/pics/$i")
1052
+                echo Using $largest_img for menu >2&
1053
+                mv -f "$largest_img" "$WORK_DIR/pics/largest.$IMG_FMT"
1054
+                rm -f "$WORK_DIR"/pics/$i/*.$IMG_FMT
1055
+                mv  "$WORK_DIR/pics/largest.$IMG_FMT" \
1056
+                  "$WORK_DIR/pics/$i/000001.$IMG_FMT"
1057
+            fi
1058
         fi
1059
 
1060
         wait
1061
@@ -5594,6 +5750,13 @@
1062
     done
1063
     echo
1064
 fi
1065
+# for user supplied thumbs, resize and copy to appropriate directories
1066
+if ! $SWITCHED; then
1067
+    for i in ${!USER_PICS[@]}; do
1068
+        convert "${USER_PICS[i]}" -resize $THUMB_SIZE \
1069
+        "$WORK_DIR/pics/$i/000001.$IMG_FMT"
1070
+    done
1071
+fi
1072
 # overlay menu title and thumb titles on template
1073
 if $MIST; then
1074
     # overlay white.png onto background
1075
@@ -5622,7 +5785,7 @@
1076
     convert "$WORK_DIR/pics/template.png" -background none \
1077
     "${ADD_PLAYALL_BTN[@]}" "${ADD_RTN_BTN[@]}" \
1078
     "$WORK_DIR/pics/template.png"
1079
-    convert "$WORK_DIR/pics/template.png" "$WORK_DIR/pics/template.jpg"
1080
+    convert "$WORK_DIR/pics/template.png" "$WORK_DIR/pics/template1.png"
1081
 fi
1082
 
1083
 # copy the preview for -quick-menu
1084
@@ -6287,9 +6450,13 @@
1085
 
1086
         # cut out transparent hole in background with this 'cookie cutter'
1087
         convert "$WORK_DIR/cookie_cutter.png" "$WORK_DIR/pics/template.png" \
1088
-        -compose Xor -composite "$WORK_DIR/quick_menu_bg.png"
1089
+        -compose Xor -composite -depth 8 -colorspace RGB -type TrueColorMatte \
1090
+        "$WORK_DIR/quick_menu_bg.png"
1091
     else
1092
-        cp "$WORK_DIR/pics/template.png" "$WORK_DIR/quick_menu_bg.png"
1093
+        #cp "$WORK_DIR/pics/template.png" "$WORK_DIR/quick_menu_bg.png"
1094
+        convert "$WORK_DIR/pics/template.png" \
1095
+        -depth 8 -colorspace RGB -type TrueColorMatte \
1096
+        "$WORK_DIR/quick_menu_bg.png"
1097
     fi
1098
 fi
1099
 $QUICK_MENU && quick_menu preview
1100
@@ -6323,7 +6490,7 @@
1101
     rm "$WORK_DIR/pics/template.png"
1102
     cp "$WORK_DIR/pics/template.bk.png" "$WORK_DIR/pics/template.png"
1103
 fi
1104
-rm -f "${PICS[@]}"
1105
+! $USER_THUMBS && rm -f "${PICS[@]}"
1106
 unset PICS IM_CMD1 IM_CMD2 IM_CMD3 IM_CMD4 IM_CMD5
1107
 
1108
 
1109
@@ -6403,7 +6570,6 @@
1110
 # run this twice for switched menus for 1st menu made and last
1111
 # to make sure files get symlinked properly (Hack)
1112
 if [[ $MENU_NUM = [1-2] || -n ${file_is_image[@]}  ]]; then
1113
-    # do not check compliance for SVCD's - no still images are made
1114
     if ! $MK_CAROUSEL_MODE; then
1115
         echo
1116
         check_compliance
1117
@@ -6502,9 +6668,9 @@
1118
         fade_incr=$(bc -l <<< "scale=2; 100 / $fade_frames") >&2
1119
     fi
1120
 
1121
-    TOYUV_FADE_CMD=(ppmtoy4m -v 0 -n $fade_frames -A 10:11 -F $YUV_FR -I p \
1122
+    TOYUV_FADE_CMD=(ppmtoy4m -v 0 -n $fade_frames -A $PIXEL_AR -F $YUV_FR -I p \
1123
     -S 420mpeg2 -r)
1124
-    TOYUV_STILLS_CMD=(ppmtoy4m -n $MIX_VFRAMES -A 10:11 -F $YUV_FR -I p \
1125
+    TOYUV_STILLS_CMD=(ppmtoy4m -n $MIX_VFRAMES -A $PIXEL_AR -F $YUV_FR -I p \
1126
     -S 420mpeg2 -r )
1127
     # transitions
1128
     echo >&2
1129
@@ -6555,7 +6721,7 @@
1130
         fi
1131
         # encode transition frames
1132
         if (($f == (${#MIX_IN[@]} - 1) )); then
1133
-            fadein_cmd=(ppmtoy4m -v 0 -n 26 -A 10:11 -I p -r -S 420mpeg2)
1134
+            fadein_cmd=(ppmtoy4m -v 0 -n 26 -A $PIXEL_AR -I p -r -S 420mpeg2)
1135
             cat "$WORK_DIR"/animenu/*.ppm 2>/dev/null |
1136
             "${fadein_cmd[@]}" 2>/dev/null |
1137
             $YUVCORRECT 2> /dev/null
1138
@@ -6601,8 +6767,8 @@
1139
          -acodec pcm_s16le -y $WORK_DIR/slideshow.wav)
1140
     else
1141
         # generate silence
1142
-        BGAUDIO_CMD=(ffmpeg -f s16le -t $bgaudio_time -i /dev/zero -ar 48000 \
1143
-        -ac 2 -acodec pcm_s16le -y $WORK_DIR/slideshow.wav)
1144
+        BGAUDIO_CMD=(ffmpeg -f s16le -ar 48000 -t $bgaudio_time -i /dev/zero
1145
+        -ar 48000 -ac 2 -acodec pcm_s16le -y $WORK_DIR/slideshow.wav)
1146
     fi
1147
     echo
1148
     echo "Encoding audio to wav with: ${BGAUDIO_CMD[@]}" | format_output |
1149
@@ -6652,15 +6818,15 @@
1150
     mv "$WORK_DIR/slideshow.vob" "$WORK_DIR/intro.mpg"
1151
 fi
1152
 # check bgvideo and showcase VIDEO for compliance ( if present ) #FIXME
1153
-if [[ -n $BG_VIDEO ]]; then
1154
+if [[ -n $BG_VIDEO && $BG_VIDEO = $BG_AUDIO ]]; then
1155
     # do not reencode animated slideshow made in MK_CAROUSEL_MODE
1156
     if ! [[ $BG_VIDEO = $WORK_DIR/carousel-00.m2v ]]; then
1157
         if ! idvid -isformat \
1158
          ${TV_STANDARD}-${TARGET} "$BG_VIDEO" >/dev/null; then
1159
-            tovid_reencode "$BG_VIDEO" $BG_SEEK background
1160
+            ! $NOASK && tovid_reencode "$BG_VIDEO" $BG_SEEK background
1161
         fi
1162
     fi
1163
-elif [[ -n $SHOWCASE_VIDEO ]]; then
1164
+elif [[ -n $SHOWCASE_VIDEO && $SHOWCASE_VIDEO = $BG_AUDIO ]]; then
1165
     # do not reencode animated slideshow made in MK_CAROUSEL_MODE
1166
     if ! [[ $SHOWCASE_VIDEO = $WORK_DIR/carousel-00.m2v ]]; then
1167
         if ! $SWITCHED && ! $QUICK_MENU; then
1168
@@ -6923,7 +7089,7 @@
1169
     echo "Creating $THUMB_FRAMES images from each video for the main menu"
1170
     for ((i=0; i<=NUM_FILES; i++)) ; do
1171
         if [ "$SC_FRAMESTYLE" = "glass" ]; then
1172
-            # some vars for get_framed_pics()
1173
+            # some vars for get_framed_pics function
1174
             D=2
1175
             VOUT="png:z=7"
1176
             FRAME_SIZE=$THUMB_SIZE
1177
@@ -6942,49 +7108,82 @@
1178
             convert "${FILES[i]}" -depth 8 \
1179
               -resize ${THUMB_SIZE}! \
1180
               "$WORK_DIR/pics/$i/$(printf "%06d%s"  0 .${IMG_FMT})"
1181
+        elif $USER_THUMBS; then
1182
+            : # allow substituting user image for images
1183
         else
1184
             echo
1185
             echo "Working on ${IN_FILES[i]}"
1186
+            # for static menu use 9 frames so we can get the largest one below
1187
+            if $STATIC && $FRAME_SAFE; then
1188
+                thumb_frames=9
1189
+            else
1190
+                thumb_frames=$THUMB_FRAMES
1191
+            fi
1192
+            # warning to ignore transcode error messages
1193
+            print_tcode_info
1194
             if [ -s  "${IN_FILES[i]}.nav_log" ]; then
1195
                 NAV_SEEK[i]="--nav_seek"
1196
                 NAVSEEK[i]=${IN_FILES[i]}.nav_log
1197
             fi
1198
-
1199
-            TRANSCODE_CMD2=(nice transcode $transcode_arg 10 \
1200
+            yuv_fifo="$WORK_DIR/pics/$i/out.yuv"
1201
+            log_tmp="$WORK_DIR/pics/$i/log.tmp"
1202
+            [[ ! -p "$yuv_fifo" ]] && mkfifo "$yuv_fifo"
1203
+            # resize using ffmpeg instead of transcode
1204
+            FFMPEG_CMD2=(ffmpeg $PIPE_FORMAT -i "$yuv_fifo" -f image2 -s $THUMB_SIZE -y \
1205
+            "$WORK_DIR/pics/$i/%06d.$IMG_FMT")
1206
+            TRANSCODE_CMD2=(transcode --progress_rate 10 \
1207
             --write_pid $WORK_DIR/tcode$i.pid -q 1 -i "${IN_FILES[i]}" \
1208
-            -c ${SEEK_FRAMES[i]}-$((${SEEK_FRAMES[i]} + $THUMB_FRAMES)) \
1209
-            ${NAV_SEEK[i]} "${NAVSEEK[i]}" -o "$WORK_DIR/pics/$i/" \
1210
-            -f $FRAME_RATE -Z $THUMB_SIZE $EXPORT)
1211
+            -c ${SEEK_FRAMES[i]}-$((${SEEK_FRAMES[i]} + $thumb_frames)) \
1212
+            ${NAV_SEEK[i]} "${NAVSEEK[i]}" -o "$yuv_fifo" \
1213
+            -f $FRAME_RATE $EXPORT)
1214
             yecho "Running ${TRANSCODE_CMD2[@]}" | fold -bs
1215
-
1216
-            run_transcode()
1217
-            {
1218
-                "${TRANSCODE_CMD2[@]}" >> "$LOG_FILE"  2>&1
1219
-                sleep 1
1220
-            }
1221
-            run_transcode &
1222
-            sleep 1 # short sleep to allow 1st jpg to appear
1223
+            yecho "Running ${FFMPEG_CMD2[@]}" | fold -bs
1224
+            "${TRANSCODE_CMD2[@]}"  2>&1 | strings >> "$LOG_FILE" &
1225
+            "${FFMPEG_CMD2[@]}" > "$log_tmp" 2>&1 &
1226
+            ffm_pid=$!
1227
+            wait_for "$WORK_DIR/tcode$i.pid"
1228
             TRANSCODE_PID=$(<$WORK_DIR/tcode$i.pid)
1229
             tcode_pids="$tcode_pids $TRANSCODE_PID"
1230
-            check_stall $TRANSCODE_PID &
1231
-            if [[ -n "$TRANSCODE_PID" ]]; then
1232
-                while ps -p $TRANSCODE_PID >/dev/null; do
1233
+            if [[ -n "$ffm_pid" ]]; then
1234
+                wait_for "$WORK_DIR/pics/$i/000001.$IMG_FMT"
1235
+                while ps -p $ffm_pid >/dev/null; do
1236
                     sleep 2 # spinner interval
1237
                     last_image=$(find $WORK_DIR/pics/$i \
1238
                     -maxdepth 1 -name \*.$IMG_FMT| sort |
1239
                     awk -F / '{ field = $NF }; END{ print field }')
1240
-                spin "Seeking in video and creating images: $last_image"
1241
+                    spin "Seeking in video and creating images: $last_image"
1242
                 done
1243
-                echo
1244
+                wait # wait for ffmpeg and transcode to finish
1245
+                # get the largest image if static menu(we made 9)
1246
+                # get largest image of 9 if static menu and not -frame-safe
1247
+                if $STATIC && $FRAME_SAFE; then
1248
+                    largest=$(get_largest 6 $V_FRAMES "$WORK_DIR/pics/$i/")
1249
+                    # remove the unused images after saving the largest as 1st
1250
+                    mv "$largest" "$WORK_DIR/pics/$i/000001.$IMG_FMT" 2>/dev/null
1251
+                    rm -f "$WORK_DIR"/pics/$i/00000{2..9}.png
1252
+                fi
1253
                 numpics=$(find $WORK_DIR/pics/$i/ -name  "*.${IMG_FMT}" | wc -l)
1254
                 # which video has the most frames encoded? Used in final encode
1255
                 ((numpics > ani_pics)) && ani_pics=$numpics
1256
+                # append ffmpeg output to the log
1257
+                echo -e \
1258
+                "\n$ME Log from ffmpeg (processing transcode stream)\n" \
1259
+                >> "$LOG_FILE"
1260
+                strings "$log_tmp" |   sed '/time=10000000000.00/d' >> "$LOG_FILE"
1261
+                rm -f "$log_tmp"
1262
+                echo
1263
                 echo "Created $numpics images of $THUMB_FRAMES"
1264
             else
1265
                 runtime_error "Problem creating images from the video."
1266
             fi
1267
-            unset TRANSCODE_CMD2 run_transcode numpics
1268
+            unset TRANSCODE_CMD2 numpics
1269
         fi
1270
+        # copy 000001 image to 000000 as we use 0 based counting (transcode)
1271
+        # TODO transition to using "1" based' images as we use ffmpeg now
1272
+        cp "$WORK_DIR/pics/$i/000001.$IMG_FMT" "$WORK_DIR/pics/$i/000000.$IMG_FMT"
1273
+        last=$(find $WORK_DIR/pics/$i -maxdepth 1 -name \*.$IMG_FMT | \
1274
+        sort | awk 'END{print}')
1275
+        rm -f "$last"
1276
     done
1277
 fi
1278
 # create the pics for background image
1279
@@ -6992,15 +7191,17 @@
1280
     if [ -z "$BG_PIC" ]; then
1281
         echo
1282
         echo "Creating a black background"
1283
-        BG_PIC="$WORK_DIR/pics/template.jpg"
1284
+        # using JPEG here to save disk space as quality is not noticable
1285
+        BG_PIC="$WORK_DIR/pics/template1.png"
1286
         if $QUICK_MENU; then
1287
-            convert  -size $VIDSIZE xc:none "$BG_PIC"
1288
+            convert  -size $VIDSIZE xc:none \
1289
+            -depth 8 -colorspace RGB -type TrueColorMatte "$BG_PIC"
1290
         else
1291
-            convert  -size $VIDSIZE xc:$BG_CLR "$BG_PIC"
1292
+            convert  -size $VIDSIZE xc:$BG_CLR -depth 8 "$BG_PIC"
1293
         fi
1294
     else
1295
         convert -size $VIDSIZE "$BG_PIC" -resize $VIDSIZE! \
1296
-        "$WORK_DIR/pics/template.jpg"
1297
+        "$WORK_DIR/pics/template1.png"
1298
     fi
1299
     # create/resize submenu background, fill in array and symlink if needed
1300
     if $SUB_MENU; then
1301
@@ -7008,26 +7209,26 @@
1302
             if ((${#SM_BACKGROUND[@]} > 1)); then
1303
                 for f in ${!SM_BACKGROUND[@]}; do
1304
                     convert  -size $VIDSIZE "${SM_BACKGROUND[f]}" \
1305
-                    -resize $VIDSIZE\! miff:- |
1306
-                    convert - "$SM_BK_PNG" -gravity SouthEast -geometry +50+50 \
1307
-                    -composite "$WORK_DIR/submenu$((f+1))_template.jpg"
1308
+                    -resize $VIDSIZE\! miff:- | convert - $IMG_DEPTH \
1309
+                    "$SM_BK_PNG" -gravity SouthEast -geometry +50+50 \
1310
+                    -composite "$WORK_DIR/submenu$((f+1))_template.$SM_IMG_FMT"
1311
                 done
1312
             else
1313
                 convert  -size $VIDSIZE "$SM_BACKGROUND" \
1314
-                -resize $VIDSIZE\! miff:- |
1315
-                convert - "$SM_BK_PNG" -gravity SouthEast -geometry +50+50 \
1316
-                -composite "$WORK_DIR/submenu_template.jpg"
1317
+                -resize $VIDSIZE\! miff:- | convert - $IMG_DEPTH \
1318
+                "$SM_BK_PNG" -gravity SouthEast -geometry +50+50 \
1319
+                -composite "$WORK_DIR/submenu_template.$SM_IMG_FMT"
1320
             fi
1321
         else
1322
             convert  -size $VIDSIZE xc:$SUBMENU_BG_CLR miff:- |
1323
-            convert - "$SM_BK_PNG" -gravity SouthEast -geometry +50+50 \
1324
-            -composite "$WORK_DIR/submenu_template.jpg"
1325
+            convert - $IMG_DEPTH "$SM_BK_PNG" -gravity SouthEast -geometry +50+50 \
1326
+            -composite "$WORK_DIR/submenu_template.$SM_IMG_FMT"
1327
         fi
1328
         if  ((${#SM_BACKGROUND[@]} == 1)) || [[ -z ${SM_BACKGROUND[@]} ]]; then
1329
             for ((f=0; f<${#IN_FILES[@]}; f++)); do
1330
-                ln -s "$WORK_DIR/submenu_template.jpg" \
1331
-                "$WORK_DIR/submenu$((f+1))_template.jpg"
1332
-                SM_BACKGROUND[f]=$WORK_DIR/submenu$((f+1))_template.jpg
1333
+                ln -s "$WORK_DIR/submenu_template.$SM_IMG_FMT" \
1334
+                "$WORK_DIR/submenu$((f+1))_template.$SM_IMG_FMT"
1335
+                SM_BACKGROUND[f]=$WORK_DIR/submenu$((f+1))_template.$SM_IMG_FMT
1336
             done
1337
         fi
1338
     fi
1339
@@ -7142,7 +7343,9 @@
1340
             "$WORK_DIR/Submenu${s}_${button}.png"
1341
         done
1342
 
1343
-        # make submenu spumux.xml
1344
+##############################################################################
1345
+#                    Make xml files for spumux and dvdauthor                 #
1346
+##############################################################################
1347
 (
1348
     cat <<EOF
1349
 <subpictures>
1350
@@ -7402,7 +7605,7 @@
1351
     echo     "<?xml version=\"1.0\" encoding=\"utf-8\"?>"
1352
     echo     "<dvdauthor dest=\"$OUT_DIR\" jumppad=\"0\">"
1353
     echo -e  "  <vmgm>\n    <menus>"
1354
-    echo     "      <video aspect=\"4:3\"/>"
1355
+    echo     "      <video format=\"${TV_STANDARD}\" aspect=\"4:3\"/>"
1356
     echo     "      <pgc entry=\"title\" pause=\"0\">"
1357
     echo     "        $INTRO"
1358
     echo     "        <vob file=\"$WORK_DIR/dummy.mpg\"/>"
1359
@@ -7418,7 +7621,7 @@
1360
 fi)
1361
   <titleset>
1362
     <menus>
1363
-      <video aspect="4:3"/>
1364
+      <video format="${TV_STANDARD}" aspect="4:3"/>
1365
 $(for ((menu_num=1; menu_num<=NUM_MENUS; menu_num++)); do
1366
     echo -e "      <pgc>"
1367
     for ((i=1; i<=$V_TOTAL; i++)); do
1368
@@ -7676,7 +7879,7 @@
1369
 EOF
1370
 ) |sed '/^ *$/d' >> "$DVDAUTHOR_XML"
1371
 ##############################################################################
1372
-#                            Animenu stuff                                   #
1373
+#                            Make submenus                                   #
1374
 ##############################################################################
1375
 
1376
 # make dummy VMGM mpeg
1377
@@ -7772,23 +7975,30 @@
1378
             fi
1379
 
1380
             # which is harmless as they get removed, but needs to be tweaked
1381
+            if [ $SM_IMG_FMT = "jpg" ]; then
1382
+                sm_img_fmt="JPEGS"
1383
+            elif [ $SM_IMG_FMT = "png" ]; then
1384
+                sm_img_fmt="PNGS"
1385
+            else
1386
+                sm_img_fmt=${SM_IMG_FMT}s
1387
+            fi
1388
             if $ANI_SUB_MENU; then
1389
                 JPEG2YUV_OPTS=(-n $smframes)
1390
-                PICS_IN=($WORK_DIR/animenu/%0d.$SM_IMG_FMT)
1391
-                PICS_OUT=($WORK_DIR/animenu/)
1392
+                PICS_IN="$WORK_DIR/animenu/%0d.$SM_IMG_FMT"
1393
+                PICS_OUT="$WORK_DIR/animenu"
1394
                 CUT_TIME=$smframes
1395
-                JPEG_DIR="$WORK_DIR/animenu"
1396
+                IMG_DIR="$WORK_DIR/animenu"
1397
                 SLEEP=1
1398
-                TOTAL_JPEGS=$(($smframes * ${CHAPTERS[i]}))
1399
+                TOTAL_IMGS=$(($smframes * ${CHAPTERS[i]}))
1400
 
1401
             else  # not animated submenu
1402
                 JPEG2YUV_OPTS=(-n 1 -l ${SM_LOOPS[i]})
1403
-                PICS_IN=($WORK_DIR/${i}-submenu.$SM_IMG_FMT)
1404
-                PICS_OUT=($WORK_DIR/submenu/)
1405
+                PICS_IN="$WORK_DIR/${i}-submenu.$SM_IMG_FMT"
1406
+                PICS_OUT="$WORK_DIR/submenu"
1407
                 CUT_TIME=1
1408
-                JPEG_DIR="$WORK_DIR/submenu"
1409
+                IMG_DIR="$WORK_DIR/submenu"
1410
                 SLEEP=.5
1411
-                TOTAL_JPEGS=${CHAPTERS[i]}
1412
+                TOTAL_IMGS=${CHAPTERS[i]}
1413
                 PREFIX=${i}-
1414
             fi
1415
             if [[ -n ${GROUP[i]} ]]; then
1416
@@ -7850,10 +8060,12 @@
1417
                 unset cmd[key]
1418
             fi
1419
             yecho
1420
-            yecho "Creating $TOTAL_JPEGS chapter images for ${IN_FILES[i]}"
1421
+            yecho "Creating $TOTAL_IMGS chapter images for ${IN_FILES[i]}"
1422
             yecho
1423
             unset cf frm
1424
             for t in "${cmd[@]}"; do
1425
+                # warning to ignore transcode error messages
1426
+                print_tcode_info
1427
                 if [[ -n ${GROUP[i]} ]]; then
1428
                     CUR_FILE="${FILE_IN[cf++]}"
1429
                 else
1430
@@ -7865,53 +8077,68 @@
1431
                 else
1432
                     unset NAVSEEK NAVLOG
1433
                 fi
1434
-
1435
-                TCODE_CMD=(nice transcode $transcode_arg 10 \
1436
+                log_tmp="$PICS_OUT/log.tmp"
1437
+                yuv_fifo="$PICS_OUT/out.yuv"
1438
+                [[ ! -p "$yuv_fifo" ]] && mkfifo "$yuv_fifo"
1439
+                # resize using ffmpeg instead of transcode
1440
+                FFMPEG_CMD=(ffmpeg $PIPE_FORMAT -i "$yuv_fifo" \
1441
+                -f image2 -s ${GEO_ARRAY[C]} -y "$PICS_OUT/%06d.$SM_IMG_FMT")
1442
+                TCODE_CMD=(nice transcode --progress_rate 10 \
1443
                 --write_pid $WORK_DIR/tcode$i.pid -q 1 -i "$CUR_FILE" \
1444
-                $NAVSEEK "$NAVLOG" -o "${PICS_OUT[@]}" -f \
1445
-                $FRAME_RATE -Z ${GEO_ARRAY[C]},fast -c $t -y $SM_IMG_FMT,null)
1446
-                echo "Running ${TCODE_CMD[@]}" |
1447
-                sed 's/    */ /g'|sed -e "s/^ *//"|tee -a >> "$LOG_FILE"
1448
-                #sed 's/    */ /g'|sed -e "s/^ *//"|fold -bs >> "$LOG_FILE"
1449
-                echo >> "$LOG_FILE"
1450
-                run_transcode()
1451
-                {
1452
-                    "${TCODE_CMD[@]}" >> "$LOG_FILE"  2>&1
1453
-                    sleep 1
1454
-                }
1455
-                run_transcode &
1456
-                sleep 2 # short sleep to allow 1st jpg to appear
1457
+                $NAVSEEK "$NAVLOG" -o "$yuv_fifo" -f \
1458
+                $FRAME_RATE -c $t $EXPORT)
1459
+                yecho "Running ${TCODE_CMD[@]}" | fold -bs
1460
+                yecho "Running ${FFMPEG_CMD[@]}" | fold -bs
1461
+                "${TCODE_CMD[@]}"  2>&1 | strings >> "$LOG_FILE" &
1462
+                "${FFMPEG_CMD[@]}" > "$log_tmp" 2>&1 &
1463
+                ffm_pid=$!
1464
+                wait_for "$WORK_DIR/tcode$i.pid"
1465
                 TCODE_PID=$(<$WORK_DIR/tcode$i.pid)
1466
                 tcode_pids="$tcode_pids $TCODE_PID"
1467
-                check_stall $TCODE_PID &
1468
                 if [[ -n "$TCODE_PID" ]]; then
1469
-                    while ps -p $TCODE_PID >/dev/null; do
1470
-                        sleep $SLEEP # spinner interval
1471
-                        last_image=$(find "$JPEG_DIR" -maxdepth 1 -name \*.jpg |
1472
+                    while ps -p $ffm_pid >/dev/null; do
1473
+                        wait_for "$IMG_DIR/000001.$SM_IMG_FMT"
1474
+                        sleep 1 # spinner interval
1475
+                        end=$(find "$IMG_DIR" -maxdepth 1 -name \*.$SM_IMG_FMT |
1476
                         sort | awk -F / '{ field = $NF }; END{ print field }')
1477
-                        spin "Seeking in video and creating images: $last_image"
1478
+                        spin "Seeking in video and creating images: $end"
1479
                     done
1480
                     echo
1481
-                    total_images=$(find "$JPEG_DIR" -name '*.jpg' | wc -l)
1482
-                    echo "Created $total_images JPEGS of $TOTAL_JPEGS"
1483
+                    total_imgs=$(find "$IMG_DIR" -name "*.$SM_IMG_FMT" | wc -l)
1484
+                    wait
1485
+                    echo "Created $total_imgs $sm_img_fmt of $TOTAL_IMGS"
1486
                 else
1487
                     runtime_error "Problem creating images from the video."
1488
                 fi
1489
+                echo -e \
1490
+                "\n$ME Log from ffmpeg (processing transcode stream)\n" \
1491
+                >> "$LOG_FILE"
1492
+                strings "$log_tmp" >> "$LOG_FILE"
1493
+                rm -f "$log_tmp"
1494
                 unset TCODE_CMD cmd run_transcode
1495
                 if ! $ANI_SUB_MENU ; then
1496
                     echo
1497
-                    mv $WORK_DIR/submenu/000000.$SM_IMG_FMT \
1498
+                    mv $WORK_DIR/submenu/000001.$SM_IMG_FMT \
1499
                     $WORK_DIR/submenu/$(printf "%08d%s\n" $((frm++)) .$SM_IMG_FMT)
1500
                     let frm+=1
1501
                 elif $ANI_SUB_MENU; then
1502
                     echo "renaming images by frame number"
1503
                     echo
1504
                     u=${t/*-}; v=${t/-*}
1505
-                    for ((n=0; n<smframes; n++)); do
1506
+                    # names now start with 000001.  Rename starting at 000000.
1507
+                    for ((n=1; n<smframes+1; n++)); do
1508
                        # if [ $v -eq ${CUT[0]} ]; then
1509
-                        mv $WORK_DIR/animenu/$(printf "%06d%s\n" $n .jpg) \
1510
-                        $WORK_DIR/animenu/$(printf \
1511
-                        "%08d%s\n" $((frm++ )) .jpg)
1512
+                        curimage=$WORK_DIR/animenu/$(printf \
1513
+                        "%06d%s\n" $n .$SM_IMG_FMT)
1514
+                        lastimage=$WORK_DIR/animenu/$(printf \
1515
+                        "%06d%s\n" $((n-1)) .$SM_IMG_FMT)
1516
+                        nextimage=$WORK_DIR/animenu/$(printf \
1517
+                        "%08d%s\n" $((frm++ )) .$SM_IMG_FMT)
1518
+                        if [[ ! -e $curimage ]]; then
1519
+                            cp "$lastimage" "$nextimage"
1520
+                        else
1521
+                            mv "$curimage" "$nextimage"
1522
+                        fi
1523
                         let frm+=1
1524
                     done
1525
                 fi
1526
@@ -7965,7 +8192,7 @@
1527
                                 -composite "$WORK_DIR/animenu/$a/${f##*/}" ; } &
1528
                                 smpids="$smpids $!"
1529
                                 if ((num_procs==max_procs)); then
1530
-                                    wait $smpids
1531
+                                    wait $smpids 2>/dev/null
1532
                                     unset num_procs smpids
1533
                                 fi
1534
                                 # rm -f "$f"
1535
@@ -7986,7 +8213,7 @@
1536
 
1537
             if $ANI_SUB_MENU; then
1538
                 $DEBUG && stime=$(date +%s)
1539
-                TOYUV_CMD=(ppmtoy4m -v 0 -n $smframes -A 10:11 -F $YUV_FR -I p \
1540
+                TOYUV_CMD=(ppmtoy4m -v 0 -n $smframes -A $PIXEL_AR -F $YUV_FR -I p \
1541
                 -S 420mpeg2 -r)
1542
                 IMGENC_CMD=(ffmpeg -f yuv4mpegpipe -r $FRAME_RATE -i - -an \
1543
                 -r $FRAME_RATE -s $VIDSIZE -tvstd $TV_STANDARD $FFMPEG_OPTS \
1544
@@ -8022,8 +8249,8 @@
1545
                     IM_CMD1=(montage - -tile ${TILE_ARRAY[C]} \
1546
                     -geometry ${GEO_ARRAY[C]}+5+5 -bordercolor '#101010' \
1547
                     -mattecolor '#101010' -background none miff:-)
1548
-                    IM_CMD2=(convert -depth 8 \
1549
-                    $WORK_DIR/submenu$((i+1))_template.jpg \
1550
+                    IM_CMD2=(convert \
1551
+                    $WORK_DIR/submenu$((i+1))_template.$SM_IMG_FMT \
1552
                     $WORK_DIR/title${i}_txt.png  -gravity south \
1553
                     -geometry +0+55 -composite - -gravity north \
1554
                     -geometry +0+45 -composite "$out_ppm")
1555
@@ -8034,7 +8261,7 @@
1556
                     if ((num_procs==max_procs || a == smframes-1 )); then
1557
                         spin "\rProcessing frame $((a+1)) of $smframes  " >&2
1558
                         cat "${ppm_fifos[@]}"
1559
-                        wait $smpids
1560
+                        wait $smpids 2>/dev/null
1561
                         unset smpids num_procs ppm_fifos
1562
                     fi
1563
 
1564
@@ -8042,7 +8269,7 @@
1565
                 done > "$WORK_DIR/ppm.fifo"
1566
                 $DEBUG && etime=$(date +%s) && get_elapsed "the submenu m2v"
1567
 
1568
-                # wait for ppmtoyuv and ffmpeg to finish
1569
+                # wait for ppmtoy4m and ffmpeg to finish
1570
                 wait
1571
 
1572
                 unset IM_CMD IM_CMD2 d f P
1573
@@ -8070,10 +8297,10 @@
1574
                 -border $THUMB_FRAME_SIZE miff:-)
1575
                 IM_CMD1=(montage - -tile ${TILE_ARRAY[C]} -geometry \
1576
                 ${GEO_ARRAY[C]}+5+5 -background none miff:-)
1577
-                IM_CMD2=(convert $WORK_DIR/submenu$((i+1))_template.jpg \
1578
-                $WORK_DIR/title${i}_txt.png  -gravity south -geometry +0+55 \
1579
-                -composite - -gravity north -geometry +0+45 -composite \
1580
-                $WORK_DIR/${i}-submenu.$SM_IMG_FMT)
1581
+                IM_CMD2=(convert $WORK_DIR/submenu$((i+1))_template.$SM_IMG_FMT \
1582
+                $IMG_DEPTH $WORK_DIR/title${i}_txt.png  -gravity south \
1583
+                -geometry +0+55 -composite - -gravity north -geometry +0+45 \
1584
+                -composite $WORK_DIR/${i}-submenu.$SM_IMG_FMT)
1585
                 "${IM_CMD[@]}" | "${IM_CMD1[@]}" | "${IM_CMD2[@]}"
1586
             fi
1587
             if ! $ANI_SUB_MENU; then
1588
@@ -8081,14 +8308,15 @@
1589
                 yecho
1590
                 yecho "Converting chapter montage of ${IN_FILES[i]}
1591
                 to m2v video format"
1592
-                IMG_STREAM_CMD1=(jpeg2yuv -v 0 -f $FRAME_RATE -I p \
1593
-                "${JPEG2YUV_OPTS[@]}" -L 1 -b 1  -j "${PICS_IN[@]}")
1594
+                IMG_STREAM_CMD1=(convert "$PICS_IN" ppm:-)
1595
+                IMG_STREAM_CMD2=(ppmtoy4m -v 0 -n ${SM_LOOPS[i]} -A $PIXEL_AR -F $YUV_FR -I p \
1596
+                -S 420mpeg2 -r)
1597
                 ENC_CMD1=(ffmpeg -f yuv4mpegpipe -r $FRAME_RATE -i - \
1598
                 -r $FRAME_RATE -s $VIDSIZE -tvstd $TV_STANDARD $FFMPEG_OPTS \
1599
                 -y "$WORK_DIR/menu$i.m2v")
1600
-                echo "Running ${IMG_STREAM_CMD1[@]} | ${ENC_CMD1[@]}"|
1601
-                format_output | tee -a "$LOG_FILE" 2>&1
1602
-                if ! "${IMG_STREAM_CMD1[@]}" |
1603
+                echo "Running ${IMG_STREAM_CMD1[@]} | ${IMG_STREAM_CMD2[@]} | \
1604
+                ${ENC_CMD1[@]}"| format_output | tee -a "$LOG_FILE" 2>&1
1605
+                if ! "${IMG_STREAM_CMD1[@]}" | "${IMG_STREAM_CMD2[@]}" |
1606
                 "${ENC_CMD1[@]}" 2>&1|strings >> "$LOG_FILE"; then
1607
                     runtime_error
1608
                 fi
1609
@@ -8126,9 +8354,7 @@
1610
                     spin $SPINNER
1611
                 done
1612
                 echo
1613
-                #cp "$WORK_DIR/polaroid_stack.png"
1614
-                #ss_ind=$(awk -F[-.] '{print $2}' <<< "$sld")
1615
-                IM_CMD=(convert $WORK_DIR/submenu$((i+1))_template.jpg \
1616
+                IM_CMD=(convert $WORK_DIR/submenu$((i+1))_template.$SM_IMG_FMT \
1617
                 "$WORK_DIR/polaroid_stack.png" \
1618
                 -gravity north -geometry +0+45 -composite \
1619
                 $WORK_DIR/thumb_title${i}.png \
1620
@@ -8140,7 +8366,7 @@
1621
 
1622
                 # encode to m2v
1623
                 yecho "Encoding to compliant m2v video format"
1624
-                PPM_CMD=(ppmtoy4m -v 0 -n ${SM_LOOPS[i]} -A 10:11 -I p -F $YUV_FR \
1625
+                PPM_CMD=(ppmtoy4m -v 0 -n ${SM_LOOPS[i]} -A $PIXEL_AR -I p -F $YUV_FR \
1626
                 -S 420mpeg2 -r)
1627
                 FFM_CMD=(ffmpeg $INSIZE -r $FRAME_RATE -pix_fmt yuv420p \
1628
                 -f yuv4mpegpipe -i - -an -r $FRAME_RATE -s $VIDSIZE \
1629
@@ -8166,7 +8392,7 @@
1630
                 -y $WORK_DIR/submenu.wav)
1631
             elif [[ "${SM_AUDIO[s]}" = "none" ]]; then # user asked for silence
1632
                 SUBMENU_AUDIOLEN[s]=$(vid_length "$WORK_DIR/menu$s.m2v")
1633
-                BGAUDIO_CMD=(ffmpeg -f s16le -i /dev/zero $AUDIO_OPTS \
1634
+                BGAUDIO_CMD=(ffmpeg -f s16le -ar 48000 -i /dev/zero $AUDIO_OPTS \
1635
                 -t ${SUBMENU_AUDIOLEN[s]} -y $WORK_DIR/menu$s.$AUDIO_EXT)
1636
             else
1637
                 # SM_AUDIO[s] is an audio file we will process it
1638
@@ -8179,7 +8405,7 @@
1639
             fi
1640
         else # no supplied audio for submenu so create silence
1641
             SUBMENU_AUDIOLEN[s]=$(vid_length "$WORK_DIR/menu$s.m2v")
1642
-            BGAUDIO_CMD=(ffmpeg -f s16le -i /dev/zero $AUDIO_OPTS \
1643
+            BGAUDIO_CMD=(ffmpeg -f s16le -ar 48000 -i /dev/zero $AUDIO_OPTS \
1644
             -t ${SUBMENU_AUDIOLEN[s]} -y $WORK_DIR/menu$s.$AUDIO_EXT)
1645
         fi
1646
         # run if wav doesn't exist, or its a slideshow
1647
@@ -8249,16 +8475,26 @@
1648
     rm -fr $WORK_DIR/animenu/*
1649
 fi
1650
 ##############################################################################
1651
-#                      Work on main menu                                     #
1652
+#                              End of submenus                               #
1653
+##############################################################################
1654
+
1655
+##############################################################################
1656
+#                            Work on main menu                               #
1657
 ##############################################################################
1658
 if $DO_MENU; then
1659
     yecho
1660
     yecho "Building main menu"
1661
 fi
1662
 if [[ -n "$BG_VIDEO" ]] && ! $QUICK_MENU; then
1663
+    if $FAST_SEEK; then
1664
+        bg_pre_seek="-ss $BG_SEEK" && unset bg_post_seek
1665
+    else
1666
+        bg_post_seek="-ss $BG_SEEK" && unset bg_pre_seek
1667
+    fi
1668
     yecho "Getting background video from $BG_VIDEO"
1669
-    FFMPEG_CMD=(ffmpeg -ss $BG_SEEK -i "$BG_VIDEO" -vframes $BG_VIDEO_FRAMES \
1670
-    -s $VIDSIZE -sameq "$WORK_DIR/bg/%d.jpg")
1671
+    FFMPEG_CMD=(ffmpeg $bg_pre_seek -i "$BG_VIDEO" -an $bg_post_seek \
1672
+    -vframes $BG_VIDEO_FRAMES -s $VIDSIZE  -f image2 \
1673
+    -y "$WORK_DIR/bg/%d.$IMG_FMT")
1674
     yecho "Extracting/resizing background images"
1675
     echo "Running: ${FFMPEG_CMD[@]}" | format_output >> "$LOG_FILE"
1676
     # Run command and check for failure
1677
@@ -8267,19 +8503,23 @@
1678
     fi
1679
     # make sure there are enough pics to make a bg video
1680
     IMAGES=( "${IMAGES[@]}" \
1681
-    $(find $WORK_DIR/bg -maxdepth 1 -name \*[1-9]\*.jpg|sort) )
1682
+    $(find $WORK_DIR/bg -maxdepth 1 -name \*[1-9]\*.$IMG_FMT | sort) )
1683
     last_pic=${#IMAGES[@]}
1684
     num_bgpics=$last_pic
1685
     next_pic=$(($last_pic + 1))
1686
     if [ $last_pic -lt $MAX_MENU_LEN ]; then
1687
         for ((l=next_pic; l<=MAX_MENU_LEN; l++)); do
1688
-            cp $WORK_DIR/bg/${last_pic}.jpg $WORK_DIR/bg/$l.jpg
1689
+            cp $WORK_DIR/bg/${last_pic}.$IMG_FMT $WORK_DIR/bg/$l.$IMG_FMT
1690
         done
1691
     fi
1692
     unset IMAGES PICS last_pic next_pic
1693
 fi
1694
 if [[ -n "$SHOWCASE_VIDEO" ]] && $SC_THUMB; then
1695
-    echo "Getting showcase video images from $SHOWCASE_VIDEO"
1696
+    if $SWITCHED && $USER_THUMBS; then
1697
+        echo "Using supplied image for showcased thumb"
1698
+    else
1699
+        echo "Getting showcase video images from $SHOWCASE_VIDEO"
1700
+    fi
1701
     if [ "$SC_FRAMESTYLE" = "glass" ]; then
1702
         # some vars for get_framed_pics()
1703
         D=2
1704
@@ -8298,23 +8538,33 @@
1705
         else
1706
             FFMPEG_SEEK_VAL=$SHOWCASE_SEEK_VAL
1707
         fi
1708
+        if $FAST_SEEK; then
1709
+            ffm_pre_seek="-ss $FFMPEG_SEEK_VAL" && unset ffm_post_seek
1710
+        else
1711
+            ffm_post_seek="-ss $FFMPEG_SEEK_VAL" && unset ffm_pre_seek
1712
+        fi
1713
+        if $SWITCHED && $USER_THUMBS; then
1714
+            #convert ${USER_PICS[MENU_NUM-1]} -resize $SHOWCASE_SIZE \
1715
+            cp "$WORK_DIR/showcase_img.png" "$WORK_DIR/showcase/000001.png"
1716
+        else
1717
+            FFMPEG_CMD=(ffmpeg $ffm_pre_seek -i "$SHOWCASE_VIDEO" -s \
1718
+            $SHOWCASE_SIZE -vframes $FRAMES -an $ffm_post_seek -f image2 \
1719
+            -y "$WORK_DIR/showcase/%06d.png")
1720
+            echo -e "\nRunning: "${FFMPEG_CMD[@]}"\n" | fold -bs >> "$LOG_FILE"
1721
+            SED_VAR="frame="
1722
+            "${FFMPEG_CMD[@]}" >> "$LOG_FILE.tmp" 2>&1 &
1723
+            ffm_pid=$!
1724
+            while ps -p $ffm_pid >/dev/null; do
1725
+                sleep 1
1726
+                spin $SPINNER
1727
+            done
1728
+            wait $ffm_pid
1729
+            (($?)) && runtime_error "Problem creating images from the video."
1730
 
1731
-        FFMPEG_CMD=(ffmpeg -ss $FFMPEG_SEEK_VAL -i "$SHOWCASE_VIDEO" -s \
1732
-        $SHOWCASE_SIZE -vframes $FRAMES -an -y "$WORK_DIR/showcase/%06d.png")
1733
-        echo -e "\nRunning: "${FFMPEG_CMD[@]}"\n" | fold -bs >> "$LOG_FILE"
1734
-        SED_VAR="frame="
1735
-        "${FFMPEG_CMD[@]}" >> "$LOG_FILE.tmp" 2>&1 &
1736
-        ffm_pid=$!
1737
-        while ps -p $ffm_pid >/dev/null; do
1738
-            sleep 1
1739
-            spin $SPINNER
1740
-        done
1741
-        wait $ffm_pid
1742
-        (($?)) && runtime_error "Problem creating images from the video."
1743
-
1744
-        strings "$LOG_FILE.tmp" >> "$LOG_FILE"
1745
-        rm -f "$LOG_FILE.tmp"
1746
-        echo
1747
+            strings "$LOG_FILE.tmp" >> "$LOG_FILE"
1748
+            rm -f "$LOG_FILE.tmp"
1749
+            echo
1750
+        fi
1751
     fi
1752
     for ((i=FIRST_PIC; i<LAST_PIC; i++)); do
1753
         SC_PICS=( ${SC_PICS[@]} $(find $WORK_DIR/showcase -maxdepth 1 \
1754
@@ -8364,14 +8614,14 @@
1755
                 else
1756
                     { convert -size $SHOWCASE_SIZE "$pic" $SC_RAISE miff:- |
1757
                     convert - $SHOWCASE_FRAME -background none $ROTATE $WAVE miff:- |
1758
-                    convert - -$QUALITY  resize ${SHOWCASE_SIZE}! "$pic"  ; } \
1759
+                    convert - $QUALITY  resize ${SHOWCASE_SIZE}! "$pic"  ; } \
1760
                       2>> "$LOG_FILE" &
1761
                 fi
1762
             fi
1763
             impids="$impids $!"
1764
             if ((num_procs==max_procs || p >= (${#SC_PICS[@]}-1) )); then
1765
                 spin "\rProcessing frame $this_pic of $LAST_PIC  "
1766
-                wait $impids
1767
+                wait $impids 2>/dev/null
1768
                 unset impids num_procs
1769
             fi
1770
         done
1771
@@ -8582,7 +8832,6 @@
1772
     PPM_LOOPS=$LOOPS
1773
 fi
1774
 if ! $QUICK_MENU && $DO_MENU; then
1775
-    PIPE_FORMAT="-pix_fmt yuv420p -f yuv4mpegpipe"
1776
     $STATIC && INSIZE="-s $VIDSIZE"
1777
     echo
1778
     echo \
1779
@@ -8595,7 +8844,7 @@
1780
         echo ${ANIMENU_ENDFRAME} ${THUMBS_FADEOUT_STARTFRAME}) )
1781
     (( ${fadevals[0]} > ${fadevals[1]} )) && $MENU_FADE && \
1782
         PPM_FRAMES=$((PPM_FRAMES+18))
1783
-    TOYUV_CMD=(ppmtoy4m -v 2 -n $PPM_FRAMES -A 10:11 -I p -F $YUV_FR \
1784
+    TOYUV_CMD=(ppmtoy4m -v 2 -n $PPM_FRAMES -A $PIXEL_AR -I p -F $YUV_FR \
1785
     -S 420mpeg2 -r)
1786
     IMGENC_CMD=(ffmpeg $INSIZE -r $FRAME_RATE $PIPE_FORMAT -i - -an \
1787
     -r $FRAME_RATE -s $VIDSIZE -tvstd $TV_STANDARD $FFMPEG_OPTS \
1788
@@ -8626,7 +8875,7 @@
1789
     if [ -z "$BG_VIDEO" ]; then
1790
         for ((frame=0; frame<=ANIMENU_ENDFRAME; frame++)); do
1791
             # copy template for fade out beginning and end frames
1792
-            cp $WORK_DIR/pics/template.jpg $WORK_DIR/bg/$(($frame + 1)).jpg
1793
+            cp $WORK_DIR/pics/template1.png $WORK_DIR/bg/$(($frame + 1)).png
1794
         done
1795
     fi
1796
     unset bgfade_pids num_procs
1797
@@ -8634,11 +8883,11 @@
1798
         ((num_procs++))
1799
         D=`get_bg_opacity`
1800
         composite -dissolve $D \
1801
-        $WORK_DIR/bg/$(($frame + 1)).jpg $WORK_DIR/black.ppm \
1802
-        $WORK_DIR/bg/$(($frame + 1)).jpg &
1803
+        $WORK_DIR/bg/$(($frame + 1)).png $WORK_DIR/black.ppm \
1804
+        $WORK_DIR/bg/$(($frame + 1)).png &
1805
         bgfade_pids="$bgfade_pids $!"
1806
         if ((num_procs >= max_procs || frame == BG_FADEIN_ENDFRAME)); then
1807
-            wait $bgfade_pids
1808
+            wait $bgfade_pids 2>/dev/null
1809
             unset bgfade_pids num_procs
1810
         fi
1811
     done
1812
@@ -8646,8 +8895,8 @@
1813
     for ((frame=BG_FADEOUT_STARTFRAME; frame<=BG_FADEOUT_ENDFRAME; frame++)); do
1814
         #((num_procs++))
1815
         D=`get_bg_opacity`
1816
-        composite -dissolve $D $WORK_DIR/bg/$frame.jpg \
1817
-        $WORK_DIR/black.ppm $WORK_DIR/bg/$frame.jpg
1818
+        composite -dissolve $D $WORK_DIR/bg/$frame.$IMG_FMT \
1819
+        $WORK_DIR/black.ppm $WORK_DIR/bg/$frame.$IMG_FMT
1820
         #bgfade_pids="$bgfade_pids $!"
1821
         #if ((num_procs >= max_procs || frame == BG_FADEOUT_ENDFRAME)); then
1822
         #    wait $bgfade_pids
1823
@@ -8686,7 +8935,7 @@
1824
         fi
1825
         $TEXTMENU && unset sc_cmd
1826
         ! $TEXTMENU && MOSAIC="-mosaic"
1827
-        BG_PIC=$(find $WORK_DIR/bg -name $((frame + 1)).jpg)
1828
+        BG_PIC=$(find $WORK_DIR/bg -name $((frame + 1)).$IMG_FMT)
1829
         # create the montage from the images in each video dir
1830
         MONTAGE_CMD=(convert  -size $VIDSIZE -background none \
1831
         ${sc_cmd[@]} $SC_IMG_CMD $MOSAIC)
1832
@@ -8700,10 +8949,10 @@
1833
         -geometry ${THUMB_SIZE}${MTG_GEO} -background none)
1834
         #  dissolve the finished montages onto the background
1835
         MONTAGE_CMD2=(composite -dissolve $S -gravity $BUTTON_GRAVITY \
1836
-        -geometry +${XGEO}+${YGEO} - $WORK_DIR/bg/$((frame + 1)).jpg \
1837
+        -geometry +${XGEO}+${YGEO} - $WORK_DIR/bg/$((frame + 1)).$IMG_FMT \
1838
         -background none)
1839
         MONTAGE_CMD2c=(composite -size $VIDSIZE -background none \
1840
-        -gravity NorthWest  -dissolve $S - $WORK_DIR/bg/$((frame + 1)).jpg \
1841
+        -gravity NorthWest  -dissolve $S - $WORK_DIR/bg/$((frame + 1)).$IMG_FMT \
1842
         -background none)
1843
         # if MIST is called for, this dissolves the mist onto the background
1844
         MONTAGE_CMD3=(composite -dissolve $B -gravity $TITLE_GRAVITY \
1845
@@ -8842,7 +9091,7 @@
1846
             fi
1847
         fi
1848
         impids="$impids $!"
1849
-        rmpics+=( "$WORK_DIR/bg/$((frame+1)).jpg" )
1850
+        rmpics+=( "$WORK_DIR/bg/$((frame+1)).$IMG_FMT" )
1851
         rmpics+=( "$WORK_DIR"/showcase/$(printf "%06d%s"  $(($frame + 1)) .png) )
1852
         # we reuse thumbs for static so don't rm ANI_PICS
1853
         ! $STATIC && rmpics+=( "${ANI_PICS[@]}" )
1854
@@ -8852,7 +9101,7 @@
1855
         if ((num_procs==max_procs || frame >= ANIMENU_ENDFRAME-1)) && $cat_fifos; then
1856
             spin  "\rProcessing frame $(($frame + 1))  " >&2
1857
             cat "${ppm_fifos[@]}"
1858
-            wait $impids
1859
+            wait $impids 2>/dev/null
1860
             rm -f "${rmpics[@]}"
1861
             unset num_procs ppm_fifos impids rmpics
1862
         fi
1863
@@ -8893,8 +9142,8 @@
1864
             $WORK_DIR/pics/template.png)
1865
             # dissolve piped images onto bgvideo
1866
             IM_CMD03=(composite -size $VIDSIZE -background none \
1867
-            -gravity NorthWest  -dissolve $OPACITY - $WORK_DIR/bg/$count.jpg \
1868
-            -background none)
1869
+            -gravity NorthWest  -dissolve $OPACITY - \
1870
+            $WORK_DIR/bg/$count.$IMG_FMT -background none)
1871
             # dissolve titles onto bgvideo
1872
             IM_CMD04=(convert -size $VIDSIZE -background none \
1873
              - ${sc_thumb_title_cmd[@]} -mosaic)
1874
@@ -8904,14 +9153,14 @@
1875
             -geometry ${THUMB_SIZE}${MTG_GEO} -background none miff:-)
1876
             IM_CMD2=(composite -dissolve $OPACITY \
1877
             -gravity $BUTTON_GRAVITY -geometry +${XGEO}+${YGEO} - \
1878
-            $WORK_DIR/pics/template.jpg -background none miff:-)
1879
+            $WORK_DIR/pics/template1.png -background none miff:-)
1880
             IM_CMD2b=(composite -dissolve $OPACITY \
1881
             -gravity $BUTTON_GRAVITY -geometry +${XGEO}+${YGEO} - \
1882
-            $WORK_DIR/bg/$count.jpg -background none miff:-)
1883
+            $WORK_DIR/bg/$count.$IMG_FMT -background none miff:-)
1884
             IM_CMD3=(composite -dissolve 30 -gravity $TITLE_GRAVITY \
1885
             -geometry ${mist_xoffset}${mist_yoffset} \
1886
             $WORK_DIR/white.png - miff:-)
1887
-            IM_CMD4=(convert -depth 8 - $WORK_DIR/title_txt.png -gravity \
1888
+            IM_CMD4=(convert - -depth 8 $WORK_DIR/title_txt.png -gravity \
1889
             $TITLE_GRAVITY -geometry ${title_xoffset}${title_yoffset} \
1890
             -composite "${ADD_RTN_BTN[@]}" "${ADD_PLAYALL_BTN[@]}" \
1891
             "$out_ppm" )
1892
@@ -8983,12 +9232,12 @@
1893
             impids="$impids $!"
1894
             # remove images after they are used each cat run
1895
             rmpics+=( "$WORK_DIR"/showcase/$(printf "%06d%s"  $count .png) )
1896
-            rmpics+=( "$WORK_DIR/bg/$count.jpg" )
1897
+            rmpics+=( "$WORK_DIR/bg/$count.$IMG_FMT" )
1898
             # we reuse thumbs for static so don't rm ANI_PICS
1899
             ! $STATIC && rmpics+=( "${ANI_PICS[@]}" )
1900
             if ((num_procs==max_procs || count >= FRAMES)); then
1901
                 cat "${ppm_fifos[@]}"
1902
-                wait $impids
1903
+                wait $impids 2>/dev/null
1904
                 rm -f "${rmpics[@]}"
1905
                 unset num_procs ppm_fifos impids rmpics
1906
                 # remove now unneeded images to keep disc usage low
1907
@@ -9015,10 +9264,10 @@
1908
             # make final montages and composite onto grey background with title
1909
             IM_CMD0=(montage ${ANI_PICS[@]} -tile ${TILE_ARRAY[NUM_FILES]} \
1910
             -geometry ${THUMB_SIZE}${MTG_GEO} -background none miff:-)
1911
-            IM_CMD1=(convert $WORK_DIR/pics/template.jpg \
1912
+            IM_CMD1=(convert $WORK_DIR/pics/template1.png \
1913
             -  -gravity $BUTTON_GRAVITY -geometry +${XGEO}+${YGEO} \
1914
             -composite miff:-)
1915
-            IM_CMD2=(convert $WORK_DIR/bg/$count.jpg \
1916
+            IM_CMD2=(convert $WORK_DIR/bg/$count.$IMG_FMT \
1917
             -  -gravity $BUTTON_GRAVITY -geometry +${XGEO}+${YGEO} \
1918
             -composite miff:-)
1919
             IM_CMD3=(composite -dissolve 30 -gravity $TITLE_GRAVITY -geometry \
1920
@@ -9047,12 +9296,12 @@
1921
                 fi
1922
             fi
1923
             impids="$impids $!"
1924
-            rmpics+=( "$WORK_DIR/bg/$count.jpg" )
1925
+            rmpics+=( "$WORK_DIR/bg/$count.$IMG_FMT" )
1926
             # static reuses the thumbs so don't rm each cat run
1927
             ! $STATIC && rmpics+=( "${ANI_PICS[@]}" )
1928
             if ((num_procs==max_procs || count >= FRAMES)); then
1929
                 cat "${ppm_fifos[@]}"
1930
-                wait $impids
1931
+                wait $impids 2>/dev/null
1932
                 rm -f "${rmpics[@]}"
1933
                 unset num_procs ppm_fifos impids rmpics
1934
             fi
1935
@@ -9066,7 +9315,7 @@
1936
 if ! $QUICK_MENU && $DO_MENU; then
1937
     echo
1938
     echo "Cleaning up montage images"
1939
-    rm -f $WORK_DIR/animenu/*.jpg
1940
+    rm -f $WORK_DIR/animenu/*.$IMG_FMT
1941
     rm -f $WORK_DIR/animenu/*.png
1942
 fi
1943
 # check if m2v was created ok before proceeding
1944
@@ -9131,8 +9380,6 @@
1945
 unset BGAUDIO_CMD TIME
1946
 
1947
 # convert to proper audio format
1948
-# temporarily have to use mp2enc for svcd as ffmpeg broken FIXME
1949
-# see r2162 todisc or older for how to fix this block when ffmpeg is fixed
1950
 BGAUDIO_CMD=(ffmpeg -i $WORK_DIR/intro.wav \
1951
 $AUDIO_OPTS -y $WORK_DIR/intro.$AUDIO_EXT)
1952
 yecho "Running "${BGAUDIO_CMD[@]}"" | fold -bs >> "$LOG_FILE"
1953
@@ -9209,9 +9456,7 @@
1954
     strings "$LOG_FILE.tmp" >> "$LOG_FILE" && rm -f "$LOG_FILE.tmp"
1955
 fi
1956
 echo "Cleaning up unwanted files in $REAL_WORK_DIR"
1957
-#find "$WORK_DIR"/ -name '*.png' ! -name Highlight.png ! -name Select.png \
1958
-#-exec rm -f {} \; > /dev/null 2>&1
1959
-find "$WORK_DIR"/ -name '*.jpg' ! -name preview.jpg -exec rm -f {} \; \
1960
+find "$WORK_DIR"/ -name '*.$IMG_FMT' ! -name preview.$IMG_FMT -exec rm -f {} \; \
1961
 > /dev/null 2>&1
1962
 rm -fr "$WORK_DIR/animenu" "$WORK_DIR/pics" "$WORK_DIR/submenu"
1963
 $VMGM_ONLY && $KEEP_FILES && mv -v "$REAL_WORK_DIR" "$BASEDIR"/VMGM
1964
tovid-0.33.tar.bz2/src/tovid -> tovid-0.34.tar.bz2/src/tovid Changed
290
 
1
@@ -22,6 +22,13 @@
2
     gui         Start the tovid GUI                         todiscgui
3
     mpg         Encode videos to MPEG format                tovid
4
     titlesets   Start the titleset wizard                   (new)
5
+    chapters    Set video chapter points with mplayer       (new)
6
+
7
+The following general options are also available:
8
+    --prefix | -prefix      Return the tovid install prefix
9
+    --version | -version    Return the tovid version
10
+    --info | -info          Return prefix, version and python module search path
11
+    These options are to be used on their own, as in:  tovid --prefix
12
 
13
 Run 'tovid <command>' with no further arguments to get help on a command,
14
 and what arguments it expects.
15
@@ -30,6 +37,7 @@
16
 import sys
17
 import os
18
 import subprocess
19
+import signal
20
 import time
21
 import shlex
22
 import shutil
23
@@ -47,61 +55,144 @@
24
     'gui': 'todiscgui',
25
     'mpg': 'makempg',
26
     'batch': 'tovid-batch',
27
-    'titlesets': 'make_titlesets',
28
+    'titlesets': 'titleset-wizard',
29
+    'chapters': 'set_chapters',
30
 }
31
 
32
 
33
-def get_script_dir(tovid_path):
34
-    """Get the full path to the directory where tovid's executable scripts are.
35
-    """
36
-    # Determine the prefix where tovid is installed
37
-    tovid_path = os.path.abspath(tovid_path)
38
-    bin_dir = os.path.dirname(tovid_path)
39
-    prefix = os.path.dirname(bin_dir)
40
-    # Prepend the script directory /$PREFIX/lib/tovid/ to $PATH,
41
-    # so executables in there can be run without an absolute pathname
42
-    script_dir = os.path.join(prefix, 'lib', 'tovid')
43
-    return script_dir
44
-
45
-
46
-def install_tovid_ini(script_dir):
47
-    """If tovid.ini doesn't exist in user's home directory,
48
-    copy the one from script_dir.
49
-    """
50
-    # If for some reason the default tovid.ini doesn't exist, return
51
-    default_tovid_ini = os.path.join(script_dir, 'tovid.ini')
52
-    if not os.path.exists(default_tovid_ini):
53
-        return
54
-
55
-    # Create ~/.tovid if it doesn't exist already
56
-    user_tovid_dir = os.path.expanduser('~/.tovid')
57
-    if not os.path.exists(user_tovid_dir):
58
-        print("Creating '%s'" % user_tovid_dir)
59
-        os.mkdir(user_tovid_dir)
60
-
61
-    # Copy default tovid.ini to ~/.tovid if it doesn't exist already
62
-    user_tovid_ini = os.path.join(user_tovid_dir, 'tovid.ini')
63
-    if not os.path.exists(user_tovid_ini):
64
-        print("Creating '%s'" % user_tovid_ini)
65
-        shutil.copy(default_tovid_ini, user_tovid_ini)
66
-
67
-
68
-def get_config_options(command):
69
-    """Return any options found in ~/.tovid/tovid.ini for the given command.
70
-    """
71
-    # Parse the user's tovid.ini file
72
-    filename = os.path.expanduser('~/.tovid/tovid.ini')
73
-    config = ConfigParser()
74
-    config.read(filename)
75
-    # If no [command] section exists, or if there's no 'options' setting,
76
-    # return an empty list.
77
-    if command not in config.sections():
78
-        return []
79
-    elif 'options' not in config.options(command):
80
-        return []
81
-    # Otherwise, get the 'options' setting from the [command] section,
82
-    # and split into a list of individual options using shell syntax
83
-    else:
84
+class Frontend:
85
+    def __init__(self, args):
86
+        # Set attributes
87
+        self.path = os.path.abspath(args.pop(0))
88
+        self.prefix = self.get_prefix(self.path)
89
+        self.script_dir = os.path.join(self.prefix, 'lib', 'tovid')
90
+        self.version = self.get_version()
91
+        # Handle any special options
92
+        self.parse_options(args)
93
+        # Setup and run the command
94
+        self.install_tovid_ini()
95
+        self.run_command(args)
96
+
97
+
98
+    def get_prefix(self, script_path):
99
+        """Get the path prefix where tovid is installed (/usr or /usr/local).
100
+        """
101
+        # Determine the prefix where tovid is installed
102
+        bin_dir = os.path.dirname(script_path)
103
+        return os.path.dirname(bin_dir)
104
+
105
+
106
+    def get_version(self):
107
+        """Return the tovid version string.
108
+        """
109
+        tovid_init = self.script_dir + '/tovid-init'
110
+        cmd = shlex.split("bash -c '. %s && printf $TOVID_VERSION'" % tovid_init)
111
+        return subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]
112
+
113
+
114
+    def parse_options(self, args):
115
+        """Parse and handle any command-line options at the beginning of args.
116
+        The args list is modified in place.
117
+        """
118
+        while args and args[0].startswith('-'):
119
+            arg = args.pop(0)
120
+
121
+            if arg in ['-prefix', '--prefix']:
122
+                print self.prefix
123
+                sys.exit(0)
124
+
125
+            elif arg in ['-version', '--version']:
126
+                print self.version
127
+                sys.exit(0)
128
+
129
+            elif arg in ['-info', '--info']:
130
+                print("tovid version: %s" % self.version)
131
+                print("tovid prefix: %s" % self.prefix)
132
+                print("tovid script directory: %s" % self.script_dir)
133
+                print("python library path:")
134
+                print('  ' + '\n  '.join(sys.path))
135
+                sys.exit(0)
136
+
137
+
138
+    def run_command(self, args):
139
+        """Run the command in the first element of args, passing any additional
140
+        arguments found after that.
141
+        """
142
+        if not args:
143
+            return
144
+
145
+        os.environ['PATH'] = self.script_dir + os.pathsep + os.environ['PATH']
146
+
147
+        command = args.pop(0)
148
+        if command not in _scripts:
149
+            print(usage)
150
+            print("Unknown command: '%s'" % command)
151
+            sys.exit(1)
152
+
153
+        # Get the script name for the given command
154
+        script = _scripts[command]
155
+
156
+        # Ensure that the script exists in self.script_dir
157
+        # (Should never happen if installer is configured correctly)
158
+        script_path = os.path.join(self.script_dir, script)
159
+        if not os.path.exists(script_path):
160
+            print("ERROR: Missing script: '%s'" % script)
161
+            sys.exit(1)
162
+
163
+        # Get any options found in tovid.ini
164
+        ini_args = self.get_config_options(command)
165
+
166
+        # Summon the script and catch keyboard interruptions
167
+        try:
168
+            proc = subprocess.Popen([script] + ini_args + args)
169
+            proc.wait()
170
+        except KeyboardInterrupt:
171
+            print("\n!!! tovid was manually interrupted. Exiting.")
172
+            os.kill(proc.pid, signal.SIGTERM)
173
+            # Sleep a second to let the script clean up
174
+            time.sleep(1)
175
+            sys.exit(1)
176
+        else:
177
+            sys.exit(proc.returncode)
178
+
179
+
180
+    def install_tovid_ini(self):
181
+        """If tovid.ini doesn't exist in user's home directory,
182
+        copy the one from self.script_dir.
183
+        """
184
+        # If for some reason the default tovid.ini doesn't exist, return
185
+        default_tovid_ini = os.path.join(self.script_dir, 'tovid.ini')
186
+        if not os.path.exists(default_tovid_ini):
187
+            return
188
+
189
+        # Create ~/.tovid if it doesn't exist already
190
+        user_tovid_dir = os.path.expanduser('~/.tovid')
191
+        if not os.path.exists(user_tovid_dir):
192
+            print("Creating '%s'" % user_tovid_dir)
193
+            os.mkdir(user_tovid_dir)
194
+
195
+        # Copy default tovid.ini to ~/.tovid if it doesn't exist already
196
+        user_tovid_ini = os.path.join(user_tovid_dir, 'tovid.ini')
197
+        if not os.path.exists(user_tovid_ini):
198
+            print("Creating '%s'" % user_tovid_ini)
199
+            shutil.copy(default_tovid_ini, user_tovid_ini)
200
+
201
+
202
+    def get_config_options(self, command):
203
+        """Return any options found in ~/.tovid/tovid.ini for the given command.
204
+        """
205
+        # Parse the user's tovid.ini file
206
+        filename = os.path.expanduser('~/.tovid/tovid.ini')
207
+        config = ConfigParser()
208
+        config.read(filename)
209
+        # If no [command] section exists, or if there's no 'options' setting,
210
+        # return an empty list.
211
+        if command not in config.sections():
212
+            return []
213
+        if 'options' not in config.options(command):
214
+            return []
215
+        # Otherwise, get the 'options' setting from the [command] section,
216
+        # and split into a list of individual options using shell syntax
217
         options = config.get(command, 'options')
218
         options = shlex.split(options)
219
         print("Read options from %s:" % filename)
220
@@ -109,68 +200,10 @@
221
         return options
222
 
223
 
224
-def main(args):
225
-    # Get the script directory
226
-    script_dir = get_script_dir(args.pop(0))
227
-    os.environ['PATH'] = script_dir + os.pathsep + os.environ['PATH']
228
-
229
-    # Install tovid.ini if necessary
230
-    install_tovid_ini(script_dir)
231
-
232
-    # Get the command name
233
-    command = args.pop(0)
234
-
235
-    # Check whether command is a special argument
236
-    if command in ['-prefix', '--prefix']:
237
-        print script_dir
238
-        sys.exit(0)
239
-
240
-    elif command in ['-version', '--version']:
241
-        from subprocess import Popen, PIPE
242
-        import shlex
243
-        tovid_init = script_dir + '/tovid-init'
244
-        cmd = shlex.split("sh -c '. %s && printf $TOVID_VERSION'" % tovid_init)
245
-        print Popen(cmd, stdout=PIPE).communicate()[0]
246
-        sys.exit(0)
247
-
248
-    # If command is not in the known scripts, exit with a usage error
249
-    elif command not in _scripts:
250
-        print(usage)
251
-        print("Unknown command: '%s'" % command)
252
-        sys.exit(1)
253
-
254
-    # Get the script name for the given command
255
-    script = _scripts[command]
256
-
257
-    # Ensure that the script exists in script_dir
258
-    # (Should never happen if installer is configured correctly)
259
-    script_path = os.path.join(script_dir, script)
260
-    if not os.path.exists(script_path):
261
-        print("DEBUG: Missing script: '%s'" % script)
262
-        sys.exit(1)
263
-
264
-    # Get any options found in tovid.ini
265
-    ini_args = get_config_options(command)
266
-
267
-    # Summon the script and catch keyboard interruptions
268
-    try:
269
-        proc = subprocess.Popen([script] + ini_args + args)
270
-        proc.wait()
271
-    except KeyboardInterrupt:
272
-        print("\n!!! tovid was manually interrupted. Exiting.")
273
-        proc.kill()
274
-        # Sleep a second to let the script clean up
275
-        time.sleep(1)
276
-        sys.exit(1)
277
-    else:
278
-        sys.exit(proc.returncode)
279
-
280
-
281
 if __name__ == '__main__':
282
     if len(sys.argv) < 2:
283
         print(usage)
284
         sys.exit()
285
     else:
286
-        main(sys.argv)
287
-
288
+        tovid = Frontend(sys.argv)
289
 
290
tovid-0.33.tar.bz2/src/tovid-batch -> tovid-0.34.tar.bz2/src/tovid-batch Changed
10
 
1
@@ -87,7 +87,7 @@
2
     if test -e "$FILE"; then
3
        EXT=$(echo "$FILE" | awk -F '.' '{ print $NF }')
4
        FILENAME=$(basename "$FILE" ."$EXT")
5
-       TOVID_CMD="tovid -noask $TOVID_ARGS -in \"$FILE\" -out \"$FILENAME.tovid_encoded\""
6
+       TOVID_CMD="tovid mpg -noask $TOVID_ARGS -in \"$FILE\" -out \"$FILENAME.tovid_encoded\""
7
        precho $TOVID_CMD
8
        eval $TOVID_CMD
9
     else
10
tovid-0.33.tar.bz2/src/tovid-init -> tovid-0.34.tar.bz2/src/tovid-init Changed
18
 
1
@@ -45,7 +45,7 @@
2
 #set -u
3
 
4
 # Suite version
5
-TOVID_VERSION="0.33"
6
+TOVID_VERSION="0.34"
7
 
8
 # String used to separate blocks of output
9
 SEPARATOR="========================================================="
10
@@ -432,6 +432,7 @@
11
     IFS=$OIFS
12
     for i in ${!test_version[@]}; do
13
         [[ -z ${version[i]} ]] && version[i]=0
14
+       (( ${version[i]} > ${test_version[i]} )) && return 0
15
        (( ${version[i]} < ${test_version[i]} )) && return 1
16
     done
17
     return 0
18
tovid-0.33.tar.bz2/src/tovid-init.in -> tovid-0.34.tar.bz2/src/tovid-init.in Changed
9
 
1
@@ -432,6 +432,7 @@
2
     IFS=$OIFS
3
     for i in ${!test_version[@]}; do
4
         [[ -z ${version[i]} ]] && version[i]=0
5
+       (( ${version[i]} > ${test_version[i]} )) && return 0
6
        (( ${version[i]} < ${test_version[i]} )) && return 1
7
     done
8
     return 0
9
tovid-0.34.tar.bz2/titleset-wizard.desktop Added
15
 
1
@@ -0,0 +1,13 @@
2
+[Desktop Entry]
3
+Name=tovid titleset wizard
4
+Type=Application
5
+Exec=tovid titlesets
6
+Icon=titleset-wizard
7
+Terminal=false
8
+GenericName=DVD creation with multiple menus
9
+GenericName[en_US]=DVD creation with multiple menus
10
+Comment=Author videos to DVD with multiple menus
11
+Comment[en_US]=Author videos to DVD with multiple menus
12
+Categories=AudioVideo;Video;
13
+StartupNotify=true
14
+X-KDE-SubstituteUID=false
15
tovid-0.33.tar.bz2/tovidgui.desktop -> tovid-0.34.tar.bz2/tovidgui.desktop Changed
9
 
1
@@ -8,6 +8,6 @@
2
 GenericName[en_US]=DVD creation with menus
3
 Comment=Author videos to DVD with menus
4
 Comment[en_US]=Author videos to DVD with menus
5
-Categories=AudioVideo;Video
6
+Categories=AudioVideo;Video;
7
 StartupNotify=true
8
 X-KDE-SubstituteUID=false
9