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.
This commit is contained in:
Joscha 2018-01-05 20:16:23 +00:00
parent 03d0d21c0e
commit 304a1dd6fe
2 changed files with 3 additions and 2 deletions

View file

@ -219,4 +219,6 @@ main = runInputT inputSettings $ do
args <- lift $ getArgs
if length args == 1
then fromFile (args !! 0)
else outputStrLn $ " USAGE: " ++ name ++ " <cards file>"
else do
outputStrLn $ " USAGE: " ++ name ++ " <cards file>"
void $ runMaybeT $ promptContinue "Continue"

View file

@ -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 =