toodles 0.1.0.6 → 0.1.0.7
raw patch · 3 files changed
+22/−12 lines, 3 files
Files
- README.md +9/−1
- app/Main.hs +11/−9
- toodles.cabal +2/−2
README.md view
@@ -84,16 +84,24 @@ ### Running +Invoking `toodles` with no arguments will treat the current directory as the+project root and will start a server on port 9001. You can set these with the+`-d` and `-p` flags, respectively.++ ```bash # $ toodles -d <root directory of your project> -p <port to run server> # for more info run: # $ toodles --help $ toodles -d /path/to/your/project -p 9001+# or simply+$ toodles ``` ### Current Limitations -Due to the parser's current simplicity, Toodles won't see TODO's in multiline initiated comment. For instance in javascript+Due to the parser's current simplicity, Toodles won't see TODO's in multiline+initiated comment. For instance in javascript ```javascript // TODO(#bug) this would be parsed
app/Main.hs view
@@ -3,6 +3,7 @@ {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-}+ {-# LANGUAGE TypeOperators #-} -- TODO(avi|p=3|#cleanup|key=val|k3y=asdf) - break this into modules@@ -288,6 +289,7 @@ , assignee_search :: Maybe SearchFilter , limit_results :: Int , port :: Maybe Int+ , no_server :: Bool } deriving (Show, Data, Typeable, Eq) argParser :: ToodlesArgs@@ -297,6 +299,7 @@ , assignee_search = def &= help "Filter todo's by assignee" , limit_results = def &= help "Limit number of search results" , port = def &= help "Run server on port"+ , no_server = def &= help "Output matching todos to the command line and exit" } &= summary ("toodles " ++ showVersion version) &= program "toodles" &=@@ -524,7 +527,6 @@ runFullSearch userArgs = let projectRoot = directory userArgs in do- putStrLn $ "configPath: " ++ projectRoot ++ "/.toodles.yaml" configExists <- doesFileExist $ projectRoot ++ "/.toodles.yaml" config <- if configExists then Y.decodeEither' . B8SS.pack <$> readFile (projectRoot ++ "/.toodles.yaml")@@ -582,11 +584,11 @@ main = do userArgs <- cmdArgs argParser >>= setAbsolutePath sResults <- runFullSearch userArgs- if isJust $ port userArgs- then do- let webPort = fromJust $ port userArgs- ref <- newIORef sResults- dataDir <- (++ "/web") <$> getDataDir- putStrLn $ "serving on " ++ show webPort- run webPort $ app $ ToodlesState ref dataDir- else mapM_ (putStrLn . prettyFormat) $ todos sResults+ case userArgs of+ (ToodlesArgs _ _ _ _ True) -> mapM_ (putStrLn . prettyFormat) $ todos sResults+ _ -> do+ let webPort = fromMaybe 9001 $ port userArgs+ ref <- newIORef sResults+ dataDir <- (++ "/web") <$> getDataDir+ putStrLn $ "serving on " ++ show webPort+ run webPort $ app $ ToodlesState ref dataDir
toodles.cabal view
@@ -2,10 +2,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 770bcef8fdc02da5e012a221275957c0f7b87d287968aa1806ed5ddd1c1c3746+-- hash: 429b821200d601bbe58f758a652ca17684158c3b53f471f474b1dc8c790b674c name: toodles-version: 0.1.0.6+version: 0.1.0.7 synopsis: Manage the TODO entries in your code description: See the README on GitHub at <https://github.com/aviaviavi/toodles#readme> category: Project Management