Soft Rock Software

Seek 'n' Link

User Guide

Contents

Introduction

About Seek 'n' Link

Seek 'n' Link is a simple search tool for RISC OS computers, which presents the results as links in a HTML file, automatically launched into your web browser. It is primarily designed for searching HTML, though it can be used to search other types of file as well.

The program is an offshoot of WebChange and, as such, as well as hopefully performing a useful function in its own right, will provide a means of testing changes and updates to the search code that will be used in its bigger brother.

About these instructions

This document has been written with the assumption that if you are using the software, you will already be suitably familiar with the RISC OS desktop and how it works, including naming conventions.

The most appropriate choice of browser for reading these instructions is Netsurf. If you are using Netsurf (or another browser with support for CSS), and viewing these instructions while online, a suitable stylesheet is downloaded from the Soft Rock Software website. If you are not using a CSS capable browser, or you are viewing this document while offline, the appearance becomes much more plain, but still perfectly useable.

Using the Software

Launching the program

Seek 'n' Link is run in the customary RISC OS manner, by double clicking on its application directory in a RISC OS filer window. When you do so, its icon appears on the right hand side of the icon bar. Clicking Menu on this gives you its icon bar menu which presents two options - Info, and Quit. The purpose of these should be reasonably obvious, so need no explanation here.

The main window

Clicking with Select or Adjust on the icon bar icon will open Seek 'n' Link's main window:

There are 5 icons in the main window, detailed in the following sections.

The search path

In order to search for something, Seek 'n' Link needs to know what files you wish to search through. You tell it by dragging folders or files to the main window, and the "Path" field is updated to tell you what has been dragged. This is called "the search path"

When first loaded, before anything has been dragged onto Seek 'n' Link, there is no search path, so this field contains "<None>"

If you drag a single file, or a single folder, onto the main window, the search path will be set to that item, and this field will be updated to contain the path to that file or folder.

If you highlight a number of files and/or folders and drag them all onto Seek 'n' Link's main window together, they will all become a part of Seek 'n' Link's search path. The Path field obviously won't be able to show the details of all of them, so instead it will display "<Multiple Objects>"

The filename pattern

The "Pattern" field allows you to restrict your search to files whose paths match a particular string, which is called "the filename pattern". Seek 'n' Link will look at the full path for each file it finds on the search path, and if the contents of this field are on that path somewhere, the file will be included in the main search.

So to restrict your searches only to html files, for example, just enter "/htm" in this field. However, when searching for files with a specific extension, as with this example, there are some points to remember:

  1. Including the slash character - / - in the filename pattern is recommended, in case the rest of the extension just happens to turn up elsewhere on the path. Continuing with the same example as above - if the files you are searching are in a folder called html, then using just "htm" as the filename pattern will result in all the files in that folder being searched, even if they aren't html files.
  2. Obviously, you do need to be using extensions for this to be useful - if your files lack extensions and you are relying solely on RISC OS filetypes, then using the filename pattern to match against extensions will not work!
  3. In the given example, you will note that "/htm" was suggested rather than "/html" - files ending in the latter will be matched using "/htm" since "/html" quite obviously contains "/htm", but the reverse isn't true.

Whatever you enter as the filename pattern can be wildcarded, in the same way as the search term (see below), and the pattern matching is case insensitive (that is to say, 'ABC...' and 'abc...' are seen as the same).

If you don't enter a filename pattern in this field, Seek 'n' Link will search through every file found on the search path.

The search term

The "Find" field contains the text you wish to search for, and is known as "the search term". Seek 'n' Link will load each file in the search path (if it matches the filename pattern, explained above) and scan through the file looking for what is entered as the search term.

Searches are case insensitive (so the small "a" and the capital "A" are seen as the same) and wildcards are supported. Wildcards are explained below.

If nothing at all is entered here, then the search results will be exclusively based on the filename pattern, above - this means, for example, that by keeping this field empty, you can search for all files with the extension /htm

Stripping HTML type tags

This option is used to force Seek 'n' Link to remove anything enclosed in angle brackets (< and >) - which is what you would use for markup in html files.

If you are searching through html files using Seek 'n' Link, you may be searching for some specific text in the actual content, in which case you wouldn't want to be searching through the markup as well.

If you are searching through other types of file, then it might be better to untick this option - since attempting to remove html type tags from files that don't have them could slow the search down unnecessarily. In addition to which, files which don't contain markup in the style of html could conceivably have actual content enclosed in angle brackets that this would remove.

Search!

Clicking on this icon will invoke the search, using whatever has been entered in the previous fields.

Results

The results of your search are written to an html file, which is then filer_run so that it is launched into your web browser. This file contains links to those files for which the search succeeded.

If you entered something as a search term, then a small portion of text from the file is included with the results, so that you can see the context in which the search term was found.

If you entered a filename pattern but no search term, the results you see will be a list of links to files that match that pattern - so, for example, if you entered a pattern of "/jp*g" and no search term, the results would be a list of links to all the jpeg files in the search path, which you can then click on to view.

Wildcards and Special Characters

Supported wildcards

Seek 'n' Link currently supports the following wildcards, which can be used in both the filename pattern, and the search term:

Wildcard limitations

Unfortunately, due to the way the wildcard search functions have been written, there is a flaw in the way the tilde wildcard character is handled. Specifically, consider the example given above of "f~2;rce" against the following text:

"I need to fix this - to force it not to fail if the first match fails"

When attempting to search in this case, Seek 'n' Link will initially match the first "f" it encounters - the start of the word "fix" - and then seek the next part of the search term after the wildcard - the "rce" - which it will find as a part of the word "force".

However, because the text between those two points ( "ix this - to fo") is more than two characters, the result will be a fail, even though the word force should itself match - the search code was originally written based on the logic that a fail means the search term simply wasn't found, which made sense before the tilde wildcard was added.

For the moment, this is not going to be addressed - I believe most meaningful search terms will contain words and phrases that will be suitably unique that it won't be a major problem in practice. I will return to this point eventually, though, since it is clearly not ideal - just not yet.

Special characters

In addition to the wildcards detailed above, there is presently one other character recognised by Seek 'n' Link in searches which has a special meaning - the "vertical bar" or "|". This character tells the program how to use the character immediately following it in the search term.

If a letter of the alphabet (in upper or lower case) follows the vertical bar, then it is interpreted as a control character in the range 1 to 26 - so, for example, "|M" would represent a carraige return (13), and "|J" would represent a linefeed (10).

You can also represent a "null" character (0) by following the vertical bar with a zero, as in "|0"

In all other cases, the vertical bar simply means use the character that follows as is, and do not treat it in any way as a special character - which in turn means following it with itself ("||") means match a vertical bar at this point in the search term, following it with a question mark ("|?") means match a question mark at this point, following it with an asterisk ("|*") means match an asterisk here, and following it with a tilde ("|~") means match a tilde at this point in the search term. In other words, if any of these characters follows a vertical bar, they are not used as wildcards.

Support

Contacting Soft Rock Software

If you are online when viewing this document, the current email address for contacting Soft Rock Software with support issues should be displayed in this image:

--image not downloaded--

Unfortunately, the image/email address is not clickable from this document. If for any reason the image does not appear, please refer to the contact form on the Soft Rock Software website.

Licence/Disclaimer

The no-nonsense plain English licence terms

Copyrights

Seek 'n' Link is a copyright product of Vince M Hudd/Soft Rock Software, provided in its current form free of charge from the Soft Rock Software website. The software is not 'public domain' or similar - it is a commercial product, protected by copyright, which just happens to be priced, currently, at £0.00.

Re-distribution of the software is therefore not permitted; please do not make copies of this software and give them away - it is far better to direct people to the Seek 'n' Link product web page at www.softrock.co.uk/products/seeknlink.html which, amongst other things, ensures they receive the most up to date version.

The one exception to this is magazines; permission is granted for magazines to include on thier cover disc, should they so wish, any version of the software that has been made available free of charge on the above website.

Disclaimer of Liability

Software can be complicated to write, and despite all the effort put in while both writing and testing it, sometimes bugs and 'misfeatures' can slip through. If this is found to have happened with Seek 'n' Link, neither Vince M Hudd nor Soft Rock Software can accept any liability or responsibility.