2006-06-30 13:54:01 +00:00
|
|
|
|
#!/usr/bin/env python -tt
|
2006-06-27 02:39:03 +00:00
|
|
|
|
# -*- coding: iso-8859-15 -*-
|
2003-08-22 10:50:02 +00:00
|
|
|
|
|
2006-06-26 14:17:12 +00:00
|
|
|
|
# file convertDefault.py
|
2003-08-22 10:50:02 +00:00
|
|
|
|
# This file is part of LyX, the document processor.
|
|
|
|
|
# Licence details can be found in the file COPYING.
|
|
|
|
|
|
2006-06-26 14:17:12 +00:00
|
|
|
|
# \author Herbert Vo<56>
|
|
|
|
|
# \author Bo Peng
|
2003-08-22 10:50:02 +00:00
|
|
|
|
|
|
|
|
|
# Full author contact details are available in file CREDITS.
|
|
|
|
|
|
2003-01-13 23:35:18 +00:00
|
|
|
|
# The default converter if no other has been defined by the user from the
|
|
|
|
|
# Conversion->Converter tab of the Preferences dialog.
|
2003-08-22 10:50:02 +00:00
|
|
|
|
|
2003-01-13 23:35:18 +00:00
|
|
|
|
# The user can also redefine this default converter, placing their
|
|
|
|
|
# replacement in ~/.lyx/scripts
|
2003-08-22 10:50:02 +00:00
|
|
|
|
|
2003-01-13 23:35:18 +00:00
|
|
|
|
# converts an image from $1 to $2 format
|
2006-06-26 14:17:12 +00:00
|
|
|
|
import os, sys
|
|
|
|
|
if os.system(r'convert -depth 8 "%s" "%s"' % (sys.argv[1], sys.argv[2])) != 0:
|
2006-06-27 21:08:54 +00:00
|
|
|
|
print >> sys.stderr, sys.argv[0], 'ERROR'
|
|
|
|
|
print >> sys.stderr, 'Execution of "convert" failed.'
|
|
|
|
|
sys.exit(1)
|