0README

note
|-- 0NOTE			obvious
|-- 0README			this file
|-- Makefile			makefile
|-- note.1			man page
|-- note.c			source file
`-- note.sh			shell script [not tested with macsox]


NAME
       note - prepend dated input to file; maintain calendar and notes files
SYNOPSIS
       note [ { -f filename, -c date_string, -n, -s } ]
DESCRIPTION
       Note reads terminal input, line by line.  A date:
            Month day:
       starts  each line.  Input is terminated by ^D .  A blank line is added,
       as a record separator.

       The input then is prepended as a block to a file  selected  by  command
       line  option (default, "$HOME/memos/notes").  The previous state of the
       file is saved with the extension ".bak".   All  files  are  written  in
       "$HOME/memos",  except  for  "calendar",  in  "$HOME".  The directories
       "$HOME/tmp" and "$HOME/memos" must exist.  If the specified  file  does
       not exist, it is created and a warning message written to stderr.

       Note  is  an  easy way to be sure information gets into the proper memo
       file, and it operates independently of working directory.

       The option -c selects "$HOME/calendar" as the  file.   It  requires  an
       immediately  following  specification of a date, which is used to start
       each line of input and is needed for selection by the calendar program.

       If no date is specified, the date header is today's date.

   COMMAND LINE OPTIONS
       Option syntax is as required for parsing by getopt(3C).
       (default)      prepend dated input to "$HOME/memos/notes"
       -f fname       prepend dated input to "$HOME/memos/fname"
       -s             prepend dated input to "$HOME/memos/shop"
       -c datestring  prepend dated input to "$HOME/calendar"

       The datestring for the -c option is of the form:
            { date     [ date_modifier_list ] }
       Syntax for a date is relatively loose:
            {  now  |  today  |  weekday  |  month  day[, year] | mm/dd[/yy] |
            {month|mm} number weekday }
       The  remainder  of  the  datestring  is  a  set  of  date  modification
       sequences.  Each of these consists of two arguments,  a  signed  number
       and  either:  (1)  a unit specification ( d = day, w = week, m = month,
       and y = year ); or (2) a weekday designator (first two or three letters
       or  the  full  word).   Date modifications are cumulative.  The actions
       were described above.
EXAMPLES
       To set up a calendar entry for tomorrow:
       $ note -c today 1 d
       For monday next week:
       $ note -c mon 1 w
       For the 3rd wednesday in July
       $ note -c july 3 wed
SEE ALSO
       getdate(3), chgdate(1)
AUTHOR
       j.a. rupley, tucson, az  85716


"Note" attachs a date to a each line of input, and then _pre_-pends the
text to a file selected by command-line option.  "Note" makes it a bit
easier to file information properly.  Useful for adding to a calendar
file, or recording notes in a "memo" file.  Files are backed up before
each modification.  They are kept in $HOME/memos (except $HOME for
calendar).  Date specification is simple; e.g., the third monday in the
next month, for a dated calendar entry, is:

	note -c now +1 month 3 monday 


"Note" uses the "chgdate" parser to calculate the date from command-line
arguments.  The date format is recognized by the UNIX "calendar"
program.

The "note" and "chgdate" code is short and simple; it should be
easy to tailor to taste, specifically hardwiring of other filenames in
"note", and addition of rules to the yacc parser for idiosyncratic date
syntax.

For more information see the man pages in the "note" and "chgdate"
directories.

["Note.sh" is a shell script that does roughly the same thing as "note";
not tested with macosx.]


John Rupley
 rupley@u.arizona.edu -or- jar@rupley.com
 30 Calle Belleza, Tucson AZ 85716 - (520) 325-4533; fax - (520) 325-4991
 Dept. Biochemistry & Molecular Biophysics, Univ. Arizona, Tucson AZ 85721
