dstask import-tw or dstask-import tw?
Hi,
Love this project, thank you very much for it. Using git as a backend is such a good idea! I have been using taskwarrior until now and was looking at manually importing all my tasks when I notice the mentioned import mechanisms. I'm not clear if there's a difference between them, or if there's a preference for one over the other. Also, it seems that the import is not working, with either, from a taskwarrior (v2.6.0) export.
Using dstask import-tw export.json I receive: No tasks found. Run 'dstask help' for instructions.
Using dstask-import tw < export.json I receive: failed to decode JSON from stdin
Any hints welcome :)
Since I am playing around with dstask and imported my taskwarrior (v3.0.2) database to try it out, just a report for how to handle this:
The correct workflow currently is:
task export > tw.json
cat tw.json | dstask-import-linux-amd64 tw
(Or directly piping from taskw to dstask of course).
However, it also failed with the message failed to decode JSON from stdin for me.
The issue was that the import could not deal with any 'depends' fields in my taskwarrior export file. Once those had all been removed the import worked perfectly.
Since I am just trying the tool out I simply filtered each task line with the field (with :g/depends":/d in vim) but it seems reasonable that just removing the "depends:.." fields themselves would work without losing the associated tasks.
I am not sure if there was a change in the way taskwarrior represents dependencies in their exports, or if there is a bug in the dstask-import code but that seems to be where the issue was coming from on my end.
Thanks for the comprehensive reply! I'll check it out. :)
I also have this problem, even using cat.
cat taskwarrior.json| ./dstask-import-linux-amd64 tw
failed to decode JSON from stdin
I checked with jq that the taskwarrior json export is correctly formatted
I also have this problem, even using
cat.cat taskwarrior.json| ./dstask-import-linux-amd64 tw failed to decode JSON from stdinI checked with
jqthat the taskwarrior json export is correctly formatted
the fix is mentioned 2 posts above by marty
oh I'm sorry, I didn't read it all