File:
[LON-CAPA] /
loncom /
build /
help_graphics_converter.pl
Revision
1.1:
download - view:
text,
annotated -
select for diffs
Fri Jul 5 16:12:31 2002 UTC (22 years, 2 months ago) by
bowersj2
Branches:
MAIN
CVS tags:
HEAD
This commit implements the .tex-based online help system in LON-CAPA. It
may be necessary to manually run loncom/build/help_graphics_converter.pl
and doc/help/rebuildLabelHash.pl after a cvs update, and
loncapa_apache.conf may need to be manually copied to /etc. (The
loncapafiles.lpml has been updated.)
After merging this, the URL http://[loncapahost]/adm/help/Foils.hlp
should display a help file.
Also, some *very* out-of-date files have been removed from the /doc
directory.
# The LearningOnline Network
# help_graphics_converter - converts help .png into .gif and .eps
#
# This file is part of the LearningOnline Network with CAPA (LON-CAPA).
#
# LON-CAPA is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# LON-CAPA is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with LON-CAPA; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# /home/httpd/html/adm/gpl.txt
#
# http://www.lon-capa.org/
#
# YEAR=2002
# 7/4, Jeremy Bowers
#
###
use strict;
my $dirprefix = "/home/httpd/html/adm/help/";
# Check that the png directory exists
if (not (-d $dirprefix . "png/"))
{ die "Can't convert help graphics because the png directory is not ".
"installed."; }
mkdir $dirprefix . "gif/";
mkdir $dirprefix . "eps/";
foreach my $file (glob($dirprefix . "png/*.png"))
{
my $filename = substr($file, rindex($file, "/") + 1);
my $gifdest = $dirprefix . "gif/" . substr($filename, 0, -4) . ".gif";
my $epsdest = $dirprefix . "eps/" . substr($filename, 0, -4) . ".eps";
print "Converting $filename... gif";
system ("convert $file $gifdest\n") if (not (-s $gifdest));
print " eps";
system ("convert $file $epsdest\n") if (not (-s $epsdest));
print " done.\n";
}
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>