1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
|
--- webmagick.in.orig Sun Oct 17 23:55:14 1999
+++ webmagick.in Thu Nov 25 23:44:06 1999
@@ -127,6 +127,7 @@
$opt_dircolorlink,
$opt_dircolorvlink,
$opt_dirfmt,
+ $opt_dirhtmlext,
$opt_dirindexname,
$opt_forcecache,
$opt_forcegif,
@@ -156,6 +157,7 @@
$opt_imgindexname,
$opt_indexname,
$opt_javascript,
+ $opt_jpegquality,
$opt_mapnetscape,
$opt_maptype,
$opt_maxgif,
@@ -164,6 +166,7 @@
$opt_metadescription,
$opt_metaexpires,
$opt_metakeywords,
+ $opt_nodate,
$opt_pageindexname,
$opt_prefixpath,
$opt_prune,
@@ -267,6 +270,7 @@
$opt_pageindexname = '.index'; # Base name of secondary index files
$opt_dirindexname = '.dirindex'; # Subdirectory Title cross-reference
# dirname Directory Title
+$opt_dirhtmlext = '.html'; # Use .shtml for SSI
$opt_imgindexname = '.imgindex'; # Image name to label cross-reference file
#
@@ -309,6 +313,7 @@
$opt_forcemontage = 0; # Force montage (default off)
$opt_forcegif = 0; # Force GIF imagemaps (default off)
$opt_forcejpeg = 0; # Force JPEG imagemaps (default off)
+$opt_jpegquality = 70; # Quality for JPEG imagemaps
$opt_help = 0; # Display usage message
$opt_version = 0; # Display version info
$opt_htmlext = '.html'; # Use .shtml for SSI
@@ -319,6 +324,7 @@
$opt_title = ''; # Page title (blank provides default title)
$opt_address = ''; # Additonal address info for bottom of
# imagemap page
+$opt_nodate = 0; # Don't show updates date
$opt_pichtml = 0; # Write separate HTML for each picture
$opt_pichtmlext = '.html'; # Use .shtml for SSI
$opt_pichtmltarget = '';
@@ -658,6 +664,7 @@
'dircolorfore=s' => \$opt_dircolorfore,
'dircolorlink=s' => \$opt_dircolorlink,
'dircolorvlink=s' => \$opt_dircolorvlink,
+ 'dirhtmlext=s' => \$opt_dirhtmlext,
'dirindexname=s' => \$opt_dirindexname,
'footer=s' => \$opt_footer,
'forcecache!' => \$opt_forcecache,
@@ -678,9 +685,11 @@
'imgindexname=s' => \$opt_imgindexname,
'indexname=s' => \$opt_indexname,
'javascript!' => \$opt_javascript,
+ 'jpegquality=i' => \$opt_jpegquality,
'mapnetscape!' => \$opt_mapnetscape,
'maptype=s' => \$opt_maptype,
'maxgif=i' => \$opt_maxgif,
+ 'nodate!' => \$opt_nodate,
'pageindexname=s' => \$opt_pageindexname,
'pichtml!' => \$opt_pichtml,
'pichtmlbottom=s' => \$opt_pichtmlbottom,
@@ -870,7 +879,7 @@
# for each directory ignoring hidden directories
use File::Find;
print( "Processing directory tree $opt_srcdir ...\n" ) if $opt_debug;
- finddepth( \&wanted, $opt_srcdir );
+ find( \&wanted, $opt_srcdir );
} else {
print( "Processing directory $opt_srcdir ...\n" ) if $opt_debug;
$sourceDirectory = $opt_srcdir;
@@ -934,7 +943,7 @@
sub wanted {
my($dev,$ino,$mode,$nlink,$uid,$gid);
($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_);
- if ( -d $_ && !/^\..+/ ) {
+ if ( -d _ && -w _ && !/^\..+/ ) {
if( $_ ne '.' && get_rc_var('.', 'opt_prune', 0) ) {
$File::Find::prune=1;
# following funny logic is to avoid warnings about $prune
@@ -1425,6 +1434,7 @@
'dircolorfore' => $opt_dircolorfore,
'dircolorlink' => $opt_dircolorlink,
'dircolorvlink' => $opt_dircolorvlink,
+ 'dirhtmlext' => $opt_dirhtmlext,
'dirindexname' => $opt_dirindexname,
'footer' => $opt_footer,
'framemarginwidth' => $opt_framemarginwidth,
@@ -1450,7 +1460,7 @@
'readme' => $opt_readme,
'readmepresent' => $haveReadme,
'readmevisible' => $opt_readmevisible,
- 'dateText' => "Page updated on $calendarMonths[$dateMonth] $dateDay, $dateYear",
+ 'dateText' => $opt_nodate ? "" : "Page updated on $calendarMonths[$dateMonth] $dateDay, $dateYear",
'subdirectories' => join(' ',@dirNames),
'title' => $pageTitle,
'version' => $webmagickInfo{'version'},
@@ -1694,7 +1704,7 @@
sub writeTopIndexes {
print( STDERR "Writing Index Files ${opt_indexname} & ",
- "${opt_pageindexname}dir.html ...\n" )
+ "${opt_pageindexname}dir${opt_dirhtmlext} ...\n" )
if $opt_debug;
#---- Generate the Variables for Format Options ----
@@ -1805,7 +1815,7 @@
# Pull README into thumbnail frame if it exists, and is
# either marked always visible or there are no images.
#
- $dirframelink = "${opt_pageindexname}dir.html";
+ $dirframelink = "${opt_pageindexname}dir${opt_dirhtmlext}";
if( $opt_framefmt_frames{$opt_framestyle} <= 2 ) {
if( $haveReadme && ( $opt_readmevisible || ! $haveImages ) ) {
@@ -1923,8 +1933,8 @@
# ----- Output Frame Directory File (usally ".indexdir.html") ------
#
- open( INDEX, ">${opt_pageindexname}dir.html")
- || die("$0: Failed to open file \"${opt_pageindexname}dir.html\"",
+ open( INDEX, ">${opt_pageindexname}dir${opt_dirhtmlext}")
+ || die("$0: Failed to open file \"${opt_pageindexname}dir${opt_dirhtmlext}\"",
" for output\n$@\n");
print( INDEX "<HTML>\n<HEAD>\n" );
print( INDEX " <TITLE>${pageTitle}</TITLE>\n" );
@@ -2143,6 +2153,7 @@
">WebMagick</A>" );
print( INDEX " $webmagickInfo{version}</NOBR>, <NOBR>Copyright ©</NOBR> <NOBR>Bob Friesenhahn</NOBR>\n" );
}
+ print( INDEX "</FONT>\n" );
print( INDEX "</ADDRESS>\n" );
}
@@ -2762,7 +2773,7 @@
$status = $montage->Write(
filename=>"JPEG:$fileNames{'montageJPEG'}",
interlace=>'Plane',
- quality=>70
+ quality=>$opt_jpegquality
);
handleMagickError( __FILE__, __LINE__, $fileNames{'montageJPEG'}, $status) if "$status";
last MONTAGE if "$status";
@@ -3369,6 +3380,8 @@
Montage:
--forcegif Force imagemap to be in GIF format
+ --forcejpeg Force imagemap to be in JPEG format
+ --jpegquality Quality of JPEG imagemaps
--maxgif Maximum size of GIF imagemap before trying JPEG
--columns Montage columns
--rows Montage rows (max)
@@ -3408,9 +3421,11 @@
--dircolorfore Foreground color (directory frame)
--dircolorlink Link (unvisited) color (directory frame)
--dircolorvlink Link (visited) color (directory frame)
+ --dirhtmlext Extension for directory frame
--javascript Enable JavaScript output
--header Page header (imagemap frame)
+ --nodate Don't print updates date
--title Page title
--pichtml Per-image HTML file generation
--pichtmlext Per-image HTML file extension (default .html)
|