Analog 5.22: AliasesCASE INSENSITIVE CASE SENSITIVEThere are similar commands for usernames, if your logfile records these. By default, usernames are always case insensitive, but you can specify
USERCASE SENSITIVEto override this.
DIRSUFFIX default.htm(You can only have one DIRSUFFIX.) There are other built-in aliases for other items: for example, hostnames are converted to lower case at this point.
FILEALIAS /football.html /soccer.html HOSTALIAS lion lion.statslab.cam.ac.ukThere is also the special command FILEALIAS none, which cancels any other file aliases which might have been specified.
The alias commands for the other items are called BROWALIAS, REFALIAS, USERALIAS and VHOSTALIAS. Only one alias is ever applied to any item. So after
FILEALIAS /football.html /soccer.html FILEALIAS /soccer.html /brazil.htmlthe file /soccer.html would get translated to /brazil.html, but /football.html would only get translated to /soccer.html and would not see the second alias.
You can also use wildcards in ALIAS commands: ? matches any one character and * matches any number of characters (including none). And on the right-hand side, you can use $1, $2 etc. to represent the parts of the original name matched by the *'s. As a special abbreviation, if there is exactly one * on the left-hand side, then a * on the right-hand side can be used to represent $1. So, for example,
FILEALIAS /*/football/* /soccer/would translate /sport/football/rules.html to just /soccer/, but either of
FILEALIAS /*/football/* /$1/soccer/$2 # or FILEALIAS /sport/football/* /sport/soccer/*would translate /sport/football/rules.html to /sport/soccer/rules.html.
You can use $$ to get an actual $ on the right-hand side. Or you can prefix the right-hand side with "PLAIN:" to treat any $'s and *'s on the right-hand side literally. For example
FILEALIAS /*/football/* PLAIN:/$1/soccer/$2would translate /sport/football/rules.html to exactly /$1/soccer/$2
Analog's *'s are un-greedy: if there are two possible ways of matching, the part of the expression on the left matches as little as possible. This is more often what you want. But it contrasts with Perl's regular expressions, for example. (Oh, two consecutive *'s are completely useless, but if you try it they are collapsed into one before counting the $1, $2, etc.)
The behaviour of FILEALIAS and REFALIAS can be slightly unintuitive if the file has search arguments.
A warning to Unix users: if you put an ALIAS command on the command line with +C, the shell may try and expand $1 etc., which is not what you want. To stop the shell doing this, put the command in single quotes instead of double quotes.
TYPEALIAS .txt ".txt (Plain text files)"would provide an explanation of thoteing (German), Dimitris Xenakis (Greek), Laszlo Nemeth & Andras Kemeny (Hungarian), Gustaf Gustafsson & Valberg Larusson (Icelandic), Furio Ercolessi, Luca Andreucci, Alessio Bragadini & Marco Bernardini (Italian), Takayuki Matsuki, Stephen Obenski, Motonobu Takahashi, Kaori Chikenji & Kazuto Ishigaki (Japanese), Byungkwan Kim & InChang Oh (Korean), Jurijs Turjanskis & Anda Bimbere (Latvian), Ingrid (Lithuanian), Jan-Aage Bruvoll, Espen Bjarnø & Pål Løberg (Norwegian Bokmål), Magni Onsøien & Trond Øksendal (Norwegian Nynorsk), Wlodek Lapot, Tomek Wozniak & Marcin Sochacki (Polish), Ivan Martinez, Paulino Michelazzo & Ronan Lucio Pereira (Brazilian Portuguese), Jaime Carvalho e Silva (European Portuguese), Alex Mihaila (Romanian), San Sanych Timofeev, Boris Litvinenko & Vyacheslav Nikitich (Russian), Mile Peric (Serbian), Stefan Billik (Slovak), Andrej Zizmond & Dalibor Cvijetinoviè (Slovene), Javier Solis, Alexander Velasquez, Alfredo Sola, Martin Perez, Nelson Tactuk, Javier Kohan & J. L. García (Spanish), Björn Malmberg, Frank Osterberg, Wesley Schaal & Christian Rose (Swedish), Nezih Erkman & Dikran Diragormacioglu (Turkish), and Yaroslav Boychuk (Ukrainian).
Finally, thanks to all of you for using the program!
Stephen Turner
Need help with analog? Use the analog-help mailing list.