benjypng / logseq-todoist-plugin

MIT License
125 stars 19 forks source link

How to add the command in a template and make it auto-run #47

Closed ferranrego closed 1 year ago

ferranrego commented 1 year ago

Hi,

firstly, thanks @hkgnp for developing for this plugin, it really made my life easier.

I'm opening this issue because:

  1. I have a template that is executed daily and it appears on my journal block.
  2. I would like the command /pull today to be executed and generate the list of task of that day automatically.

Is that possible? Adding the command to the template now executes the command instead of waiting to execute it every midnight.

Thanks!

benjypng commented 1 year ago

Hi! It is technically possible, but it is not something that everyone may need it. Will need to regularly background-check the system to see if it's midnight (when the computer is on) and then execute the script.

On Wed, Oct 19, 2022 at 11:24 PM Ferran @.***> wrote:

Hi,

firstly, thanks @hkgnp https://github.com/hkgnp for developing for this plugin, it really made my life easier.

I'm opening this issue because:

  1. I have a template that is executed daily and it appears on my journal block.
  2. I would like the command /pull today to be executed and generate the list of task of that day automatically.

Is that possible? Adding the command to the template now executes the command instead of waiting to execute it every midnight.

Thanks!

— Reply to this email directly, view it on GitHub https://github.com/hkgnp/logseq-todoist-plugin/issues/47, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALNXKGK7R4ZIMU73FP5PQ7TWEAHBRANCNFSM6AAAAAARJHXYBY . You are receiving this because you were mentioned.Message ID: @.***>

ferranrego commented 1 year ago

Thanks for the answer, this is how I do it with the "Unfinished business" plugin:

image

Is there something similar with todoist plugin?

benjypng commented 1 year ago

I see what you mean. Apologies. I don't use templates in my workflows actually. It is possible to use macrorenderer for this, but will need to add it in as a new feature. However, it has been a crazy year and I am not able to commit to when I can implement it though! Will work on this when I have time.

On Thu, Oct 20, 2022 at 4:49 PM Ferran @.***> wrote:

Thanks for the answer, this is how I do it with the "Unfinished business" plugin:

[image: image] https://user-images.githubusercontent.com/3515290/196901964-1f15c45e-5b08-4d60-97bd-e0d26b7570f2.png

Is there something similar with todoist plugin?

— Reply to this email directly, view it on GitHub https://github.com/hkgnp/logseq-todoist-plugin/issues/47#issuecomment-1285164210, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALNXKGIEWWJBBDG2TMMU35TWEEBR3ANCNFSM6AAAAAARJHXYBY . You are receiving this because you were mentioned.Message ID: @.***>

ferranrego commented 1 year ago

Sounds good! Many thanks @hkgnp!!

benjypng commented 1 year ago

Please update the plugin and setup your template as follows (i.e. {{renderer :todoist_randomword}}):

Screenshot 2022-11-05 at 5 52 15 PM

Let me know if it works.

ferranrego commented 1 year ago

Hi @hkgnp, thanks for this update. Seems what I was looking for, but I'm not sure if I do it well, but the string {{renderer: todoist_randomword}} still stays in the page after being executed, and then every time I interact with the tasks or the block, it executes again.

benjypng commented 1 year ago

Apologies could you try to update to the latest version and try to set it up again?

ferranrego commented 1 year ago

Works like a charm now, many thanks @hkgnp!!