From c9580946a96572ff0240642931eea72d3fb76f46 Mon Sep 17 00:00:00 2001 From: Stefan Dresselhaus Date: Mon, 6 Feb 2017 15:57:43 +0100 Subject: [PATCH] now reads first arg as markdown --- app/Main.hs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/Main.hs b/app/Main.hs index b4a07b7..b2dd598 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -1,8 +1,14 @@ module Main where import Lib +import System.Environment main :: IO () main = do - md <- readFile "test.md" - sequence_ $ sequence . fmap print <$> getMails md + args <- getArgs + case args of + [fn] -> do + md <- readFile fn + sequence_ $ sequence . fmap print <$> getMails md + _ -> do + print "please call with markdown-file"