Skip to content

A command-line tool for managing todo files written in markdown

License

Notifications You must be signed in to change notification settings

elliottt/two-trucs

Repository files navigation

two-trucs

So, the French phrase trucs à faire means "things to do". J'ai des trucs à faire, "I have things to do." truc means 'thingamajig', basically.

Anyway, you should call your tool two-trucs.

-- getty

Introduction

two-trucs is a tool for managing a grouped todo list written in markdown. For example, if you have the following markdown:

* [x] Task 1
* [x] Task 2
* [ ] Task 3
* [x] Add bugs
* [ ] Fix bugs

and you run two-trucs on it, it will re-order the list to the following:

* [ ] Task 3
* [ ] Fix bugs
* [x] Task 1
* [x] Task 2
* [x] Add bugs

If you manage these lists by updating them daily, and want to archive the tasks that were completed in the previous day, you can run two-trucs with the -n flag, instructing it that you are beginning a new day. Given this markdown file:

# Yesterday

## Project

* [x] Finish that thing
* [ ] Do that other thing
* [ ] Add bugs

Running two-trucs -n on the file will give you:

# Today

## Project

* [ ] Do that other thing
* [ ] Add bugs

# Yesterday

## Project

* [x] Finish that thing

If you are starting a new day, you can alter the default heading of "Today" by passing -t "My alternate title".

Vim plugin

You can use two-trucs with vim by using this repository as a plugin. For vim-plug, just add the following to your config:

Plug 'elliottt/two-trucs', { 'do': 'make release' }

The plugin comes with two commands:

  • TTSort which will sort the todo items in place
  • TTNext which will start a new day, using a default title of the current date