From 304a1dd6feb9e1e006aeee0ffdf678869a5b2858 Mon Sep 17 00:00:00 2001 From: Joscha Date: Fri, 5 Jan 2018 20:16:23 +0000 Subject: [PATCH] Fix small things - Wait for user input after displaying usage information (on windows, the terminal window might close too quickly otherwise). - When cards are tier 0, only put the tier in the infostring to conform to the original python script's behaviour better. --- app/Main.hs | 4 +++- src/Cards.hs | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Main.hs b/app/Main.hs index dba7475..a518913 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -219,4 +219,6 @@ main = runInputT inputSettings $ do args <- lift $ getArgs if length args == 1 then fromFile (args !! 0) - else outputStrLn $ " USAGE: " ++ name ++ " " + else do + outputStrLn $ " USAGE: " ++ name ++ " " + void $ runMaybeT $ promptContinue "Continue" diff --git a/src/Cards.hs b/src/Cards.hs index 5783084..d610d1a 100644 --- a/src/Cards.hs +++ b/src/Cards.hs @@ -219,7 +219,6 @@ cardToString :: Card -> [String] cardToString Card{sides=s, tier=t, lastChecked=lc, offset=o} | t == minBound = let info = ":: {\"level\": " ++ (show $ fromEnum t) ++ - ", \"last_checked\": " ++ formatTime defaultTimeLocale "%s" lc ++ "}" in info : intersperse "::" s | otherwise =