summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfffaaa <>2019-01-08 16:17:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2019-01-08 16:17:00 (GMT)
commitcbbb6cdc30bf8f1c0080c388b1ac20ab37e0791b (patch)
treeae1d0352c50f6101ffd7fe95e7daced3c07225e4
parent70bea08ae67389320959c24bad36610c3df0a4a8 (diff)
version 1.1.1.11.1.1.1
-rw-r--r--changes.txt6
-rw-r--r--doc/usr/page.rst1
-rw-r--r--issues.txt3
-rw-r--r--lentil.cabal28
-rw-r--r--src/Lentil/Parse/Run.hs22
-rw-r--r--src/Lentil/Parse/Source.hs4
-rw-r--r--src/Lentil/Parse/Syntaxes.hs2
-rw-r--r--src/Main.hs2
8 files changed, 50 insertions, 18 deletions
diff --git a/changes.txt b/changes.txt
index 9136057..4d06f1b 100644
--- a/changes.txt
+++ b/changes.txt
@@ -1,3 +1,9 @@
+1.1.1.1
+-------
+
+- Released Tue 08 Jan 2019 17:02:01 CET
+- Added basic Markdown support (requested by Massimo Zaniboni)
+- Headless progress bar (requested by qptain nemo)
1.1.0.0
-------
diff --git a/doc/usr/page.rst b/doc/usr/page.rst
index 3d42314..0841968 100644
--- a/doc/usr/page.rst
+++ b/doc/usr/page.rst
@@ -180,6 +180,7 @@ As now lentil parses:
- OpenGL Shading Language source files (``.glsl``)
- Restructured Text (Sphinx) ``.. ::todo`` directives (``.rst``)
- Org mode for Emacs files (``.org``), both ``TODO`` and list-like items
+- Markdown files (``.md``)
- plain text files (``.txt``)
If you want a file type ``.xyz`` to be recognised as one in the list above,
diff --git a/issues.txt b/issues.txt
index 188e186..24f8fe5 100644
--- a/issues.txt
+++ b/issues.txt
@@ -1,3 +1,6 @@
+bin/sign.sh
+ 1 put this in Setup.hs?
+
doc/dev/issues.txt
11 check --output pretty, there are trailing white spaces [bug] [u:1]
12 win (and mac?) builds [package] [u:2] [2017]
diff --git a/lentil.cabal b/lentil.cabal
index 4570299..3fac371 100644
--- a/lentil.cabal
+++ b/lentil.cabal
@@ -1,5 +1,5 @@
name: lentil
-version: 1.1.0.1
+version: 1.1.1.1
synopsis: frugal issue tracker
description: minumum effort, cohesive issue tracker based on
ubiquitous @TODO@s and @FIXME@s conventions.
@@ -64,10 +64,15 @@ executable lentil
pipes >= 4.2 && < 4.4,
optparse-applicative >= 0.13 && < 0.15,
regex-tdfa==1.2.*,
- natural-sort==0.1.*, parsec==3.1.*, filepath==1.4.*,
- filemanip==0.3.*, ansi-wl-pprint==0.6.*, csv==0.1.*,
- terminal-progress-bar==0.2.*,
- text==1.2.*, semigroups==0.18.*
+ natural-sort==0.1.*,
+ parsec==3.1.*,
+ filepath==1.4.*,
+ filemanip==0.3.*,
+ ansi-wl-pprint==0.6.*,
+ csv==0.1.*,
+ terminal-progress-bar==0.4.*,
+ text==1.2.*,
+ semigroups==0.18.*
other-modules: Lentil.Types, Lentil.Args, Lentil.File, Lentil.Print,
Lentil.Query, Lentil.Export, Lentil.Parse.Source,
Lentil.Parse.Issue Lentil.Parse.Syntaxes,
@@ -93,12 +98,17 @@ test-suite test
pipes >= 4.2 && < 4.4,
optparse-applicative >= 0.13 && < 0.15,
regex-tdfa==1.2.*,
- natural-sort==0.1.*, parsec==3.1.*, filepath==1.4.*,
- filemanip==0.3.*, ansi-wl-pprint==0.6.*, csv==0.1.*,
- terminal-progress-bar==0.2.*, text==1.2.*,
+ natural-sort==0.1.*,
+ parsec==3.1.*,
+ filepath==1.4.*,
+ filemanip==0.3.*,
+ ansi-wl-pprint==0.6.*,
+ csv==0.1.*,
+ terminal-progress-bar==0.4.*,
+ text==1.2.*,
semigroups==0.18.*
-- same as above, plus hspec
- , hspec >= 2.3 && < 2.6
+ , hspec >= 2.3 && < 2.7
other-modules: Lentil.Types, Lentil.Args, Lentil.File, Lentil.Print,
Lentil.Query, Lentil.Export, Lentil.Parse.Source,
Lentil.Parse.Issue, Lentil.Parse.Syntaxes,
diff --git a/src/Lentil/Parse/Run.hs b/src/Lentil/Parse/Run.hs
index 1f36bee..789db3d 100644
--- a/src/Lentil/Parse/Run.hs
+++ b/src/Lentil/Parse/Run.hs
@@ -25,6 +25,7 @@ import qualified Data.Functor.Identity as I
import qualified System.ProgressBar as PB
import qualified Control.Monad as CM
import qualified Data.Text as T
+import qualified Data.Text.Lazy as TL
import qualified Data.Text.IO as TI
import qualified Control.Exception as E
@@ -69,12 +70,23 @@ fpExist t = await >>= \(fp, k) ->
else yield fp
where
fi i = fromIntegral i
- lbl = show t ++ " source files"
- pb k = PB.mkProgressBar (PB.msg lbl)
- PB.percentage 40
- (PB.Progress (fi k) (fi t))
pbe k = CM.when (mod k 30 == 0 && t > 100)
- (liftIO (perrEph $ pb k))
+ (liftIO (() <$ pb k))
+
+ -- the bar itself
+ pb k = PB.newProgressBar
+ myBar
+ 2
+ (PB.Progress (fi k) (fi t) ())
+ myBar = PB.defStyle {
+ PB.styleDone = '*',
+ PB.styleCurrent = '*',
+ PB.styleTodo = ' ',
+ PB.styleWidth = PB.ConstantWidth 40,
+ PB.stylePrefix = PB.msg barMes
+ }
+ barMes = TL.pack $ show t ++ " source files"
+
-- pick appropriate parser (if exists)
fp2par :: [Alias] -> Pipe FilePath (FilePath, ParSource [Comment]) IO ()
diff --git a/src/Lentil/Parse/Source.hs b/src/Lentil/Parse/Source.hs
index 13ca254..db49daa 100644
--- a/src/Lentil/Parse/Source.hs
+++ b/src/Lentil/Parse/Source.hs
@@ -221,7 +221,7 @@ orgListMulti = MultiLine <$>
-- header of the list item.
( try (newline *> newline) <|>
try (newline <* lookAhead (listMarker *> spaces)) <|>
- (eof *> pure 'x')
+ ('x' <$ eof)
)
orgListSingle :: ParSource CommentString
@@ -248,7 +248,7 @@ listMarker = choice
numMark]
where
numMark :: ParSource Char
- numMark = (digit *> (char '.' <|> char ')'))
+ numMark = digit *> (char '.' <|> char ')')
orgOther :: ParSource ()
diff --git a/src/Lentil/Parse/Syntaxes.hs b/src/Lentil/Parse/Syntaxes.hs
index 271e435..60e73da 100644
--- a/src/Lentil/Parse/Syntaxes.hs
+++ b/src/Lentil/Parse/Syntaxes.hs
@@ -66,7 +66,7 @@ languages = [ ([".hs", ".lhs",
([".sml"], Just sml),
([".rst"], Just rst), -- reStructuredText
([".org"], Just org), -- org-mode
- ([".txt"], Just text) ]
+ ([".txt", ".md"], Just text) ]
haskell, c, javascript, pascal, python, ruby, perl, nix,
xml, erlang, ocaml, rust, sml, rst, org, text :: ParSource [CommentString]
diff --git a/src/Main.hs b/src/Main.hs
index f84b765..b1f8bf4 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -32,7 +32,7 @@ version = infoOption versionCopy ( long "version" S.<>
short 'v' S.<>
help "show version and copyright info" )
where
- versionCopy = "\nlentil - frugal issue tracker, version 1.1.0.1\n\
+ versionCopy = "\nlentil - frugal issue tracker, version 1.1.1.1\n\
\(C) 2015-2018 Francesco Ariis - http://www.ariis.it\n\
\released under the GNU General Public License v3\n"