Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

Commit

Permalink
Merge branch 'release/1.4.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
smallhadroncollider committed May 2, 2019
2 parents b57e4c8 + 13e0f00 commit dc3d98b
Show file tree
Hide file tree
Showing 12 changed files with 102 additions and 42 deletions.
9 changes: 9 additions & 0 deletions .bin/build
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,12 @@ echo "Release info copied to clipboard"
# Homebrew Pull Request
brew update
brew bump-formula-pr --url="https://github.com/smallhadroncollider/taskell/archive/$1.tar.gz"

# Update taskell.app website
(cd docs/html && echo "---
layout: default
title: {{ site.name }}
---
" > index.md && cat ../../README.md >> index.md && jekyll build)
(cd docs/html/_site && git add . && git commit -m "Latest Build" && git push)
(cd docs/html && cap production deploy)
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,8 @@ listLeft = <

Available special keys: `<Space>`, `<Enter>`, `<Backspace>`, `<Left>`, `<Right>`, `<Up>`, `<Down>`

On a Mac you can use the `alt` characters: e.g. `quit = œ` is equivalent to `alt+q`.

You shouldn't try to assign the `1`-`9` keys, as it will not overwrite the default behaviour.


Expand Down
2 changes: 1 addition & 1 deletion docs/html/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: taskell
tagline: Command-line Kanban board/task managment
baseurl: ""
locale: "en"
version: 1.4.2
version: 1.4.3
destination: _site/public
exclude: [deployment, Capfile, log, Gemfile, Gemfile.lock]

Expand Down
82 changes: 71 additions & 11 deletions docs/html/index.md
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ Follow [@taskellcli](https://twitter.com/taskellcli) on Twitter for updates
- [Installation](#installation)
- [Using Taskell](#using-taskell)
- [Options](#options)
- [Controls](#controls)
- [Storage](#storage)
- [Importing Trello Boards](#importing-trello-boards)
- [Importing GitHub Projects](#importing-github-projects)
- [Configuration](#configuration)
- [Controls](#controls)
- [Theming](#theming)
- [Roadmap](#roadmap)

Expand All @@ -52,15 +52,25 @@ There are usually bottles (binaries) available. If these are not available for y

### 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>`.
[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`).

### Fedora

Run `sudo dnf install ncurses-compat-libs` then download and run binary as described below.
Not officially supported, but try running `sudo dnf install ncurses-compat-libs` then download and run the binary as described below. If that doesn't work you may need to build from scratch ([Cabal](#cabal)/[Stack](#stack)).

### Binaries

[A binary is available for Mac and Linux](https://github.com/smallhadroncollider/taskell/releases). Download it and copy it to a directory in your `$PATH` (e.g. `/usr/local/bin` or `/usr/bin`).
[A binary is available for Mac and Debian/Ubuntu](https://github.com/smallhadroncollider/taskell/releases). Download it and copy it to a directory in your `$PATH` (e.g. `/usr/local/bin` or `/usr/bin`).

### Cabal

You can install Taskell with `cabal`:

```bash
cabal install taskell
```

Make sure you run `cabal update` if you haven't run it recently.

### Stack

Expand All @@ -78,10 +88,6 @@ If none of the above options work you can build taskell using [Stack](https://do
- `-t <trello-board-id>`: import a Trello board ([see below](#importing-trello-boards))
- `-g <github-project-id>`: import a GitHub project ([see below](#importing-github-projects))

### Controls

Press `?` for a [list of controls](https://github.com/smallhadroncollider/taskell/blob/master/templates/controls.md)

#### Tips

- If you're using a simple two-column "To Do" and "Done" then use the space bar to mark an item as complete while staying in the "To Do" list. If you're using a more complicated column setup then you will want to use `H`/`L` to move tasks between columns.
Expand Down Expand Up @@ -197,7 +203,9 @@ This would then show you a list of possible projects to import. Enter the number

## Configuration

You can edit Taskell's settings by editing `~/.taskell/config.ini`:
Taskell uses the [XDG Base Directory Specification](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html), so it will look for an `$XDG_CONFIG_HOME` environmental variable and create a directory named `taskell` inside it. If this variable is not found it will create the `taskell` directory in `~/.config/`. (If you've been using Taskell since <= 1.3.5 then it will be in a `~/.taskell` directory, feel free to move this to the XDG directory.)

Taskell has a `config.ini` file:

```ini
[general]
Expand Down Expand Up @@ -244,9 +252,61 @@ subtask = "-"

**Warning**: currently if you change your `[markdown]` settings any older files stored with different settings will not be readable.

### Controls

You can edit keyboard bindings in the `bindings.ini` config file.

The default bindings are as follows:

```ini
# general
quit = q
undo = u
search = /
help = ?

# navigation
previous = k
next = j
left = h
right = l
bottom = G

# new tasks
new = a
newAbove = O
newBelow = o

# editing tasks
edit = e, A, i
clear = C
delete = D
detail = <Enter>
dueDate = @

# moving tasks
moveUp = K
moveDown = J
moveLeft = H
moveRight = L, <Space>
moveMenu = m

# lists
listNew = N
listEdit = E
listDelete = X
listRight = >
listLeft = <
```

Available special keys: `<Space>`, `<Enter>`, `<Backspace>`, `<Left>`, `<Right>`, `<Up>`, `<Down>`

You shouldn't try to assign the `1`-`9` keys, as it will not overwrite the default behaviour.


### Theming

You can edit Taskell's colour-scheme by editing `~/.taskell/theme.ini`:
You can edit Taskell's colour-scheme by editing `theme.ini`:

```ini
[other]
Expand Down Expand Up @@ -291,4 +351,4 @@ Anyone is welcome to contribute to the project, but please read through [CONTRIB

## Acknowledgements

Built using [Brick](https://github.com/jtdaugherty/brick). Thanks to [Jonathan Daugherty](https://github.com/jtdaugherty) for answering all my questions and pointing me in the right direction. Also thanks to [Jack Leigh](https://github.com/leighman) and [Thom Wright](https://github.com/ThomWright) for helping me get started. Also thanks to [Katja Durrani](https://github.com/katjad) for submitting Taskell to [`homebrew-core`](https://github.com/Homebrew/homebrew-core).
Built using [Brick](https://github.com/jtdaugherty/brick). Thanks to [Jonathan Daugherty](https://github.com/jtdaugherty) for answering all my questions and pointing me in the right direction. Also thanks to [Jack Leigh](https://github.com/leighman) and [Thom Wright](https://github.com/ThomWright) for helping me get started. Also thanks to [Katja Durrani](https://github.com/katjad) for submitting Taskell to [`homebrew-core`](https://github.com/Homebrew/homebrew-core).
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.4.2.0'
version: '1.4.3.0'
category: Command Line Tools
author: Mark Wales
maintainer: mark@smallhadroncollider.com
Expand Down
6 changes: 3 additions & 3 deletions roadmap.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
## Misc.

- Automate website publishing when doing a new build
> Should automatically update the `_config.yml` file, build the website, then deploy it
- Add more information to taskell.app
> Update taskell.app to have more than just README.md contents. Use cases, more images, examples, etc.
* [ ] Use case example: checklist
Expand Down Expand Up @@ -93,7 +91,6 @@
* [ ] Check for duplicate keys
* [ ] More detailed error messages for missing/invalid mappings
- Add a List widget for common actions between tasks and sub-tasks
- Can't remove a description

## Done

Expand Down Expand Up @@ -268,3 +265,6 @@
> Give an organisation or username and repo, list the possible projects to fetch - avoid having to look up the project ID manually first
- GitHub import should take pagination into account
- Use XDG spec for storing config files
- Automate website publishing when doing a new build
> Should automatically update the `_config.yml` file, build the website, then deploy it
- Can't remove a description
2 changes: 1 addition & 1 deletion src/Config.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import ClassyPrelude
import Data.FileEmbed (embedFile)

version :: Text
version = "1.4.2"
version = "1.4.3"

usage :: Text
usage = decodeUtf8 $(embedFile "templates/usage.txt")
5 changes: 3 additions & 2 deletions src/Data/Taskell/Task/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ new text = blank & (name .~ text)

setDescription :: Text -> Update
setDescription text =
description .~
if null (strip text)
then id
else description .~ Just text
then Nothing
else Just text

maybeAppend :: Text -> Maybe Text -> Maybe Text
maybeAppend text (Just current) = Just (concat [current, "\n", text])
Expand Down
2 changes: 1 addition & 1 deletion src/IO/Keyboard/Parser.hs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ lexeme :: Parser a -> Parser a
lexeme p = skipSpace *> p <* skipSpace

commentP :: Parser ()
commentP = lexeme $ skipMany (char '#' *> manyTill anyChar endOfLine)
commentP = lexeme $ skipMany ((char '#' <|> char ';') *> manyTill anyChar endOfLine)

stripComments :: Parser a -> Parser a
stripComments p = lexeme $ commentP *> p <* commentP
Expand Down
4 changes: 2 additions & 2 deletions src/IO/Taskell.hs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import IO.Markdown (parse, stringify)
import qualified IO.HTTP.GitHub as GitHub (GitHubIdentifier, getLists)
import qualified IO.HTTP.Trello as Trello (TrelloBoardID, getLists)

import UI.CLI (promptYN)
import UI.CLI (PromptYN (PromptYes), promptYN)

type ReaderConfig a = ReaderT Config IO a

Expand Down Expand Up @@ -142,7 +142,7 @@ fileExists path = lift $ doesFileExist path
promptCreate :: FilePath -> ReaderConfig Bool
promptCreate path = do
cwd <- lift $ pack <$> getCurrentDirectory
lift $ promptYN $ concat ["Create ", cwd, "/", pack path, "?"]
lift $ promptYN PromptYes $ concat ["Create ", cwd, "/", pack path, "?"]

-- creates taskell file
createPath :: FilePath -> ReaderConfig ()
Expand Down
10 changes: 8 additions & 2 deletions src/UI/CLI.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
module UI.CLI
( prompt
, promptYN
, PromptYN(PromptYes)
) where

import ClassyPrelude
Expand All @@ -14,5 +15,10 @@ prompt s = do
hFlush stdout -- prevents buffering
getLine

promptYN :: Text -> IO Bool
promptYN s = (==) "y" <$> prompt (s <> " (y/n)")
data PromptYN
= PromptYes
| PromptNo

promptYN :: PromptYN -> Text -> IO Bool
promptYN PromptYes s = not . flip elem ["n", "no"] . toLower <$> prompt (s <> " (Y/n)")
promptYN PromptNo s = not . flip elem ["y", "yes"] . toLower <$> prompt (s <> " (y/N)")
18 changes: 0 additions & 18 deletions version-bump.md

This file was deleted.

0 comments on commit dc3d98b

Please sign in to comment.