Skip to content

Commit

Permalink
putting all modules in Data.GPS
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob Stewart committed Aug 10, 2011
1 parent 4b6e903 commit bb77572
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 12 deletions.
@@ -1,14 +1,14 @@
{-# LANGUAGE ScopedTypeVariables #-}

-- | The `HTMLGenerator' module generates the HTML content for the index.html generated
module Gps2HtmlReport.HTMLGenerator where
module Data.GPS.Gps2HtmlReport.HTMLGenerator where

import Text.Html
import Data.GPS hiding (src,link,href)
import Text.Printf
import Data.Maybe

import Gps2HtmlReport.JourneyStats
import Data.GPS.Gps2HtmlReport.JourneyStats

-- | Takes all the WayPoints and generates the HTML file
generateHtmlPage :: [WptType] -> Html
Expand Down
@@ -1,7 +1,7 @@
-- | This module uses the JourneyStats module to generate
-- the statistics about the journey WayPoints, then
-- uses the Cairo bindings to generate the charts
module Gps2HtmlReport.JourneyCharts where
module Data.GPS.Gps2HtmlReport.JourneyCharts where

import Data.GPS
import Data.Maybe
Expand All @@ -10,7 +10,7 @@ import Data.Accessor
import Data.Colour
import Data.Colour.Names

import Gps2HtmlReport.JourneyStats
import Data.GPS.Gps2HtmlReport.JourneyStats

data OutputType = Window | PNG | PS | PDF | SVG

Expand Down
@@ -1,6 +1,6 @@
-- | This module provides the JourneyCharts and HTMLGenerator
-- modules with statistics for the charts, and the journey statistics
module Gps2HtmlReport.JourneyStats where
module Data.GPS.Gps2HtmlReport.JourneyStats where

import Data.GPS hiding (speed)
import Data.Maybe
Expand Down
6 changes: 3 additions & 3 deletions Gps2HtmlReport/Main.hs → Data/GPS/Gps2HtmlReport/Main.hs
Expand Up @@ -5,9 +5,9 @@ import System.FilePath
import System.Directory
import Text.Html

import Gps2HtmlReport.OsmChart
import Gps2HtmlReport.HTMLGenerator
import Gps2HtmlReport.JourneyCharts
import Data.GPS.Gps2HtmlReport.OsmChart
import Data.GPS.Gps2HtmlReport.HTMLGenerator
import Data.GPS.Gps2HtmlReport.JourneyCharts

-- | Reads the current directory for all .gpx files, then maps to `generateReport' for each one
main :: IO [()]
Expand Down
Expand Up @@ -3,7 +3,7 @@
-- | This module utilizes the perl gpx2png program
-- to download the OSM tiles, and the GraphicsMagick bindings
-- to resize the OSM image if necessary
module Gps2HtmlReport.OsmChart where
module Data.GPS.Gps2HtmlReport.OsmChart where

import System.FilePath
import System.Directory
Expand Down
5 changes: 5 additions & 0 deletions README.md
Expand Up @@ -61,6 +61,11 @@ I'd also like to know what is required to make this utility work on non-Linux sy

Either way, get in touch!

To Do
-----

* It would be great to port the perl `gpx2png' utility to Haskell, eliminating this dependency.
* This Haskell program currently makes use of elevation, latitude and longitude. There are many other attributes possibly available in WptType. Ideas for what to do with these attributes [here](http://hackage.haskell.org/packages/archive/GPX/0.4.8/doc/html/Data-Geo-GPX-WptType.html#t:WptType) most welcome.

Credits
-------
Expand Down
6 changes: 3 additions & 3 deletions gps2htmlReport.cabal
Expand Up @@ -16,9 +16,9 @@ extra-source-files: README.md
tested-with: GHC ==7.0.2

Executable gps2htmlReport
Main-is: Gps2HtmlReport/Main.hs
Main-is: Data/GPS/Gps2HtmlReport/Main.hs

library
Build-Depends: base >= 4, html, gps, time, cairo, Chart, random, data-accessor, colour, xsd, filepath, directory, process, gd
Build-Depends: base >= 4 && < 5, html, gps, time, cairo, Chart, random, data-accessor, colour, xsd, filepath, directory, process, gd
Extensions: ScopedTypeVariables
Exposed-Modules: Gps2HtmlReport.HTMLGenerator, Gps2HtmlReport.JourneyStats, Gps2HtmlReport.JourneyCharts, Gps2HtmlReport.OsmChart
Exposed-Modules: Data.GPS.Gps2HtmlReport.HTMLGenerator, Data.GPS.Gps2HtmlReport.JourneyStats, Data.GPS.Gps2HtmlReport.JourneyCharts, Data.GPS.Gps2HtmlReport.OsmChart

0 comments on commit bb77572

Please sign in to comment.