Remove redundant scripts.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7117 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Angus Leeming 2003-06-05 22:54:24 +00:00
parent bb1885193f
commit 97c8bd0f6b
7 changed files with 7 additions and 133 deletions

View File

@ -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 <leeming@lyx.org>
* lyx2lyx/lyx2lyx: bump the output format to 224.

View File

@ -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()

View File

@ -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()

View File

@ -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]

View File

@ -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")

View File

@ -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()

View File

@ -1,3 +0,0 @@
#!/bin/sh
convert $1 $2.eps
convert $1 $2.png