Sublime Forum

Keeping TODO comments at one place with TypeTodo

#1

Hi.

[size=150]What is this[/size]

As TypeTodo is installed, it waits when you type in #todo: comment (or //todo:, no difference).
When that TODO is typed in, it is:

  • assigned ID that is unique within current project
  • saved into specified database using that ID
  • any changes done later to TODO comment with ID assigned are saved as well

In addition to ID and comment itself, following verbose information is stored:

  • timestamp at creation
  • name of user who created particular TODO first
  • timestamp at last edition
  • name of user who edited particular TODO last
  • file name where TODO was created
  • priority level, arbitrary signed integer
  • category name for TODO, arbitrary tag
  • state of TODO, currently only “+” or “-”

Here’s what it looks like. Bottom half of image is .todo file itself. While it’s saved instantly, window changing is required because Sublime doesn’t update view if not focused.

Comment tracking works right after installation and will save TODO’s in the [projectname].todo text file within project folder by default.
Other available mode for storing is using MySQL server. It is described later in text.

[size=150]Why[/size]

Some day I’ve found that my //todo comments all around code are lacking organization. And that I don’t want to switch to any standalone task organizer while coding.
So only idea was to write tool that will look over my comments and keep them in order by itself. Maybe it should be called something like “Zentodo”, but I’m in harmony with “TypeTodo” too.
Originally it was designed to keep TODO comments only within per-project plain text file, but I’ve found it too trivial and made connection to MySQL server (which server is not provided itself in TypeTodo bundle, in case you thought it is).

[size=150]Installation[/size]

TypeTodo available through Package Control for both St2 and St3
Also TypeTodo’s Git is https://github.com/NikolayRag/typeTodo

[size=150]Database configuring[/size]

First lines of [projectname].todo file may be configured for storing TODO’s into MySQL server instead of file. Configuration template line is placed at top of [projectname].todo file at creation, you only have to uncomment it and type in your server credentials.
You can use one MySQL server/scheme for any number of different projects, as they’re separated in the table by project name.
If you have two DIFFERENT projects using SAME name, they will be considered as one, messing up TODO ID’s

[size=150]Whats next?[/size]

Next will be two significant changes, not sure in which order.

  1. TypeTodo will handle database<->sourcefile consistency.
  2. HTTP engine for those who wants all database abilities but don’t want to set up their own MySQL server.

When? Depends on your interest.

[size=85]
Disclaimer.
As I’m not a professional programmer and this project is my first Python program ever, any suggestions over code are highly welcome.
Also TypeTodo was not tested over OsX and Linux, so I will be glad to hear any replies on using it there.
[/size]

0 Likes

#2

HTTP engine is introduced and become default. It uses typetodo.com as API host and database .

Fixed unstable SQL table creation. And some more stuff done, see https://github.com/NikolayRag/typeTodo/releases.

0 Likes