Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Add candlesticks option, which doesn't yet do anything.

Eventually we will want to plot things which are not candlestick plots. This will allow us to do that by specifying which tracks should be plotted as candlesticks and which tracks should be plotted as other things in the options.
  • Loading branch information...
commit d1f12dea3b34e6954095d38ae700682fc06a8e2f 1 parent acb3a6f
Alex Lang authored October 19, 2011

Showing 1 changed file with 9 additions and 0 deletions. Show diff stats Hide diff stats

  1. 9  tools/zoom-cache-gnuplot.hs
9  tools/zoom-cache-gnuplot.hs
@@ -33,10 +33,12 @@ parseTrack arg =
33 33
 -- Options record, only gnuplot options for now
34 34
 data Options = Options
35 35
     { gnuplotOpts :: [Attribute]
  36
+    , candleSticks :: [(FilePath, TrackNo, Int)]
36 37
     }
37 38
 
38 39
 defaultOptions = Options
39 40
     { gnuplotOpts = []
  41
+    , candleSticks = []
40 42
     }
41 43
 
42 44
 parseCustom :: String -> Attribute
@@ -50,6 +52,13 @@ options =
50 52
         (OptArg ((\ f opts -> opts { gnuplotOpts = parseCustom f : gnuplotOpts opts }) . fromMaybe "gnuplot")
51 53
                              "KEY:VALUE")
52 54
         "gnuplot KEY:VALUE"
  55
+    , Option ['c'] ["candlesticks"]
  56
+        (OptArg ((\ f opts ->
  57
+          opts { candleSticks = either (error "bad command line syntax")
  58
+                                 (: candleSticks opts) $ parseTrack f  }) .
  59
+                               fromMaybe "candlesticks")
  60
+          "FILE:TRACKNO:SUMMARYLVL")
  61
+        "candelsticks FILE:TRACKNO:SUMMARYLVL"
53 62
     ]
54 63
 
55 64
 parseOpts :: [String] -> IO (Options, [String])

0 notes on commit d1f12de

Please sign in to comment.
Something went wrong with that request. Please try again.