summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Wales <mark@smallhadroncollider.com>2020-06-17 11:48:19 +0100
committerMark Wales <mark@smallhadroncollider.com>2020-06-17 11:48:19 +0100
commit020103e2235cc9bbbdb3159e508791baef7baec3 (patch)
tree33a60d3949afcc310c6223b1b584ed2b8a5a5497
parenta37728ef296505ea96313eb51f393ec2b5bfa5d9 (diff)
parentcf745785e55ef6fcfc0ac0a6f991ef558061b56a (diff)
Merge branch 'release/1.9.4'1.9.4
-rw-r--r--.cmt2
-rwxr-xr-xdocs/html/_config.yml2
-rw-r--r--docs/html/index.md13
-rw-r--r--package.yaml2
-rw-r--r--src/Taskell/Config.hs13
-rw-r--r--src/Taskell/IO.hs17
-rw-r--r--src/Taskell/IO/Markdown/Parser.hs2
-rw-r--r--stack.yaml2
-rw-r--r--stack.yaml.lock8
-rw-r--r--test/Taskell/IO/Markdown/ParserTest.hs6
10 files changed, 41 insertions, 26 deletions
diff --git a/.cmt b/.cmt
index 2157c79..ec10c78 100644
--- a/.cmt
+++ b/.cmt
@@ -14,7 +14,7 @@
# predefined messages
{
- r = "docs: updates Stack resolver"
+ r = "chore: updates Stack resolver"
vb = "chore: version bump"
readme = "docs: updates readme"
}
diff --git a/docs/html/_config.yml b/docs/html/_config.yml
index 1a17470..61151a7 100755
--- a/docs/html/_config.yml
+++ b/docs/html/_config.yml
@@ -3,7 +3,7 @@ title: taskell
tagline: Command-line Kanban board/task management
baseurl: ""
locale: "en"
-version: 1.9.3
+version: 1.9.4
destination: _site/public
exclude: [deployment, Capfile, log, Gemfile, Gemfile.lock]
diff --git a/docs/html/index.md b/docs/html/index.md
index cc789d1..7c27bcc 100644
--- a/docs/html/index.md
+++ b/docs/html/index.md
@@ -302,7 +302,7 @@ You can edit Taskell's colour-scheme by editing `theme.ini`:
title.fg = green
; status bar
-statusBar.bg = magenta
+statusBar.bg = blue
statusBar.fg = black
; current list title
@@ -310,6 +310,17 @@ titleCurrent.fg = blue
; current task
taskCurrent.fg = magenta
+
+; subtasks
+; selected
+subtaskCurrent.fg = magenta
+; incomplete
+subtaskIncomplete.fg = blue
+; complete
+subtaskComplete.fg = yellow
+
+; disabled
+disabled.fg = yellow
```
You can also change the background and default text colour:
diff --git a/package.yaml b/package.yaml
index 2e82149..be20018 100644
--- a/package.yaml
+++ b/package.yaml
@@ -1,5 +1,5 @@
name: taskell
-version: '1.9.3.0'
+version: '1.9.4'
category: Command Line Tools
author: Mark Wales
maintainer: mark@smallhadroncollider.com
diff --git a/src/Taskell/Config.hs b/src/Taskell/Config.hs
index 0374cd1..d4f811f 100644
--- a/src/Taskell/Config.hs
+++ b/src/Taskell/Config.hs
@@ -4,10 +4,19 @@ module Taskell.Config where
import ClassyPrelude
-import Data.FileEmbed (embedFile)
+import Data.FileEmbed (embedFile)
+import Data.Version (showVersion)
+import Language.Haskell.TH.Syntax (liftString)
+import qualified Paths_taskell (version)
version :: Text
-version = "1.9.3"
+version = $(liftString $ showVersion Paths_taskell.version)
+
+trelloUsage :: Text
+trelloUsage = decodeUtf8 $(embedFile "templates/trello-token.txt")
+
+githubUsage :: Text
+githubUsage = decodeUtf8 $(embedFile "templates/github-token.txt")
usage :: Text
usage = decodeUtf8 $(embedFile "templates/usage.txt")
diff --git a/src/Taskell/IO.hs b/src/Taskell/IO.hs
index 813a31a..8491338 100644
--- a/src/Taskell/IO.hs
+++ b/src/Taskell/IO.hs
@@ -1,17 +1,14 @@
-{-# LANGUAGE TemplateHaskell #-}
-
module Taskell.IO where
import ClassyPrelude
import Control.Monad.Reader (runReader)
-import Data.FileEmbed (embedFile)
import Data.Text.Encoding (decodeUtf8With)
import System.Directory (doesFileExist, getCurrentDirectory)
import Data.Time.Zones (TZ)
-import Taskell.Config (usage, version)
+import Taskell.Config (githubUsage, trelloUsage, usage, version)
import Taskell.Data.Lists (Lists, analyse, initial)
import Taskell.IO.Config (Config, general, github, markdown, trello)
@@ -106,18 +103,10 @@ createRemote tokenFn missingToken getFn identifier path = do
bool (pure Exit) (Load path ls <$ lift (writeData tz config ls path))
createTrello :: Trello.TrelloBoardID -> FilePath -> ReaderConfig Next
-createTrello =
- createRemote
- (Trello.token . trello)
- (decodeUtf8 $(embedFile "templates/trello-token.txt"))
- Trello.getLists
+createTrello = createRemote (Trello.token . trello) trelloUsage Trello.getLists
createGitHub :: GitHub.GitHubIdentifier -> FilePath -> ReaderConfig Next
-createGitHub =
- createRemote
- (GitHub.token . github)
- (decodeUtf8 $(embedFile "templates/github-token.txt"))
- GitHub.getLists
+createGitHub = createRemote (GitHub.token . github) githubUsage GitHub.getLists
exists :: Text -> ReaderConfig (Maybe FilePath)
exists filepath = do
diff --git a/src/Taskell/IO/Markdown/Parser.hs b/src/Taskell/IO/Markdown/Parser.hs
index 420fc94..b0bb915 100644
--- a/src/Taskell/IO/Markdown/Parser.hs
+++ b/src/Taskell/IO/Markdown/Parser.hs
@@ -57,7 +57,7 @@ listP :: Symbol -> Parser L.List
listP sym = L.create <$> listTitleP sym <*> (fromList <$> many' (taskP sym))
markdownP :: Symbol -> Parser LS.Lists
-markdownP sym = fromList <$> many1 (listP sym) <* endOfInput
+markdownP sym = fromList <$> many1 (listP sym) <* skipSpace <* endOfInput
-- parse
parse :: Config -> Text -> Either Text LS.Lists
diff --git a/stack.yaml b/stack.yaml
index c2ee160..2a46bdc 100644
--- a/stack.yaml
+++ b/stack.yaml
@@ -1,4 +1,4 @@
-resolver: lts-15.0
+resolver: lts-16.1
pvp-bounds: both
packages:
- .
diff --git a/stack.yaml.lock b/stack.yaml.lock
index 8b69b79..d77e2d4 100644
--- a/stack.yaml.lock
+++ b/stack.yaml.lock
@@ -13,7 +13,7 @@ packages:
hackage: tz-0.1.3.3
snapshots:
- completed:
- size: 488576
- url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/15/0.yaml
- sha256: e4b6a87b47ec1cf63a7f1a0884a3b276fce2b0d174a10e8753c4f618e7983568
- original: lts-15.0
+ size: 531237
+ url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/16/1.yaml
+ sha256: 954b6b14b0c8130732cf4773f7ebb4efc9a44600d1a5265d142868bf93462bc6
+ original: lts-16.1
diff --git a/test/Taskell/IO/Markdown/ParserTest.hs b/test/Taskell/IO/Markdown/ParserTest.hs
index c46b2a8..909a8ff 100644
--- a/test/Taskell/IO/Markdown/ParserTest.hs
+++ b/test/Taskell/IO/Markdown/ParserTest.hs
@@ -134,6 +134,12 @@ test_parser =
"List item with Sub-Task"
(Right (makeSubTask "Blah" True))
(parse defaultConfig "## Test\n\n- Test Item\n * [x] Blah"))
+ , testCase
+ "Line break at end"
+ (assertEqual
+ "List item"
+ (Right listWithItem)
+ (parse defaultConfig "## Test\n\n- Test Item\n\n"))
]
, testGroup
"Alternative Format"