3 import System
.Environment
13 help
:: [String] -> IO ()
14 help argv
= putStrLn $ usage Help
16 usageHelp
= "usage: " ++ progName
++ " [operation] [id]\n\
19 \ bookmark [options] [id]\n\
20 \ citation [options] [id]\n\
21 \ help [operation] \n\
22 \ modify [options] <filters> <id>\n\
23 \ remove [options] <id>\n\
24 \ search [options] [filters] [id]\n\
25 \ view [options] <id>\n\
29 version
= putStrLn $ progName
++ " " ++ progVersion
37 error $ "No operation specified ('" ++ progName
++ " help' for help)"
41 case parseArg
(head argv
) of
42 Right Add
-> add argv
'
43 Right Bookmark
-> bookmark argv
'
44 Right Citation
-> citation argv
'
45 Right Help
-> help argv
'
46 Right Modify
-> modify argv
'
47 Right Remove
-> remove argv
'
48 Right Search
-> search argv
'
49 Right View
-> view argv
'
50 Right Version
-> version