Zap_Card v.2T June 18, 1988 ZAP_CARD - AN ELEMENTARY CARD FILER by J.Andrzej Wrotniak INTRODUCTION This program will allow you to create and manipulate simple card files, to store, retrieve and update various kinds of information. Zap_Card is not a full-featured database, but it is adequate for many simple tasks, as e.g. cataloguing books or records, or collecting references to literature. On the other hand, Zap_Card is, I believe, much easier in use than a regular, even simple, database program. My 11-year old friend is using it (after 15 minutes of explanation) to maintain a catalog of his father's compact disk collection. This is a utility program, not a way of life. Reading this documentation before using the program is not really necessary. You may decide to quit reading, run Zap_Card and learn it on the go: the help screens and occasional referring to the documentation should suffice. SYSTEM REQUIREMENTS Zap_Card will run on any Atari ST computer, in monochrome or color (medium resolution). It was not tested on a Mega ST, but there is no reason it should not run on one. CONTENTS OF THIS PACKAGE The following files are included in the set: - ZAP_CARD.PRG - the executable program; - ZAP_CARD.RSC - the resource file; - ZAP_CARD.DOC - the documentation you are reading now; - CLASS_CD.CFI - a small example data file (not encrypted). The resource and data files (not the program itself!) should be placed in the folder \ZAP_CARD\ created in the same directory (root or folder) as ZAP_CARD.PRG, e.g. - 1 - Zap_Card v.2T June 18, 1988 B:\ZAP_CARD.PRG B:\ZAP_CARD\ZAP_CARD.RSC B:\ZAP_CARD\*.CFI or, if you are using a hard drive: E:\MISCPROG\ZAP_CARD.PRG E:\MISCPROG\ZAP_CARD\ZAP_CARD.RSC E:\MISCPROG\ZAP_CARD\*.CFI LEGAL NOTICES Zap_Card is a copyrighted program. However, the executable files of Zap_Card (versions up to and including 2Z) may be freely used and distributed for non-commercial purposes - as long as at most a reasonable medium/copying/mailing fee is involved. If you distribute the program, please pass along also this documentation. The above permission includes the rights to post Zap_Card on electronic bulletin board systems or networks and to distribute it via user groups. This does not, however, include the vendors selling "public domain" disks for $10 and more (which is more than the wholesale price of many Atari ST programs). The program was coded in the OSS Personal Pascal v.1 and later recompiled using Version 2 of this compiler. The executable code contains library routines copyrighted by OSS and CCD and used with their permission. The resource file was produced with the RCS from Atari. Guinness supplied the beer. Disclaimer: After using Zap_Card for more than a year I have all reasons to believe that the program is free of bugs and glitches. Still, in this age of everybody suing everybody for everything, I have to state that using Zap_Card, you are doing it at your own risk. I am giving you the rights to use this program, but I am not responsible for any harm and losses the use (or misuse) of Zap_Card may cause. GETTING STARTED: FILES AND PASSWORDS You run Zap_Card by double-clicking on its icon from the desktop (sorry, no "Install Application" option here). The Password Panel will show up. Pressing Return (or clicking on [Done]) will continue the program without a password. If you choose a password (any combination of characters, with case significant), the file created by the program will be accessible only after the same password is used. When you enter a password, it remains fixed for the length of the program run; during that run you will be able only to create new password-protected files, access old files created with the same password, and access files created with no password. - 2 - Zap_Card v.2T June 18, 1988 After the Password Panel, a file selector will appear, so you may choose an existing card file from the \ZAP_CARD\ folder, or create a new one by typing its name in. Files created with a password are denoted with extension CFC, those without password - by CFI. And finally you will find yourself in the Main Panel (if a new file is being created - the Header Panel, but just click on [Continue] to exit it). Here is where the fun begins. THE MAIN PANEL This is where you will spend most of your time with Zap_Card. All basic functions of the program are accessible from here, and the [Help] button will bring up a screen with a brief description of available options. Most of the panel is occupied by the card template, consisting of three header lines (smaller box at the top), 10 text lines (larger box below) and six keyword indicators (below the text box). The discussion of keywords will be postponed until later. The card template also contains the card number and the date of its creation (or the current date, if the template is empty). Total number of cards in the file is displayed at the top left of the panel. The three header lines may contain any information which will be used for sorting and searching of cards, as e.g. author, title and publisher in case of a book catalog. The 10 text lines may contain any other information supplementing the header, but the program does not make any use of it. (In case of a book catalog you may write there, for example, a short summary of each book). The three short lines just to the left of the header box should contain the header descriptors, as e.g. "Author", "Title" and "Publisher". To enter the header descriptors, you click on the [Headers] button, which will bring you into the Header Panel. When you have your header descriptors typed in, return to the Main Panel (by clicking on [Continue]) - your card file is ready for use. TYPING IN CARDS; SORTING ORDER When you create a new file, an empty blank will be displayed first. You may fill it with the information as you like. To recall a blank card when a filled card is displayed, just click on [Blank]. Filling cards with text is pretty straightforward. The information is just typed in, moving between lines is done by using the keyboard arrows, and some degree of editing is possible by use of Backspace and Delete keys. - 3 - Zap_Card v.2T June 18, 1988 In addition to the normal ASCII characters, a Control-C key combination may be used in the header lines (a right-pointing arrow will show on screen). When the program sorts the cards alphabetically, each header line is treated as if it started from this arrow, so that Isaac =>Asimov will precede Arthur =>Clarke in your book catalog. Without the arrows whole lines are compared. Only the first arrow in each header line is significant. The cards in your file will be always alphabetically sorted by their header lines. Sorting is done by comparing the top header lines for all cards; when those are equal - the middle ones are compared, and finally - the bottom ones. The text lines (large box) are not used for sorting. Example: Arthur C. Clarke The Songs of Distant Earth Isaac =>Asimov Foundation Arthur =>C.Clarke Rendez-Vous with Rama Yes, this is right. "Arthur" precedes "Asimov" in the alphabetical order; we've forgotten the arrow before the first "Clarke"! ADDING, REPLACING AND DELETING CARDS When your card is ready, it can be added to the file by clicking on the [Add] button. The card will be inserted into the proper place, according to the alphabetical order as described above. When you are modifying an existing card, a choice exists between [Add] and [Replace]. The latter will just modify the card in the file, while the former will add the modified one, still retaining the original. Clicking on the [Delete] button will discard the currently displayed card from the file (a confirmation will be requested). Actually, all these operations are performed on the copy of your card file kept in the computer memory. They will not affect your file on disk until it is overwritten on your explicit request. Thus, if you make a series of mistakes, you may always exit the program (or re-read the file from the disk using [Open]) without saving the modified file, and the original will remain unchanged. - 4 - Zap_Card v.2T June 18, 1988 ADDING KEYWORDS TO CARDS Quite often you may want to assign one or more keywords to a card. For example, possible keywords in your book catalog may include MATH, SCIENCE, HISTORY, REFERENCE, SCI-FI, HORROR etc. (type of book), XVIII, XIX, XX (century), ENGLAND, US, FRANCE, GERMANY, POLAND (country of origin) and other possible attributes in one or more possible categories. The keywords could be, in principle, just typed in into one of the header lines (as only the header lines are used for search operations). This is not the best solution, as it would require remembering the exact spelling of each keyword; the program would not know that SCIFI, SCI-FI and SF mean the same thing. This is why in Zap_Card you chose the keywords from a pre- defined menu. To get there, click on the [Keywords] button on the Main Panel - enter the Keyword Panel. The Keyword Panel displays a series of 40 keyword buttons. At the beginning they are empty. You may define new keywords by clicking on [Add], remove existing ones by [Delete] and modify them by [Replace]. In each case another dialog box will appear, and you have to type the keywords in there. To exit these secondary (or tertiary) dialogs, just click on [OK] (or type Return) with nothing typed in. The keywords, as you will notice, are limited to 6 character each because of screen space limitations. This should be, nevertheless, sufficient for meaningful mnemonics. The keyword buttons can be selected or deselected by clicking. The selected ones become a part of the current card itself and will appear in the card template of Main Panel. BROWSING AND SEARCHING The single up- and down-arrow buttons will move us to the previous or to the next card in our file, while the double arrow buttons will cause a jump to the first or to the last card, respectively. Zap_Card will also perform a search for a card (or cards) selected by given text strings in the header lines and/or given combination of keywords. Clicking on [Find] will bring up the Search Panel with a search card template. The search template consists of only the header lines and keywords - the large text box is irrelevant here, as the search operation does not make any use of it. If you type anything into a header line of the search template, then only the cards with a matching text (case- insensitive) in this line will be selected. - 5 - Zap_Card v.2T June 18, 1988 In our example book catalog, a template with "mov" in the first header line will select all books by Asimov (but also all by Moviansky, if you have any there), and one with "mov" in Line 1 and "Found" in Line 2 - all of Asimov's Foundation series (but also Moviansky's Lost and Found). There is a [Keywords] button here as well, used to set up the keywords for search (the Keyword Panel again). Buttons [AND] and [OR] allow to choose between the two possible ways of looking for the keywords: [AND] - select only the cards containing all the shown keywords; [OR] - select the cards containing any of the shown keywords. (This, of course, in addition to the header lines, if any.) Clicking on [OK] will return you to the Main Panel and start the search (always from the beginning of the file) for the first selected card. When already there, [Next] will search for the next one from the current position on. OPENING AND SAVING FILES This is done with the [Open] and [Save] buttons, as you have already guessed. An alert box will remind you about saving your file, if necessary. Files created without a password (*.CFI) will be always saved without it and vice versa. There is no way of protecting an unprotected file or un-protecting a protected one. Back-up files are not created by the program; I would recommend you to perform a manual back-up after each session. PRINTING Clicking on the [Print] button will bring up the Print Panel. From here you may choose the way the printout will be done. [This], [All] and [Selected] buttons define, whether the program will print just the current card, or all cards, or cards corresponding to the last search ([Find]) template, respectively. [Card(s)] and [Header(s)] will give you the choice of printing whole cards or just their 3-line headers. You may also squeeze the printout by setting the "Print Empty Lines" option to [No]. The last thing to be set here is the printout page length in lines. For a normal printer setup this is equal to 66 (with a 6- line skip-over-perforation region). I found, however, that smaller settings, as 33 or 22 lines, with 2 or 3 "logical" pages (respectively) fitting into a standard sheet of paper, may be more - 6 - Zap_Card v.2T June 18, 1988 satisfactory - especially when combined with horizontally condensed printout. Your printer should be, of course, set to the same value (with the skip-over-perforation equal to not more than one-tenth of the page length). This can be done with many of available public domain printer setting programs, of which my own AW_PRINT is just one. I found that the 33-line setting produces nice booklets which can be later bound, while the 22-line setting will print one card per mini-page. This is suitable for cutting and storing printed cards in boxes - and after updating your file you need only to print out the new cards. ACCESS TO THE MENU BAR Let me admit: I was too lazy to watch for GEM messages and redraw the Zap_Card screen every time a desktop accessory messes it up. On the other hand, sometimes you have to access the Desk menu without leaving the program. Thus, Zap_Card offers a compromise here. After clicking on the [Menu] button on the Main Panel, the panel disappears and the Desk menu with accessories becomes available. When you are done with the accessories of your choice, click on the entry [Back to Zap_Card...] - and re-enter the program. A primitive - but working - solution. PROGRAM LIMITATIONS Zap_Card will allow files of up to 1024 cards - less on a 520 ST, especially with accessories installed. In any case, a warning will appear on the screen and you will not be able to exceed the limit. Some handy features are missing from this program. A possibility to merge data files (or to split a data file into two or more) would be very useful and I am considering including these into future releases. Some rudimentary editing of the 10-line text area would be nice, too. Maybe some day. APPENDIX FOR INQUIRING MINDS: ENCRYPTION SAFETY The encryption scheme used in Zap_Card for password protection is based on asynchronous combination of two linear congruential pseudorandom generators with initial parameters modified by the password and file name (therefore do NOT rename your password-protected files!). While this is a quite primitive and not very elegant method (as compared to Rivest-Shamir-Adleman, my personal favorite), it - 7 - Zap_Card v.2T June 18, 1988 is much simpler and still quite costly to break - even after disassembling the program to get the details and with an access to both encrypted and un-encrypted text. Without the latter the system is safe from any practical attack, at least without supercomputers getting much faster than they are now. On the other hand, some of the commercial programs (and expensive ones, too) are using some much more vulnerable methods, so what the heck. PERSONAL NOTE FROM THE AUTHOR I hope you will like this program and find some use for it. If this is the case, let me know. All it will cost you is the mail stamp and a few minutes to write a short note. I will also be glad to hear suggestions for (simple!) enhancements, and reports of possible bugs and misbehaviours. One day I may decide to rewrite Zap_Card (using a more powerful compiler), so your remarks may come handy. Thanks. My (office) address is: Dr. J.Andrzej Wrotniak S.T.X. 4400 Forbes Blvd. Lanham, MD 20706 I can be also reached on the CompuServe (70611,2552) and on GEnie. Don't be shy, let me know you're out there. - 8 -