-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-svn-id: file:///home/svn/nwr/trunk@48 103c2249-d0a5-da11-ade6-0050bffea3d9
- Loading branch information
greg
committed
Mar 22, 2003
1 parent
ec76f99
commit 58eab35
Showing
5 changed files
with
124 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
Makefile.in | ||
aclocal.m4 | ||
autom4te.cache | ||
configure | ||
config.log | ||
config.h | ||
config.status | ||
Makefile | ||
stamp-h1 | ||
.deps | ||
|
||
rec | ||
play | ||
squelch | ||
encode | ||
plot | ||
log | ||
streamer | ||
splitter | ||
monitor | ||
downsample | ||
capture | ||
demux | ||
emailer | ||
insertdb | ||
|
||
*.html | ||
fips.inc | ||
|
||
nwr-*.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#include <stdio.h> | ||
|
||
int main(int, char *[]) | ||
{ | ||
for (;;) { | ||
char buf[4096]; | ||
int n = fread(buf, 1, sizeof(buf), stdin); | ||
if (n == 0) { | ||
break; | ||
} | ||
for (int i = 0; i < n/2; i += 2) { | ||
*(short *)(buf+i) = *(short *)(buf+i*2); | ||
} | ||
fwrite(buf, 1, n/2, stdout); | ||
} | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?xml version="1.0"?> | ||
<xsl:stylesheet | ||
version="1.0" | ||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
xmlns:xhtml="http://www.w3.org/1999/xhtml" | ||
xmlns="http://www.w3.org/1999/xhtml"> | ||
|
||
<xsl:output indent="yes" /> | ||
|
||
<xsl:template match="eas"> | ||
<xsl:variable name="station" select="station" /> | ||
<xsl:variable name="ustation" select="translate($station, 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')" /> | ||
<html xml:lang="en" lang="en"> | ||
<head> | ||
<title><xsl:value-of select="$ustation" />: NOAA Weather Radio</title> | ||
<link href="/style.css" rel="stylesheet" type="text/css" /> | ||
</head> | ||
<body> | ||
<h1><xsl:value-of select="$ustation" />: NOAA Weather Radio</h1> | ||
<table border="1"> | ||
<tr> | ||
<th>Originator</th> | ||
<th>Event</th> | ||
<th>Issued</th> | ||
<th>Audio</th> | ||
<th>Counties</th> | ||
</tr> | ||
<xsl:for-each select="message"> | ||
<tr> | ||
<td><xsl:value-of select="originator" /></td> | ||
<td><xsl:value-of select="event" /></td> | ||
<td><xsl:value-of select="issued" /></td> | ||
<td><a href="{$station}/{filename}">Listen</a></td> | ||
<td> | ||
<xsl:for-each select="area"> | ||
<xsl:value-of select="@county" /> | ||
<xsl:if test="position() != last()">, </xsl:if> | ||
</xsl:for-each> | ||
</td> | ||
</tr> | ||
</xsl:for-each> | ||
</table> | ||
</body> | ||
</html> | ||
</xsl:template> | ||
|
||
</xsl:stylesheet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/perl -w | ||
|
||
my %fips; | ||
while (<>) { | ||
my @a = split /\t/; | ||
$fips{$a[4]*1000+$a[5]} = $a[6]; | ||
} | ||
foreach (sort { $a <=> $b } keys %fips) { | ||
print "{$_, \"$fips{$_}\"},\n"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
create table message ( | ||
id integer primary key, | ||
station varchar(8), | ||
raw varchar(300), | ||
originator char(3), | ||
event char(3), | ||
issued timestamp without time zone, | ||
received timestamp without time zone, | ||
purge timestamp without time zone, | ||
sender varchar(20), | ||
filename varchar(30) | ||
); | ||
|
||
create table message_area ( | ||
message_id integer references message on delete cascade, | ||
code char(6), | ||
part integer, | ||
state integer, | ||
county integer | ||
); |