[comp.unix.questions] online notebook requested

marki@hpiacla.HP.COM (Mark Ikemoto) (01/15/88)

I am looking for a tool.  Please read on... 

During my continuing learning process with Unix I have come across
bits of information about Unix that I would have liked to have stored
away, on-line, in my own personal data base/notebook for later recall.
Such a tool would be useful for keeping at my fingertips information
that was gleaned through laborious searching of the man pages or
information not even documented in the man pages at all.  You could
also use it for names-and-addresses, recipes, restaurant
recommendations, etc.

For example, as I'm typing away on the terminal and I need to do a
subdirectory-to-subdirectory copy, I ask myself, what was that
dang-blasted option for cp to do this and how do I specify the subdir
names (e.g., ./tools/* ? , ./tools/ ? , ./tools ?).  I type:

          % man2 cp

and receive something like the following on my terminal screen:

          .\" keywords: cp copy subdir 

          cp -r subdir1 subdir2
              Subdir copying is tricky if subdir1 is your current
              working directory, or subdir2 is your current working
              directory, or if you live above the 39th parallel and
              it's the weekend.

          .\" end-of-entry


Basically, it's like the grep command searching a file for keywords,
but instead of returning just one line per match, it returns 
several lines until some marker is reached.  One nice thing is that
you could set up  man2  to access the notebooks of other users (willing
users!) on your system or other systems.  Kind of a distributed
intelligence with random thoughts.

I've thought of this tool but haven't had the time to implement it yet.
Does anyone out there have it, its equivalent, or something better
(hopefully for free).


Mark

wnp@killer.UUCP (Wolf Paul) (01/16/88)

In article <3600005@hpiacla.HP.COM> marki@hpiacla.HP.COM (Mark Ikemoto) writes:
>I am looking for a tool.  Please read on... 
>
>Basically, it's like the grep command searching a file for keywords,
>but instead of returning just one line per match, it returns 
>several lines until some marker is reached.  One nice thing is that
>you could set up  man2  to access the notebooks of other users (willing
>users!) on your system or other systems.  Kind of a distributed
>intelligence with random thoughts.
>
>I've thought of this tool but haven't had the time to implement it yet.
>Does anyone out there have it, its equivalent, or something better
>(hopefully for free).
>

A program like this is included with the MKS Toolkit, and my attempt to
re-write it for UNIX (since I don't have MKS source :-)) was recently posted
to comp.unix.microport.

The program is called "help" (very original :-)) and uses a helpfile where
each entry starts with a line consisting of '#' and one or more keywords.
The program looks for a match of argv[1] with one of the keywords, and then
outputs everything from the line following the '#' to the last line before the
next '#' line.

The program uses an index file which contains the absolute file offset in the 
helpfile for each keyword. I don't know if and how much this improves
performance, or if it is efficiently implemented.

If you cannot find the program in comp.unix.microport, e-mail me and I will
send you a shar file - the thing is not that long. If there is enough interest,
I will post it to comp.sources.misc as well.

Wolf Paul
ihnp4!killer!wnp

jhritz@cfpas.UUCP (John Hritz) (01/22/88)

In article <3600005@hpiacla.HP.COM> marki@hpiacla.HP.COM (Mark Ikemoto) writes:
>I am looking for a tool.  Please read on... 
>
>During my continuing learning process with Unix I have come across
>bits of information about Unix that I would have liked to have stored
>away, on-line, in my own personal data base/notebook for later recall.
>
I had the same need, which I addressed at first with a mail style interface and
then with a program which inserts time and date along with the little snipet.
Your idea with keywords and things would also be helpful.  Sed would allow the
keyword seach as well as a mark to mark extraction using the append option.
I will play around with the idea and report back.
-- 
UUCP: ihnp4!mibte!cfpas!jhritz (John Hritz)  "Do photons have mass?...
VOICE: 313-351-3485                               Are any of them Catholic?"

davidsen@steinmetz.steinmetz.UUCP (William E. Davidsen Jr) (01/26/88)

In article <239@cfpas.UUCP> jhritz@cfpas.UUCP (John Hritz) writes:
| In article <3600005@hpiacla.HP.COM> marki@hpiacla.HP.COM (Mark Ikemoto) writes:
| >I am looking for a tool.  Please read on... 
| >
| >During my continuing learning process with Unix I have come across
| >bits of information about Unix that I would have liked to have stored
| >away, on-line, in my own personal data base/notebook for later recall.
| >
| I had the same need, which I addressed at first with a mail style interface and

	I have a program which allow an arbitrary text to have a one
line title and multiple keywords. It can search on anded or ored
keywords. The lastest version is still in alpha, but if you want a copy
of the old one, drop me a line.

	To give you an idea of how long this has been in use, the
original ifdef's change from CP/M-80 to CP/M-86!
-- 
	bill davidsen		(wedu@ge-crd.arpa)
  {uunet | philabs | seismo}!steinmetz!crdos1!davidsen
"Stupidity, like virtue, is its own reward" -me

sid@llama.rtech.UUCP (Sid Shapiro) (01/30/88)

In article <239@cfpas.UUCP> jhritz@cfpas.UUCP (John Hritz) writes:
>In article <3600005@hpiacla.HP.COM> marki@hpiacla.HP.COM (Mark Ikemoto) writes:
>>I am looking for a tool.  Please read on... 
>>
>>During my continuing learning process with Unix I have come across
>>bits of information about Unix that I would have liked to have stored
>>away, on-line, in my own personal data base/notebook for later recall.
>>
>I had the same need, which I addressed at first with a mail style interface and
>then with a program which inserts time and date along with the little snipet.
>Your idea with keywords and things would also be helpful.  Sed would allow the
>keyword seach as well as a mark to mark extraction using the append option.
>I will play around with the idea and report back.

I once implemented a scheme that I got from an idea that some guy at
Lucas Films described.  Take a file, stash it in a safe place (or
message of some kind) with a name derived from the date, strip out all
non-essential words, and enter the rest of the words in a DBM data base
keyed to the rest of the words, with the rest of the fields containing
the names of all the files that that word appeared in.  The end result
was a key-word data base, but rather than have to figure out the key
words (something I always had trouble with) almost every word was keyed!
It was implemented as a bourne shell script.  There were 2 problems with
it though: first it was REAL slow.  I expect if I had re-done it in c it would
have speeded up.  Second - I didn't know how to delete a file without
rebuilding the entire data base - something that took forever. 

It was fun though.
/ Sid /

rbj@icst-cmr.arpa (Root Boy Jim) (02/06/88)

   From: Mark Ikemoto <marki@hpiacla.HP.COM>

   For example, as I'm typing away on the terminal and I need to do a
   subdirectory-to-subdirectory copy, I ask myself, what was that
   dang-blasted option for cp to do this and how do I specify the subdir
   names (e.g., ./tools/* ? , ./tools/ ? , ./tools ?).  I type:

I dunno what flavor you're running (HP/UX?), but if it has csh then you
might consider getting tcsh and running that. It has a help key, where
after you type 'foo^H' it looks for foo.help in a specified directory.
I chop some manual pages up so they fit on one screen and voila.

Even if it doesn't help you, somebody else might benefit. Good luck.

	(Root Boy) Jim Cottrell	<rbj@icst-cmr.arpa>
	National Bureau of Standards
	Flamer's Hotline: (301) 975-5688
Excuse me, but didn't I tell you there's NO HOPE for the
 survival of OFFSET PRINTING?

davidsen@steinmetz.steinmetz.UUCP (William E. Davidsen Jr) (02/10/88)

Due to dozens of requests, I am posting my keyword text save program to
sources.misc. I have no idea what the delay is. The version posted is
the current working version, in use for about three years. I have been
upgrading recently, and expect to post an upgrade in 6-8 weeks.
-- 
	bill davidsen		(wedu@ge-crd.arpa)
  {uunet | philabs | seismo}!steinmetz!crdos1!davidsen
"Stupidity, like virtue, is its own reward" -me