From 97c8bd0f6b598766113dae4a12bd1588cc43cbc2 Mon Sep 17 00:00:00 2001 From: Angus Leeming Date: Thu, 5 Jun 2003 22:54:24 +0000 Subject: [PATCH] Remove redundant scripts. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7117 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/ChangeLog | 7 ++++ lib/scripts/fig2png.py | 16 --------- lib/scripts/fig2pstex.py | 23 ------------- lib/scripts/general_command_wrapper.py | 24 -------------- lib/scripts/pic2ascii.py | 45 -------------------------- lib/scripts/pic2png_eps.py | 22 ------------- lib/scripts/pic2png_eps.sh | 3 -- 7 files changed, 7 insertions(+), 133 deletions(-) delete mode 100644 lib/scripts/fig2png.py delete mode 100644 lib/scripts/fig2pstex.py delete mode 100644 lib/scripts/general_command_wrapper.py delete mode 100644 lib/scripts/pic2ascii.py delete mode 100644 lib/scripts/pic2png_eps.py delete mode 100644 lib/scripts/pic2png_eps.sh diff --git a/lib/ChangeLog b/lib/ChangeLog index 3bf281eab8..bfcfe26802 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -2,6 +2,13 @@ * external_templates: Scrap the RasterImage format. + * scripts/fig2pstex.py: + * scripts/pic2ascii.py: + * scripts/pic2png_eps.py: + * scripts/general_command_wrapper.py: + * scripts/pic2png_eps.sh: + * scripts/fig2png.py: removed. + 2003-06-04 Angus Leeming * lyx2lyx/lyx2lyx: bump the output format to 224. diff --git a/lib/scripts/fig2png.py b/lib/scripts/fig2png.py deleted file mode 100644 index 3bce89707b..0000000000 --- a/lib/scripts/fig2png.py +++ /dev/null @@ -1,16 +0,0 @@ -#! /usr/bin/env python -# This script converts a xfig file into PNG files - -import sys -import os - -filename = sys.argv[1] -basename = os.path.splitext(filename)[0] -parameters = sys.argv[2:] - -pid = os.fork() -if pid == 0: - os.execvp("fig2dev", ["fig2dev", "-Lpng"] + parameters + [filename, basename + ".png"]) - print "fig2dev did not work" - os.exit(1) -os.wait() diff --git a/lib/scripts/fig2pstex.py b/lib/scripts/fig2pstex.py deleted file mode 100644 index 741665736f..0000000000 --- a/lib/scripts/fig2pstex.py +++ /dev/null @@ -1,23 +0,0 @@ -#! /usr/bin/env python -# This script converts a xfig file into Postscript/LaTeX files - -import sys -import os - -filename = sys.argv[1] -basename = os.path.splitext(filename)[0] -parameters = sys.argv[2:] - -pid = os.fork() -if pid == 0: - os.execvp("fig2dev", ["fig2dev", "-Lpstex"] + parameters + [filename, basename + ".eps"]) - print "fig2dev did not work" - os.exit(1) -os.wait() - -pid = os.fork() -if pid == 0: - os.execvp("fig2dev", ["fig2dev", "-Lpstex_t", "-p" + basename] + parameters + [filename, basename + ".pstex_t"]) - print "fig2dev did not work the second time" - os.exit(1) -os.wait() diff --git a/lib/scripts/general_command_wrapper.py b/lib/scripts/general_command_wrapper.py deleted file mode 100644 index 6142b9ccfb..0000000000 --- a/lib/scripts/general_command_wrapper.py +++ /dev/null @@ -1,24 +0,0 @@ -#! /usr/bin/env python -# This is a general wrapper script that will allow -# us to maintain security in the external material -# insets. -# Use like this: -# general_command_wrapper.py stdin-filename stdout-filename command args -# Use "-" for stdin-filename and stdout-filename to use the normal stdio - -import sys -import os - -if sys.argv[1] != "-": - os.close(0) - sys.stdin = open(sys.argv[1],"r") -if sys.argv[2] != "-": - print "Redirecting" + sys.argv[2] - os.close(1) - os.close(2) - sys.stdout = open(sys.argv[2],"w") - sys.stderr = open(sys.argv[2],"w") - -os.execvp(sys.argv[3], sys.argv[3:]) -print "Could not run " + sys.argv[3] - diff --git a/lib/scripts/pic2ascii.py b/lib/scripts/pic2ascii.py deleted file mode 100644 index b7dd0cc1a8..0000000000 --- a/lib/scripts/pic2ascii.py +++ /dev/null @@ -1,45 +0,0 @@ -#! /usr/bin/env python -# This script converts a raster format picture into an ascii representation -# with the suffix .asc - -import sys -import os -import string - -pid = os.fork() -if pid == 0: - os.execvp("convert", ["convert", sys.argv[1], "temporary_filename_that_is_long.gif"]) - print "Could not run convert" - os.exit(1) -os.wait() - -os.system("identify temporary_filename_that_is_long.gif > temp.dim") - -fp = open("temp.dim", "r") -line = fp.readline() -lines = string.split(line,' ') -dims = string.split(lines[1],'x') -xsize = float(dims[0]) -ysize = float(string.split(dims[1],'+')[0]) - -aspect_ratio = xsize / ysize - -if len(sys.argv) > 2: - resulting_x = int(sys.argv[2]) -else: - resulting_x = 40 -resulting_y = int(resulting_x / aspect_ratio) - -os.system("echo s | gifscii temporary_filename_that_is_long.gif %d %d" % (resulting_x, resulting_y)) - -os.system("tail +3 temporary_filename_that_is_long.asc > temporary_filename_that_is_long2.asc") - -pid = os.fork() -if pid == 0: - os.execvp("mv", ["mv", "temporary_filename_that_is_long2.asc", os.path.splitext(sys.argv[1])[0] + ".asc"]) - print "Could not rename file" - os.exit(1) -os.wait(pid) - -os.system("rm temporary_filename_that_is_long.gif temporary_filename_that_is_long.asc") - diff --git a/lib/scripts/pic2png_eps.py b/lib/scripts/pic2png_eps.py deleted file mode 100644 index 1a11e7fe29..0000000000 --- a/lib/scripts/pic2png_eps.py +++ /dev/null @@ -1,22 +0,0 @@ -#! /usr/bin/env python -# This script converts a raster format picture into a PNG and EPS file - -import sys -import os - -if len(sys.argv) > 2: - pars = sys.argv[2] - -pid = os.fork() -if pid == 0: - os.execvp("convert", ["convert", pars, sys.argv[1], os.path.splitext(sys.argv[1])[0] + ".eps"]) - print "convert did not work" - os.exit(1) -os.wait() - -pid = os.fork() -if pid == 0: - os.execvp("convert", ["convert", pars, sys.argv[1], os.path.splitext(sys.argv[1])[0] + ".png"]) - print "convert did not work second time" - os.exit(1) -os.wait() diff --git a/lib/scripts/pic2png_eps.sh b/lib/scripts/pic2png_eps.sh deleted file mode 100644 index 7f59c10da0..0000000000 --- a/lib/scripts/pic2png_eps.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -convert $1 $2.eps -convert $1 $2.png