Tide from terminal.

Post your Debian questions here.

Tide from terminal.

Postby weedeater64 » April 18th, 2011, 8:28 pm

Inspired by the 'weather from terminal' post.

I use both weather-utils, and tide, which is the command line client for XTide.
I don't care for all the fluff in XTide, and prefer the simple text output of tide.
However I had to do a bit of reading and research to get the output I wanted.
I assume you have some basic command line skills, ie.. cat, grep, wget or lynx -dump,
redircection of output.. I'll start a discussion thread for questions and input from other
more savy folks.

Edit;
Discussion/questions
viewtopic.php?f=24&t=644

So we begin by grabbing the xtide packages,

Code: Select all
root@optiplex:/home/jeff# apt-get install xtide xtide-data


There are a good many options and variables you can set to your liking, but
I'll just discuss how I managed a local prediction with the default output.

Code: Select all
~$ tide
Minimal usage:  tide -l "Location name" (or set the environment variable
  XTIDE_DEFAULT_LOCATION to "Location name")
blablabla
options
blablabla
These are only the most important switches.  For information on all of
the switches, please read the verbose documentation at:
  http://www.flaterco.com/xtide/


Rather than set a default location variable, I chose to create an alias, and then perhaps
add more alias' at a later date, but for now..
So I need a location, I was never able to determine how to list the available locations, but did learn that

~$ cat file.tcd

should be avoided, don't believe me try it your self.

So I visit the website mentioned in above and read a bit then followed the 'what if your location isn't listed' link, and from there the http://www.flaterco.com/xtide/files.html#harmonicsfiles link, and finally 'list of included locations' link which took me to http://flaterco.com/xtid/locations.html

Now we're getting somewhere, this is the page I needed. So I,

Code: Select all
lynx -dump http://flaterco.com/xtide/locations.html > xtide_locations.txt


Then I poked around a bit in the resulting file, and found several entries that I may
want to use. For now I've added

alias tidec='tide -l chesapeake'

to my .bash_aliases

an unexpected bit of gravy is that I get not just the high and low tides for the next
three days, but also the sunrise and sunset times. The output you get is very controlable/configurable, but I'm content with this.

Have fun on the surf. jeff
weedeater64
 
Posts: 31
Joined: April 18th, 2011, 4:45 pm

Return to General Questions

Who is online

Users browsing this forum: Baidu [Spider] and 1 guest

cron

x