Skip to content

Commit

Permalink
Merge branch 'release/1.9.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
smallhadroncollider committed Feb 3, 2020
2 parents cd0114f + 2b58b41 commit cad31bc
Showing 26 changed files with 283 additions and 101 deletions.
16 changes: 13 additions & 3 deletions .bin/build
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# stop on any errors
set -e

workDir=".stack-build"
branch=$(git rev-parse --abbrev-ref HEAD)

@@ -42,6 +45,8 @@ mkdir -p "releases/$1/taskell"
# Mac
stack build --work-dir "$workDir" --ghc-options -O3

strip "$(stack path --local-install-root --work-dir $workDir)/bin/taskell" # remove tokens

tar -czvf "releases/$1/taskell-$1_x86-64-mac.tar.gz" --directory="$(stack path --local-install-root --work-dir $workDir)/bin" "taskell"


@@ -52,6 +57,8 @@ stack build --work-dir "$workDir" --docker --ghc-options -O3
LINUX_FULL_PATH=$(find "$workDir" -path "*linux*" -and -path "*bin/taskell")
LINUX_PATH=${LINUX_FULL_PATH%"taskell"}

strip "$LINUX_FULL_PATH" # remove tokens

tar -czvf "releases/$1/taskell-$1_x86-64-linux.tar.gz" --directory="$LINUX_PATH" "taskell"

mkdir -p "releases/$1/taskell/DEBIAN"
@@ -90,9 +97,6 @@ echo "Release info copied to clipboard"
# add to Hackage
stack upload .

# Homebrew Pull Request
brew update
brew bump-formula-pr --url="https://github.com/smallhadroncollider/taskell/archive/$1.tar.gz" taskell

# Update taskell.app website
(cd docs/html && echo "---
@@ -103,5 +107,11 @@ title: {{ site.name }}
(cd docs/html/_site && git add . && git commit -m "Latest Build" && git push)
(cd docs/html && bundle exec cap production deploy)


# Homebrew Pull Request
brew update
brew bump-formula-pr --url="https://github.com/smallhadroncollider/taskell/archive/$1.tar.gz" taskell


# unstash
git stash pop
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -44,8 +44,6 @@ You can install Taskell on your Mac using [Homebrew](https://brew.sh):
brew install taskell
```

There are usually bottles (binaries) available. If these are not available for your computer, Homebrew will build Taskell from scratch, which can take a while, particularly on older machines. Occasionally the build fails the first time, but usually works on a second attempt.

### Debian/Ubuntu

[A `.deb` package is available for Debian/Ubuntu](https://github.com/smallhadroncollider/taskell/releases). Download it and install with `dpkg -i <package-name>`. You may also need to install the `libtinfo5` package (`sudo apt install libtinfo5`).
@@ -275,6 +273,16 @@ You shouldn't try to assign the `1`-`9` keys, as it will not overwrite the defau

Due dates must be input with the format `YYYY-MM-DD` or `YYYY-MM-DD HH:MM`. The date will not be accepted otherwise.

You can also pass in relative times such as `1w 2d` (for 1 week and 2 days). Valid units are:

- `s` (seconds)
- `m` (minutes)
- `h` (hours)
- `d` (days)
- `w` (weeks)

These can be used in any combination. If the time is made up only of days and/or weeks, the due date will not include a time.

By default times are stored in the Markdown file as UTC. If you would like local times (and are unlikely to open the file in lots of different timezones) then you can set `localTimes` to `true` in the `markdown` section of the [config file](#configuration). If you have this setting on and you change timezone, you'll get a diff on all your times the next time you make changes to the file.


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.1
version: 1.9.2
destination: _site/public
exclude: [deployment, Capfile, log, Gemfile, Gemfile.lock]

6 changes: 6 additions & 0 deletions docs/html/index.md
Original file line number Diff line number Diff line change
@@ -214,6 +214,9 @@ Taskell has a `config.ini` file:
filename = taskell.md

[layout]
; top/bottom padding for the taskell window
padding = 1

; the width of a column
column_width = 30

@@ -225,6 +228,9 @@ column_padding = 3
; the default icon may not display on all systems
description_indicator = ""

; whether to show the statusbar
statusbar = true

[markdown]
; the markdown to start a title line with
title = "##"
3 changes: 2 additions & 1 deletion package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: taskell
version: '1.9.1.0'
version: '1.9.2.0'
category: Command Line Tools
author: Mark Wales
maintainer: [email protected]
@@ -48,6 +48,7 @@ library:
- IO.Markdown.Parser
- IO.Markdown.Serializer
- IO.HTTP.GitHub
- IO.HTTP.GitHub.Card
- IO.HTTP.Trello.List
- IO.HTTP.Trello.ChecklistItem
- IO.Keyboard
25 changes: 18 additions & 7 deletions roadmap.md
Original file line number Diff line number Diff line change
@@ -12,6 +12,10 @@
## Refactoring

- Refactor Task `Update` to be `Task -> Maybe Task`?
- Refactor IO.Github
* [x] Issue -> AutomatedCard
* [ ] Tidy up logic
* [ ] Less nesting
- Add tests for IO.GitHub
- Break up State module
* [ ] More of logic should go into Task, List, and Lists
@@ -21,6 +25,8 @@
## Bugs

- Help modal needs to wrap and scroll
- Import GitHub descriptions should retain new lines
> Need to sort new line rendering first
- Empty subtasks create "---" task
> Feel like I added this for some reason, can't think why...
- Pressing Esc while editing a task should go back to previous version?
@@ -40,13 +46,6 @@

## Features

- Key binding to move to top of next/previous list
> Should be able to not have a key defined for bottom of list
- Theming sub-tasks
> Currently use other styling
* [ ] Selected
* [ ] Not done
* [ ] Done
- Define key binding info in one place
> Currently all over the place
* [ ] Bindings
@@ -124,6 +123,15 @@

## In Progress

- Theming sub-tasks
> Currently use other styling
* [ ] Selected
* [ ] Not done
* [ ] Done
- Top level `Taskell` namespace
- Add `y` to relative date parsing
- Key binding to move to top of next/previous list
> Should be able to not have a key defined for bottom of list
## Done

@@ -365,3 +373,6 @@
> See #54
* [x] Padding
* [x] Show toggle bar
- Add info about relative dates to Readme
- Refactor Draw/Main to remove `if` statement
- Refactor Config files to use applicatives
2 changes: 1 addition & 1 deletion src/Config.hs
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ import ClassyPrelude
import Data.FileEmbed (embedFile)

version :: Text
version = "1.9.1"
version = "1.9.2"

usage :: Text
usage = decodeUtf8 $(embedFile "templates/usage.txt")
1 change: 1 addition & 0 deletions src/Events/Actions/Normal.hs
Original file line number Diff line number Diff line change
@@ -33,6 +33,7 @@ events
, (A.Left, left)
, (A.Right, right)
, (A.Bottom, bottom)
, (A.Top, top)
-- new tasks
, (A.New, (startCreate =<<) . (newItem =<<) . store)
, (A.NewAbove, (startCreate =<<) . (above =<<) . store)
2 changes: 2 additions & 0 deletions src/Events/Actions/Types.hs
Original file line number Diff line number Diff line change
@@ -17,6 +17,7 @@ data ActionType
| Left
| Right
| Bottom
| Top
| New
| NewAbove
| NewBelow
@@ -56,6 +57,7 @@ read "next" = Next
read "left" = Left
read "right" = Right
read "bottom" = Bottom
read "top" = Top
read "new" = New
read "newAbove" = NewAbove
read "newBelow" = NewBelow
7 changes: 7 additions & 0 deletions src/Events/State.hs
Original file line number Diff line number Diff line change
@@ -24,6 +24,7 @@ module Events.State
, above
, below
, bottom
, top
, previous
, duplicate
, next
@@ -206,6 +207,12 @@ bottom = pure . selectLast
selectLast :: InternalStateful
selectLast state = setIndex state (countCurrent state - 1)

top :: Stateful
top = pure . selectFirst

selectFirst :: InternalStateful
selectFirst state = setIndex state (0)

removeBlank :: Stateful
removeBlank state = do
currentTask <- getCurrentTask state
23 changes: 14 additions & 9 deletions src/IO/Config/General.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
module IO.Config.General where
module IO.Config.General
( Config
, defaultConfig
, parser
, filename
, debug
) where

import ClassyPrelude

@@ -14,12 +20,11 @@ data Config = Config
defaultConfig :: Config
defaultConfig = Config {filename = "taskell.md", debug = False}

filenameP :: SectionParser String
filenameP = maybe (filename defaultConfig) unpack . (noEmpty =<<) <$> fieldMb "filename"

debugP :: SectionParser Bool
debugP = fieldFlagDef "debug" False

parser :: IniParser Config
parser =
fromMaybe defaultConfig <$>
sectionMb
"general"
(do filenameCf <-
maybe (filename defaultConfig) unpack . (noEmpty =<<) <$> fieldMb "filename"
debugCf <- fieldFlagDef "debug" False
pure Config {filename = filenameCf, debug = debugCf})
parser = fromMaybe defaultConfig <$> sectionMb "general" (Config <$> filenameP <*> debugP)
17 changes: 10 additions & 7 deletions src/IO/Config/GitHub.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
module IO.Config.GitHub where
module IO.Config.GitHub
( Config
, defaultConfig
, parser
, token
) where

import ClassyPrelude

@@ -13,10 +18,8 @@ data Config = Config
defaultConfig :: Config
defaultConfig = Config {token = Nothing}

tokenP :: SectionParser (Maybe GitHubToken)
tokenP = fieldMb "token"

parser :: IniParser Config
parser =
fromMaybe defaultConfig <$>
sectionMb
"github"
(do tokenCf <- fieldMb "token"
pure Config {token = tokenCf})
parser = fromMaybe defaultConfig <$> sectionMb "github" (Config <$> tokenP)
11 changes: 10 additions & 1 deletion src/IO/Config/Layout.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
module IO.Config.Layout where
module IO.Config.Layout
( Config
, defaultConfig
, parser
, padding
, columnWidth
, columnPadding
, descriptionIndicator
, statusBar
) where

import ClassyPrelude

58 changes: 34 additions & 24 deletions src/IO/Config/Markdown.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
module IO.Config.Markdown where
module IO.Config.Markdown
( Config(Config)
, defaultConfig
, parser
, titleOutput
, taskOutput
, descriptionOutput
, dueOutput
, subtaskOutput
, localTimes
) where

import ClassyPrelude

@@ -26,31 +36,31 @@ defaultConfig =
, localTimes = False
}

titleOutputP :: SectionParser Text
titleOutputP = fromMaybe (titleOutput defaultConfig) . (noEmpty . parseText =<<) <$> fieldMb "title"

taskOutputP :: SectionParser Text
taskOutputP = fromMaybe (taskOutput defaultConfig) . (noEmpty . parseText =<<) <$> fieldMb "task"

descriptionOutputP :: SectionParser Text
descriptionOutputP =
fromMaybe (descriptionOutput defaultConfig) . (noEmpty . parseText =<<) <$> fieldMb "summary"

dueOutputP :: SectionParser Text
dueOutputP = fromMaybe (dueOutput defaultConfig) . (noEmpty . parseText =<<) <$> fieldMb "due"

subtaskOutputP :: SectionParser Text
subtaskOutputP =
fromMaybe (subtaskOutput defaultConfig) . (noEmpty . parseText =<<) <$> fieldMb "subtask"

localTimesP :: SectionParser Bool
localTimesP = fieldFlagDef "localTimes" (localTimes defaultConfig)

parser :: IniParser Config
parser =
fromMaybe defaultConfig <$>
sectionMb
"markdown"
(do titleOutputCf <-
fromMaybe (titleOutput defaultConfig) . (noEmpty . parseText =<<) <$>
fieldMb "title"
taskOutputCf <-
fromMaybe (taskOutput defaultConfig) . (noEmpty . parseText =<<) <$> fieldMb "task"
descriptionOutputCf <-
fromMaybe (descriptionOutput defaultConfig) . (noEmpty . parseText =<<) <$>
fieldMb "summary"
dueOutputCf <-
fromMaybe (dueOutput defaultConfig) . (noEmpty . parseText =<<) <$> fieldMb "due"
subtaskOutputCf <-
fromMaybe (subtaskOutput defaultConfig) . (noEmpty . parseText =<<) <$>
fieldMb "subtask"
localTimesCf <- fieldFlagDef "localTimes" (localTimes defaultConfig)
pure
Config
{ titleOutput = titleOutputCf
, taskOutput = taskOutputCf
, descriptionOutput = descriptionOutputCf
, dueOutput = dueOutputCf
, subtaskOutput = subtaskOutputCf
, localTimes = localTimesCf
})
(Config <$> titleOutputP <*> taskOutputP <*> descriptionOutputP <*> dueOutputP <*>
subtaskOutputP <*>
localTimesP)
17 changes: 10 additions & 7 deletions src/IO/Config/Trello.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
module IO.Config.Trello where
module IO.Config.Trello
( Config
, defaultConfig
, parser
, token
) where

import ClassyPrelude

@@ -13,10 +18,8 @@ data Config = Config
defaultConfig :: Config
defaultConfig = Config {token = Nothing}

tokenP :: SectionParser (Maybe TrelloToken)
tokenP = fieldMb "token"

parser :: IniParser Config
parser =
fromMaybe defaultConfig <$>
sectionMb
"trello"
(do tokenCf <- fieldMb "token"
pure Config {token = tokenCf})
parser = fromMaybe defaultConfig <$> sectionMb "trello" (Config <$> tokenP)
Loading

0 comments on commit cad31bc

Please sign in to comment.