Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
75 lines (47 sloc) 1.88 KB

Now developed and hosted on bitbucket:

A module for converting files in the todo.txt format to Python objects that allow in-memory editing operations on the representation; these objects can regenerate the contents of the file, allowing for round-trip editing.


None apart from Python; tested on 2.7.1.


Command Line

When run from the command line this module should simply parse any files given (or stdin) and print them out after round-tripping them. This is present purely for easy verification of the parse correctness.


Simply instantiate a TodoFile object from your file data:

tf = TodoFile(filedata)

Then modify it as desired:


When finished, the new representation can be retrieved by string conversion:


To work with two files (e.g. for archiving):

src_file = TodoFile(src_data)
dest_file = TodoFile(dest_data)

src_file.move_item(3, dest_file)



If you use and like this, please let me know! Patches, pull requests, suggestions etc. are all gratefully accepted.


Copyright 2012 Benedict Singer

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.