home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / util / unix / ftpscrip.tz / ftpscrip / FtpExtra / readme < prev    next >
Encoding:
Text File  |  1991-09-16  |  9.8 KB  |  196 lines

  1. *Please* finish reading this readme file.  It will tell you everything I can
  2. think of regarding the scripts in this package.  I have tried to break things
  3. up into some sort of logical order, but I tend to ramble on, sort of 
  4. _Stream of Conciousness_ documentation if you will.  Please forgive the
  5. poor spelling, grammer, etc.  There are additional comments in many of
  6. the scripts.
  7.  
  8. The Minimum You Have To Do -
  9.     At the very least you have to set a few variables in the runme file,
  10. and a few defines in ftpmenu.c  Please take the time to do that. If you dont
  11. nothing will work right.  If you're like me you typed 'make' before
  12. 'more readme', well I suppose you'll live.  It probably didnt work due
  13. to the fact I dont understand 'make' yet, so I used a shell script to 
  14. do everything, you can use 'runme', just pretend its a make file, it
  15. would be if I knew what I was doing. Anyway, almost all of these 
  16. scripts rely on csh.  If youre csh _isn't_ at /bin/csh then they wont run.
  17. They also rely on the berkeley curses C library, and a pager (more, less)
  18. Ive tried to note restrictions and requirements.  Then just type ftpnightly,
  19. this should get the ball rolling.  Things should take care  of updating
  20. themselves after that, you can just use the routines. If you just want
  21. to see how things work then skip typing ftpnightly.  Youll be working
  22. with old data, but at least youll be able to see what the interfaces to 
  23. ftpnew, and ftpmenu are like.
  24.  
  25. The Makefile -
  26.     See the comments at the front of the makefile for a list of everything
  27. it will do.  It adds lines to your .cshrc, and adds a directory at your
  28. home level among others.
  29.  
  30.  
  31. The Scripts -
  32.  
  33. The basic idea - 
  34.     At a high level heres how things work.  You set up an 'at' job that
  35. runs every night.  It will do a bunch of stuff for you automatically.  In
  36. general it gets the new listings and abstract files.  Then when you log in
  37. for the day, you can use some other scripts to view the information.  Of
  38. course things get filtered along the way, and all this information eats
  39. up disk space, but it sure speeds up routine archive checking.  If you
  40. let things go it doesnt matter, since todays files replace yesterdays, and
  41. the onlything wasted is the automatic ftp to your archive sites in the
  42. middle of the night.  More recently Ive added the ability to automatically
  43. mirror the last few days of new stuff to a local directory.  If you always
  44. want to look at the new things, this is a godsend. (A friend of mine hacked
  45. this one actually.)  _Beware_ a hell of a lot of stuff can get  posted in 
  46. two days.  It averages around 1M, but its been as high as 15M, and 3-4M is
  47. not uncommmon.  If you want to enable this, you'll have to take a look
  48. at $FTPEXTRAS/bin/ftpnightly.  $FTPEXTRAS is an environment variable that
  49. tells where all this stuff goes.  The make file will create FtpExtra/ in
  50. your home directory unless you tell it otherwise. Oh yea, I almost forgot,
  51. script files, in  $FTPEXTRAS/scripts/ tell this nightly job exactly
  52. what it is looking for.  My examples should be explanation enough.  Reading
  53. the comments in the script files, really will aid your understanding. Yipes..
  54. Ive used script in two differnet ways.  Shell script, and ftpcheck script.
  55. The files in $FTPEXTRAS/scripts/ are internally used.  Things in 
  56. $FTPEXTRAS/bin/ are shell scripts you can run from the prompt. These are the
  57. ones with comments.
  58.  
  59.  
  60. The scripts you will use -
  61.     'call <place>' - uses the info in your .netrc file to save you typing
  62. e.g. I type 'call sum' instead of 'ftp sumex-aim.stanford.edu'  Basically
  63. it does a substring search and ftp's to any match.
  64.     'ftpnew [month]' - uses data files that get automatically generated
  65. to show you a listing of whats new this (or the specified) month.  I originally
  66. used this as an easy way to see if anything new was posted to sumex, long
  67. before I knew about info-mac.digest.
  68.     'ftpmenu' - Menu driven program based on the curses package allows
  69. you to retrieve recent posts releatively easily.  A good tool for browsing
  70. if you've been away for a few weeks.
  71.     'undo' - unbinhexes everything in the current dierectory, and 
  72. trashes the .hqx if successful
  73.  
  74.  
  75. The scripts that run behind the scenes -
  76.     'ftpcheck' - Runs script files you set up to get information
  77. from your favorite ftp sites.
  78.     'ftpdoc' - If you are  running the mirroring option, then this
  79. script takes care of exttracting doc files.
  80.     'ftpmenubase' - the real meat of ftpmenu
  81.     'ftpnightly' - runs automatically every night.
  82.     'mirror.etc.etc.etc.and.more.stuff' - if it starts off mirror. then
  83. it has something to do with mirroring.  (Obviously I suppose)
  84.     
  85.  
  86. Some aliases - 
  87.     sumex - Goes directly to the directory holding the sumex mirror.
  88.     
  89.  
  90.  
  91. Dependancies -
  92.     less,more - If you dont have a one of these pagers the abstract
  93. function of 'ftpmenu' wont work.
  94.     mcread - Available at sumex-aim, this utility can translate
  95. MacWrite macbinary files into text. I use it to extract docs with ftpdoc
  96. during the mirroring operation.
  97.     unsit - Also used by ftpdoc.
  98.     mcvert - Debinhexes files.  Used by undo, and during mirroring.
  99.     macbin - used by ftpdoc.
  100. All of these should be availible at sumex-aim.stanford.edu
  101.  
  102.  
  103. Questions -
  104.     Q: How can I add sites to the ones already being watched?  How can
  105. I add remove directories from those being watched?
  106.     A: This is controlled by two things.  Your .netrc, and the scripts
  107. in $FTPEXTRAS/scripts/  When the automatic stuff runs, it looks in your
  108. .netrc. It steps to each line and reads the entry, if a script (internal)
  109. is present then it gets run.  So to add a site: add it to your .netrc,
  110. and then create a script file.  The script file should  be named
  111. script.host.domain and be in $FTPEXTRAS/scripts/  Please note that
  112. the spacing of the .netrc file is important, since I check specific columns
  113. for this or that info.  To change directories, simply modify an existing
  114. script.  It should be obvious if you look at  one of them, they are
  115. simply sequential ftp commands.
  116.  
  117.     Q: How can I change the number of days I am mirroring?  How can just
  118. mirror permanently?
  119.     A: These are controled in mirror.sumex-aim.stanford.edu and
  120. mirror.sumex.filter.  To change the number of days, look for the foreach,
  121. and include more or less numbers depending on your preference.  To miror
  122. permanently, comment out the 'rm *' line that gets rid of yesterdays files.
  123.  
  124.     Q: How do I use ftpmenu?
  125.     A: The idea behind this program is to let you easily retrieve files
  126. from ftp sites.  When you run the program, it should tell you that it is 
  127. loading some information.  You will then see a menu of sites.  Pick a site,
  128. then pick a directory from the new menu.  You will then see a list of files,
  129. just go to the file, you want and hit space.  It will get marked (visibly).
  130. You can mark other files, etc..  When you are done, exit the program, and
  131. the files will be retrieved into the current directory.  A short help
  132. screen is available by hitting 'h' or '?'
  133.  
  134.     Q: When I use ftpmenu, and try and look at an abstract, I dont
  135. see one.  Not only that the controls stop working right, and when I hit
  136. ^C to get out of the program, my keypresses dont echo properly.
  137.     A: This occurs because somefile doesnt exist.  Heres what you
  138. should check.  The path to 'less' or 'more' at the very beginning
  139. of ftpmenu.c.  Make sure this points to a valid copy.  If this path is
  140. invalid you will get screwy behavior as above.  Another thing that could
  141. be wrong is the absense of an abstract file.  Make sure the parameter
  142. that ftpmenu (the script) passes to ftpmenubase (the realprogram) is
  143. valid.  If you havent been fiddling, then It should work the way I have
  144. it set up.  The last thing you should do is mail me, and tell me to 
  145. include real error checking.  (Like checking whether  files exist)
  146. I have really poor checking in this program, since I orginally developed
  147. it for _me_ and of course I know what should go where. 
  148.  
  149.     Q: How can I change the order of things when using 'ftpnew'?
  150.     A: If you chnage the order things are listed in your .netrc
  151. then the ordering in both ftpnew and ftpmenu, will change.  To change
  152. the order of directories, change the order of your $FTPEXTRAS/scripts/whatever
  153. file.
  154.  
  155.     Q: When I run ftpmenu, all the choices appear twice, how come?
  156.     A: Look in your .netrc. Probably you have the site listed twice.
  157. This could happen easily if you ran 'runme' more than once. Youve probably
  158. got duplicate lines in youre .cshrc also.
  159.  
  160.     Q: How do I get ftpmenu to show me abstracts from other sites
  161. besides Sumex?
  162.     A: You need to see if the site has an abstract file you can get.
  163. For instance mac.archive.umich.edu could be added by following these steps.
  164. 1) Modify the $FTPEXTRAS/script/script.mac.archive.umich.edu file
  165. so that it gets the /mac/00help/index.txt file.  Take a look at the 
  166. script for sumex to see how to do this.
  167. 2) Add a line to ftpnightly, that will 'cat' the two abstract files together.
  168. such as 'cat abstract.sumex-aim.stanford.edu abstract.umich > totalabstract'
  169. 3) Change 'ftpmenu' so that the abstract file is totalabstract  instead
  170. of the sumex abstract.  
  171. Make sense?
  172.  
  173.     Q: Some other miscellaneous problem?
  174.     A: Mail me, and ask.  Maybe Ill know.
  175.  
  176. About Me - 
  177.     I'm a Junior in computer science at University California, Davis.
  178. You can reach me at jedavis@ucdavis.edu.  Id be happy to explain,
  179. or make small changes, if I have time.  As soon as school starts back up
  180. (its summer now) Ill be fairly busy though.  But please feel free to ask.
  181. Now could you do me a favor: write me a brief note saying what you, like
  182. dont like about this whole thing.  Or if you got it running at all.  If
  183. you work somewhere that has official letterhead, and you use these, then
  184. take the time to boost my ego by expressing it on that official letterhead,
  185. and sending it to:
  186.  
  187. James Davis
  188. 6708 Austin Way
  189. Sacramento, CA 95823
  190.  
  191. Incidentally thats my parents address so it should be good for quite
  192. a while, as opposed to my local address  which changes quite often.
  193.  
  194. At this point you should go modify: ftpmenu.c, runme, bin/ftpnightly
  195.  
  196.