Skip to content

Commit

Permalink
Merge branch 'master' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasvl authored Jan 21, 2024
2 parents cfc19a0 + 26c67d6 commit 45449c5
Show file tree
Hide file tree
Showing 10 changed files with 955 additions and 34 deletions.
18 changes: 13 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ This Obsidian plugin will rollover any incomplete todo items from the previous d

Just create a new daily note using the `Daily notes` or `Periodic Notes` plugin. The previous day's incomplete todos will be rolled over to today's daily note.

### 2. Command: Rollover Todos Now
**Note:** Automatic rollover can cause conflicts with other plugins, particularly the Templater plugin. If you're using Templater for your daily notes, it's recommended that you disable automatic rollover in the plugin's settings and instead trigger it manually after creation.

### 2. Command: Manual Rollover Todos Now

You can also open your command palette (CMD+P on macOS) and start typing `roll` to find this command. No matter where you are in Obsidian, the previous day's todos will get rolled forward. There is also a command called `Undo last rollover` which can be run within 2 minutes of a rollover occurring. Both commands are potentially destructive, and the default text element undo command (CMD+Z on macOS) didn't work. Currently only 1 undo is available for use at the moment.

Expand All @@ -29,27 +31,31 @@ Note that if you create a daily note in the future, and you try to run this comm

## Settings

### 1. Template Heading
### 1. Disable automatic rollover

If you prefer to trigger the rollover of your todos manually, you can use this setting to prevent the plugin from rolling them over when a new note is created.

### 2. Template Heading

If you chose a template file to use for new daily notes in `Daily notes > Settings` or `Periodic Notes > Settings`, you will be able to choose a heading for incomplete notes to roll into. Note that incomplete todos are taken from the entire file, regardless of what heading they are under. And they are all rolled into today's daily note, right under the heading of choice.

If you leave this field as blank, or select `None`, then incomplete todos will be rolled onto the end of today's note (for new notes with no template, the end is the beginning of the note).

### 2. Delete todos from previous day
### 3. Delete todos from previous day

By default, this plugin will actually make a copy of incomplete todos. So if you forgot to wash your dog yesterday, and didn't check it off, then you will have an incomplete checkmark on yesterday's daily note, and a new incomplete checkmark will be rolled into today's daily note. If you use the `Undo last rollover` command, deleted todos will be restored (remember, the `time limit on this is 2 minutes`).

Toggling this setting on will remove incomplete todos from the previous daily note once today's daily note has a copy of them.

### 3. Remove empty todos in rollover
### 4. Remove empty todos in rollover

By default, this plugin will roll over anything that has a checkbox, whether it has content or not. Toggling this setting on will ignore empty todos. If you have **#2** from above toggled on, it will also delete empty todos.

## Bugs/Issues

1. Sometimes you will use this plugin, and your unfinished todos will stay in the same spot. These could be formatting issues.

- Regex is used to search for unfinished todos: `/\t*- \[ \].*/g`
- Regex is used to search for unfinished todos: `/\s*[-*+] \[ \].*/g`
- At a minimum, they need to look like: `start of line | tabs`-` `[` `]`Your text goes here`
- If you use spaces instead of tabs at the start of the line, the behavior of the plugin can be inconsistent. Sometimes it'll roll items over, but not delete them from the previous day when you have that option toggled on.

Expand All @@ -72,6 +78,8 @@ And the previous day might look like
- [x] Do the dishes
```

3. There are sometimes conflicts with other plugins that deal with new notes -- particularly the Templater plugin. In these situations, your todos may be removed from your previous note, and then not be saved into your new daily note. The simplest remedy is to disable the automatic rollover, and instead trigger it manually.

## Installation

This plugin can be installed within the `Third-party Plugins` tab within Obsidian.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "obsidian-rollover-daily-todos",
"name": "Rollover Daily Todos",
"version": "1.1.3",
"version": "1.1.7",
"minAppVersion": "0.12.12",
"description": "This Obsidian.md plugin rolls over incomplete TODOs from the previous daily note to today's daily note. (https://obsidian.md). (Originally created by Matthew Sessions)",
"author": "Lukas Mölschl",
Expand Down
9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "obsidian-rollover-daily-todos",
"version": "1.1.3",
"version": "1.1.7",
"description": "This Obsidian.md plugin rolls over incomplete TODOs from the previous daily note to today's daily note. (https://obsidian.md)",
"main": "main.js",
"scripts": {
Expand All @@ -9,8 +9,13 @@
"test": "vitest",
"format": "prettier --write ."
},
"cspell": {
"words": [
"todos"
]
},
"keywords": [],
"author": "Matthew Sessions",
"author": "Lukas Mölschl",
"license": "MIT",
"devDependencies": {
"@rollup/plugin-commonjs": "^15.1.0",
Expand Down
Loading

0 comments on commit 45449c5

Please sign in to comment.