Git Product home page Git Product logo

tb.go's Introduction

Taskbook.go

Tasks, boards & notes for the terminal 🚀🚀🚀

demo.mp4

Overview

  • Create tasks & notes in different boards
  • View timeline of tasks & notes
  • Filter by boards
  • Respects XDG env
  • Configurable colors (TOML)
  • Archive and restore tasks & notes
  • Tab-complete arguments

Table of Contents

Installation

Requirements

Needs Nerd Fonts to render icons correctly.

AUR

Use your favorite AUR helper or makepkg to install.

paru -S tb.go

or

yay -S tb.go

or

#Manual
git clone https://aur.archlinux.org/tb.git
cd tb
makepkg -si

Git

git clone https://github.com/araaha/tb.go
cd tb.go
make
make sys-install

Binary releases

You can download binaries from here:

Usage

Quickstart

Create a task via tb task. You can begin tasks, or complete them. Alternatively tb note creates a note. All items are stored in a taskbook.json file stored in

  • $XDG_DATA_HOME
  • $HOME/.local/share/taskbook

in that order.

Deleting tasks archives them. To permanently remove them, run tb archive --remove. tb clear clears every completed task and places them in the archive. For further information, run tb --help to see all commands. For each subcommand, you can run --help for that flag to see examples.

Shell Completion

  • bash
    #Set up completion for tb
    eval "$(tb completion bash)"
  • zsh
    #Set up completion for tb
    source <(tb completion bash)```
  • fish
    #Set up completion for tb
    tb completion fish | source
  • powershell
    #Set up completion for tb
    tb completion powershell | Out-String | Invoke-Expression```
    

Config

The config file is stored in TOML. You can specify one with the --config flag. Alternatively, it searches in

  • $XDG_CONFIG_HOME/taskbook/taskbook.toml
  • $HOME/.config/taskbook/taskbook.toml in that order.

Example

#Gruvbox
[colors]
white = "#ebdbb2"
red = "#fb4934"
yellow = "#fabd2f"
gray = "#928374"
green = "#b8bb26"
blue = "#83a598"
magenta = "#d3869b"
cyan = "#8ec07c"

You can specify the colors in hex format.

Commands

tb help

A Taskbook

Usage:
  tb [flags]
  tb [command]

Available Commands:
  archive     Display archived items
  begin       Begin/pause task
  check       Check/uncheck task
  clear       Delete all checked items
  completion  Generate the autocompletion script for the specified shell
  delete      Delete item
  edit        Edit item description
  help        Help about any command
  list        List items by board
  move        Move item between boards
  note        Create note
  priority    Update priority of task
  restore     Restore items from archive
  star        Star/unstar item
  task        Create task
  timeline    Display timeline view

Flags:
      --config string   config file (default is $XDG_CONFIG_HOME/taskbook/taskbook.toml)
  -h, --help            help for tb
  -v, --version         Display current version

Use "tb [command] --help" for more information about a command.

Comparison

Compared to taskbook:

  • tb.go respects $XDG env
  • Shell-completion (via cobra)
  • You can specify which colors to use
  • Much more performant due to being compiled
  • Uses Nerd Fonts icons

Thanks to

  • taskbook - this project was heavily inspired by this one

tb.go's People

Contributors

araaha avatar

Stargazers

Roman Skorobagatko avatar Alex Lov avatar Miles Maddox avatar David A avatar Ariel Churi avatar  avatar Can Evgin avatar

Watchers

 avatar

tb.go's Issues

tb creates state file on every command

tb creates its DB file on every command even on --version or help or completion, it does not need this file on commands that do not access this file so no need to create/touch it. It might be executed in read-only environment (for building/testing purposes, for example) where it cannot create any file or directory.

❯ rm -fr ~/.local/share/taskbook
~
❯ tb -v
open /home/alex/.config/taskbook/taskbook.toml: no such file or directory
1.0.1-2 (82223d1da41570438cebbb7062d11cff5d61aad4)
~
❯ ls -l ~/.local/share/taskbook
.rw-r--r-- alex users 4 B Sun Aug  4 19:57:34 2024  taskbook.json
~
❯

tb crashes on removing items from archive

❯ tb archive
open /home/alex/.config/taskbook/taskbook.toml: no such file or directory

  Sun Aug 04 2024
    1.  test @test
    2.  test2 @test2
    3.  testd (!) @test2
    4.  testd3 (!!) @test2
    5. 󰎚 test note
    6. 󰎚 test note @test 󰓎

  0 of 0 tasks complete
  0 done · 0 in-progress · 0 pending · 0 notes

~ on  main
❯ tb archive --remove
open /home/alex/.config/taskbook/taskbook.toml: no such file or directory
panic: runtime error: slice bounds out of range [4:3]

goroutine 1 [running]:
github.com/araaha/tb.go/taskbook.(*Book).Remove(0xa182b0)
        github.com/araaha/tb.go/taskbook/taskbook.go:196 +0x1a5
github.com/araaha/tb.go/cmd.archive()
        github.com/araaha/tb.go/cmd/archive.go:21 +0x25
github.com/araaha/tb.go/cmd.init.func1(0xc000190100?, {0x75e494?, 0x4?, 0x75e498?})
        github.com/araaha/tb.go/cmd/archive.go:14 +0xf
github.com/spf13/cobra.(*Command).execute(0xa11580, {0xc00003a7e0, 0x1, 0x1})
        github.com/spf13/[email protected]/command.go:989 +0xab1
github.com/spf13/cobra.(*Command).ExecuteC(0xa13240)
        github.com/spf13/[email protected]/command.go:1117 +0x3ff
github.com/spf13/cobra.(*Command).Execute(...)
        github.com/spf13/[email protected]/command.go:1041
github.com/araaha/tb.go/cmd.Execute()
        github.com/araaha/tb.go/cmd/root.go:49 +0x1a
main.main()
        github.com/araaha/tb.go/main.go:8 +0xf
~ on  main
❯

tb complains about missing config on every command

I guess it doesn't need to have a config to show version and/or help but it complains about missing config on every subcommand. At least it should send it to stderr not to stdout, but still not very pleasant user experience. Better not require it at all as it seems like needed only for coloring now.

❯ tb -v
open /home/alex/.config/taskbook/taskbook.toml: no such file or directory
1.0.1-2 (82223d1da41570438cebbb7062d11cff5d61aad4)
~
❯

It also breaks completion generation as this message added to output for shells and they cannot parse it (I tested only on zsh though).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.