#!/usr/bin/env python
"""Adds files to be processed.
Usage: add [file1 [file2 [file3 [... filen]]]]"""
CMD="add"

def do():
    print "Adding..."

@@ -110,37 +110,340 @@
 dd%22%0A
-%0Adef do():%0A    print %22Adding...%22
+import config%0Aimport os%0Aimport sys%0A%0Adef do():%0A    f = open(os.path.join(config.STATE,%22unprocessed%22), %22a%22)%0A    for fn in sys.argv%5B2:%5D:%0A        addFile(f, fn)%0A%0Adef addFile(buff, fname):%0A    %22Adds a file to be processed%22%0A    ##TODO: Add directories recursively%0A    ##TODO: Check if file exists before adding%0A    buff.write(%22%25s%5Cn%22%25(fname))
 %0A

add command