Giter Site home page Giter Site logo

extract-todo's Introduction

extract-todo

Python build

extract-todo is a simple commandline tool for the extraction of TODOs. It can extract TODOs from single-line-comments like:

    # TODO something todo

It prints the file, line number and the TODO text.

Installation

You need python3+ to run this tool. It can be installed from pypi with

pip install extract-todo

Usage

You can use this tool with the command

python -m extract_todo /path/to/file

or

extract-todo /path/to/file

It prints the filename, line number and the TODO text. Example output:

.\tests\files\test.py
  LINE 1:       test
  LINE 5:       test 2

Running on all relevant files in a directory

Note that if you want to run this tool on all the supported files in your git-managed project, you can run extract-todo with no file arguments:

extract-todo

If you want to limit it to searching certain files, you could do something like this:

extract-todo --filename-pattern='*.py' --filename-pattern='*.rb'

Author and License

Copyright (C) Jens Wilberg July 2021

extract_todo.py is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

extract_todo.py is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with extract_todo.py.  If not, see <http://www.gnu.org/licenses/>.

extract-todo's People

Contributors

follnoob avatar geo7 avatar msabramo avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

geo7 msabramo

extract-todo's Issues

Comment delimiter size != 2 not correctly supported

  • extract-todo version: 0.3.1
  • Python version: 3.7.9
  • Operating System: Win 10

Description

When a filetype has only one comment char and we try to extract the todo with no space, it will not be noticed. This is probably also a problem with comments which have more than 2 comment chars

What I Did

Use extract-todo with following file (python)

#TODO

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.