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:
parent
03d0d21c0e
commit
304a1dd6fe
2 changed files with 3 additions and 2 deletions
|
|
@ -219,4 +219,6 @@ main = runInputT inputSettings $ do
|
||||||
args <- lift $ getArgs
|
args <- lift $ getArgs
|
||||||
if length args == 1
|
if length args == 1
|
||||||
then fromFile (args !! 0)
|
then fromFile (args !! 0)
|
||||||
else outputStrLn $ " USAGE: " ++ name ++ " <cards file>"
|
else do
|
||||||
|
outputStrLn $ " USAGE: " ++ name ++ " <cards file>"
|
||||||
|
void $ runMaybeT $ promptContinue "Continue"
|
||||||
|
|
|
||||||
|
|
@ -219,7 +219,6 @@ cardToString :: Card -> [String]
|
||||||
cardToString Card{sides=s, tier=t, lastChecked=lc, offset=o}
|
cardToString Card{sides=s, tier=t, lastChecked=lc, offset=o}
|
||||||
| t == minBound =
|
| t == minBound =
|
||||||
let info = ":: {\"level\": " ++ (show $ fromEnum t) ++
|
let info = ":: {\"level\": " ++ (show $ fromEnum t) ++
|
||||||
", \"last_checked\": " ++ formatTime defaultTimeLocale "%s" lc ++
|
|
||||||
"}"
|
"}"
|
||||||
in info : intersperse "::" s
|
in info : intersperse "::" s
|
||||||
| otherwise =
|
| otherwise =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue