Skip to content

Commit

Permalink
Merge branch 'release/1.9.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
smallhadroncollider committed Jun 17, 2020
2 parents a37728e + cf74578 commit 020103e
Showing 10 changed files with 41 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .cmt
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@

# predefined messages
{
r = "docs: updates Stack resolver"
r = "chore: updates Stack resolver"
vb = "chore: version bump"
readme = "docs: updates readme"
}
2 changes: 1 addition & 1 deletion docs/html/_config.yml
Original file line number Diff line number Diff line change
@@ -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]

13 changes: 12 additions & 1 deletion docs/html/index.md
Original file line number Diff line number Diff line change
@@ -302,14 +302,25 @@ 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
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:
2 changes: 1 addition & 1 deletion package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: taskell
version: '1.9.3.0'
version: '1.9.4'
category: Command Line Tools
author: Mark Wales
maintainer: [email protected]
13 changes: 11 additions & 2 deletions src/Taskell/Config.hs
Original file line number Diff line number Diff line change
@@ -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")
17 changes: 3 additions & 14 deletions src/Taskell/IO.hs
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion src/Taskell/IO/Markdown/Parser.hs
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion stack.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resolver: lts-15.0
resolver: lts-16.1
pvp-bounds: both
packages:
- .
8 changes: 4 additions & 4 deletions stack.yaml.lock
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions test/Taskell/IO/Markdown/ParserTest.hs
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit 020103e

Please sign in to comment.