jschlatow / taskopen

Tool for taking notes and open urls with taskwarrior
GNU General Public License v2.0
363 stars 31 forks source link

Not recognizing Annotations #154

Closed folofjc closed 2 years ago

folofjc commented 2 years ago

I just installed, but it appears to not recognize my annotations.

$task add Example
Created task 46.
$ task 46 annotate www.gmail.com
Annotating task 46 'Example'.
Annotated 1 task.
$ taskopen 46
No actions applicable.
Attaching to task 46 'Example'.
Type a file extension (or none):^C
$ task 46
Name          Value
------------- ---------------------------------------------
ID            46
Description   Example
                2022-09-07 10:32:56 www.gmail.com
Status        Pending
Entered       2022-09-07 10:31:50 (5min)
Last modified 2022-09-07 10:32:56 (4min)
Virtual tags  ANNOTATED PENDING READY UDA UNBLOCKED LATEST
UUID          fb588492-2a69-4763-80db-9b8bf6c1a4f4
Urgency        0.8
Brainpower    M

    annotations    0.8 *    1 =    0.8
                                ------
                                   0.8

Date                Modification
------------------- ------------------------------------------
2022-09-07 10:32:56 Annotation of 'www.gmail.com' added.

$ taskopen --debug 46
Executing: task rc.verbose=blank,label,edit rc.json.array=on context show
Executing: task rc.verbose=blank,label,edit rc.json.array=on  46 +PENDING export
No actions applicable.
Executing no_annotation_hook.
Attaching to task 46 'Example'.
Type a file extension (or none): ^CSIGINT: Interrupted by Ctrl-C.

$ task rc.verbose=blank,label,edit rc.json.array=on context show
No context is currently applied.
$ task rc.verbose=blank,label,edit rc.json.array=on  46 +PENDING export
[
{"id":46,"brainpower":"M","description":"Example","entry":"20220907T083150Z","modified":"20220907T083256Z","status":"pending","uuid":"fb588492-2a69-4763-80db-9b8bf6c1a4f4","annotations":[{"entry":"20220907T083256Z","description":"www.gmail.com"}],"urgency":0.8}
]

Even if I just try to add a Note, it doesn't recognize it and just adds a new one:

$taskopen --debug 46
Executing: task rc.verbose=blank,label,edit rc.json.array=on context show
Executing: task rc.verbose=blank,label,edit rc.json.array=on  46 +PENDING export
No actions applicable.
Executing no_annotation_hook.
Attaching to task 46 'Example'.
Type a file extension (or none):
Annotating task 46 'Example'.
Annotated 1 task.

$ task 46

Name          Value
ID            46
Description   Example
                2022-09-07 10:32:56 www.gmail.com
                2022-09-07 10:40:43 Notes
Status        Pending
Entered       2022-09-07 10:31:50 (9min)
Last modified 2022-09-07 10:40:43 (7s)
Virtual tags  ANNOTATED PENDING READY UDA UNBLOCKED LATEST
UUID          fb588492-2a69-4763-80db-9b8bf6c1a4f4
Urgency        0.9
Brainpower    M

    annotations    0.9 *    1 =    0.9
                                ------
                                   0.9

Date                Modification
2022-09-07 10:32:56 Annotation of 'www.gmail.com' added.
2022-09-07 10:40:43 Annotation of 'Notes' added.

$taskopen 46
No actions applicable.
Attaching to task 46 'Example'.
Type a file extension (or none):
Annotating task 46 'Example'.
Annotated 1 task.

$ task 46

Name          Value
ID            46
Description   Example
                2022-09-07 10:32:56 www.gmail.com
                2022-09-07 10:40:43 Notes
                2022-09-07 10:40:58 Notes
Status        Pending
Entered       2022-09-07 10:31:50 (9min)
Last modified 2022-09-07 10:40:58 (2s)
Virtual tags  ANNOTATED PENDING READY UDA UNBLOCKED LATEST
UUID          fb588492-2a69-4763-80db-9b8bf6c1a4f4
Urgency          1
Brainpower    M

    annotations      1 *    1 =      1
                                ------
                                     1

Date                Modification
2022-09-07 10:32:56 Annotation of 'www.gmail.com' added.
2022-09-07 10:40:43 Annotation of 'Notes' added.
2022-09-07 10:40:58 Annotation of 'Notes' added.
folofjc commented 2 years ago

Does taskopen not start with any configuration file? I guess I have to set it up from scratch? I would have thought it would at least use $EDITOR for the Notes?

folofjc commented 2 years ago

I copied over some things from the help file.

I copied over the first box for [General] and then added some stuff to open webpages and notes. However, I get the following error about the General section:

$ taskopen 36
Invalid config option in [General]: ,project:
Invalid config option in [General]: ,tags:
Invalid config option in [General]: ,description:

Is that General section in the helpfile correct for the task_attributes?

jschlatow commented 2 years ago

@folofjc There are inead a few syntax errors in taskopenrc.5

Can you please try to rebuild the current master branch? I just fixed some issues with config file creation. Taskopen now contains default actions for URLs and Notes. Furthermore, it now correctly creates a default config file when none exists.

Please also my explanation in #153.

folofjc commented 2 years ago

Vielen Dank! That works.