home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 203.lha / Library / libr.doc < prev    next >
Text File  |  1988-12-28  |  11KB  |  471 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.                                LIBRARY
  10.  
  11.  
  12.  
  13.               A Text Storage Program For The Amiga(tm)
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.                              by
  22.  
  23.                        Bill Brownson
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.                          June 11, 1987
  50.  
  51.  
  52.                   Copyright 1987, Bill Brownson
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59. Introduction
  60.  
  61. One of the most common uses for any computer is the Storage of data of 
  62.  
  63. various types.  There are a variety of programs available for Data 
  64.  
  65. Base Management, Word Processing and similar types of software.  The 
  66.  
  67. data Base programs normally require that all records conform to a 
  68.  
  69. specific format, and normally require that all records be the same 
  70.  
  71. size.  Word processing programs have no requirement for content or 
  72.  
  73. form, but it is difficult to find a specific file referencing a 
  74.  
  75. subject, particularly if there are several files which are about the 
  76.  
  77. same general subject.  Archive Programs, like word processing, have no 
  78.  
  79. requirement for content or form and waste no space but with them it is 
  80.  
  81. difficult to catalogue information for easy retrieval at a later date.
  82.  
  83.  
  84. Both word processing and data Base programs waste disk space.  The 
  85.  
  86. data Base wastes space by requiring that all records be the same size, 
  87.  
  88. and the text files (indeed all files) waste space because, on the 
  89.  
  90. average, every file wastes one half of a disk allocation unit, whether 
  91.  
  92. it is 128 bytes (early CP/M) or 512 bytes (AMIGA(tm)).  It would be a 
  93.  
  94. definite advantage if there were a way to store files without wasting 
  95.  
  96. space and still be able to search files to find records based on 
  97.  
  98. selection criteria.
  99.  
  100.  
  101. The LIBRARY is a program which does exactly that.  The LIBRARY program 
  102.  
  103. stores files without regard to structure or content, and allows 
  104.  
  105. searching for specific files by word or phrase and also allows 
  106.  
  107. searching by more complicated methods.  It also allows direct access 
  108.  
  109. to the Amiga(tm) CLI interface.   The program is entirely menu driven,
  110.  
  111. allowing for a more "user friendly" interface.
  112.  
  113.  
  114. Description
  115.  
  116. The LIBRARY program is written entirely in assembler.  There is a 
  117.  
  118. second program which will purge the LIBRARY of deleted files, and also 
  119.  
  120. sort the files in the LIBRARY in alphabetic order.  This does not need 
  121.  
  122. to be done often, but will speed searches by arranging the file in the 
  123.  
  124. order that it is searched.
  125.  
  126.  
  127. The program may be run from either CLI or workbench. The first thing 
  128.  
  129. the program will do is request the name of the LIBRARY to use.  When 
  130.  
  131. this name is entered, the program will attempt to open the given file.  
  132.  
  133. If the file does not exist, the next information requested will be a 
  134.  
  135. verification of the name and the question "do you want to create it?".  
  136.  
  137. If the answer yes, the program will then create two files, one with 
  138.  
  139. the extension ".lbr" and the other with the extension ".ndx".  If the 
  140.  
  141. user answers no, the program will return to either Workbench or CLI.
  142.  
  143.  
  144.  
  145. After file creation or if the file exists, a menu will be displayed, 
  146.  
  147. and the user will be able to enter his choice of  ten menu items.
  148.  
  149.              Enter Selection [ ]
  150.  
  151. 1. Add file                     6. Delete File
  152.  
  153. 2. Display File                 7. Rename File
  154.  
  155. 3. Display Directory            8. New CLI
  156.  
  157. 4. Keyword Search               9. Logical Search
  158.  
  159. 5. Write file to disk           Q. Exit program  
  160.  
  161. The program may be exited by pressing "Q" at the option request.
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168. Add File
  169.  
  170. This is the basic operation of the program.  Text files which have 
  171.  
  172. been created by one of the various editors available to the AMIGA(tm) 
  173.  
  174. are read off of the disk and added to the LIBRARY.
  175.  
  176.  
  177. When this option is selected, the program will request the name of the 
  178.  
  179. file as it exists on disk, and then verify that it is there.  If 
  180.  
  181. desired, it is possible to return to the menu by pressing  "Return" at 
  182.  
  183. the first character or ESC at any character.  It will then ask for the 
  184.  
  185. internal name for the file.  This name can include leading or included 
  186.  
  187. spaces and any printable character.  After the internal name is 
  188.  
  189. entered, the program will begin reading the file and adding it to the 
  190.  
  191. LIBRARY.  After the file has been added, it is immediately available 
  192.  
  193. to all other options.  When a file is first added, it is immediately 
  194.  
  195. placed in proper sort order in  the internal Directory.  All directory 
  196.  
  197. entries are stored in upper case for consistency.  Multiple files of 
  198.  
  199. the same name are allowed but not recommended because of the possible 
  200.  
  201. confusion in searches or writing  to disk.
  202.  
  203.  
  204. The recommended format for text files is left flush, and, whenever 
  205.  
  206. possible, having the most common words and phrases which will identify 
  207.  
  208. the document at the start.  This is not necessary, but will allow a 
  209.  
  210. quick search of large files without the requirement of searching the 
  211.  
  212. entire file.
  213.  
  214.  
  215. Display File
  216.  
  217. The second most common use of a file (or record) is to be able to 
  218.  
  219. display it.  When Display is selected, the program will first check to 
  220.  
  221. see if an index (created by one of the search methods) exists.  If 
  222.  
  223. there is an index, the program will ask if the user wants to use the 
  224.  
  225. index.  Any response besides a "y" or "Y" will request the name of the 
  226.  
  227. file to display.  Enter only as much of the name as is necessary.   
  228.  
  229. The program will then display the selected file(s) which match the 
  230.  
  231. entry request.  The menu can be returned to by pressing "Return" or 
  232.  
  233. "ESC".  If use of the index is selected, all files selected in the 
  234.  
  235. last search will be displayed in alphabetic order.
  236.  
  237.  
  238. Files are displayed 20 lines at a time, with a pause between sections.  
  239.  
  240. Pressing "RETURN" will clear the screen and display the next 20 lines.  
  241.  
  242. If there is more than one file which matches the entry, the program 
  243.  
  244. will pause between files, and then display the next file.
  245.  
  246.  
  247.  
  248. Directory
  249.  
  250.  
  251. This option will display a list of all of the files which are 
  252.  
  253. currently in the LIBRARY.  The entries are displayed in sorted order.  
  254.  
  255. The program will display the file names until the screen is filled, 
  256.  
  257. and then pause until "RETURN" is pressed.
  258.  
  259. Search
  260.  
  261.  
  262. This is the first method of finding which files contain a specific 
  263.  
  264. word or phrase.  The program requests a word or phrase to search for, 
  265.  
  266. and then commences the search.  Pressing any key during the search 
  267.  
  268. will halt the search.  File names are displayed as they are searched, 
  269.  
  270. and all files which have the given word or phrase are displayed on the 
  271.  
  272. screen.  The search speed depends on the operating system.  A typical 
  273.  
  274. search of a LIBRARY with 130 entries in 109K should take under 20 
  275.  
  276. seconds from a floppy drive and  version 1.2 of the operating system.  
  277.  
  278. Limited wildcarding (only "?") is allowed,  and the search will 
  279.  
  280. consider a line feed to be equivalent to a space.
  281.  
  282.  
  283. Write File to Disk
  284.  
  285. Having the text files in the LIBRARY program would not be very useful 
  286.  
  287. if there was no way to extract the files for access by an editor or 
  288.  
  289. the printer.  This option allows selected files to be written to the 
  290.  
  291. disk.  The program first checks for the  index created by search.  If 
  292.  
  293. it is found, the program will ask if the index is to be used.  Any 
  294.  
  295. response except "Y" or "y" will bypass the index.  If index use is not 
  296.  
  297. requested or there is no index, the program requests the name of the 
  298.  
  299. file.  It is necessary to enter only enough of the file name to select 
  300.  
  301. the specific file (or files).  The program will then request the disk 
  302.  
  303. file name to write to.  At either request, a "Return" or "ESC"  will 
  304.  
  305. return the user to the menu.  The program will then create the file 
  306.  
  307. (deleting any file of the same name).  The printer (as "PRT:") may be 
  308.  
  309. specified instead of a disk file if hard copy of a file is required.  
  310.  
  311. If index use is selected, all files selected on the last search will 
  312.  
  313. be output.
  314.  
  315.  
  316. Delete
  317.  
  318. Delete functions in a similar manner to the other options.  It will 
  319.  
  320. request the name of the file to delete, with a "Return"  or "ESC" 
  321.  
  322. returning the user to the menu.  In this particular case, the entry 
  323.  
  324. must match exactly  the name of the file to be deleted (except for 
  325.  
  326. case).  The file is then marked for deletion, and is immediately 
  327.  
  328. removed from the directory.  The file is still in the LIBRARY, 
  329.  
  330. however, and may be recovered by using an editor  such as "MicroEmacs"
  331.  
  332. to extract the file to disk to be re-added.  The file is not 
  333.  
  334. permanently deleted until the "Packit" program is run.
  335.  
  336.  
  337.  
  338.  
  339.                      Rename File
  340.  
  341. Files are not always stored under the most descriptive title.  This 
  342.  
  343. option allows files to be renamed.   This option requests the old file 
  344.  
  345. name, and then the new file name.  Again, the menu may be returned to 
  346.  
  347. by pressing "Return" in the first character position.  The entry must 
  348.  
  349. (except for case) match exactly an entry in the directory.  renamed 
  350.  
  351. files are immediately placed in the directory in sorted order.
  352.  
  353.  
  354. Logical Search
  355.  
  356. The real usefulness of a program of this type is the ability to find 
  357.  
  358. data which matches certain criteria.  This option is similar in 
  359.  
  360. function and speed to the normal search, but allows some very 
  361.  
  362. important options.
  363.  
  364. As usual, the program requests a word or phrase to search for.  After 
  365.  
  366. this is entered, the program will present a mini-menu which will allow 
  367.  
  368. for (1) and, (2) or, or (3) and not  options.  After this is selected, 
  369.  
  370. the program will allow entry of a second word or phrase.  searching 
  371.  
  372. continues in the same manner and is only slightly slower than the 
  373.  
  374. standard search.  These options make it very easy to find a specified 
  375.  
  376. document or documents.  Examples include searching for "disk" and not 
  377.  
  378. "hard" and searching for "disk" or "floppy" and the obvious searching 
  379.  
  380. for files with "disk" and "floppy". 
  381.  
  382.  
  383. NewCLI
  384.  
  385. This option will open a new screen on the Amiga(tm).  It is a standard 
  386.  
  387. window allowing full access of to the Command Line Interface of the 
  388.  
  389. Amiga(tm).  The user may return to the LIBRARY by typing "ENDCLI"
  390.  
  391.  
  392. Non-Menu Items
  393.  
  394. Fast Search
  395.  
  396. Comprehensive searches are time consuming.  The LIBRARY program has a 
  397.  
  398. maximum search speed of about 15K per second from ram.  At maximum 
  399.  
  400. speed on a maximum size file (32 M), this search would take 35 
  401.  
  402. minutes.  As this is unacceptable in most circumstances, a fast search 
  403.  
  404. method has been added for large files.  It only searches the first 512 
  405.  
  406. bytes of a file, if the file is larger than 512 bytes, or the entire 
  407.  
  408. file if shorter.  This reduces the maximum number of disk reads to one 
  409.  
  410. per entry or about 500 for the maximum size file. The program should 
  411.  
  412. be able to accomplish this search in under 2 minutes, depending on the 
  413.  
  414. hard disk drive used. This option is a straight search, not the 
  415.  
  416. Logical search.  This search is accessed by typeing "F" at the Menu.  
  417.  
  418.  
  419.  
  420. Ego Message
  421.  
  422. Pressing "I" will give my name and address.
  423.  
  424.  
  425.  
  426.  
  427.  
  428. The LIBRARY program will run on any AMIGA(tm) using workbench versions 
  429.  
  430. 1.1 or 1.2.  It is has been tested on 5 1/4" drives and 3 1/2" drives.  
  431.  
  432. It has been tested on both 68000 and 68010 CPUs. The only current 
  433.  
  434. restrictions are a limit of 500 files in a single LIBRARY and  file 
  435.  
  436. sizes are  Limited to 64K giving a maximum LIBRARY size of 32 
  437.  
  438. Megabytes.  Any type of file may be stored within the File, but 
  439.  
  440. searches on object modules may prove to be meaningless.
  441.  
  442.      The full system is $29.95 and available from
  443.          Bill Brownson
  444.          7217 Romford Way
  445.          North Richland Hills, TX 76180
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469. Amiga is a trademark of Commodore-Amiga, Inc.
  470.  
  471.