CoCalc Public Fileswww / sga / sga / scripts / makebook.pyOpen in with one click!
Author: William A. Stein
1
#! /usr/bin/python
2
3
#############################################################
4
# Make web page for an entire book of SGA from tif files
5
#
6
# Call it like this
7
# makebook.py 7-1
8
# to make book 7-1
9
#
10
# William Stein, 14 August 2001
11
#############################################################
12
13
14
import os, sys
15
16
if len(sys.argv) != 2:
17
print "Usage: " + sys.argv[0] + " book\n"
18
sys.exit(1)
19
20
book = sys.argv[1]
21
22
# the possibilities for book are: "1", "2", "3-1", "3-2", "3-3", "4-1", "4-2", "4-3", "4.5", "6", "7-1", "7-2"
23
24
#os.system("mv "+book+ " " + book + ".back")
25
#os.system("mkdir "+book)
26
#os.system("cp "+book+ ".back/*.tif " + book)
27
#os.system("cd "+book+ "; ../scripts/process *.tif")
28
os.system("cd "+book+ "; ../scripts/makepage *.tif")
29
os.system("cd "+book+ "; ../scripts/makethumbindex *.tif > thumbindex.html")
30
os.system("cd "+book+ "; ../scripts/makenothumbindex *.tif > index.html")
31
32