Giter VIP home page Giter VIP logo

todo-tex's Introduction

todotex -- Add TODO tag to LaTeX file

This Python3 utility parses LaTeX source codes for TODO tags and print them up on terminal. Supported TODO tags are todo, TODO, fixme, FIXME, question, problem, etc. You may modify the example configuration todotex.example.toml to your like and place it at ~/.config/todotex/todotex.toml (see --help for detail).

Sample Usage

sample.tex:

\documentclass{article}
\begin{document}
% todo some text
Superchiasmatic neucleus is the primary clock % continue later: forgot
                                              %   what to write now
\end{document}

With command python3 -m todotex -c . under directory of sample.tex, the output is

sample.tex
3:TODO:some text
4:TODO:forgot what to write now

(with color)

Installation

Simply add todotex to your PYTHONPATH.

For example, suppose that all dependencies has been installed to ~/miniconda3/envs/hello/bin/python3, and that this repo has been cloned to /path/to/todo-tex. You may run the utility via:

PYTHONPATH=/path/to/todo-tex ~/miniconda3/envs/hello/bin/python3 -m todotex --help

Or you may put the following text to a shell script, and call the shell script with arguments:

PYTHONPATH=/path/to/todo-tex ~/miniconda3/envs/hello/bin/python3 -m todotex "$@"

Detailed Help

See python3 -m todotex --help.

The configuration file

Each key refers to the TODO/DONE tags in TeX source to parse, and each label refers to what to be shown in terminal. The todo list collects all TODO tags and labels. The done list collects all DONE tags and labels.

Scenario to use DONE tags includes notes to previously posed question tag. Option -D can be used to suppress showing DONE tags.

An example configuration is provided at todotex.example.toml.

Dependencies

  • tomli: used to parse configuration file

Optional dependencies

  • chardet (relevant only under Windows): used to safely open text files with unknown encodings
  • colorama, used to color the output under Windows

Dev dependencies

To run the tests in todotex, you'll need pytest:

pytest todotex/tests

todo-tex's People

Contributors

kkew3 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

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.