mirror of
https://github.com/aaronsgiles/uuUndo.git
synced 2024-11-23 23:32:28 +00:00
1 line
11 KiB
Plaintext
1 line
11 KiB
Plaintext
uuUndo
|
|
a fast, free batch uudecoding utility
|
|
|
|
written by Aaron Giles (giles@med.cornell.edu)
|
|
version 1.0, 7 November 1994
|
|
|
|
|
|
Overview
|
|
|
|
This is the first official release of uuUndo, a fast, free batch uudecoding utility for the Macintosh. Although uuUndo was originally designed to work with John NorstadÕs NewsWatcher, it does quite nicely in its own right as a standalone drag and drop smart uudecoder.
|
|
|
|
uuUndo is shipped as a fat binary, running incredibly quickly on PowerPC machines, and makes full use of asynchronous I/O to ensure smooth operation in the background. Because it is based on Leonard RosenthalÕs DropShell code, uuUndo is also fully scriptable and recordable. uuUndo requires System 7.
|
|
|
|
If you find any bugs or have any comments, please email me at giles@med.cornell.edu. Thank you.
|
|
|
|
|
|
About uuencoding
|
|
|
|
uuUndo works with uuencoded files. uuencoding is a common format on non-Macintosh systems which accomplishes the same thing that BinHex does on the Macintosh; that is, it is designed to allow a binary data file to be stored as text and thus included in mail and news messages. Unlike the BinHex format, however, there is no integrity checking built into uuencoding, so there is absolutely no guarantee that a file has been decoded properly. Be careful!
|
|
|
|
|
|
Design Limitations
|
|
|
|
uuUndo was designed from the start to accept uuencoded text files Ñ possibly interspersed with header lines and other miscellaneous junk Ñ and translate them into their original binary format. As such, it assumes that the file contains ALL of the original uuencoded data stored in the proper order.
|
|
|
|
What this means is that you cannot save several parts of a uuencoded file to three separate files and expect uuUndo to know what to do with them. It also means that you cannot save a bunch of unordered parts to the same file and expect to get the proper result. You must save all parts of a uuencoded file to the same file and in order. If you are using NewsWatcher, this is done for you automatically.
|
|
|
|
|
|
Operation
|
|
|
|
uuUndoÕs general operation should be pretty straightforward: you can either drag and drop uuencoded files onto the uuUndo icon in the Finder, or you can manually open up the uuUndo application, choose uuDecode File... from the File menu, and choose which file you wish to decode.
|
|
|
|
(Quick tip: If you are using NewsWatcher to decode a number of binaries, you might want to consider launching uuUndo first, before extracting. This prevents uuUndo from quitting and relaunching between files, and makes overall operation much smoother.)
|
|
|
|
|
|
Duplicate Files
|
|
|
|
If the file which is created through the uudecoding process already exists, a new name is algorithmically generated by adding a Ò.0Ó to the end of the file name. In the event of a further conflict, the last character incremented until a unique name is found.
|
|
|
|
|
|
Preferences for Extension Mapping
|
|
|
|
Unlike BinHex files, uuencoded files do not contain all the information needed to determine what type of file they are, or which application should be used to open them. In order to get around this, uuUndo comes with some flexible extension mapping capabilities; this means that uuUndo will examine the last part of the file's name (the ÒextensionÓ), and from that guess which icon to give the new file. For example, filenames ending in Ò.GIFÓ get automatically mapped to JPEGViewÕs GIF icon.
|
|
|
|
Although uuUndo contains an internal list of which extensions should get mapped to which icons, it is often useful to be able to add your own extension types or to change which icon a given file extension will map to. To do this in uuUndo, you will need to open up uuUndoÕs Preferences screen. Do this by choosing Preferences... from the File menu.
|
|
|
|
What you get when you do this is a window dominated by a list box on the left hand side. This list contains all the extensions uuUndo currently knows about, along with the creator and type codes, and the icon associated with that extension. You can scroll through this list, select items (one at a time only), and generally do what youÕre used to doing with lists of this sort. Note that when you click on an item in the list, the extension, creator code, type code, and icon all get displayed in the area at the right; in addition, the name of the application matching the given creator code is displayed.
|
|
|
|
But wait a second...I know what youÕre thinking! YouÕre thinking, ÒYou keep talking about these creator and type codes Ñ but what exactly ARE they?Ó Well, briefly, every file in the Macintosh file system has a pair of these four-character codes, and together these codes serve to indicate to the Finder which icon it should display. For a full explanation, see the section Creator and Type Codes, later in this document.
|
|
|
|
To modify the mapping of an extension which already is in the list, you need only double-click on the extension in the list, or else select the extension and click the Edit button. When you do this, boxes will appear around the items on the right (except for the application name, which is just displayed for informational purposes). You can then type in the extension (up to 5 characters total, including the period), and the creator and type codes. Click the Done button, or anywhere in the extension list to save your changes.
|
|
|
|
But what if you donÕt know what the creator and type codes are? Well, thatÕs easy. When you begin editing an extension, you will see the Find Example Icon... button become enabled. Click this button, and you will be presented with the standard mechanism for selecting a file. Simply choose a file on your hard drive whose icon matches the one you wish to map the current extension to, and the creator and type values will automatically be extracted and set for you.
|
|
|
|
In addition, if you are running System 7.5, or if you have the Macintosh Drag and Drop extension installed on your system and are running System 7.1.2 or later, you can accomplish the same thing in a more elegant way. Simply use the Finder to locate an example of the icon you wish, and drag the icon into the icon box in the uuUndo Preferences window. As you do this, the inside of the box will highlight, and when you let go of the mouse button, the creator and type of the current extension will be set to the creator and type of the icon you dragged from the Finder.
|
|
|
|
You can also add new extensions onto the end of the list by clicking in the New button, or delete superfluous extensions by selecting an item in the list and clicking the Delete button. When you are finished, simply close the uuUndo Preferences window, and all your changes will be saved.
|
|
|
|
|
|
Other Preferences
|
|
|
|
By default, uuUndo will leave the original uuencoded file alone when it is finished. This allows you to try again in case the decoding didnÕt work quite right (remember that there is no way for uuUndo to know whether everything worked!) However, as a convenience, uuUndo can automatically move files into the trash can or delete them as they are processed. To use these features, choose a different option from the popup menu at the bottom of uuUndoÕs preferences screen. The three available options are leave source file alone, move source file to the trash, and delete source file immediately.
|
|
|
|
|
|
Creator and Type Codes
|
|
|
|
A creator code is associated with a particular application; for instance, JPEGViewÕs creator code is 'JVWR', and SimpleTextÕs creator code is 'ttxt'. On the other hand, a type code serves to indicate what type of data the file contains; for instance a text file has a type of 'TEXT', and a GIF file has a type of 'GIFf'. It is important to note that both creator and type codes are case-sensitive; that is, 'giff' is different than 'GIFf'.
|
|
|
|
Another important thing to realize is that one creator code can be associated with several type codes, and vice-versa. As an example, consider the application SimpleText, which has a creator type of 'ttxt'. SimpleText can open three types of files (actually more, but weÕll leave it at three for this example): text files ('TEXT'), read-only text files ('ttro'), and pictures ('PICT'). To get SimpleTextÕs text file icon, you should set the creator and type to 'ttxt' and 'TEXT', respectively. To get SimpleTextÕs picture file icon, you use 'ttxt' and 'PICT'.
|
|
|
|
On the other hand, SimpleText isnÕt the only application that can open text and picture files. You can open text files in BBEdit as well, and BBEditÕs creator code is 'R*ch' (remember, types are case sensitive!). So to get the text file icon for BBEdit instead of SimpleText, you would use a creator code of 'R*ch' instead of 'ttxt'.
|
|
|
|
|
|
Change History
|
|
|
|
1.0:
|
|
¥ fixed another bug which would prevent files from being moved into the trash
|
|
¥ restored the option to delete files immediately
|
|
|
|
1.0b4:
|
|
¥ fixed a bug which would prevent files from being moved into the trash if the trash already contained a file with the same name
|
|
|
|
1.0b3:
|
|
¥ fixed a really stupid bug which would sometimes (often?) corrupt the extension mapping preferences; if you fell victim to this, you can get the defaults back by deleting your uuUndo preferences file (in the Preferences folder in your System Folder)
|
|
|
|
1.0b2:
|
|
¥ added the uuUndo preferences screen, allowing you to edit the extension mapping uuUndo does. The resource format is the same as before, but it is stored in the uuUndo Preferences file; uuUndoÕs default mapping is still stored in the applicationÕs resource fork
|
|
¥ changed the option to delete the source file to only move the file to the trash. This accomplishes mostly the same thing, and lets you get back to any damaged files to examine them by hand
|
|
¥ the progress window now displays the name of the output file, rather than the input file name
|
|
¥ fixed the bug which crashed non-Color QuickDraw-capable machines (though the new preferences code may still have some problems yet...)
|
|
|
|
1.0b1:
|
|
¥ first public release; essentially just 1.0a2 repackaged
|
|
|
|
1.0a2:
|
|
¥ IMPORTANT NOTE: If you are running System 7.5b2, and you have the Apple Menu Options control panel installed, you cannot drag and drop files from a mounted file server without crashing. I don't know why this is happening, but it is definitely a conflict caused by a patch the Apple Menu Options CP makes
|
|
¥ all disk I/O is now done asynchronously, and the central I/O during decoding is implemented using a fancy double-buffering scheme. This scheme enables us to be decoding one half of the input buffer as the other half is being read in, and similarly half of the output buffer can be written as the other half is being decoded into. I have realized an overall speed increase on my PowerPC of about 15%. But more importantly, all the asynchronous I/O allows other applications to operate more smoothly while uuUndo is churning away in the background
|
|
¥ The keyword "end" must now be on a line all by itself to be recognized. This prevents certain lines like "end part 1" from tricking uuUndo into thinking that it had reached the end of the uuencoded data
|
|
¥ File extension mapping is now done *before* long names get truncated, so that really long names have a chance of getting properly mapped
|
|
¥ The appropriate menus are now dimmed during a decode operation
|
|
¥ the cursor is reset to an arrow when a context switch is done
|
|
|
|
1.0a1:
|
|
¥ initial release |