]> git.lyx.org Git - lyx.git/commitdiff
Remove unused libreoffice2eps.py script.
authorJulien Rioux <jrioux@lyx.org>
Tue, 10 Jan 2012 13:54:48 +0000 (13:54 +0000)
committerJulien Rioux <jrioux@lyx.org>
Tue, 10 Jan 2012 13:54:48 +0000 (13:54 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40596 a592a061-630c-0410-9148-cb99ea01b6c8

development/scons/scons_manifest.py
lib/Makefile.am
lib/scripts/libreoffice2eps.py [deleted file]

index 047fe48f602dd1b6f5b39ceb3c30b219bfcf852b..6b974af8fdf9dcb60a6fe5181de563a4cbd09ff0 100644 (file)
@@ -3281,7 +3281,6 @@ lib_scripts_files = Split('''
     layout2layout.py
     legacy_lyxpreview2ppm.py
     listerrors
-    libreoffice2eps.py
     lyxpak.py
     lyxpreview2bitmap.py
     lyxpreview_tools.py
index 1119f55e49c6eb9fd41f19e1953626bcf629bb5b..1218969838a7f948af0eca0e3cc43e7fc5255b8c 100644 (file)
@@ -1517,7 +1517,6 @@ dist_scripts_PYTHON = \
        scripts/include_bib.py \
        scripts/layout2layout.py \
        scripts/legacy_lyxpreview2ppm.py \
-       scripts/libreoffice2eps.py \
        scripts/listerrors \
        scripts/lyxpak.py \
        scripts/lyxpreview2bitmap.py \
diff --git a/lib/scripts/libreoffice2eps.py b/lib/scripts/libreoffice2eps.py
deleted file mode 100755 (executable)
index c7329c2..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-
-# file libreoffice2eps.py
-# This file is part of LyX, the document processor.
-# Licence details can be found in the file COPYING.
-#
-# \author Tommaso Cucinotta
-#
-# Full author contact details are available in file CREDITS
-
-
-# This script converts an OpenOffice drawing to EPS.
-
-# Usage:
-#   python libreoffice2eps.py input.odg output.eps
-
-import os, sys, tempfile, shutil
-
-def runCommand(cmd):
-    ''' Utility function:
-        run a command, quit if fails
-    '''
-    if os.system(cmd) != 0:
-        print "Command '%s' failed." % cmd
-        sys.exit(1)
-
-# We expect two args, the names of the input and output files.
-if len(sys.argv) != 3:
-    sys.exit(1)
-
-input, output = sys.argv[1:]
-
-# Fail silently if the file doesn't exist
-if not os.path.isfile(input):
-    sys.exit(0)
-
-tmpdir = tempfile.mkdtemp()
-fname = os.path.splitext(os.path.basename(input))[0]
-
-# Generate the EPS file
-runCommand('libreoffice -nologo -headless -convert-to eps -outdir "%s" "%s"' % (tmpdir, input))
-shutil.move('%s/%s.eps' % (tmpdir, fname), '%s/%s.ps' % (tmpdir, fname))
-runCommand('ps2eps "%s/%s.ps"' % (tmpdir, fname))
-shutil.move('%s/%s.eps' % (tmpdir, fname), output)
-os.remove('%s/%s.ps' % (tmpdir, fname))
-os.rmdir(tmpdir)