xmobar

Portabilityunportable
Stabilityunstable
MaintainerRóman Joost
Safe HaskellNone

Plugins.Monitors.UVMeter

Description

An australian uv monitor for Xmobar

Synopsis

Documentation

data UvInfo

Constructors

UV 

Fields

index :: String
 

Instances

Show UvInfo 

uvURL :: String

getData :: IO String

textToXMLDocument :: String -> Either ParseError [XML]

formatUVRating :: Maybe Float -> Monitor String

getUVRating :: String -> [XML] -> Maybe Float

runUVMeter :: [String] -> Monitor String

type AttrName = String

XML Parsing code comes here. This is a very simple XML parser to just deal with the uvvalues.xml provided by ARPANSA. If you work on a new plugin which needs an XML parser perhaps consider using a real XML parser and refactor this plug-in to us it as well.

Note: This parser can not deal with short tags.

Kudos to: Charlie Harvey for his article about writing an XML Parser with Parsec.

type AttrValue = String

data Attribute

Constructors

Attribute (AttrName, AttrValue) 

Instances

Show Attribute 

data XML

Constructors

Element String [Attribute] [XML] 
Decl String 
Body String 

Instances

Show XML 

document :: Parser [XML]

parse the document

tag :: Parser XML

parse any tags

endTag :: String -> Parser String