packages feed

rhbzquery 0.4 → 0.4.1

raw patch · 10 files changed

+37/−14 lines, 10 files

Files

ChangeLog.md view
@@ -1,5 +1,9 @@ # rhbzquery releases +## 0.4.1 (2020-12-17)+- set no stdout buffering (reported by @clrkwllms)+- change license from BSD3 to GPLv2+ and add SPDX tags+ ## 0.4 (2020-12-11) - add --list-operators - rename longer operators to be more memorable
README.md view
@@ -6,6 +6,8 @@ and if xdg-open is available will try to open the url (unless --dryrun is given). +rhbzquery is distributed under the GPL license version 2 or later.+ ## Usage examples  `rhbzquery f33 xyz` : F33 bugs for package xyz
rhbzquery.cabal view
@@ -1,12 +1,12 @@ name:                rhbzquery-version:             0.4+version:             0.4.1 synopsis:            Bugzilla query tool description:         A CLI tool for creating bugzilla queries for bugzilla.redhat.com.-license:             BSD3+license:             GPL-2 license-file:        LICENSE-author:              Jens Petersen-maintainer:          petersen@redhat.com+author:              Jens Petersen <petersen@redhat.com>+maintainer:          Jens Petersen <petersen@redhat.com> copyright:           2020  Jens Petersen <petersen@redhat.com> category:            Utils homepage:            https://github.com/juhp/rhbzquery
src/Bugzilla.hs view
@@ -1,3 +1,5 @@+-- SPDX-License-Identifier: GPL-2.0-or-later+ module Bugzilla (brc) where 
src/Common.hs view
@@ -1,5 +1,7 @@ {-# LANGUAGE CPP #-} +-- SPDX-License-Identifier: GPL-2.0-or-later+ module Common (error') where  #if MIN_VERSION_simple_cmd(0,1,4)
src/Fields.hs view
@@ -1,3 +1,5 @@+-- SPDX-License-Identifier: GPL-2.0-or-later+ module Fields (   allBzFields,   BzFields(..),
src/Help.hs view
@@ -1,5 +1,7 @@ {-# LANGUAGE CPP #-} +-- SPDX-License-Identifier: GPL-2.0-or-later+ module Help (detailedHelp) where 
src/Main.hs view
@@ -1,6 +1,8 @@ {-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} +-- SPDX-License-Identifier: GPL-2.0-or-later+ module Main (main) where  #if !MIN_VERSION_simple_cmd_args(0,1,3)@@ -23,6 +25,7 @@ import SimpleCmd (cmd_) import SimpleCmdArgs import System.Directory+import System.IO  import Bugzilla import Common@@ -35,20 +38,22 @@ data QueryMode = BugList | ListFields | ListOperators | CreateBug | APIQuery  main :: IO ()-main =+main = do+  hSetBuffering stdout NoBuffering   simpleCmdArgsWithMods (Just version) (fullDesc <> header "Bugzilla query tool" <> progDescDoc (Just detailedHelp)) $-  run <$>-  switchWith 'n' "dryrun" "Do not open url" <*>-  switchWith 'm' "mine" "My bugs" <*>-  (flagWith' ListFields 'l' "list-fields" "List query FIELDs" <|>-   flagWith' ListOperators 'o' "list-operators" "List op search operator types" <|>-   flagWith' CreateBug 'f' "file" "File a bug" <|>-   flagWith BugList APIQuery 'w' "api" "Web API query") <*>-  many (strArg argHelp)+    run <$>+    switchWith 'n' "dryrun" "Do not open url" <*>+    switchWith 'm' "mine" "My bugs" <*>+    (flagWith' ListFields 'l' "list-fields" "List query FIELDs" <|>+     flagWith' ListOperators 'o' "list-operators" "List op search operator types" <|>+     flagWith' CreateBug 'f' "file" "File a bug" <|>+     flagWith BugList APIQuery 'w' "api" "Web API query") <*>+    many (strArg argHelp)   where     run :: Bool -> Bool -> QueryMode -> [String] -> IO ()+    -- FIXME list aliases     run _ _ ListFields _ = mapM_ putStrLn allBzFields-    run _ _ ListOperators _ = do+    run _ _ ListOperators _ =       mapM_ putStrLn $ map showOpHelp operators ++         ["", "content~ uses matches", "content!~ uses notmatches"]     -- FIXME should really use some and many
src/ParseArg.hs view
@@ -1,3 +1,5 @@+-- SPDX-License-Identifier: GPL-2.0-or-later+ module ParseArg (   argHelp,   readBzQueryArg,
src/User.hs view
@@ -1,5 +1,7 @@ {-# LANGUAGE CPP #-} +-- SPDX-License-Identifier: GPL-2.0-or-later+ module User (   getBzUser   )