1
0
Fork
You've already forked mt
0

Add new tasks/TODOs #4

Open
opened 2024年05月18日 15:59:11 +02:00 by simenandre · 0 comments
simenandre commented 2024年05月18日 15:59:11 +02:00 (Migrated from github.com)
Copy link

I have a Bash-script that should probably be refactored into mt.

function note() {
 if [ 1ドル ]; then
 FILE=$NOTES_DIR/$(date +%Y-%m-%d).md
 if [ 2ドル ]; then
 FILE=2ドル
 fi
 echo 1ドル >> $FILE
 fi
}
function nt() {
 if [ 1ドル ]; then
 CONTENT="- [ ] 1ドル"
 note $CONTENT 2ドル
 fi
}
alias todo="mt"

I imagine this workflow will be better if the default task directory in mt could be configured, like what I've done with note() above. For reference, NOTES_DIR is a directory called notes in my home directory.

I imagine these configuration values:

  • notes-dir (default is $HOME/.tasks)
  • level (scan only level directories deep)
  • local-level (scan local only level directories deep)
  • output-style (choosing between minimalist, regular, json)

When mt new "<task description>" (maybe even n as alias) is executed, a new line is created in (notes-dir)/%Y-%m-%d.md: - [ ] <task description>. By adding -l for local, the task is added to TODO.md in the local directory or -f file.md to write to a specific file.

We should also add reading tasks from the current directory, limiting them to a level and local-level configuration. I imagine something like this:

$ mt
- Do this
- And that
- One important (local)
I have a Bash-script that should probably be refactored into `mt`. ```bash function note() { if [ 1ドル ]; then FILE=$NOTES_DIR/$(date +%Y-%m-%d).md if [ 2ドル ]; then FILE=2ドル fi echo 1ドル >> $FILE fi } function nt() { if [ 1ドル ]; then CONTENT="- [ ] 1ドル" note $CONTENT 2ドル fi } alias todo="mt" ``` I imagine this workflow will be better if the default task directory in `mt` could be configured, like what I've done with `note()` above. For reference, `NOTES_DIR` is a directory called `notes` in my home directory. I imagine these configuration values: - `notes-dir` (default is `$HOME/.tasks`) - `level` (scan only level directories deep) - `local-level` (scan local only level directories deep) - `output-style` (choosing between `minimalist`, `regular`, `json`) When `mt new "<task description>"` (maybe even `n` as alias) is executed, a new line is created in `(notes-dir)/%Y-%m-%d.md`: `- [ ] <task description>`. By adding `-l` for local, the task is added to `TODO.md` in the local directory or `-f file.md` to write to a specific file. We should also add reading tasks from the current directory, limiting them to a `level` and `local-level` configuration. I imagine something like this: ``` $ mt - Do this - And that - One important (local) ```
Sign in to join this conversation.
No Branch/Tag specified
main
ziggy
dependabot/go_modules/golang.org/x/net-0.23.0
renovate/configure
v0.0.2
v0.0.1
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
simenandre/mt#4
Reference in a new issue
simenandre/mt
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?