TODO Comment (TODOCOM)

todocom (Todo Comments)

Introduction

CLI program that retrieves all TODO comments from file(s) and prints them in terminal/shell. It was created in order to automatically update a list of TODO tasks by simply adding "TODO:" comments in the code Comments Format It also enables prioritization of tasks by using "TODO soon:" or "TODO urgent" and assign tasks to a specific teammate.


Usage

Add TODO comments according to the format, open terminal and run the following command:

todo [folder/file]

Types

This command will print out all TODO comments that were found in the code, sorted by their prioritization: urgent, soon and regular. Urgent tasks will be printed in RED, soon in CYAN and regular comments in WHITE to make it easier to read. There is also an option to filter comments by their priotization:

# Prints urgent TODOs
todo -u [folder/file]

or:

# Prints soon TODOs
todo -s [folder/file]

Comments can also be assigned to a user by adding "Todo @username" comment:

# Prints Assigned TODOs
todo -a [USERNAME] [folder/file]

Finally, there is an option to save the list in a text file (stores as regular text without colors):

# Store results in a txt file
todo -o [path/to/sample.txt] [folder/file]

Setup

pip install todocom

Comments Format

There are two types of comments: single line and multi-line. Currently, multi-line comments (docstrings) are only supported in Python, but single line should work for most programming languages.

Format is flexible and can be lower-case, upper-case or a combination of both. Below are several examples:

                        - TODO:       - ToD0:
                        - To-D0:      - to-do:
                        - TODo:       - TOD0:

In Urgent and soon comments the TODO part is flexible as shown above, but must be followed by either urgent or soon in lower-case:

                    - TO-DO soon:       - tODo soon:
                    - ToD0 urgent:      - T0-D0 urgent: