summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfffaaa <>2021-01-13 14:46:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2021-01-13 14:46:00 (GMT)
commit861e17e0ec9cfcc00389320724e5367f510df1e9 (patch)
tree145b19f5194781a53ba504af562e4eb681f72898
parent8e79060056989a3276b3c9593f08c28580d00b9c (diff)
version 1.5.0.0HEAD1.5.0.0master
-rw-r--r--changes.txt8
-rw-r--r--doc/usr/page.rst10
-rw-r--r--issues.txt2
-rw-r--r--lentil.cabal4
-rw-r--r--src/Lentil/Args.hs2
-rw-r--r--src/Lentil/Export.hs6
-rw-r--r--src/Lentil/Types.hs2
-rw-r--r--src/Main.hs5
-rw-r--r--test/Lentil/ExportSpec.hs11
9 files changed, 41 insertions, 9 deletions
diff --git a/changes.txt b/changes.txt
index 585636b..512cb1e 100644
--- a/changes.txt
+++ b/changes.txt
@@ -1,8 +1,14 @@
+1.5.0.0
+-------
+
+- Wed 13 Jan 2021 15:31:54 CET
+- Added `file` filelist export format (request by Henning Thielemann)
+
1.4.1.0
-------
- Fri 13 Nov 2020 09:36:31 CET
-- Fixed bug in R (`) (syntactic backquotes
+- Fixed bug in R (`) (syntactic backquotes)
1.4.0.0
-------
diff --git a/doc/usr/page.rst b/doc/usr/page.rst
index 1123757..6c15b45 100644
--- a/doc/usr/page.rst
+++ b/doc/usr/page.rst
@@ -295,6 +295,16 @@ by compilers (GCC, GHC, etc.):
This is useful because it is recognised by editors like Emacs,
which can turn them into active links to the relevant file/position.
+``-f file`` exports a filelist.
+
+::
+
+ src/Lentil/Export.hs
+ src/Lentil/File.hs
+ src/Lentil/Parse/Run.hs
+ src/Lentil/Parse/Syntaxes.hs
+ src/Main.hs
+
.. raw:: html
<p><br/></p>
diff --git a/issues.txt b/issues.txt
index 2bbaab7..52eb543 100644
--- a/issues.txt
+++ b/issues.txt
@@ -23,7 +23,7 @@ src/Lentil/Parse/Syntaxes.hs
[request]
36 Consider using https://github.com/github/semantic ? [design]
45 lowercase does not work (not recognised, .r vs. .R) [bug]
- 112 rst parser doesn't respect whitespace or paragraphs. How to
+ 115 rst parser doesn't respect whitespace or paragraphs. How to
implement this without breaking other parsers? [bug] [design]
src/Main.hs
diff --git a/lentil.cabal b/lentil.cabal
index 47eb513..cf59616 100644
--- a/lentil.cabal
+++ b/lentil.cabal
@@ -1,5 +1,5 @@
name: lentil
-version: 1.4.1.0
+version: 1.5.0.0
synopsis: frugal issue tracker
description: minumum effort, cohesive issue tracker based on
ubiquitous @TODO@s and @FIXME@s conventions.
@@ -11,7 +11,7 @@ license-file: LICENSE
author: Francesco Ariis <fa-ml@ariis.it> et al.
(check authors.txt)
maintainer: Francesco Ariis <fa-ml@ariis.it>
-copyright: © 2015-2020 Francesco Ariis et al. (check authors.txt)
+copyright: © 2015-2021 Francesco Ariis et al. (check authors.txt)
category: Development, Project Management
stability: Stable
build-type: Simple
diff --git a/src/Lentil/Args.hs b/src/Lentil/Args.hs
index 2641883..c292a09 100644
--- a/src/Lentil/Args.hs
+++ b/src/Lentil/Args.hs
@@ -63,7 +63,7 @@ format = option (str >>= parseFormat)
( short 'f' <>
metavar "TYPE" <>
value Pretty <>
- help "output format (pretty, tagpop, csv, comp, xml)" )
+ help "output format (pretty, tagpop, file, csv, comp, xml)" )
where
parseFormat :: String -> ReadM Format
parseFormat s = let asl = map forTup (enumFrom minBound)
diff --git a/src/Lentil/Export.hs b/src/Lentil/Export.hs
index bc9b714..82a5cde 100644
--- a/src/Lentil/Export.hs
+++ b/src/Lentil/Export.hs
@@ -51,13 +51,17 @@ issues2Xml is = concat ["<issues>", concatMap is2x (groupBy is), "</issues>", "\
file = prettyFP . iFile
groupBy = L.groupBy ((==) `on` file)
--- markdown output
+-- todo [feature] [u:3] markdown output
-- - che genere di header? o lista di liste?
-- - come mettere i tag? /[[cdsacad] [cdsac]/
-- - lista? minuses
-- - wrap at 80? sì
-- - cmark
+issues2File :: [Issue] -> String
+issues2File is = unlines . L.nub . L.sort $ map iFile is
+
+
-----------------
-- ANCILLARIES --
-----------------
diff --git a/src/Lentil/Types.hs b/src/Lentil/Types.hs
index 7e40d02..eb9c07d 100644
--- a/src/Lentil/Types.hs
+++ b/src/Lentil/Types.hs
@@ -49,7 +49,7 @@ normaliseFlagword t = map C.toLower t
-- output format
-data Format = TagPop | Pretty | Csv | Comp | Xml
+data Format = TagPop | Pretty | File | Csv | Comp | Xml
deriving (Show, Eq, Enum, Bounded)
-- comp: as gcc/ghc would output warnings
diff --git a/src/Main.hs b/src/Main.hs
index aacaaf5..44ef3d2 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -37,8 +37,8 @@ version = infoOption versionCopy ( long "version" S.<>
short 'v' S.<>
help "show version and copyright info" )
where
- versionCopy = "\nlentil - frugal issue tracker, version 1.4.1.0\n\
- \(C) 2015-2020 Francesco Ariis - http://www.ariis.it\n\
+ versionCopy = "\nlentil - frugal issue tracker, version 1.5.0.0\n\
+ \(C) 2015-2021 Francesco Ariis - http://www.ariis.it\n\
\released under the GNU General Public License v3\n"
@@ -65,6 +65,7 @@ runLentil lo = uncurry (findIssues (loAlias lo) (loFlagwords lo))
case loFormat lo of
Pretty -> outFunction (ppIssues bCol fil)
TagPop -> outFunction (ppPopularity bCol fil)
+ File -> outFunction (issues2File fil)
Csv -> outFunction (issues2CSV fil)
Comp -> outFunction (issues2Compiler fil)
Xml -> outFunction (issues2Xml fil)
diff --git a/test/Lentil/ExportSpec.hs b/test/Lentil/ExportSpec.hs
index aee8363..3d849c0 100644
--- a/test/Lentil/ExportSpec.hs
+++ b/test/Lentil/ExportSpec.hs
@@ -35,6 +35,11 @@ xml = concat
, "</issue>"
, "</file></issues>", "\n"]
+file :: String
+file = unlines
+ ["./file",
+ "file"]
+
main :: IO ()
main = hspec spec
@@ -61,3 +66,9 @@ spec = do
it "exports issues to xml output format" $
issues2Xml is `shouldBe` xml
+ describe "issues2File" $ do
+ it "exports file list" $
+ issues2File is `shouldBe` file
+ it "does not duplicate files" $
+ issues2File (is++is) `shouldBe` file
+