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
201
 
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
tovid-0.33.tar.bz2/Makefile.am Deleted
201
 
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
tovid-0.33.tar.bz2/Makefile.in Deleted
201
 
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
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
201
 
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
tovid-0.33.tar.bz2/configure Deleted
201
 
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
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
201
 
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
tovid-0.33.tar.bz2/icons/tovid.gif Deleted
tovid-0.33.tar.bz2/install-sh Deleted
201
 
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
tovid-0.33.tar.bz2/missing Deleted
201
 
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
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
201
 
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
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
201
 
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
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
201
 
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
tovid-0.33.tar.bz2/docs/src/en/tovid.t2t -> tovid-0.34.tar.bz2/docs/src/en/tovid.t2t Changed
201
 
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
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
201
 
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
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
201
 
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
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
201
 
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
tovid-0.33.tar.bz2/libtovid/guis/todisc.py -> tovid-0.34.tar.bz2/libtovid/guis/todisc.py Changed
201
 
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
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
201
 
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
tovid-0.33.tar.bz2/libtovid/metagui/gui.py -> tovid-0.34.tar.bz2/libtovid/metagui/gui.py Changed
201
 
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
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
201
 
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
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
201
 
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
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
201
 
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
tovid-0.33.tar.bz2/src/todisc -> tovid-0.34.tar.bz2/src/todisc Changed
201
 
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
tovid-0.33.tar.bz2/src/tovid -> tovid-0.34.tar.bz2/src/tovid Changed
201
 
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
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