Re: Blank Lines in Todo.txt file
--- In todotxt@..., Ingo Karkat <swdev <at> ...> wrote:
>
> On 05-Jan-2011 00:26, evilninjaphil wrote:
> > This is my first port of call for some help, it might be something
> > else but I've got to start somewhere!
> >
> > I am using todo.sh for my Todo list, Cygwin to run the command line
> > and Samurize to embed it on my desktop which is running Windows 7. I
> > have my todo.txt file and have set up a 2011goals.txt file so I can
> > move bigger goals/tasks from my daily todo list to the other .txt file
> > with both shown on the desktop.
> >
> > Now, I've noticed that when I've moved the tasks from todo to
> > 2011goals it's leaving blank lines in the main todo file. So when I
> > use ls to list my tasks they show up like this;
> >
> > 1.
> > 2.
> > 3.
> > 4.
> > 5.
> > 6.
> > 7.
> > 10.
> >
> > So it looks like when I use the command 't move 8 2011goals.txt' it's
> > moving the task but leaving the line behind and not re-assigning the
> > number to the next new task. If I look at the .txt file there's
> > nothing there, just the plain text (naturally) but I'm not sure if
> > it's the script leaving the blank lines behind or Samurize not reading
> > the file right. I've pretty much no experience when it comes to Cygwin
> > or the scripts so I'm working blind hence the plea for help! Is there
> > a way to set it to remove the blank line numbers or refresh the file
> > to remove the blanks? Or is this a formatting error with Samurize
> > which means I have to check with their support forum?
>
> By default, TODOTXT_PRESERVE_LINE_NUMBERS is set, so that the task numbers only
> change when you explicitly archive done items - this makes tasks easier to
> recognize by their fixed numbers. You can turn this off via the todo.sh -n
> option, or by setting
> export TODOTXT_PRESERVE_LINE_NUMBERS=0
> in your todo.cfg, or explicitly request a clean up via 'todo.sh archive'.
>
> You seem to directly include the file contents of todo.txt in Samurize. Instead,
> you could have Samurize execute the "C:\cygwin\bin\bash.exe todo.sh -p ls"
> command periodically (say, every minute). This takes more of a performance hit,
> but you would get all the filtering, numbering, sorting, (yes, and suppression
> of empty lines) of todo.sh. For example, I only put the prioritized tasks
> (todo.sh lsp) on my desktop.
>
> -- regards, ingo
>
That's fantastic, thanks very much! The "C:\cygwin\bin\bash.exe todo.sh -p ls" command, do you run that
as a Console Program or an Active Script?
The archive command worked a treat, thanks again!
------------------------------------
http://todotxt.comYahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/todotxt/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/todotxt/join
(Yahoo! ID required)
<*> To change settings via email:
todotxt-digest@...
todotxt-fullfeatured@...
<*> To unsubscribe from this group, send an email to:
todotxt-unsubscribe@...
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/