now using python3
authorDan White <dan@whiteaudio.com>
Sun, 12 Sep 2021 00:09:34 +0000 (19:09 -0500)
committerDan White <dan@whiteaudio.com>
Sun, 12 Sep 2021 00:09:34 +0000 (19:09 -0500)
tdrec

diff --git a/tdrec b/tdrec
index 5e6932726a5704e454522d11af02c8ddaeba9fd1..1326492b192f88bdbb6453621a37b15f431eade7 100755 (executable)
--- a/tdrec
+++ b/tdrec
@@ -17,8 +17,8 @@ import sys
 #
 
 #replaced with path to current .todo
-#HEADER_STRING = 'TODO %s' 
-HEADER_STRING = '\n=== %s ===' 
+#HEADER_STRING = 'TODO %s'
+HEADER_STRING = '\n=== %s ==='
 
 #--force-colour necessary to keep color information
 DEFAULT_DEVTODO_OPTIONS = '--force-colour --filter -children'
@@ -41,7 +41,7 @@ Default options are: %s '''
 if sys.argv[1:]:
     #help if requested
     if sys.argv[1] == '-h' or sys.argv[1] == '--help':
-        print usage % (os.path.basename(sys.argv[0]), DEFAULT_DEVTODO_OPTIONS)
+        print(usage % (os.path.basename(sys.argv[0]), DEFAULT_DEVTODO_OPTIONS))
         sys.exit()
     DEVTODO_OPTIONS = '--force-colour ' + ' '.join(sys.argv[1:])
 else:
@@ -68,6 +68,6 @@ for (dpath, dnames, fnames) in os.walk(cwd):
                              stdout=subprocess.PIPE).stdout
         todoOutput = f.read()
         if todoOutput:
-            print HEADER_STRING % herePath(dpath, cwd)
-            print LAST_NL_RE.sub('\g<2>', todoOutput)
+            print(HEADER_STRING % herePath(dpath, cwd))
+            print(LAST_NL_RE.sub('\g<2>', todoOutput))