From 1884f2e54097bdce9a4a011065a89044c86a8ebf Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sat, 19 Aug 2017 18:44:56 +0200 Subject: Add command line option handling Use 'optparse-applicative' to parse command line options. Provide a `--slack-token` option that sets a Slack API token to enable access to the chat platform. More options will come as needed (including things like database name, language, possibly IRC configuration). Code is based on the example in https://hackage.haskell.org/package/optparse-applicative Pretty cool option parser. --- sorbot.cabal | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sorbot.cabal') diff --git a/sorbot.cabal b/sorbot.cabal index c79d2a1..69ef437 100644 --- a/sorbot.cabal +++ b/sorbot.cabal @@ -16,6 +16,7 @@ cabal-version: >=1.10 library hs-source-dirs: src exposed-modules: Lib + , CliOptions , I18n , IRC , Message @@ -26,6 +27,7 @@ library build-depends: base >= 4.7 && < 5 , bytestring , irc-client + , optparse-applicative , regex-tdfa , sqlite-simple , text -- cgit v1.2.3