Giter Site home page Giter Site logo

soywod / unfog Goto Github PK

View Code? Open in Web Editor NEW
188.0 8.0 5.0 469 KB

⏱ Minimalist CLI task & time manager, written in Haskell.

License: BSD 3-Clause "New" or "Revised" License

Haskell 98.85% Shell 1.15%
task-manager time-tracker haskell cli haskell-cli haskell-stack worktime

unfog's Introduction

⏱ Unfog gh-actions

Minimalist CLI task & time manager, written in Haskell.

image

Table of contents

Motivation

Taskwarrior is a good and powerful CLI to track your tasks, but it requires time to configure it. The amount of features is giant, which can lead to confusion. Plus, if you also want to track your time, you need to install the Timewarrior plugin, which makes the configuration step even heavier.

In the other hand, Watson tracks well your time but can't tracks your tasks.

Unfog proposes an alternative solution that:

  • is easy to install / configure / use
  • can track your tasks AND your time

Concept

A task is composed of a description and an optionnal due time. It can be attached to a project. It can be started and stopped (to track time) and done or deleted (to track projects).

Basic reports can be generated to have an overview of your tasks and your projects. They allow you to determine how and where the time was spent, if projects fits their initial estimations…

Installation

curl -sSL https://raw.githubusercontent.com/soywod/unfog/master/install.sh | bash

See wiki section for more information.

Configuration

# ~/.config/unfog/config.toml

# Store file location.
# Default: $XDG_CONFIG_HOME/unfog/store
# Warning: only absolute paths are supported for now,
# see https://github.com/soywod/unfog/issues/45
store-path = "/abs/path/to/store"

See wiki section for more information.

Usage

⏱ Unfog - Minimalist task & time manager

Usage: unfog COMMAND

Available options:
  -h,--help                Show this help text

Available commands:
  list                     Show current project tasks [l]
  info                     Show task details [i]
  worktime                 Show worktime report [wtime, w]
  status                   Show active task info [stat]
  add                      Add a new task [a]
  edit                     Edit an existing task [e]
  start                    Start a task [sta, s]
  stop                     Stop a task [sto, S]
  toggle                   Toggle a task [tog, t]
  done                     Mark as done a task [do, d]
  undone                   Unmark as done a task [undo, u]
  delete                   Delete a task [del, D]
  undelete                 Undelete a task [undel, U]
  context                  Change the current project [ctx, c]
  upgrade                  Upgrade the CLI
  version                  Show the version
  cache:clear              Clear the state cache

See wiki section for more information.

Interfaces

See wiki section for more information.

Credits

See wiki section for more information.

unfog's People

Contributors

bherzet avatar razcore-rad avatar soywod avatar vincentcordobes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

unfog's Issues

Upgrade error

Do you know why I'd get this error?

~ 
❯ unfog upgrade                                                                                                                                                       09:43:32
bash: line 1: 404:: command not found

I looked at the call and it's super simple. If I run it manually it works just fine.

~ 
❯ curl -sSL https://raw.githubusercontent.com/soywod/unfog/master/install.sh | bash                                                                                   09:41:16
Downloading latest linux release...
Installing binaries...
Installing bash completion...
Unfog v1.0.3 installed!

installer script does not work

I suspect some sort of curl (maybe HTTP redirect) issue.
I have not been able to get curl to be more useful in debugging (yet).

however, I am able to download without issue if I extract the curl command from install.sh if I remove the -s flag. With it present, I get a zero-length file.

This does not work in install.sh itself, weirdly.

bash/arch FWIW

allow for batch processing of tasks

Sometimes, one might wish to have multiple tasks running simultaneously; or mark a lot of tasks done at once.

Currently, a command like unfog done 1 2 3 only acts upon the first task.

Document requirements

Installation on Ubuntu 16.04 failed with a glibc dependency - Minimum OS, or at the very least, glibc version, should be documented.

Mark done task as not done (undo)

Hi,

Would it be possible to include a method to mark a done tag as not done? Basically, some kind of undo command for if I accidentally mark a task as done.

It might be logical for the command to only be available while inside the 'done' context.

`start <ID found by completion>` don't find the ID

Hello, i got a small issue with the completion : the id returned is not recognized by unfog start command.

# system : ubuntu 18.04
# installation method : install.sh
# version: 1.0.1

·▓█  ~/apps █ unfog list

ID   |DESC           |PROJECT     |ACTIVE |DUE |WORKTIME 
a4fb |Test module PR |helpdeskv14 |       |    |3 mins   

# typing `unfog start a<Tab>`, it is completed by bash with an ID
·▓█ ?=130 ~/apps █ unfog start a4fbcc5e-b391-4f60-9e0a-46375a37d73f 
Error: task not found

Command to delete tag

Currently there doesn't seem to be a way to delete a tag.

What would be the best syntax for this? The opposite of +tag would probably be -tag, but this potentially interferes with the convention of passing command line arguments with a -.

Suggestion: No arguments = "list"

Just a simple suggestion:

When you run unfog with no options, you get a unfog: invalid arguments. I suppose it could be a lot more "friendly" if instead of that, it just assumed the user want to list the current, not-done tasks.

Adding ref of related files (idea)

Searching for a good tool for managing task.

This tools is really interesting and appear to be really clean to use.
(working currently with timewarrior and taskwarrior + a lot of TODO/FIXME in files)

I got only an idea of enhancement : a field to link to external refs (local wiki, code, issue tracker...) and maybe something to add a task directly from this ref (source code or documentation in vim, ... for issue tracker case it would require some kind of server ... ).
Actually, i'm not sure how much it is a good idea, but doing a simple gf (to start a correction) from a task manager would be pleasant.

Integrations

I was searching for random stuff and came across this taskwarrior, timewarrior & gnome-pomodoro integration post

Taskwarrior uses hooks, is there something similar with unfog?

I can think of a way to just make a custom script or something that acts as an intermediary to unfog, but it would really be nice if we could have some sort of integration, maybe? :)

What do you think?

Refactor id system

Replace actual reusable integer ids system by hash system (like git commits).

hyphens in tasks terminate input

I added a task containing an hyphen: unfog create download author - title +admin

This seemed to succeed; however, the resulting task was terminated just before the hyphen; and also lost the +admin context

this might be an input redirection issue?

(I tried this first in unfog-vim; which confused vim greatly)

Editing a task's worktime after it has been recorded

Hey! Stumbled upon this project when I was trying to get taskwarrior/timewarrior setup for myself, and this seems to be much more along the lines of what I was looking for in the process. Nice and simple! Great work on this project thus far, it's really easy and intuitive to use 😄. I was wondering if there is any way to edit a task's worktime other than going into the store file and manually editing the UTC dates. While I was able to do that for a task that I had forgotten to track, it was a bit annoying as I had to convert from UTC time to my timezone before editing the entries in the store file. Would love if there was a way to do this via the cli interface or suggestions about how I might go about doing that in an easier fashion if that is not possible right now. Thank you!

Refactor show cmd

Show task in a vertical table (instead of horizontal), like the Vim plugin:

KEY VALUE
DESC my desc
TAGS +tag +tag2
...

Introduction of the `PROJECT` column for `unfog w --more` messed up the table

So I just noticed that my PR to introduce the PROJECT column #57 messed up the table, there's probably a place where the table is create where I missed adding a new (empty) column in places like SUBTOTAL, empty (-) rows, etc. or something like that, but I'll have to dig up the code to see where this happens.

❯ unfog version
1.0.5

❯ unfog w --from 2023-02-01 --to 2023-02-10 --more
DATE       |ID   |PROJECT                           |DESC                                                         |WORKTIME        
2023-02-09 |fc25 |gdquest-godot-v4-new-features     |Scraping Footage                                             |                
2023-02-09 |8ffc |gdquest-godot-v4-new-features     |GDQuest Godot v4 Demos - Particles                           |                
2023-02-09 |133c |gdquest-godot-v4-new-features     |GDQuest Godot v4 Demos - Navigation                          |                
2023-02-09 |aac7 |gdquest-godot-v4-new-features     |GDQuest Godot v4 Demos - AnimationTree Audio                 |                
2023-02-09 |346e |gdquest-godot-v4-new-features     |GDQuest Godot v4 Demos - Swarm of Agents                     |                
2023-02-09 |65f8 |gdquest-support                   |GDQuest Support                                              |                
2023-02-09 |96a3 |gdquest-godot-v4-new-features     |GDQuest Godot v4 Demos - Physics: 2D Performance Comparisson |                
2023-02-09 |47e5 |gdquest-godot-v4-new-features     |GDQuest Godot v4 Demos - Text and UI: Theme Variation        |                
2023-02-09 |4143 |gdquest-godot-v4-new-features     |GDQuest Godot v4 Demos - Text and UI: MultiLingual           |                
2023-02-09 |a985 |gdquest-godot-visualization-tools |GDQuest Port godot-visualization-tools to Godot v4           |5 hours 13 mins 
SUBTOTAL   |     |                                  |5 hours 13 mins                                              
—          |—    |—                                 |—                                                            
TOTAL RAW  |     |                                  |5 hours 13 mins                                              
TOTAL WDAY |     |                                  |16 hours 43 mins 

The above should look like this properly formatted:

❯ ./unfog version
1.0.4

❯ ./unfog w --from 2023-02-01 --to 2023-02-10 --more
DATE       |ID   |DESC                                                         |WORKTIME         
2023-02-09 |fc25 |Scraping Footage                                             |                 
2023-02-09 |8ffc |GDQuest Godot v4 Demos - Particles                           |                 
2023-02-09 |133c |GDQuest Godot v4 Demos - Navigation                          |                 
2023-02-09 |aac7 |GDQuest Godot v4 Demos - AnimationTree Audio                 |                 
2023-02-09 |346e |GDQuest Godot v4 Demos - Swarm of Agents                     |                 
2023-02-09 |65f8 |GDQuest Support                                              |                 
2023-02-09 |96a3 |GDQuest Godot v4 Demos - Physics: 2D Performance Comparisson |                 
2023-02-09 |47e5 |GDQuest Godot v4 Demos - Text and UI: Theme Variation        |                 
2023-02-09 |4143 |GDQuest Godot v4 Demos - Text and UI: MultiLingual           |                 
2023-02-09 |a985 |GDQuest Port godot-visualization-tools to Godot v4           |5 hours 13 mins  
SUBTOTAL   |     |                                                             |5 hours 13 mins  
—          |—    |—                                                            |—                
TOTAL RAW  |     |                                                             |5 hours 13 mins  
TOTAL WDAY |     |                                                             |16 hours 43 mins 

Where the time should be aligned with the last column WORKTIME.

List PROJECT column when using `unfog worktime`

Since unfog worktime uses the PROJECT as key and not IDs or DESCriptions it should output the PROJECT column when listing the content so we don't have to go back and forth between unfog worktime and unfog list. Thanks!

install.sh not working with Dash

Shebang in install.sh refers to /bin/sh. On Debian 10 and Ubuntu 18.04 (and I guess most Linux distributions, really), this points to Dash:

$ ls -l /bin/sh
lrwxrwxrwx 1 root root 4 Jan 17  2019 /bin/sh -> dash

The problem is that Dash (version 0.5.10.2-5) doesn't support the syntax used in the script and produces multiple errors upon running, such as:

./ins.sh: 4: [: unexpected operator

Running the installation script with Bash works just fine, so the easy solution is to replace sh with bash (both in the code and the curl [...] | sh command in the documentation). The other solution would be to rewrite the script so it actually works with Dash.

Store file location?

Hi,

is it possible to change location of the store file?
I would like to keep it in ~/Dropbox folder so it is synced across all my systems.

Archive context

Find a way to archive context (so they do not appear anymore in the research + autocompletion).

Configuration exeample is wrong

If I follow the configuration page on the wiki, I get this error:

~ 
❯ unfog add TacaticalSpaceCombat Course --project gdquest.ks.2020.ftl                                                                                                 09:50:32
unfog: /home/razcore/Cloud/Dropbox: openFile: inappropriate type (Is a directory)

The example should be the full path to the file, not the directory, e.g.:

store-path = "/home/user/Dropbox/unfog"

Generate a work report

Worktime displays time spent per tag. Would it be possible to generate a report based on a date range?

I want to look at how much time was spent per task for all tasks in the current week.

Add break and resume commands

start and stop need the id of the targeted task. It could be nice to have 2 other commands that don't need the task id, and affect the last task used. Here the workflow I have in mind:

  • I start the work day by unfog start id
  • I decide to take a coffee, so I just unfog break
  • I take back the work with unfog resume
  • I finish my task with unfog stop id

The second benefit of those 2 new commands is that they can be used by other programs (since they don't require task ids). For eg, with a pomodoro tool, each cycle of break / resume can be easily hooked on them.

Tomorrow's due date displays as passed

I've just tried to set due date to tomorrow but unfog shows that it's already passed.

~ ❯ date
Sun 14 Jun 2020 05:18:27 PM MSK
~ ❯ unfog l
unfog: list
ID |DESC |TAGS      |ACTIVE |DUE |WORKTIME
1  |test |userspace |       |    |
~ ❯ unfog e 1 :15               
unfog: task [1] updated
~ ❯ unfog l
unfog: list
ID |DESC |TAGS      |ACTIVE |DUE         |WORKTIME
1  |test |userspace |       |9 hours ago |

Hours and minutes are ignored when adding new tasks

Thanks for building this! There's one issue that I think is a bug:

Expected behavior:
When typing (at 2022/01/01, 14:34)
unfog add test -d 2022-01-01 19:00
The expected output of unfog should be:
ID |DESC |PROJECT |ACTIVE |DUE |WORKTIME
bf2f |test | | |in 4 hours |

Instead, the output is
ID |DESC |PROJECT |ACTIVE |DUE |WORKTIME
bf2f |test 19:00 | | |14 hours ago |

With the 19:00 moved to the DESC column instead of the DUE column.

This reproduces both in the VIM environment and directly in the command line.

AUR Package

Thanks for creating this excellent software.
I've created an AUR package for unfog-cli and think it might be a good idea to mention it in the README.
Assuming your Arch readers have the commonly used yay installed, yay -S unfog-cli-bin could be used to install unfog from AUR.

Reminder for tasks containing due time

The simplest way could be to prepend any output with incoming tasks. Otherwise we need a kind of a service that runs in background and checks whenever a task is coming. I have no idea how to do this in Haskell, I will search a bit. Propositions are welcomed.

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.