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" } 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/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: diff --git a/package.yaml b/package.yaml index 2e821497..be200186 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 0374cd12..d4f811f6 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 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 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/stack.yaml b/stack.yaml index c2ee1606..2a46bdc4 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 8b69b79d..d77e2d4e 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 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"