GothenburgBitFactory / tasklib

A Python library for interacting with taskwarrior databases.
http://tasklib.readthedocs.org/en/latest/
BSD 3-Clause "New" or "Revised" License
147 stars 28 forks source link

`from_input` method should load taskrc_location and data_location #58

Open lyz-code opened 6 years ago

lyz-code commented 6 years ago

Hi, I'm writing some hooks and I noticed that the from_input method loads a TaskWarrior backend with the following configuration

backend = backends.TaskWarrior(data_location=hook_parent_dir)

Therefore it loads the data from the hook parent directory but the configuration from ~/.taskrc.

Now with the hooks V2 it would be as easy as to load those two values from sys.argv.

I'm willing to do a Pull Request if you are interested.

Please let me know

xeruf commented 4 years ago

yes, please implement that :)

lyz-code commented 4 years ago

Sorry @xerus2000, due to the lack of activity of taskwarrior/tasklib I've migrated my efforts to pydo

xeruf commented 4 years ago

Hmpf, that's sad. I have been working myself into taskwarrior now. I don't wanna switch again, but I'm already hitting pain points.

I do understand that the representation as text file isn't always optimal, but it is the UNIX philosophy and can be really useful if you work a lot with text-processing CLI tools - renaming tags or whatever can easily be done without even using taskwarrior.

lyz-code commented 4 years ago

I agree with you, but these reasons made me take the decision. Regarding the UNIX point, I think that as long as the application supports the import and export of it's data as json, it makes it compliant with the principle.