pyedxl - a python library for handling EDXL

I am proud to announce my latest work called pyedxl which is a python library for handling OASIS Emergency Data Exchange Language (EDXL) Distribution Element. At this time, it partially supports most of specification version 1.0 published on March 14, 2006. The main purpose to develop this library is to learn how to use lxml effectively. For those who can't stand to read, you might directly go to the Subversion repository.

Currently, there is not official release yet. I recommend all you to try the latest code in the repository. Below is the checkout command.

svn checkout http://pyedxl.googlecode.com/svn/trunk/ pyedxl

I also includes an example how to use it in tests/ directory. Please don't expect too much. There is only one example by now. In summary, the example is named gdacs.py that will convert fetched data from GDACS in RSS format to EDXL and print out the latest entry.

PYTHONPATH=. tests/gdacs.py

You may specify an e-mail as a command line argument to indicate sender ID.

PYTHONPATH=. tests/gdacs.py me@myorg.org

In addition, you may specify the second argument as a local file or URL to override default RSS URL.

wget -O gdacs.xml http://www.gdacs.org/XML/RSS.xml
PYTHONPATH=. tests/gdacs.py me@myorg.org gdacs.xml

See below for generated EDXL.

<EDXLDistribution xmlns="urn:oasis:names:tc:emergency:EDXL:DE:1.0">
  <dateTimeSent>2006-12-16T14:20:34.308722</dateTimeSent>
  <senderID>rss@gdacs.org</senderID>
  <language>EN</language>
  <distributionType>Report</distributionType>
  <distributionStatus>Actual</distributionStatus>
  <combinedConfidentiality>UNCLASSIFIED AND NOT SENSITIVE</combinedConfidentiality>
  <distributionID>asgard:476</distributionID>
  <targetArea>
    <circle>1.220000,-77.170000,0.000000</circle>
  </targetArea>
  <contentObject>
    <embeddedXMLContent>
      <item xmlns="http://backend.userland.com/rss2" xmlns:gdas="http://www.gdacs.org" xmlns:asgard="http://asgard.jrc.it" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:geo="http://www.w3.org/2003/01/geo/" xmlns:glide="http://glidenumber.net">
        <title>Orange volcano alert: Galeras (Colombia) is Erupting</title>
        <description>On Thursday, December 14, 2006, an activity change occurred in the volcano Galeras in Colombia. The volcano is Erupting with SWVRC alert level 3. Since this volcano is located in a region in which live about 1.5 million people in a 100 km area, the GDACS alert level is Orange.</description>
        <link>http://www.gdacs.org/reports.asp?eventType=VO&amp;system=asgard&amp;ID=476&amp;alertlevel=Orange&amp;location=CO&amp;glide_no=VO-2005-000193-COL</link>
        <linkGeneric>http://www.gdacs.org/ArchiveFolder/archiveVO.asp?eventType=VO&amp;color=Orange&amp;status=Erupting&amp;search=Search+events</linkGeneric>
        <pubDate>Thu, 14 Dec 2006 13:24 GMT+1</pubDate>
        <gdas:eventType>VO</gdas:eventType>
        <asgard:alertLevel>Alert Level 3</asgard:alertLevel>
        <gdas:alertLevel>Orange</gdas:alertLevel>
        <dc:subject>VO_Orange</dc:subject>
        <dc:subject>Erupting</dc:subject>
        <asgard:ID>476</asgard:ID>
        <asgard:date>Thu, 14 Dec 2006 13:24 GMT+1</asgard:date>
        <asgard:runDate>Thu, 14 Dec 2006 13:24 GMT+1</asgard:runDate>
        <VolcanoName>Galeras</VolcanoName>
        <VolcanoStatus>Erupting</VolcanoStatus>
        <VolcanoEventID>956</VolcanoEventID>
        <alertlevel>3</alertlevel>
        <geo:long>-77.17</geo:long>
        <geo:lat>1.22</geo:lat>
        <asgard:population>1587394</asgard:population>
        <gdas:country>Colombia</gdas:country>
        <glide:number id="" iso3="COL" year="" type="VO" number="000193">VO-2005-000193-COL</glide:number>
      </item>
    </embeddedXMLContent>
  </contentObject>
</EDXLDistribution>

Hopefully this work is useful for anyone who want to develop softwares related to EDXL and its friend. In fact, Python has many XML implementation and lxml is one of them. They are able to parse any XML and generate them back to string again. However, it is not easy to know which elements must be added where in the XML tree.

Note that this is just a result of learning lxml, please don't expect performance and scalability from the current code.

Tags: , , , , ,

wow gold

We are selling wow gold and doing wow power leveling for you at an unimaginable price. You can buy cheap wow gold and power leveling from us, a professional, loyal and reliable wow gold exchange corporation and power leveling work group

情趣用品,情趣用品,情

情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣,情趣,情趣,情趣,情人歡愉用品,情惑用品性哥,情人用品性哥,情趣用品,AIO交友愛情館,情人歡愉用品,美女視訊,情色交友,情人用品性哥,視訊交友,辣妹視訊,美女交友,性愛,嘟嘟成人網,按摩棒,震動按摩棒,微調按摩棒,情趣按摩棒,逼真按摩棒,G點,跳蛋,跳蛋,跳蛋,性感內衣,飛機杯,充氣娃娃,情趣娃娃,角色扮演,性感睡衣,後庭區,SM,潤滑液,情趣禮物,威而柔,香水,精油,芳香精油,自慰,自慰套,性感吊帶襪,情趣用品加盟,情人節禮物,情人節,吊帶襪,辣妹視訊,美女交友,情色交友,成人交友,視訊聊天室,美女視訊,視訊美女,情色視訊,免費視訊聊天,視訊交友,視訊聊天,AIO交友愛情館,嘟嘟成人網,成人貼圖,成人網站,AIO交友愛情館,情色,情色貼圖,情色文學,情色交友,色情聊天室,色情小說,七夕情人節,色情,A片,A片下載,免費A片,免費A片下載,情色視訊,情色電影,色情網站,辣妹視訊,視訊聊天室,情色視訊,免費視訊聊天,視訊聊天,美女視訊,視訊美女,美女交友,美女,情色交友,成人交友,自拍,本土自拍,情人視訊網,視訊交友90739,生日禮物,情色論壇,正妹牆,正妹,成人網站,A片,免費A片,A片下載,免費A片下載,AV女優,成人影片,色情A片,成人論壇,情趣,免費成人影片,成人電影,成人影城,愛情公寓,色情影片,保險套,舊情人,微風成人,成人,成人遊戲,成人光碟,色情遊戲,跳蛋,按摩棒,一夜情,男同志聊天室,肛交,口交,性交,援交hkhoi

http://www.mmoinn.com

In five minutes to be wow gold ? This is not a dream, as soon as
possible to experience the mmoinn! There are a lot cheaper warcraft gold
waiting for you, you have unexpected wow power leveling
, a witness to World of Warcraft World of green trees and dream!

Video Converter for Mac is

Video Converter for Mac is the most powerful Video Converter for Mac OS software which allows you to convert videos between popular video formats and audio formats. The easy-to-use Video Converter for Mac lets you to enjoy your videos on iPod, PSP, Mobile Phone, Zune, iPhone, Apple TV and MP4/MP3 player. This Video Converter for Mac allows you to set the destination, the name of output files.iPod Converter for Mac is the best Video to iPod Converter for Mac OS X software for you. With the iPod Converter for Mac you can easily convert popular video formats including FLV, MPEG1, MPEG2, DivX, Xvid, WMV, 3GP, 3G2, MOV, AVI, MPEG TS/TP (for HD Video), etc to iPod compatible MPEG-4 videos. And also it is not only and iPod Converter for Mac, but it can convert all popular videos to iPhone, Apple TV, PSP, PS3, Youtube (web), Creative Zen, iRiver PMP, Archos, MP4, various mobile phones and many other digital video and audio players.MP4 Converter for Mac is an excellent Mac MP4 converter which can not only convert MP4 to MP3, WMA, AAC, WAV, etc but also convert avi, flv, wmv, mpeg, divx etc to MP4 on Mac os x to enjoy your favourite video with MP4 Converter for Mac os. Compared with other mp4 converter Mac software, the MP4 Converter for Mac provides powerful edit functions, such as setting the output settings, cropping and trimming files, merging several files into one, etc. With this MP4 Converter for Mac, you can easily convert mp4 videos to varoius format for Mac.

FLV Converter Mac is a

FLV Converter Mac is a powerful FLV Converter for Mac software which can convert FLV video files to all popular video formats and convert FLV to popular audio formats for Mac OS X users. FLV Converter Mac OS X softwrare supports all video popular formats indcluding FLV, MPG, MPEG1, MPEG2, MP4, 3GP, 3G2, MOV, AVI, Mpeg TS/TP (for HD Video), etc. The Mac FLV Converter can also convert FLV to MP3, WAV, OGG, 3GP, AAC and M4A, AC3, APE, etc audio.
How to download YouTube videos for Mac and convert the .FLV files on Mac OS? Here are the easy-to-use and top-user-rating YouTube Video Grabber Mac and Mac FLV converter tools. It is safe to install and no spyware or adware guarenteed.
With the YouTube Video Grabber Mac application, you can easily download youtube for mac and convert YouTube videos on your Mac OS. It can automatically detect the YouTube video files from the YouTube web pages you have opened and download multiple files once a time. YouTube Video Grabber Mac is a totally free download youtube videos for mac, because if you don’t want to convert downloaded videos to your mobile players, you don’t have to pay for it.e

Post new comment

The content of this field is kept private and will not be shown publicly.