Skip to content
This repository has been archived by the owner on Feb 3, 2023. It is now read-only.
/ ExtractTodoTags Public archive

Little Python tool to extract TODO tags from code base

License

Notifications You must be signed in to change notification settings

AlbertEmil/ExtractTodoTags

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ExtractTodoTags

Description

The tool extracts TODO tags denoted by # TODO of Python files (.py) and stores found tags in an output file. The input directory to process and the output filename can be passed via command line arguments. In addition, you can specify a command to open the output file if desired.

Dependencies

  • Python 3.6 or later (using f-strings)
  • pandas (for data handling)
  • tabulate (to parse nice tables)

Why?

There are many great extensions to handle TODO tags for common editors like VS Code (e.g. Todo Tree) or Sublime Text (e.g. TodoReview). However, I was looking for an easy way to handle and sort more detailed tags throughout a given project folder and save them in a file for later usage or as a reference. Detailed TODO tags look like this:

# TODO: Refactoring: ...
# TODO: Feature: ...
# TODO: Improvement: ...

All tags are sorted upon filename, additional tag (Refactoring, Feature ...) and the line number which # TODO was found in. Tag and tag description are separated by a single colon. You can provide any string as an additional tag, a complete TODO tag needs to be formatted in the following form:

# TODO: <additional tag>: <description>

How?

Input directory and output file name containing all found TODO tags can be specified as command line arguments. The output file generated by the tool can be opened by passing an additional command (e.g. code to open the file with VS Code). Use flag --help for futher information.

Remarks

Using pandas in this little tool is definitely over-engineering, but was obviously the solution, since it is part of my default working environment.

About

Little Python tool to extract TODO tags from code base

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages