DC23 / scriptabit

Python scripting for Habitica
Apache License 2.0
8 stars 4 forks source link

sb-pets --hatch-pets creates habit and tag #30

Closed therealmaxmoon closed 7 years ago

therealmaxmoon commented 7 years ago

Is there a way to deactivate creation of habits and tags, because I use a script every day to feed and hatch pets and I have to remove the habit and the tag every day by hand.

Automatically created habit: :wolf: Hatched 2 new pets @ 07:10:18 01/17/17

Automatically created tag: scriptabit

Solved it temporarily by commenting out following line: https://github.com/DC23/scriptabit/blob/master/scriptabit/plugins/pet_care.py#L556

DC23 commented 7 years ago

In the current version, there is no way to control the two behaviors (tagging and the notification habit).

It is possible to make both configurable. What I am thinking is:

  1. Make a new option "enable-notifications" that defaults to True. You could then add a line to ~/.config/scriptabit/scriptabit.cfg that sets that option to False for everything, or just set it on specific commands.
  2. Make another new option "task-tags" that defaults to 'scriptabit' and accepts a comma-separated string of tags. Set it to an empty string in the config file or command line to disable tagging.

I would keep the default behaviors the same as the current behavior to reduce surprises to other users.

DC23 commented 7 years ago

I have implemented #31 in the 1.17.2 feature branch. You can use that branch until I release to PyPI tomorrow, or just wait until then.

DC23 commented 7 years ago

I have merged 1.17.2 into master, but not released to PyPI yet.

therealmaxmoon commented 7 years ago

The two new flags to deactivate tags and habit creation are: --tags '' --use-notification-panel 0

Thanks for the fast implementation.