topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Friday December 13, 2024, 7:03 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: appending text to todo.txt file?  (Read 7985 times)

pikamookie

  • Charter Member
  • Joined in 2006
  • ***
  • default avatar
  • Posts: 4
    • View Profile
    • Donate to Member
appending text to todo.txt file?
« on: July 19, 2006, 10:47 AM »
Hi there.  I'm not great with .bat files or command lines, but is there an easy way to bring up FARR, type in "todo feed dog" and then have "feed dog" with date and time put into my todo.txt file?  I found something similar for slickrun, however, I dont' know how to implement it with FARR.  Any suggestions?  Thanks!

http://groups.google...b4?#68b3cc8169188eb4
======================================
:: GTD Wannabe
:: Command to append text to a file
:: 22 Jan 06
:: In response to:
http://groups.google...msg/68b3cc8169188eb4
::
:: First param is name of the file, including extension
:: Second param is the text to be appended to the file
::
:: Assumes that this command will be run in the same directory as your
target text files

:: Filename is first param
set filename=%1%

:: Remove the quotation marks from the second parameter
set text=%2%
set textclean=%text:~1,-1%

:: Write the current date/time and second parameter text to the
appropriate text file

:: These two lines put the date/time and text one one line.  Remove the
:: if that's what you want.
::echo %date% %time% %textclean% >> %filename%
::echo. >> %filename%

:: These lines put the date on a line, time on a line, and text on a
line.  Add in :: if you don't
:: want it done this way.  See block immediately above.
echo %date% >> %filename%
echo %time% >> %filename%
echo %textclean% >> %filename%
echo. >> %filename%
======================================================

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: appending text to todo.txt file?
« Reply #1 on: July 19, 2006, 11:33 AM »
actually gerome wrote such a tool to do exactly this..
i cant remember if he posted it - it might need a few extra features but finding someone who wants to use this might be just the thing he needs to perfect it.
let's try to get his attention and see if he will post it.


jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: appending text to todo.txt file?
« Reply #2 on: July 19, 2006, 11:36 AM »
It's Farr's ADDNOTE :)
I think it might be exactly what you're looking for, pikamookie!

pikamookie

  • Charter Member
  • Joined in 2006
  • ***
  • default avatar
  • Posts: 4
    • View Profile
    • Donate to Member
Re: appending text to todo.txt file?
« Reply #3 on: July 19, 2006, 02:10 PM »
that looks like exactly what i'm looking for!  hmmm, but how do i make this work with FARR?  i tried pasting the code into the link but then i get the .exe and nothing happens...  :)

thanks for all the replies btw!  i love FARR.  it's no doubt the most important app on my computer. 

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: appending text to todo.txt file?
« Reply #4 on: July 19, 2006, 02:28 PM »
addnote is not quite done - i wouldnt try to use it yet - but maybe we can get geddi to finish it this week.

but basically the way you would use it is copy the exe somewhere permanent, probably the Scripts/ subdirectory where geddi's FBSLCalc.exe tool lives, and then add a group alias to farr to invoke it like this:

mycaps Screenshot - 001 , 02_24_PM , Jul 19 2006.png

but i repeat that addnote does not quite work right yet.
it doesnt let you specify the file to write into, the commandline args dont parse perfectly, etc.

farr is made to let you design commandline aliases like this so basically you can work with any tool that takes commandline arguments.  Addnote.exe is basically a commandline tool for adding notes to top or bottom of a text file with a date stamp.

pikamookie

  • Charter Member
  • Joined in 2006
  • ***
  • default avatar
  • Posts: 4
    • View Profile
    • Donate to Member
Re: appending text to todo.txt file?
« Reply #5 on: July 20, 2006, 10:57 AM »
gotcha.  can't wait to see the final exe!

Gerome

  • Charter Honorary Member
  • Joined in 2006
  • ***
  • Posts: 154
    • View Profile
    • Get my Freestyle Basic Script Language + compiler!
    • Donate to Member
Re: appending text to todo.txt file?
« Reply #6 on: July 21, 2006, 08:21 AM »
Hi,

gotcha.  can't wait to see the final exe!

I'm the main FBSL author that has made this little tool for FARR.
It was a 1st essay, when i have time i'll rewrite it, but if you have also a bit of time, you can try to enhance it if you know some programming like vb or alike, because FBSL is a sorta vb like but it is able to compile as a real stand alone executable without depends :)
Yours,
(¯`·._.·[Gerome GUILLEMIN]·._.·´¯)
http://www.fbsl.net [FBSL Author]
http://gedd123.free.fr/FBSLv3.zip [FBSL Help file]
(¯`·._.·[If you need help... just ask]·._.·´¯)

rjbull

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 3,205
    • View Profile
    • Donate to Member
Re: appending text to todo.txt file?
« Reply #7 on: July 21, 2006, 10:00 AM »
Addnote.exe is basically a commandline tool for adding notes to top or bottom of a text file with a date stamp.

Horst Scaheffer's LOGECHO in his PBATS collection;


LOGECHO - custom entries for logfiles, with enhanced date handling

LOGECHO 2.2 (c) 1997 Horst Schaeffer
ECHO using time/date information (case sensitive tokens):
   $D  day (01..31)   $h  hour
   $M  month (01..12)   $m  minutes
   $N  month (Jan..Dec)   $s  seconds
   $H  month (hex 1..C)   $c  sec/100
   $Y  year (00..99)
   $C  century (19|20)
   $W  day of week (Sun..Sat)
   $V  day of week (0..6)
   $Z  day of year (001..366)
   $$  '$'
   $+  new line


These are the tokens, you can mix them with any other text.