Git Product home page Git Product logo

todo-trigger's Introduction

TODO Trigger

Tie special actions to converting between TODOs and DONEs!

Usage

This extension supports the following configuration options, to be specified in the TODO Triggers Home settings panel within Roam Depot:

  • Append Text - (Optional) The text to add to the end of a block when an item flips from TODO to DONE. It supports the following place holders:

    • /Current Time - inserts the current time

    • /Today (deprecated) - inserts the the current day

    • {now}- inserts the current day. Use {now:skip dnp} to skip adding the current day when the TODO is on a daily note page.

  • On Todo - (Optional) The text to add to the end of a block, when a block first becomes a TODO. It supports the following place holders:

    • /Current Time - inserts the current time

    • /Today (deprecated) - inserts the the current day

    • {now}- inserts the current day. Use {now:skip dnp} to skip adding the current day when the TODO is on a daily note page.

  • Replace Tags - (Optional) The set of pairs that you would want to be replaced upon switching between todo and done. Multiple pairs are deliminited by | and each pair is delimited by ,. For example, Replace Tags:: #toRead, #Read | #toWrite, #Written

    • There are a couple of placeholders this option supports. {date} maps to any date tag and {today} maps to today. So you could configure Replace Tags:: {date}, {today} to replace a date tag with today's date.
  • Strikethrough - (Optional) Set to True to strikethrough blocks with {{[[DONE]]}}.

  • Classname - (Optional) Set to True to add a roamjs-done classname to blocks with {{[[DONE]]}}. You could then style the block to your liking with roam/css.

  • Explode - (Optional) Set to True to play a fun animation when the TODO is finished

  • Send To Block - (Optiona) Set to a page name or a block reference to send the completed TODO to be a child of that node.

Anytime a TODO checkbox becomes DONE, either by user click or keyboard shortbut, the "Done" action fires. Similarly, when a DONE checkbox becomes TODO, the "Todo" action fires. This extension also works on multiple blocks at once.

When "Append Text" is configured, the "Done" action appends the configured text to the end of the block. The "Todo" action removes the configured text from the end of the block.

When "Replace Tags" is configured, the "Done" action replaces each pair's first tag with the second tag. The "Todo" action does the same replacement in reverse.

When "Strikethrough" is configured the "Done" action adds a strikethrough to the block. The "Todo" action removes it.

When None are configured, nothing happens.

TODONT Mode

TODONT Mode allows users to archive todos, by replacing the {{[[TODO]]}} with a {{[[ARCHIVED]]}}. To enable, switch on icon in the TODONT MODE field in your Roam Depot Settings.

To archive a TODO, just hit CMD+SHIFT+ENTER (CTRL in windows). In the text area it inserts {{[[ARCHIVED]]}} at the beginning of the block. Any TODOs or DONEs will be replaced with an ARCHIVED. If an ARCHIVED exists, it will be cleared. If none of the above exists, an ARCHIVED is inserted in the block.

To change the CSS styling of the archive display, you'll want to change the CSS associated with the roamjs-todont class.

If the value is strikethrough, the extension will strikethrough the blocks marked with {{[[ARCHIVED]]}}.

Demo

todo-trigger's People

Contributors

dvargas92495 avatar mdroidian avatar

Stargazers

Gokul K avatar  avatar

Watchers

John Elm avatar  avatar

Forkers

mdroidian

todo-trigger's Issues

Supporting tag with spaces in Replace Tags

Replace Tags feature doesn't work on the tag with spaces.

For example, I have a tag pair: questions and resolved questions.

When using tags with [[]], Replace Tags feature works well.

When using tags with #, Replace Tags replaces #questions with #resolved questions, leaving the tag broken.

Skip Current Day Altogether

I want to tag new todos with creation date, like this: [[Date Created]]: {now}

But I don't want it to appear on todos that are already created in daily page because of redundancy. So I modified it as follows: [[Date Created]]{now:skip dnp}

But now, it always returns [[Date Created]]

Is there a way to get rid of this too? Like in my case:
{[[Date Created]]:skip dnp} {now:skip dnp} didn't work, but is there any other way to do that?

And if there isn't, will you consider adding this feature? Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.