[CAP] cap implementations

Mick Jagger lists at jpw.biz
Fri Oct 7 07:35:32 PDT 2005


Hi,
	I've finished some modifications to the atom index script I was working on.  It creates a title field for each entry, that comprises the values of scope, msgType, status, and event or multiple info categories.  Also a summary field has been added for atom reader clients.  It contains the values, event, headline, expires, instructions, web url, and area descriptions.  I think I've accounted for all of the cases where multiple infos would be present.  
	Attached is a sample index created this morning.  This script is a windows executable and is designed to be scriptable via command line arguments.  This way it can be added to your own CAP generation routines.  It supports CAP message inputs via file, or downloads the message URL.  It will do regular or pretty printed xml.  Finally it can save the message as a file, print it back out on the command line, or upload it directly to your website via ftp.  Anyone who's interested, let me know and I'll send you the demo.  

<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:cap="urn:oasis:names:tc:emergency:cap:1.1">
  <id>http://www.test.com/cap</id>
  <title>CAP Alert updates</title>
  <updated>2005-10-07T10:19:30-05:00</updated>
  <author>
    <name>Alert Authority</name>
  </author>
  <link href="http://www.test.com/cap/index.atom" rel="self" />
  <generator>JPW CAP AtomIndex Generator</generator>
  <entry>
    <id>tag:test.com,2005-10-07:/CAP/11286878996568</id>
    <author>
      <name>NWS_LOX at edis.oes.ca.gov</name>
    </author>
    <link href="http://www.edis.ca.gov/cap_1.0/1128687899.cap" rel="alternate" />
    <title>Public - Alert - EDIS message regarding Met from NWS_LOX</title>
    <summary>Alert Info
             ----------

             Event: EDIS message regarding Met from NWS_LOX
             Headline: DENSE FOG ADVISORIES HAVE BEEN ISSUED FOR COASTAL SECTIONS
             Expires: 2005-10-07T08:24:59-07:00
             Area Locations: Los Angeles Area 

             ----------
    </summary>
    <updated>2005-10-07T05:24:00-07:00</updated>
    <cap:status>Actual</cap:status>
    <cap:msgType>Alert</cap:msgType>
    <cap:category>Met</cap:category>
    <cap:urgency>Expected</cap:urgency>
    <cap:severity>Minor</cap:severity>
    <cap:certainty>Likely</cap:certainty>
  </entry>
</feed>


-- 
jake at jpw.biz
--


More information about the CAP-list mailing list