packages feed

gps2htmlReport 0.2.1 → 0.2.2

raw patch · 3 files changed

+8/−11 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

Data/GPS/Gps2HtmlReport/JourneyStats.hs view
@@ -30,7 +30,7 @@          | isJust (time x) = [(lclTime $ fromJust (time x), fromJust $ speed prev x)]          | otherwise = [] speedAtPoints' prev (x:xs)-         | isJust (time x) = (lclTime $ fromJust (time x), fromJust $ speed prev x) : speedAtPoints' x xs+         | isJust (time x) && isJust (speed prev x) = (lclTime $ fromJust (time x), fromJust $ speed prev x) : speedAtPoints' x xs          | otherwise = [] ++ speedAtPoints' x xs  -- | Takes all WayPoints, and creates a list of tuples containing (TimeStamp,JourneyDistanceAtPoint)@@ -78,8 +78,8 @@  -- | Calculates the total journey time journeyTime :: Time a => [a] -> NominalDiffTime-journeyTime [] = fromInteger 0-journeyTime [_] = fromInteger 0+journeyTime [] = 0+journeyTime [_] = 0 journeyTime (point:points) =               let startTime = toUTCTime (fromJust (time point))                  endTime = toUTCTime (fromJust (time $ last points))
Data/GPS/Gps2HtmlReport/Main.hs view
@@ -33,7 +33,7 @@     &= program _PROGRAM_NAME  _PROGRAM_NAME = "gps2HtmlReport"-_PROGRAM_VERSION = "0.2.1"+_PROGRAM_VERSION = "0.2.2" _PROGRAM_INFO = _PROGRAM_NAME ++ " version " ++ _PROGRAM_VERSION _PROGRAM_ABOUT = "A Haskell utility to generate HTML page reports of GPS Tracks and Track overlays on OpenStreetMap tiles" _COPYRIGHT = "(C) Rob Stewart 2011"@@ -69,7 +69,7 @@ createEmptyDir :: FilePath -> IO () createEmptyDir dir = do        exists <- doesDirectoryExist dir-       (if exists then removeDirectoryRecursive dir >> createDirectory dir else createDirectory dir)+       if exists then removeDirectoryRecursive dir >> createDirectory dir else createDirectory dir  -- | Generates the HTML report for each .gpx file, -- or simply an osm.png file if the '--imageonly' argument@@ -81,9 +81,7 @@           0 -> putStr "Unable to parse GPX file. Skipping..."           _ -> do            createEmptyDir webDir-           case fullReport-             of-              True -> do+           if fullReport then do                putStr "Generating statistical charts...\n"                 renderToPng (chart1 points) (webDir++"/chart1.png")                renderToPng (chart2 points) (webDir++"/chart2.png")@@ -91,8 +89,7 @@                putStr "Downloading OpenStreetMap tiles...\n"                generateOsmMap webDir points                putStr $ "Processing '"++gpxFile++"' complete. Report saved in: "++webDir++"/index.html\n"-              _ -> do+              else do                putStr "Downloading OpenStreetMap tiles...\n"                generateOsmMap webDir points                putStr $ "Processing '"++gpxFile++"' complete. Image saved in: "++webDir++"/osm.png\n"-           return ()
gps2htmlReport.cabal view
@@ -1,5 +1,5 @@ Name:                gps2htmlReport-Version:             0.2.1+Version:             0.2.2 Cabal-Version:       >=1.6 Description:         Generate a HTML summary report of GPS tracks synopsis:            GPS to HTML Summary Report