|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.frame4j.util.App
de.frame4j.MakeIndex
@MinDoc(copyright="Copyright 1998 - 2008, 2009 A. Weinert",
author="Albrecht Weinert",
version="V.23",
lastModified="15.02.2010",
lastModifiedBy="A. Weinert",
usage="start as Java application (-? for help)",
purpose="generate or update HTML file tables")
public class MakeIndex
Generate or update HTML file tables.
This application generates or updates file tables in HTML format listing
all or selected files (see FileCriteria of one or more
directories.
The content of every table line will be the file name as (clickable) link,
size, modification date, and prose remark and description. Image files
will get additionally the size in pixel and a picture (minified if
required)in the last content column (instead of hand written prose).
The pictures may be made as clickable link too.
If the picture has to be minified there is a choice of displaying the
original file rendered smaller conserving ratio or using a thumb mail
file generated by this application.
Those index tables generated or updated will usually be embedded in a
HTML or XML page to be made or updated accordingly. Such page may contain
up to twelve file tables, equally layouted and headlined. By updating
the following action will be taken
update /
overwrite it may be lost.)updating.XMLio). In spite of that this
application uses a text approach (well a bit sophisticated, see
TextHelper, but nevertheless simpler). This has two effects. An
updated HTML page remains 100% unchanged outside the updated / added file
table lines. And on the other hand even frumpish HTML pages and tables
are processed (and made better at the updated spots) that would fail on
regular expressions (of comprehensible complexity) and on all XML
parsers.
trDescribe(),
App,
Prop,
DataFile,
ImageInfo| Field Summary | |
|---|---|
boolean |
cklickImg
Make thumbnail pictures clickable. |
String |
dest
Name of the destination index file. |
String |
dirThumbnail
Directory for separately generated miniaturised pictures (thumb nails). |
String |
dirThumbnailGif
Directory for separately generated miniaturised pictures (thumb nails). |
String |
endOfKeep
Search criterion for re-start of text updates. |
int |
firstColToKeep
From this column up keep the texts found. |
int |
genThumbnail
Generate a separated miniaturised picture (thumb nail). |
String |
indDir
The directory to be indexed. |
boolean |
loCaseNames
Generate file names and links in lower case. |
boolean |
makePage
Generate a new HTML page (no update). |
boolean |
makeTable
Generate a new HTML table (no update). |
int |
MAX_TABS
Maximum number of index tables to be updated. |
boolean |
mixEntries
Mix (row) texts in case of update. |
String |
noLCforTypes
Avoid lower casing names for specified types. |
boolean |
noNew
Update the index file without generating new table entries. |
boolean |
replGifByPNG
Make png miniaturised pictures (thumb nails) for gif. |
static CleverSSS |
rkTableEnd
A RK to search for "</table>" ignoring white space and case. |
static CleverSSS |
rkTagAend
A RK to search for "></a>" case. |
static CleverSSS |
rkTdStart
A RK to search for "<td" case. |
static CleverSSS |
rkThStart
A RK to search for "<th " ignoring case. |
static CleverSSS |
rkThStartShort
A RK to search for "<th" ignoring case. |
static CleverSSS |
rkThStartTag
A RK to search for "<th>" ignoring case. |
static CleverSSS |
rkTrEnd
A RK to search for "</tr>" ignoring white space and case. |
static CleverSSS |
rkTrStart
A RK to search for "<tr" case. |
boolean |
sdsc
Put file size and date into the same table column. |
int |
showHeight
Maximum height for miniaturised pictures (thumb nails). |
int |
showWidth
Maximum width for miniaturised pictures (thumb nails). |
String |
source
The source index file's name. |
String |
tableHeader
The index table's header (and the search criterion for update). |
String |
tableStart
The start table tag for a new index table (if no update). tableStart is the beginning of an index table, i.e. |
String |
TH
The index table's standard header (German default). |
String |
TH_SHORT
The index table's short standard header (German default). |
String |
timeForm
Format string for last modification time. |
boolean |
update
Update the index file instead of generate a new one. |
boolean |
useDir
Destination index file specification is relative to the directory to be indexed. |
| Fields inherited from class de.frame4j.util.App |
|---|
ano, appBase, appIO, appStartTime, args, bgColor, err, fullClassName, help, icon, INIT_ERROR, jmxRemoteNote, JOB_DONE_OK, log, LOG_OUT_ERROR, MAIN_THREAD_EXC, mainThread, myClass, myFrame, name, NO_PARS_ERROR, objectName, out, outMode, packName, prop, retCode, runFlag, shortClassName, title, verbose, verbosity |
| Fields inherited from interface de.frame4j.net.AttrSettable |
|---|
ILLEGAL_TYPE, ILLEGAL_VALUE, NO_ATTRIBUTE, NO_KNOWN_ATTRIBUTE, NO_VALUE, OK |
| Constructor Summary | |
|---|---|
MakeIndex()
|
|
| Method Summary | |
|---|---|
int |
doIt()
Working method of MakeIndex. |
static void |
main(String[] args)
Start method of MakeIndex. |
protected String |
trDescribe(DataFile fi)
Describe a file (in HTML). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public String indDir
public String dest
public String source
update true it will be set to dest.
public boolean useDir
public boolean update
update is true the index tables found in the input file
source will be updated. This will also set App.outMode to
overwrite.
public boolean noNew
noNew is true, the existing table entries for existing files
will be updated (size, modification date) as for update true.
But new table entries for new files will not be generated (and hence not
added at the end of the last table).noNew true implies update true.
public boolean cklickImg
public boolean makePage
makeTable.
public boolean makeTable
makePagepublic boolean sdsc
public String tableStart
tableStart is the beginning of an index table, i.e. the tag
<table ...>. It shall make all denotations for lines, borders,
spacings and margins / padding. If a number of columns is specified
it has to be consistent with tableHeader. A summary (attribute)
will be demanded by some checkers.tableHeader.
public String tableHeader
tableHeader is the headline of an index table. It is a sequence of
<th>-</th> tags in a lt;tr>-</tr> tag. This headline
will also be used as textual search criterion for the start of index
tables within a HTML text file to modify or update..TH_SHORT or
TH according to the setting of sdsc.tableHeader determines the number of columns used
for a file describing table line (made by
trDescribe()).sdsc is true and at least
four or five if false. For the smaller number the column on
"usage / hints" is omitted.
public final String TH
public final String TH_SHORT
TH is that the size column and the
time of last modification column are unified to one.public boolean mixEntries
firstColToKeep on until the last occurrence
of the pattern endOfKeep will be kept untouched as is.firstColToKeep and a generated thumbnail plus
link (if any; after endOfKeep) may have to be changed.
public int firstColToKeep
update), on an
existing entry (line) all text from column firstColToKeep on
(until the last occurrence of endOfKeep) will be kept.sdsc true). That would mean
the columns containing size and time of file modification will be updated
and the columns following will be kept.
public String endOfKeep
update) and the
text stating with column firstColToKeep is to be kept for each
indexed file, than this text endOfKeep is the pattern from which
on the modification / updating will start again.
public boolean loCaseNames
public String noLCforTypes
noLCforTypes has no effect if it is null or if
loCaseNames is false.loCaseNames is true and noLCforTypes is a not
empty list of types, files of that type will get names and links according
their original name.
public String timeForm
ConstTime.toString(CharSequence)public int showHeight
public int showWidth
public int genThumbnail
genThumbnail bytes, that baby
picture is generated.
public String dirThumbnail
dirThumbnail to the directory containing the original image
file.
public String dirThumbnailGif
dirThumbnailGif to the directory containing the original image
file.
public boolean replGifByPNG
public final int MAX_TABS
public static final CleverSSS rkTableEnd
public static final CleverSSS rkTrEnd
public static final CleverSSS rkThStartTag
public static final CleverSSS rkThStart
public static final CleverSSS rkThStartShort
public static final CleverSSS rkTrStart
public static final CleverSSS rkTdStart
public static final CleverSSS rkTagAend
| Constructor Detail |
|---|
public MakeIndex()
| Method Detail |
|---|
public static void main(String[] args)
args - command line parameter public int doIt()
doIt in class AppProp,
App.go(String[], boolean),
App.go(String[], String, boolean, CharSequence),
App.mainThreadprotected String trDescribe(DataFile fi)
tableHeader
and sdsc. By default the table line has five columns:showHeight * showWidth pixelssdsc is true zhe second and third column are combined in
one.tableHeader. The number of those (4.) columns may be 0 but not
less.
fi - the file to describe
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||