<html><head>
<title>MimeMan</title>
<meta name="description" content="MimeMan provides a graphical interface to RISC OS MimeMap files.">
<link rel="stylesheet" type="text/css" href="file:/MimeManRes:Styles">
</head>
<body bgcolor="#FFFFFF" text="#000000" link="#0000CC" alink="#99AFFF" vlink="#3333FF">

<h1><a href="http://www.snowstone.org.uk/riscos/mimeman/">MimeMan</a> Help</h1>

<h2>Installation &amp; Requirements</h2>
<p>Like any standard <strong>RISC OS</strong> application, <strong>MimeMan</strong> can be run from any location simply by double clicking on it's icon. It does, however, require a few resources to work on your computer. Most people will already have these resources installed. <strong>MimeMan</strong> will check for the items it requires when it starts up and inform you if anything is missing.</p>

<h2>Tutorial</h2>
<p>When <strong>MimeMan</strong> is first run on your system, it will present a message window like this:</p>
<center><img src="file:/MimeManRes:images/welcome" alt="Welcome message" width="385" height="237" border="0" hspace="10" vspace="10"></center>
<p>If you would simply like to make sure your system <em>MimeMap</em> file is up to date and complete and are not interested in the details, then it is recommended that you click <code>Yes, auto-update</code>. Doing so will cause <strong>MimeMan</strong> to download a replacement <em>MimeMap</em> file from snowstone.org.uk (so you must be online), install it on your system and exit. The process is then finished and you do not need to do anything further and can stop reading this tutorial. (A backup of your original <em>MimeMap</em> file will be taken. For details of how to reinstate this backup, see the Reference section below.)</p>
<p>If, however, you would like to explore the <em>MimeMap</em> file on your system and the version on snowstone.org.uk, or you'd like to edit and update individual entries then click <code>No, continue as normal</code> and <strong>MimeMan</strong> will load onto the iconbar in the normal <strong>RISC OS</strong> manner.</p>
<p>Note: You can re-run the simple auto-update process at any time by choosing <code>Wizard...</code> from the iconbar menu.</p>

<ul><li>Once <strong>MimeMan</strong> has appeared on the iconbar, click with <code>Select</code> on the iconbar icon</ul>
<p>The main window will open:</p>
<center><img src="file:/MimeManRes:images/blank" alt="Blank" width="274" height="202" border="0" hspace="10" vspace="10"></center>
<p>The <code>Mime Mappings</code> window is displayed blank, like this, at the start of each session. You can drag any file onto the window (or onto the iconbar icon) and <strong>MimeMan</strong> will load any mimemap entries in that file into it's internal database. Duplicate entries will be ignored.</p>

<p>For convenience, <strong>MimeMan</strong> contains &quot;Shortcuts&quot; to three commonly accessed <em>MimeMap</em> files: the default one on your system; a &quot;reference&quot; one held at snowstone.org.uk; and a previous-session file.</p>
<ul><li>Choose the <code>Shortcuts...</code> menu item from the iconbar menu</ul>
<p>You will see a window like this (clicking <code>Adjust</code> on the iconbar icon will also open this window) :</p>
<center><img src="file:/MimeManRes:images/shortcuts" alt="Shortcuts window" width="498" height="129" border="0" hspace="10" vspace="10"></center>
<p>The left-hand text icon in the window represents your system's <em>MimeMap</em> file. The middle icon represents the <em>MimeMap</em> file held on snowstone.org.uk. (Notice that the title of the icon is blue. This indicates that the file at snowstone.org.uk has changed since you last downloaded it.) Finally, the right-hand icon represent the outcome of any previous session with <strong>MimeMan</strong>.</p>
<ul><li>Drag the left-hand <em>MimeMap</em> icon to the blank <code>Mime mappings</code> window</ul>
<p><strong>MimeMan</strong> will now analyse the local system <em>MimeMap</em> file and add the entries to its internal database. This analysis may take some time, but is a multi-tasking process. Once the analysis is complete the <code>Mime mappings</code> window will refresh and will display the mime mapping entries. (The entries in this window will vary depending on the current contents of the <em>MimeMap</em> file on your system.)</p>
<center><img src="file:/MimeManRes:images/step1" alt="Main window - initial display" width="584" height="248" border="0" hspace="10" vspace="10"></center>
<p>Each row in this window shows one mime mapping. From left to right, the columns show:</p>
<p><ol><li>Mimetype
<li><strong>RISC OS</strong> textual filetype description
<li><strong>RISC OS</strong> hexadecimal filetype
<li>Windows extensions
<li>MacOS type/creator pairs
<li>Comment</ol></p>
<p>Some of these columns may be missing for some entries. If the first &quot;Windows extension&quot; column appears miss-aligned, this may be because the <em>MimeMap</em> file contained some incorrectly-formed mappings. An example of such a row is the <em>text/plain</em> row as follows:</p>
<center><img src="file:/MimeManRes:images/badlyformed" alt="Example of mis-formed mime mapping" width="622" height="111" border="0" hspace="10" vspace="10"></center>
<p>Notice how the column alignment appears incorrect - this is due to the mis-formed <em>text/plain</em> row and can be corrected by editing the entry to put the different &quot;Windows extensions&quot; into separate fields. This will be described below.</p>

<p>One task which can be achieved using <strong>MimeMan</strong> is to merge together different <em>MimeMap</em> files. For an example of this, make sure you are connected to the internet and:</p>
<ul><li>Drag the middle &quot;shortcut&quot; icon onto the <code>Mime Mappings</code> window.</ul>
<p>(Note that the &quot;shortcut&quot; icons can also be dragged to a filer directory. This will cause the relevant file to be saved to that location.)</p>
<p>The <em>MimeMap</em> file from snowstone.org.uk will be downloaded and any new entries added to the end of the existing entries in the <code>Mime Mappings</code> window. A different colour will be used to indicate that the mappings come from different sources, as follows:</p>
<center><img src="file:/MimeManRes:images/step2" alt="Main window - two sets of entries" width="568" height="245" border="0" hspace="10" vspace="10"></center>
<p><strong>MimeMan</strong> will not allow exactly identical entries. However, there may be some entries which are very similar but not identical. It is best to identify and remove (or adjust) these entries.</p>
<ul><li>Choose <code>Group duplicates</code> from the <code>Display</code> submenu of the <code>Mime Mappings</code> window menu</ul>
<p>Depending on the number of entries in the database, this process may take some time, though it is multi-tasking. When <strong>MimeMan</strong> finds a duplicate entry it moves the lower entry up to sit next to the first duplicate. Once the process is finished the main window will be refreshed and the duplicates are highlighted by red bars on the left side of the window:</p>
<center><img src="file:/MimeManRes:images/step3" alt="Main window - sorted entries" width="630" height="356" border="0" hspace="10" vspace="10"></center>
<p>Duplicate entries can now be identified and altered or deleted. To delete an entry, choose <code>Delete</code> from the <code>Item</code> submenu of the <code>Mime Mappings</code> window menu.</p>
<ul><li>Double click on an entry in the <code>Mime Mappings</code> window</ul>
<p>The <code>Update Entry</code> window will open showing the different fields for each mime mapping.</p>
<center><img src="file:/MimeManRes:images/update" alt="The Update Entry window" width="369" height="564" border="0" hspace="10" vspace="10"></center>
<p>The entries can be edited and adjusted as needed. If a mapping was miss-formed in the original <em>MimeMap</em> file (as described above for the <em>text/plain</em> entry). There may be several entries in one of the &quot;Windows extensions&quot; boxes. In this case, they should be split into separate boxes and the mapping updated by clicking on <code>Update</code>.</p>
<p>Once you have amended the mime mappings as necessary, the database can be output as a <em>MimeMap</em> file.</p>
<ul><li>Choose <code>Save</code> from the <code>Mime Mappings</code> window menu and drag the icon to a temporary location.</ul>
<p>A <em>MimeMap</em> file will be generated and saved to the chosen location. Once you are happy with the <em>MimeMap</em> file you should use it to replace your system's current <em>MimeMap</em> file. This can be done by clicking on the  <code>Overwrite system MimeMap</code> button in the <code>Save</code> box. (Note: when <strong>MimeMan</strong> is first run, it takes a backup of your existing system <em>MimeMap</em> file. For details of how to re-instate this backup, see the Reference section below.)</p>
<p>Finally, if you wish to clear the main <strong>MimeMan</strong> <code>Mime Mappings</code> window, choose <code>Select all</code> from the main menu and then choose <code>Delete</code> from the <code>Selection</code> sub-menu.

<h2>Reference</h2>

<h3>Local Storage</h3>
<p><strong>MimeMan</strong> uses the system <strong>Choices</strong> directory to store your preferences and a database of mime mapping entries. You can examine the contents of <strong>MimeMan</strong>'s <strong>choices</strong> directory by <a href="HTMLAction:/Filer_OpenDir{}<Choices$Write>.MimeMan">clicking here</a>. It is possible to alter the location used by <strong>MimeMan</strong> for reading and writing choices by altering the relevant tokens in it's <em><a href="HTMLAction:/Filer_Run{}MimeManRes:Messages">Messages</a></em> file.</p>

<h3>Comments</h3>
<p>Some existing <em>MimeMap</em> files use blocks of multi-line comments before specific sections of mime mappings. Because <strong>MimeMan</strong> enables the user to move mapping entries around arbitrarily it becomes difficult to know, automatically, what comment is associated with what mapping. As a basic workaround, <strong>MimeMan</strong> assumes that if a comment line exists before a mapping line, then it is associated with that mapping (and shown in the comment column in the <code>Mime Mappings</code> window and in the &quot;Comment&quot; field in the <code>Update Entry</code> window). This means that any comments which flow over several lines will be lost when a <em>MimeMap</em> file is analysed by <strong>MimeMan</strong>.</p>

<h3>Settings</h3>
<p>Choosing <code>Settings...</code> from the iconbar menu will open the settings window. The location represented by the <code>Internet File</code> shortcut icon is given in the writable icon and may be changed to any location you choose. The tick-box allows a cut-down version of <strong>MimeMan</strong> to be run from the system <strong>Configure</strong> utility. (<a href="HTMLAction:/Filer_Run{}<Boot$Dir>.^.!Boot">Click here to run <strong>Configure</strong></a>.) If this is ticked, clicking on <code>MimeMap</code> in <code>Network</code> in <strong>Configure</strong> will cause <strong>MimeMan</strong> to be run (though without many of the options of the full version) and automatically examine the current system <em>MimeMap</em> file. Any changes made will be written back to the system file when the <strong>MimeMan</strong> window is closed.</p>

<h3>Backups</h3>
<p>When it is first run on a computer, <strong>MimeMan</strong> takes a backup of the existing <em>MimeMap</em> file and stores it in it's <strong>Choices</strong> directory. If you have choosen to make <strong>MimeMan</strong> act as a plugin to <strong>Configure</strong> then a small alteration is made inside <strong>Configure</strong> and a backup taken (and stored in <strong>Choices</strong>) of the orginal. You can reinstate both of these backups by <a href="HTMLAction:/Filer_Run{}MimeManRes:RestoreBackups">clicking here</a> or manually, by <a href="HTMLAction:/Filer_OpenDir{}<Choices$Write>.MimeMan">examining the contents of your <strong>Choices</strong></a>.

<h3>Updates</h3>
<p>To check whether you have the latest version of <strong>MimeMan</strong>, click on the <code>Updates</code> button in the info window. The <code>Updates</code> window will open. To check if you are up to date, click on the <code>Check Now</code> button. <strong>MimeMan</strong> will contact snowstone.org.uk to
 check whether a newer version is available. If it is, you may either visit the <strong>MimeMan</strong> homepage using the <code>Visit Website</code> button or have <strong>MimeMan</strong> upgrade itself automatically by clicking on the <code>Download and update MimeMan</code> button. The update will become active next time you restart <strong>MimeMan</strong>.</p>

<h2>Contact</h2>
<p>Please <a href="mailto:riscos@snowstone.org.uk">get in touch</a> if
you have any questions, discover any bugs or have suggestions for
improvements and modifications. In particular, if you have
recommendations for the online <em>MimeMap</em> file I would be keen
to hear them.</p>
<p>Please note that this application and associated resources are copyright Adam Richardson, 2006-7. If you wish to modify it or incorporate any of it into other applications or for other uses, you must contact me for permission. You may not charge a fee to distribute or sell it, without prior agreement from myself.</p>
</body>
</html>