----------------------------------------- 3]MOVIE CATALOGUER: Here You Go, Dennis 3]Don't Leave! This Will Catalogue Anything 3]Staff ----------------------------------------- In this month's Readers' Forum is a request from Dennis Prather, Lemoore, CA., for movie and music cataloging programs. Dennis' wish list, like many we receive at JUMPDISK, is not so much dependent on a specific application as it is on a bit of understanding of AmigaDOS commands. Yes, we know some people get headaches at the mention of learning AmigaDOS -- despite the popularity of Brad Webb's AMIGADOS PRIMER series. Still, for Dennis and anyone else who wants to make use of these fundamentals, we'll offer just a few AmigaDOS commands that will do a surprising amount of work. You'll see. Experts, don't fault us for leaving out the complexities. This is for an initial solo flight. You may weary of how the files have to be set up, but buckle down and do it, and at the end of this article there will be some easy commands that will allow you to extract and extrapolate an amazing amount of information from the data. OK, Dennis, here you go: Boot with Workbench. Format a disk and rename it from EMPTY to MOVIES. If you have two drives, put the MOVIES: disk in df1:. Otherwise, you're going to have to do some disk swapping. Open a CLI or (if you have Workbench 1.3) a Shell window. If you don't know how to do this, read the introduction to Brad Webb's AMIGADOS PRIMER column in this issue. Click the mouse inside the window that opens, to make sure it's activated. In that CLI or Shell window, type: makedir movies:films (means to press Return key, not type it) This makes a directory called FILMS on your MOVIE: disk. Next type: cd movies:films This puts control within the directory called FILMS on the disk called MOVIES:. CD stands for "change directory" and in this case it will shorten your typing job. You will now be using ED, the text formatter that is a built-in AmigaDOS command. We'll tell you enough to get minimum results, though you might want to consult a fuller explanation of ED. Then type: ed a In the ED window that opens, type the word EMPTY but don't press RETURN. Instead, press the ESC key. An asterisk appears at the bottom of the screen. Type the single character x and press RETURN. You will be taken back to the CLI or shell. Type: copy a to b copy a to c copy a to d . . . and keep going through the alphabet until you have typed: copy a to z Then type: copy a to mis You have created 27 files to hold movie titles -- one for each letter of the alphabet and an additional MISCELLANEOUS file to hold titles that don't begin with a letter, such as the movies 1984, 1943 . . . you get it. Now you are going to open the A file and make an entry. Type ed a In the ED window that opens: -- Press the CTRL and B keys together. This deletes the word EMPTY because you are going to make an entry and the file won't be empty any more. -- Press the ESC key. An asterisk prompt appears at southwest screen. -- Type: sr160 This gives you a 160-character line to work with. Dennis, we have ignored your request for an 80-character line for reasons we hope you will like. -- Press ESC key again, and at the asterisk prompt type: st10 This has the effect of letting you skip forward 10 spaces each time you press the TAB key. And after the final entry of the comment, press the RETURN key. Here's an example one-line entry: Amazing Rockets Glenn Fevre - Alice Hopkins 072 1939 r** +G Scifi mishmash This example by necessity puts the single-line entry on two lines. The characters "072" on the second line actually start at the 80th character position of the 160-character line. As you type an entry, the simplest editing method is to use the left arrow key to back up to fix mistakes, the delete key to delete mis-strikes, and type in what is needed. After doing an entry, press the CTRL and ] keys at the same time to toggle to the left of the line, then TAB through the line to make sure each entry begins where it should. The TAB positions: 0 - Title: 30 characters available 30 - Actors: 50 characters available 80 - Run Time: 10 characters available 90 - Year Made: 10 characters available - but use four digits. 100 - Ratings: 10 characters available (see below) 110 - Comment: 50 characters available Regarding the ratings, the star rating must be a lower-case r followed by the number of asterisks representing stars. This is followed by a space and a + and the movie industry rating. Here are some legal examples: r** +U (two stars unrated) r*** +G (three stars G-rated) r*** +P (three stars PG-rated) r***** +T (five stars PG-13 rated) r***** +R (five stars R-rated) Remember, this rating entry may have only a maximum of nine characters. You may make up your own system, but be consistent. You'll need it later. Now, in the A file you only type entries whose titles begin with the letter "A". I suggest you not enter "A," or "An" and the like before such a title as "An Affair to Remember." It will crowd certain files, and not using them will save space. By this logic, "A Bell for Adano" would be entered in the B file, and "The Wreck of the Mary Deare" in the W file. When you have completed the current editing session of the A file, press the ESC key and answer the asterisk prompt by typing: X . The file will be saved to disk, and you will be returned to the CLI or Shell window. Each time you want to make an entry within a given file, from the CLI or Shell type: ed filename (where filename is "a" through "z" or "mis") NOTA BENE: All this work has been done under a CD (Change Directory) of MOVIES:FILMS. At any time you reboot the system and return to any chores having to do with editing files, always first type: cd movies:films . . . Otherwise, for example, you would have to type: ed movies:films/a just to edit the A file. Last task. This line division will probably print on your printer just as it's set. If not, go into Preferences and set printer margins at 0 and 79. This will make your printer accept the (possibly) 160-character line in a neat fashion, broken into two lines. One presumes, Dennis, that you will work night and day, adding movie data to the various files until you finally have a considerable body of material built up. Now for the fun: You have throughout the file-entry phase simply typed each new entry at the end of the previous one. There's a way to put every file in order. Remember, you have done a CD MOVIES:FILMS and you are in the CLI or Shell. There type: sort a to ram:temp copy ram:temp to a Then type: ed a . . . and you will find the list has been reordered according to the alphabetical order of the titles at the left of each line. To escape the file, press the ESC key and answer the asterisk prompt with Q (The Q means quit the file without making any changes.) You can also SORT a file according to a specified nth character in the line. That's why we put different categories at specified TAB positions. For example, from the CLI or Shell type: sort a to ram:hold colstart 90 The result will be a list of entries sorted by year made, because the year of the film in all cases starts at the 90th character on the line. Can you think of other useful ways to sort? H-m-m-m-m? You can also sort a file to the printer, as in: sort a to prt: One warning about SORT. If you have a file containing more than 200 lines, you may have to increase STACK size to accommodate the volume of material that will be handled in memory. From the CLI or Shell, try: stack 10000 Try even more if you have the free memory and you need it. 3]LAST AND BEST The SEARCH function is most useful of all. In this case, from CLI or Shell try a slightly different directory specifier: cd movies: Then type: search films "John Wayne" all The command will search through all files in the FILMS directory, printing each file name on the screen. If it finds the characters John Wayne in any file, it prints the file name, a number representing the line where the string was found, and the line itself. So you get a list of cataloged films with the Duke in them. Let's break it down into its elements: search -- the command films -- what to search, in this case all files in FILMS directory "John Wayne" -- Sought string. If sought string has a space anywhere in it, enclose it in quotes, otherwise don't bother. all -- Will search ALL the files in the FILMS directory Want a printout? Then type: search > prt: films "+G " all This command above gives you a paper list of G-rated films. search > prt: films "r***** " all This last command produces a printed list of five-star movies. Here's a bit of an anomaly you should remember: If the rating is fewer than five stars, be certain to add a space to the end, as in "r*** " so the SEARCH wont return four- and five-star ratings inside of which it finds "r***". You can use SEARCH to scan the catalogue for a title you're not quite sure of. It has the word "Sun" in the title. So try: search films sun all . . . and though you may get Sunshine, Suntori and Upsun, your memory will be jogged when the right title appears on the screen. Last, let's combine SEARCH and SORT. This is an example and not to be typed in. Having done a CD MOVIES: you try: search > ram:rooney films "Mickey Rooney" all This will send all films with Mickey Rooney to a RAM file named rooney. You could then ED RAM:ROONEY and delete the file names, a, b, c, etc. You'd be left with a list of all Rooney's films you have cataloged. Then you could SEARCH the RAM:ROONEY file to other files, according to title, year made, rating, length . . . By this method you could isolate all the "Andy Hardy" movies in a single file, since Rooney was in all of them. Or you could SEARCH the file to a new file for all films in which Rooney appeared with Judy Garland. Then you could SEARCH that file to find all films with Rooney and Garland in the "Andy Hardy" series. Or musicals (if your comment includes such information). Or Rooney in dramas. Or SORT by year then delete all entries except those Rooney made in the 1950s. Print them. Scan them. Save new files. Join files. Slice and dice . . . One point to keep in mind: You can SEARCH all the files of a directory with one command, even putting the results in a new file, but you can SORT only the contents of a single file at a time. Well, Dennis, this isn't exactly the answer to your wish, but we hope it sets your creativity in motion. This system could be used for movies, recorded entertainment, bullfights in Barcelona, and beers from Bavaria. It all depends on whether you want to do the heavy digging work. Consider that even with a tailor-made application program, you'll still have to do the data entry. Perhaps this way you'll feel closer and more in control of the data. And to other readers: While this all may seem an outrageous catering to Dennis, consider that you could come up with your own system of data entry for whatever is near and dear to your heart. A coin collection might be put on a disk called MONEY: with a directory named COINS, within which are files PENNY, NICKEL, DIME, QUARTER, etc. In the nickel file might be such entries as: JEFFERSON 1950S VF $18 N132 BUFFALO 1938P F $01.50 N143 . . . as in design style, year and mint, condition, worth and file number that tells you where it's stored. And so on. We leave it to your imagination and grit. 3]END OF TEXT