Time for a brief side-note. If you are not familiar with writing HTML (the markup language used in WWW documents) and you don't know what a URL (Universal Resource Locator) is, I will not be giving you a tutorial on those things. Please search the Web or consult your local web gurus for information on that first.
Now, assuming you're comfortable with HTML and URLs,
you can construct a URL that links
directly to the WWW Tide program (tideshow.cgi
).
It can preselect a
site (and also preselect one or more of the customizing selections from the
estimate form page).
Below is a list of all the
available settings
(more or less in the order they appear on the form page). The most
frequently used would be the site=
setting (after which
the user who gets the prediction is certainly free to customize subsequent
predictions as he or she sees fit).
NOTE: as of April 2002, there is an option on the predictions page that you can check off to view a URL that will do most of the work for you ("Show the URL that would recreate this prediction"). Use that as a base and edit it as you wish, based on this document.
The URL can be inserted as part of a web page (in other words, it can be a link on a web page). Alternately, you can type it directly into the web-address blank in your browser, visit the page, and then save it as a bookmark/favorite. If you do that, then you'd type in only the actual URL, excluding the surrounding HTML tagging (<a href=" and ">...) that is shown in the examples below.
Sample link text within a page of HTML could be:
Note:
<a href="http://tbone.biol.sc.edu/tide/tideshow.cgi?site=Friday+Harbor%2C+San+Juan+Island%2C+Washington">
Check local tides</a> before fishing. |
Note: Check local tides before fishing. |
Note:
<a href="http://tbone.biol.sc.edu/tide/tideshow.cgi?site=Friday+Harbor%2C+San+Juan+Island%2C+Washington&type=graph">
Check graph of local tides</a> before fishing. |
Note: Check graph of local tides before fishing. |
You always give the root URL for the program:
href="http://tbone.biol.sc.edu/tide/tideshow.cgi
followed by a question mark.
That is then followed by one or more form settings, separated
by an ampersand (the &
character),
and finally terminated with a double-quote.
Each of the settings is
of the form key=value
, where the key
s and
permissible value
s are listed below.
If you only use one key=value
pair (as in the first example
above), you don't need any separating ampersands.
Listen up now (this is important):
No spaces are allowed anywhere in the URL. The only place you might
be tempted to use a space is in the site name. Replace any space with
a '+
' sign. You must also replace punctuation
marks using the hexadecimal escape method mandated for URLs (see HTML
references on the WWW, and good luck). Note that you can cheat
by using your browser to view the source text of the link I use via
the site selection page to
see how the names are encoded there. I encourage you to do that.
Listen up again (this is also important): Our machine here is used for a variety of research purposes aside from calculating the tides. We are quite happy to provide a reasonable service. We will become unhappy quickly if someone sets up a site with hard coded URLs that fetch a 1000x500 bitmaped graph and three monthly calendars and hits us 300 times a day. Please be reasonable. I'd guess that 99% of the time, the standard short text summary is just fine. Unless you've got special needs, start with that and let the user decide if he or she really needs (and wants to wait for) a graph or a calendar. Thanks - we appreciate your consideration!
In case you're wondering, the underpinnings for the WWW Tide Predictor are provided by the excellent CGI.pm package for writing CGI programs in Perl. It is by Lincoln D. Stein at the Cold Spring Harbor Laboratory. .
If you have questions/comments/problems/answers, please let me know. I'm Dean Pentcheff at tide@crustacea.nhm.org .
site=Name+of+site
+
' signs and all punctuation (periods,
commas, parantheses, etc.) must be replaced using
the standard URL hexadecimal escapes (see remarks above).
type=displaytype
displaytype
must be one of:
table
(for the standard tabular list
- this is the default).
graph
(for a graphic plot).
grapht
(for a text plot).
calen
(for a one-month calendar).
stats
(for max/min in a time period).
mrare
(for strict interval output).
tplotdir=direction
type
s).direction
must be one of:
horiz
(for horizontal text plots
- this is the default).
vert
(for vertical text plots).
gx=xpixels
type
s).xpixels
value should be a number
(keep it below about 2000 or your plot may not work).
The default size is 640.
gy=ypixels
type
s).ypixels
value should be a number
(keep it below about 700 or your plot may not work).
The default size is 240.
caltype=calendartype
type
s).calendartype
must be one of:
ndp
(for the compact HTML table version
- this is the default).
new
(for the slightly-wider HTML version).
www
(for the true-calendar HTML version).
text
(for the standard text version).
interval=interval
HH:MM
to set interval in
hours and minutes.
glen=days
days
value can be a decimal number, generally
somewhere between 0.5 and 7. The name glen
is an
artifact from the days when this controlled only the graph time.
The default number of days is 2.
units=unit
day
must be one of:
feet
or f
(for results in feet).
meters
or m
(for results in meters).
default
(for results in the default units for that site in our database).
fontsize=+/-sizechange
+
' signs) or decreased (numbers preceeded by
'-
' signs). The value should be one of the
following:-2 -1 +0 +1 +2 +3
+0
' (no change from standard size).
cleanout=1
suppressing the credits and warnings
killsun=1
comment=1
tzone=zonetype
zonetype
must be one of:
local
(use the time zone local to the
chosen site
, attempting automatic daylight
saving correction - this is the default).
utc
(use UTC with no offset).
ampm24=timeformat
timeformat
must be one of:
24
(use 24-hour time - this is the default).
ampm
(use AM/PM time).
weekday=1
year=year
month=month
day=day
hour=hour
min=minute
year
should be a four-digit value between
1970 and 2025 (inclusive). For dates outside those limits,
see the d_year
, d_month
, etc.
fields below.month
should be a two-digit month with
January being 01
through December being 12
.day
should be a numerical day of the month.hour
should be a numerical hour of the day
(in 24-hour time).minute
should be a numerical minute value
(between 0 and 59, with no decimal allowed).
d_year=year
d_month=month
d_day=day
d_hour=hour
d_min=minute
d_year
field forces the
use of the "distant"-time program.
d_year
should be a four-digit value between
1700 and 2100 (inclusive). Using the d_year
field (instead of year
) forces
the use of the "distant"-time calculation program. Note
that if your date is within 1970-2025, you are better off
ignoring the "d_...
" date/time fields, and you
should use the plain "year
", "month
",
etc. fields.
d_month
should be a two-digit month with
January being 01
through December being 12
.day
should be a numerical day of the month.d_hour
should be a numerical hour of the day
(in 24-hour time).d_minute
should be a numerical minute value
(between 0 and 59, with no decimal allowed).
colortext=color
colordatum=color
colormsl=color
colortics=color
colorday=color
colornight=color
colorebb=color
colorflood=color
black white yellow red skyblue seagreen blue
or deep-<br>skyblue
(no that is not a
typo - those brackets and things are needed within that skyblue color).
nofill=1
nodlines=1
notimes=1
bwgraph=1
tablelen=
glen=
tinc=hours
skinny=1
notimes
.
notimes
option.
dst=1
tzoff=hours