From 2abc849965792bc582b5bb15f7992d2d847158fc Mon Sep 17 00:00:00 2001 From: Mark Wales Date: Mon, 17 Feb 2020 13:45:00 +0000 Subject: [PATCH 1/8] docs: updates taskell.app readme --- docs/html/index.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/html/index.md b/docs/html/index.md index cc789d13..7c27bcca 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: From 11c5261ad79b114f5a516c5cd86bd8bcbdc37e7a Mon Sep 17 00:00:00 2001 From: Mark Wales Date: Mon, 17 Feb 2020 14:22:36 +0000 Subject: [PATCH 2/8] refactor: uses Paths_taskell to get version --- package.yaml | 2 +- src/Taskell/Config.hs | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/package.yaml b/package.yaml index 2e821497..eb26bf27 100644 --- a/package.yaml +++ b/package.yaml @@ -1,5 +1,5 @@ name: taskell -version: '1.9.3.0' +version: '1.9.3' category: Command Line Tools author: Mark Wales maintainer: mark@smallhadroncollider.com diff --git a/src/Taskell/Config.hs b/src/Taskell/Config.hs index 0374cd12..22f18669 100644 --- a/src/Taskell/Config.hs +++ b/src/Taskell/Config.hs @@ -4,10 +4,13 @@ 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) usage :: Text usage = decodeUtf8 $(embedFile "templates/usage.txt") From e8d8bfdd4e80b9d0a85fd0223a541de484729bb7 Mon Sep 17 00:00:00 2001 From: Mark Wales Date: Mon, 17 Feb 2020 15:01:31 +0000 Subject: [PATCH 3/8] refactor: moved embeds to Taskell.Config keeps Template Haskell in fewer files --- src/Taskell/Config.hs | 6 ++++++ src/Taskell/IO.hs | 17 +++-------------- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/src/Taskell/Config.hs b/src/Taskell/Config.hs index 22f18669..d4f811f6 100644 --- a/src/Taskell/Config.hs +++ b/src/Taskell/Config.hs @@ -12,5 +12,11 @@ import qualified Paths_taskell (version) version :: Text 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 813a31ae..84913385 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 From 756a0886a94678373c44b4c19b033132c861064d Mon Sep 17 00:00:00 2001 From: Mark Wales Date: Mon, 6 Apr 2020 16:15:45 +0100 Subject: [PATCH 4/8] chore: updates Stack resolver --- stack.yaml | 2 +- stack.yaml.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/stack.yaml b/stack.yaml index c2ee1606..974e9b79 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,4 +1,4 @@ -resolver: lts-15.0 +resolver: lts-15.7 pvp-bounds: both packages: - . diff --git a/stack.yaml.lock b/stack.yaml.lock index 8b69b79d..2296d71b 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: 491389 + url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/15/7.yaml + sha256: 92ab6303fe20ec928461c82ce0980b4d17c06f4e66205a2967e476474f686c17 + original: lts-15.7 From 1b20334b411ff4ee5088db6d27fd0b27b4107c58 Mon Sep 17 00:00:00 2001 From: Mark Wales Date: Wed, 17 Jun 2020 09:28:43 +0100 Subject: [PATCH 5/8] fix: line breaks at end of file allowed (fixes #78) --- src/Taskell/IO/Markdown/Parser.hs | 2 +- test/Taskell/IO/Markdown/ParserTest.hs | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Taskell/IO/Markdown/Parser.hs b/src/Taskell/IO/Markdown/Parser.hs index 420fc945..b0bb915d 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/test/Taskell/IO/Markdown/ParserTest.hs b/test/Taskell/IO/Markdown/ParserTest.hs index c46b2a82..909a8ff8 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" From 6382980b81f91735245aa1d5457e41bd6cb28b0b Mon Sep 17 00:00:00 2001 From: Mark Wales Date: Wed, 17 Jun 2020 09:34:22 +0100 Subject: [PATCH 6/8] chore: fixes typo in .cmt file --- .cmt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cmt b/.cmt index 2157c79e..ec10c783 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" } From 96916d17be3e88ec3ef3c37fb5654769d55584c3 Mon Sep 17 00:00:00 2001 From: Mark Wales Date: Wed, 17 Jun 2020 11:06:47 +0100 Subject: [PATCH 7/8] chore: updates Stack resolver --- stack.yaml | 2 +- stack.yaml.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/stack.yaml b/stack.yaml index 974e9b79..2a46bdc4 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,4 +1,4 @@ -resolver: lts-15.7 +resolver: lts-16.1 pvp-bounds: both packages: - . diff --git a/stack.yaml.lock b/stack.yaml.lock index 2296d71b..d77e2d4e 100644 --- a/stack.yaml.lock +++ b/stack.yaml.lock @@ -13,7 +13,7 @@ packages: hackage: tz-0.1.3.3 snapshots: - completed: - size: 491389 - url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/15/7.yaml - sha256: 92ab6303fe20ec928461c82ce0980b4d17c06f4e66205a2967e476474f686c17 - original: lts-15.7 + size: 531237 + url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/16/1.yaml + sha256: 954b6b14b0c8130732cf4773f7ebb4efc9a44600d1a5265d142868bf93462bc6 + original: lts-16.1 From cf745785e55ef6fcfc0ac0a6f991ef558061b56a Mon Sep 17 00:00:00 2001 From: Mark Wales Date: Wed, 17 Jun 2020 11:46:14 +0100 Subject: [PATCH 8/8] chore: version bump --- docs/html/_config.yml | 2 +- package.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/html/_config.yml b/docs/html/_config.yml index 1a17470a..61151a74 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/package.yaml b/package.yaml index eb26bf27..be200186 100644 --- a/package.yaml +++ b/package.yaml @@ -1,5 +1,5 @@ name: taskell -version: '1.9.3' +version: '1.9.4' category: Command Line Tools author: Mark Wales maintainer: mark@smallhadroncollider.com