home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD1.iso / Database / HF-MCF43.LHA / mcfiler4.3 / tools / deaf / deaf106.doc < prev    next >
Encoding:
Text File  |  1996-07-25  |  12.4 KB  |  307 lines

  1.  
  2.                            dP                   .8888b
  3.                            88                   88   "
  4.                      .d888b88 .d8888b. .d8888b. 88aaa
  5.                      88'  `88 88ooood8 88'  `88 88
  6.                      88.  .88 88.  ... 88.  .88 88
  7.                      `88888P8 `88888P' `88888P8 dP
  8.  
  9.  
  10.                DEAF - Description Extracting And Filenoting
  11.                              (AmiNet oriented)
  12.  
  13.             By Manuel Giorgini (mgiorgin@dsi.unive.it) in 1996
  14.  
  15.  
  16. *** Disclaimer
  17.  
  18. Briefly: (1) this program comes with no warranty.
  19.          (2) if your HD burns (or stuff like that), I won't accept
  20.              any responsibility.
  21.          (3) I can only guarantee that this program will occupy disk space
  22.              and (maybe) some memory.
  23.  
  24. This program is CryWare.  That is, if you like it and you decide it's worth
  25. being used, you're morally obliged to open the window and speak aloud what
  26. you think about it, in a language of your choice ;)
  27.  
  28. And BTW if you leave me an EMail with your comments/bugreports/threats/thanks
  29. or whatever, I'll send you the complete sourcecode in Amiga E (it's so
  30. easy to write down it.  But maybe it can still be useful to someone, just
  31. to laugh sometimes, or to have something to read in the bathroom :)
  32.  
  33. My address is mgiorgin@dsi.unive.it
  34.  
  35.  
  36.  
  37. *** Prologue
  38.  
  39. First of all: Sorry for my bad command of english language.
  40.  
  41. Hi!
  42.  
  43. I run a BBS, and as many other sysops, I like to collect files and put them
  44. at my users' disposal.  Recently (well, not so recently :) I started
  45. leeching megabytes over megabytes of stuff from the AmiNet sites, and moved
  46. all my downloads into my file areas.  Soon I started getting bored of
  47. typing all the filenotes by hand, and after having looked (with no result)
  48. for a fitting utility, I worked on my own.  Thus, DEAF was born.
  49.  
  50.  
  51. *** What is this program for?
  52.  
  53. DEAF will scan an archive, extract the description from INSIDE it, and link
  54. it as a comment for that file.  Suppose you have downloaded "foo.lha" and
  55. you have noticed that it contains "foo.readme":  DEAF will EXTRACT the
  56. "Short:" line from foo.readme (or whatever line else) and will put it as a
  57. filenote on "foo.lha" (without the trailing "Short:" and blanks).
  58.  
  59. DEAF will then be able to move that archive in your personal
  60. aminet-organized mirror (if you have any), and will take care of discarding
  61. obsolete versions.
  62.  
  63. DEAF will recognize LHA, LZX and ZIP archives, and will operate
  64. successfully with all of them, provided you have LhA, LZX and UnZip in your
  65. path (this is extremely important!); evaluation versions are OK too if you
  66. are not using LZX.  DEAF by now needs a registered LZX to work, unless when
  67. moving archives and/or taking filenote informations from the external
  68. .readme file.
  69.  
  70. From v1.02 on, DEAF will use the Shell Copy and Delete commands to
  71. accomplish its new features, so you may have to put them in your path too.
  72.  
  73. Maybe such an utility is already existing, but I hadn't been able to find
  74. it.  I found an utility similar to what DEAF was in its v1.01, but it
  75. required the .readme file to be already unarchived and in the same
  76. directory as the archive file, and this is rather annoying for people not
  77. used to download readme files along with the archives.  The .readme file
  78. could then be nested into subdirectories in the archive structure, so a
  79. manual extraction might be very unhandy and, even worse, difficult to code
  80. in a script.
  81.  
  82. Anyway, upon demand I succeeded in letting DEAF check for those kind of
  83. readme files.  So if, say, you have "foo.lha" AND "foo.readme" in the same
  84. directory, when "foo.lha" does NOT contain "foo.readme", deaf will
  85. automatically look for the so-called 'external' readme file.  This file
  86. will then be moved along with the archive, or deleted if you tell deaf to
  87. do so.  It is to say that the archive itself won't be touched (besides when
  88. being moved); these operations will regard the unarchived readme files ONLY
  89. (f.i.  those kind of files you get when downloading stuff with an ADT
  90. client).
  91.  
  92.  
  93.  
  94. *** A note for AmiNet Uploaders
  95.  
  96. Please, add the .readme file into your archives too!  Otherwise, my program
  97. would become half useless :)
  98.  
  99.  
  100.  
  101. *** Syntax
  102.  
  103. This program works via CLI/Shell only.  Nevertheless, it has been developed
  104. for script purposes.
  105.  
  106. The command line has changed a bit from v1.01.  Remember to update your
  107. scripts (if you DID use deaf in your scripts, let me know!  i'd be
  108. enthusiast ;).
  109.  
  110. 1.Work:> deaf ?
  111. FILE/M/A,DP=DESCPAT/K,KW=KEYWORD/K,TF=TEMPFILE/K,TD=TODIR/K,RP=REPLACES/S,
  112. DM=DONTMOVE/S,DC=DONTCREATE/S,DR=DELREADME/S,SF=SAFENOTE/S,FB=FALLBACK/S,
  113. Q=QUIET/S:
  114.  
  115. Where:
  116.  
  117. FILE       - Specifies the Archived (LhA, LZX, ZIP) file(s) you'd like to
  118.              comment. Wildcards are allowed.
  119.              DEAF will automatically recognize the compression type basing on
  120.              the file(s) extension and launch the appropriate command.
  121.  
  122. DESCPAT    - is the descriptor file pattern.
  123.              (default: '*[archivebasename].readme', that is, '*deaf106.readme'
  124.              for 'deaf106.lha')
  125.              This is mainly intended for people using deaf on non-AmiNet
  126.              archives.
  127.              Please take a look to the FALLBACK chapter.
  128.              This setting overrides the FALLBACK flag.
  129.  
  130. KEYWORD    - is the word (or part of) immediately previous to the description
  131.              string (default: 'Short'). No wildcards allowed.
  132.              The colon sign (':') will be skipped along with the blanks, so you
  133.              shouldn't add it to the keyword. You can do it anyway but then deaf
  134.              won't recognize a header such as 'Short    : program blah blah',
  135.              that is, with a random number of blanks before the colon sign.
  136.              Search is CASE SENSITIVE, therefore pay attention.
  137.              When more than one string is matched, DEAF will get the first
  138.              only.
  139.              BTW, you can insert "Author:" or "Uploader:" here; guess what it
  140.              would produce... :)
  141.  
  142. TEMPFILE   - Is the temporaneous workfile for DEAF. It will be (hopefully!)
  143.              deleted during the operation, so you can definitely forget about
  144.              it. (default: 'ram:deaf_temp')
  145.  
  146. TODIR      - Specifies a root path for an aminet-like partition to store that
  147.              file in.
  148.              Example: suppose your readme file contains:
  149.              Type: comm/misc
  150.              and you specify "dh0:aminet" ('/' is facultative) as path; then
  151.              your file will then be *moved* (that is, copied and deleted) to
  152.              "dh0:aminet/comm/misc/". (see DONTMOVE)
  153.              Every absent directory will be created, in order.
  154.              Eg. in the case above, deaf would check for "dh0:aminet/comm"
  155.              first, creating it if needed, then it would do the same for
  156.              "dh0:aminet/comm/misc". (see DONTCREATE)
  157.              The 'Copy' and 'Delete' commands *must* be in your path.
  158.              This feature affects any 'external' readme file too, if present.
  159.  
  160. REPLACES   - If selected, and a TODIR path is given, deaf will look for a
  161.              string like this in the readme:
  162.              Replaces: comm/misc/oldstuff_v1*
  163.              and will issue a delete command with a path composed by TODIR
  164.              and "comm/misc/oldstuff_v1*", actually deleting your files
  165.              *forever* (until recovered w/ QBTools or similar :).
  166.              This command, having a wildcard, obviously affects any .readme
  167.              file present in the directory.
  168.  
  169. DONTMOVE   - If selected, original copies of files moved by TODIR won't be
  170.              deleted. This has been put for your safe. :)
  171.              This switch affects any 'external' readme file too, if present.
  172.  
  173. DONTCREATE - If selected, and a TODIR path is given, deaf will *not* create
  174.              any directory it does not find. If it actually happens, deaf will
  175.              just stop operations at all.
  176.  
  177. DELREADME  - If selected, DEAF will delete the "external" readme file, if
  178.              present.
  179.              Normally that file would follow the related archive: moved, or
  180.              just copied, if a TODIR path is given; left where it is, otherwise.
  181.              With this switch, you force deaf to delete it, right
  182.              after having operated on your archive.
  183.  
  184. SAFENOTE   - If selected, and your file is already commented, DEAF will leave
  185.              it untouched.
  186.  
  187. FALLBACK   - Most archives on AmiNet now have their related .readme file inside
  188.              themselves too. But sometimes the name won't match (f.i. you
  189.              download 'foo_v104.readme' and it contains 'foo.readme').
  190.              Therefore I added this flag to make deaf automatically fallback
  191.              to a more generic '*.readme' descpat, when you didn't specify a
  192.              specific one. (see DESCPAT)
  193.              The reason why I didn't make it the default, is that some large
  194.              packages have more than a single readme file, and since DEAF just
  195.              looks the first only, you may have that archive moved to a directory
  196.              which it does not belong to. Anyway in most cases it will work.
  197.  
  198. QUIET      - Will avoid any message printing; DEAF will anyway still return an
  199.              error code. Obviously there could still be a message printed, that
  200.              is the error relative to an eventual ReadArgs() failure :)
  201.  
  202.  
  203. *** Example
  204.  
  205. If you have DEAF in your path, try this:
  206.  
  207. 1.Work:> deaf Work:comms/downloads/#?.??? SF QUIET
  208.  
  209. voila!
  210.  
  211. For a quick check, try deaf with its very archive:
  212.  
  213. 1.Work:> deaf <path>deaf106.lha
  214.  
  215. If you have an aminet-like organization in one of your HD's, try with
  216.  
  217. 1.Work:> deaf <path>deaf106.lha TODIR dh1:archives/aminet REPLACES
  218.  
  219. I myself have added this line to s:shell-startup:
  220.  
  221.   ________O/________O/________O/________O/________O/________ 
  222.           O\        O\        O\        O\        O\         
  223.  
  224. Alias df "deaf [] TODIR dh1:aminet REPLACES"
  225.  
  226.   ________O/________O/________O/________O/________O/________ 
  227.           O\        O\        O\        O\        O\         
  228.  
  229. Now I can do
  230.  
  231. 1.Work:> df amitcp:ibrowse/downloads/*.lha
  232.  
  233. Without the hell of typing tons of times the same commands.
  234.  
  235.  
  236.  
  237. *** History
  238.  
  239. v1.00 [15.02.96] - First version
  240.  
  241. v1.01 [28.02.96] - stuff (trust me, this version is better, it's just that
  242.                    I can't explain efficiently in English what I have done :)
  243.  
  244. v1.02 [21.06.96] - Introduced TODIR, REPLACES, DONTMOVE, and lightly improved
  245.                    in other small parts.
  246.  
  247. v1.03 [01.07.96] - Now DEAF creates the needed directories (unless specified).
  248.                    DONTCREATE introduced.
  249.  
  250. v1.04 [10.07.96] - DEAF now looks for an external .readme file too, when none
  251.                    are matched inside the archive.
  252.                    The source file has been lightly optimized.
  253.                    Fixed a bug in the REPLACEment feature.
  254.  
  255. v1.05 [20.07.96] - Fixed a SERIOUS bug. Trash v1.04, don't trust it anymore!
  256.                    Fixed another bug in the REPLACEment feature.
  257.                    Now DEAF will optionally leave untouched a present filenote
  258.                    (just moves the file around).
  259.  
  260. v1.06 [25.07.96] - I added pattern matching, thus reorganizing the whole source.
  261.                    Now deaf, when looking inside the archive, tries to find
  262.                    a readme file with the same archive base name.
  263.                    Then, it will optionally fall back to *.readme, unless a
  264.                    specific descriptor pattern is given.
  265.                    Now deaf can resolve 'Short' lines with any number of blanks
  266.                    before the colon (':') sign.
  267.  
  268.  
  269.  
  270. *** Future versions
  271.  
  272. Tell me! You ask, We consider, I add. :)
  273.  
  274. Would anybody like a zzzreadlast.displayme add-to-archive feature?
  275.  
  276.  
  277.  
  278. *** Credits
  279.  
  280. Somebody helped me in developing DEAF, with suggestions and moral support.
  281.  
  282. They are:
  283.  
  284. Ron Burman,
  285. Gerard Sweeney,
  286. Christian Ruetgers (who suggested the main improvements for v1.02 and v1.04),
  287. Rob Saxby,
  288. Ville Ranki (suggestions for v1.05),
  289. Roland De Herder (suggestions for v1.06),
  290. Mark Sorensen (v1.06).
  291.  
  292. Anyway there is still someone else I'd like to mention:
  293.  
  294. Roberto Bizzarri, for he added DEAF into his McFiler distribution
  295. [if you are looking for a good disk cataloguer, try McFiler v4.1a!
  296.  available on biz/dbase],
  297.  
  298. Gabriele Zaverio, Giuseppe Chillemi, and the whole FreakNet network;
  299. Claudio Mazzuco, Guido Vaccari, Lorenzo Belloni and all my points;
  300. Peter Van Den Broeck, for his friendship;
  301. The Smashing Pumpkins band, for their great music [it helped me indeed :)],
  302. The EFF, for his fight for the freedom of speech and privacy in the 'Net;
  303. James McOrmond, for his program JamMail (lightyears beyond TrapDoor!), and
  304. Johan Billing, for CrashMail. Smart and strong. Good tosser. Take it. :)
  305.  
  306. EOF
  307.