Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for a hook system #10

Open
1 task
ad-si opened this issue Feb 15, 2020 · 0 comments
Open
1 task

Add support for a hook system #10

ad-si opened this issue Feb 15, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@ad-si
Copy link
Owner

ad-si commented Feb 15, 2020

Similar to Taskwarrior's hooks: https://taskwarrior.org/docs/hooks_guide.html

  • post- and pre- prefixed lifetime hooks

Example use cases

  • Sync ~/.tasklite folder with git on launch (pull from remote)
    and on exit (push to remote)
  • Sync tasks between TaskLite and Habitica (as in taskwarrior-habitica-bridge)
  • Refresh custom displays whenever a TaskLite command is run
  • Show messages from a message server after each task command

More Ideas

  • Support for hooks to be stored in the database in a scripting language which are then executed by TaskLite.
    They could e.g. be written in Lua (https://hackage.haskell.org/package/hslua) or Nix (https://github.com/haskell-nix/hnix). (Dhall is unfortunately not ergonomic enough).
    I always disliked the system for git hooks, in which they are not part of the project and everybody had to install them themselves.
    It could then even be extended with custom functions.
    This could lead to a collection of useful hook scripts that anyone can use, since they are executed by TaskLite and have no additional requirements for the system setup like installed interpreters and so on.

  • Use Nix as the basis for a TaskLite plugin manager


Tracking issue for @robwhitaker's request in #2 (comment)

@ad-si ad-si added the enhancement New feature or request label Feb 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant