@database Umentiler.guide @author "Lee Kindness" @$VER: Umentiler_Guide 1.208 @node main "Umentiler 1.208" Umentiler : Umentiler version 1.208 Copyright ©1995-96 Lee Kindness doc@{fg highlight}@{b}ument@{ub}@{fg text} comp@{fg highlight}@{b}iler@{ub}@{fg text} Easier document management... or something! @{" Introduction " link INTRO } : What does it do? @{" Usage " link USAGE } : More options... @{" Legal " link LEGAL } : Copyright, distribution... @{" History " link HISTORY } : Version history @{" Other " link OTHER } : Other programs @{" Contact " link CONTACT } : Author contact --- Compiled Wednesday 10 January 1996 22:21:06 Distribution built Monday 15 January 1996 21:47:49 Exe size 8420 bytes Main source size 24083 bytes Version Umentiler 1.208 (10/01/96) @endnode @remark &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& @node INTRO "Introduction" Right... what does it do? Umentiler simply compiles documents. It replaces and expands certain tags in the file. For example you could insert the current time, version of a command, output from a command, another file into a file. ...But why? Well I am the author of over 28 programs, and a constantly releasing new versions. When a new version is released I would have to manually update the version numbers and my (constantly changing) email addresses... Rather frustrating! This guide, of course, has been compiled with the aid of Umentiler. The uncompiled version is called 'Umentiler_uc.guide'. You may wish to compare these documents... @endnode @remark &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& @node USAGE "Usage" @{" Invocation " link USEDC } : Launching Umentiler @{" Format " link FORMAT} : Format of tags in files @endnode @remark &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& @node USEDC "Launching Umentiler" Umentiler must be launched from a Shell. It accepts the following argument template: @{i}SOURCE/A,DESTINATION,QUIET/S@{ui} In short the first argument is the file to @{"process" link FORMAT} and the second is the destination. If you do not pass DESTINATION then SOURCE will be overwritten! For example: @{i}>Umentiler textfile textfile.um@{ui} Will expand all the @{"tags" link FORMAT} in 'textfile' and output to 'textfile.um' If you specify QUIET then Umentiler will not print out the number of processed, escaped and invalid tags. Umentiler is a pure command, and as such can be made resident. The 'p' bit should be set for the Umentiler command. It is not set then you should set it using: @{i}Protect Umentiler P ADD@{ui} You can then make Umentiler resident by typing: @{i}Resident Umentiler@{ui} @endnode @remark &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& @node FORMAT "Tag Format" (If you are using Amigaguide rather than Multiview to view this then the output might not be correct...) The source file that you supply Umentiler with should be plain ASCII. It can contain 'tags' which will be processed by Umentiler. The format of the tags is: @{i}/>Command options...<\ @{ui} Where 'Command' is one of: @{" Insert " link C_INSERT} @{" Version " link C_VERSION} @{" Program " link C_PROGRAM} @{" Date " link C_DATE} @{" Setvar " link C_SETVAR} @{" Var " link C_VAR} @{" Tag " link C_TAG} The command and arguments are not case sensitive. All the commands accept arguments in the normal Amiga ReadArgs template form. The output from the Insert and Program commands is itself parsed for tags. They are then replaced. To escape a tag, ie if you really want to include it in your text, then you simply precede it by '!': @{i}!/>This will not be processed<\ @{ui} You can add as many '!'s as you wish, one less is always printed. @{b}NOTE:@{ub} If you are putting an Amigaguide tag directly after an escaped Umentiler tag then you should leave a space between the end of the Umentiler command and the start of the Amigaguide tag: @{i}\@{i}!/>Command options...<\ \@{ui}@{ui} rather than: @{i}\@{i}!/>Command options...<\\@{ui}@{ui} Failing to leave a space will cause the Amigaguide tag to be escaped by the trailing '\' in the escaped Umentiler tag. @endnode @remark &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& @node C_INSERT "The INSERT Command" The Insert command is used to insert the contents of a file. It accepts the following argument template: @{i}FILE/A@{ui} FILE: The path and name of the file to insert, must be given. For example: @{i}/>Insert S:Startup-Sequence<\ @{ui} would insert your startup-sequence into the file. @endnode @remark &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& @node C_VERSION "The VERSION Command" The Version command is used to insert version information from a program or file. It accepts the following argument template: @{i}FROM/A,F=FULL/S,NN=NONAME/S,NV=NOVER/S,ND=NODATE/S,NPD=NOPARSEDATE/S@{ui} FROM: The file or program to read the version information from. Must be given. NOTE since this command uses the 'Version' AmigaDOS command you can also supply additional arguments to 'Version' in it, you could for example use "exec.library INTERNAL" for this argument. FULL: Print out the whole persion string, do not parse further with the NONAME, NOVER and NODATE options. Usefull if the version string is nonstandard. NONAME: Specifies not to print the name part of the version information. You can use NN for short. NOVER: Specifies not to print the version part of the version information. You can use NV for short. NODATE: Specifies not to insert the date section of the version information. You can use ND for short. NOPARSEDATE: If given then the date string will not be parsed, ie the brackets will not be removed. For example: @{i}/>Version C:Dir<\ @{ui} would produce: @{i}dir 37.5 04/06/91@{ui} @{i}/>Version C:List NONAME ND<\ @{ui} would produce: @{i}37.5@{ui} @{i}/>Version C:Type ND<\ @{ui} would produce @{i}type 37.2@{ui} @{b}NOTE:@{ub} If the version string of the program is not 100% in the standard format then the results of the NONAME, NOVER and NODATE command options will not be as expected! This is not my fault it is the fault of that programs author. @endnode @remark &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& @node C_PROGRAM "The PROGRAM Command" The Program command is used to insert the output of a command or script. By default the commands input stream is NIL:, you can change this by using redirection in the CMDLINE. It accepts the following argument template: @{i}NL=NOLINES/S,CMDLINE/A/F@{ui} NOLINES: Specifies that you want any newline characters generated by the command to be stripped. You can use NL as a shortcut. CMDLINE: The command line to launch. This argument automatically expands to the end of the tag, so if the command line has spaces in it there is no need to suround it in quotes. Must be given. For example: @{i}/>Program List C:d#?<\ @{ui} would use an 8000 byte stack and produce: @{i}Directory "C:" on Monday 15-Jan-96 Date 1092 --p-rwed 02-Sep-92 11:51:33 DateAct 4596 --p-rwed 16-Oct-95 17:57:59 Delete 1972 --p-rwed 02-Sep-92 11:51:33 Dir 3440 --p-rwed 02-Sep-92 11:51:33 DiskChange 312 --p-rwed 02-Sep-92 11:51:33 Display 4520 --p-rwed 16-Oct-95 17:57:59 dms 92208 ----rwed 11-Nov-95 13:52:40 DosRequest 2620 --p-rwed 16-Oct-95 17:57:59 Duplic 4104 --p-rwed 16-Oct-95 17:57:59 9 files - 238 blocks used @{ui} @{i}C:Dir is />Program NOLINES List C:Dir LFORMAT=%l<\ bytes long@{ui} would produce: @{i}C:Dir is 3440 bytes long@{ui} @{b}NOTE:@{ub} If you re-direct the output of the command to NIL: then it has the effect of executing a command but not inserting any text. @endnode @remark &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& @node C_DATE "The DATE Command" The Date command can be used to insert the date or time. It accepts the following argument template: @{i}FROM/K,LF=LOCALEFORMAT/K,F=FORMAT/N/K,NY=NODAY/S,ND=NODATE/S,NT=NOTIME/S@{ui} FROM: Normally the date/time is read in from the system clock. If this keyword is specified then they are read in from the specified file. Keyword. LOCALEFORMAT: This keyword can be used to specify a locale date format string. Keyword. Can use FL for short. The format string may contain the following formatting codes: %a - abbreviated weekday name %A - weekday name %b - abbreviated month name %B - month name %c - same as "%a %b %d %H:%M:%S %Y" %C - same as "%a %b %e %T %Z %Y" %d - day number with leading 0s %D - same as "%m/%d/%y" %e - day number with leading spaces %h - abbreviated month name %H - hour using 24-hour style with leading 0s %I - hour using 12-hour style with leading 0s %j - julian date %m - month number with leading 0s %M - the number of minutes with leading 0s %n - insert a linefeed %p - AM or PM strings %q - hour using 24-hour style %Q - hour using 12-hour style %r - same as "%I:%M:%S %p" %R - same as "%H:%M" %S - number of seconds with leadings 0s %t - insert a tab character %T - same as "%H:%M:%S" %U - week number, taking Sunday as first day of week %w - weekday number %W - week number, taking Monday as first day of week %x - same as "%m/%d/%y" %X - same as "%H:%M:%S" %y - year using two digits with leading 0s %Y - year using four digits with leading 0s %% - percentage sign You will require Workbench 2.1 or higher to use this option. If you use this option then the FORMAT, NODAY, NODATE and NOTIME options are ignored (unless locale.library is unavailable). (NOTE: it appears that locale.library has a bug in it... this results in the %U and %W formatting codes giving incorrect results) FORMAT: Format of the produced date. Keyword. Can use F for short. You can use any of the following: 0 - DOS format, dd-mmm-yy (Default) 1 - International format, yy-mm-dd 2 - USA format, mm-dd-yy 3 - Canadian/British format, dd-mm-yy 4 - Default locale format NODAY: Specifies that the day part of the date string should not be inserted. Can use NY for short. NODATE: Specifies that the date part of the date string should not be inserted. Can use ND for short. NOTIME: Specifies that the time part of the date string shouldn't be inserted. Can use NT for short. For example: @{i}/>Date LF="%n%A %d %B %Y%n%a %d %b %y%nDay%t%j"<\ @{ui} would produce: @{i} Monday 15 January 1996 Mon 15 Jan 96 Day 997@{ui} @{i}/>Date F=0<\ @{ui} @{i}/>Date F=1<\ @{ui} @{i}/>Date F=2<\ @{ui} @{i}/>Date F=3<\ @{ui} @{i}/>Date F=4<\ @{ui} would produce: @{i}Monday 15-Jan-96 21:47:51@{ui} @{i}Monday 96-Jan-15 21:47:51@{ui} @{i}Monday 01-15-96 21:47:51@{ui} @{i}Monday 15-01-96 21:47:51@{ui} @{i}Monday 15/01/96 21:47@{ui} @{i}/>Date NODATE NOTIME<\ @{ui} @{i}/>Date NODAY NOTIME<\ @{ui} @{i}/>Date NODAY NODATE<\ @{ui} would produce: @{i}Monday@{ui} @{i}15-Jan-96@{ui} @{i}21:47:51@{ui} @endnode @remark &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& @node C_SETVAR "The SETVAR Command" This command never causes any text to be inserted. It allows you to set up a local environmental variable. This could be useful say if you were wanting to include a legal document (copyright, disclaimer...) in each of your program documents. You would use this command to set a variable to the program name and then in the lagal document you could insert the program name using the @{"VAR" link C_VAR} command. This command accepts the following argument template: @{i}NAME/A,TEXT/A/F@{ui} NAME: The name of the variable to create. This name follows file system naming rules. Must be given. TEXT: What to set the variable to. Expands to the end of the tag, so no need to enclose in quotes. Must be given. For example: @{i}/>Setvar PROGRAM Umentiler<\ @{ui} would setup a variable called 'PROGRAM' and set it to 'Umentiler' @{i}/>Setvar NAME Lee Kindness<\@{ui} would set up a local variable called 'NAME' and set it to 'Lee Kindness' @endnode @remark &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& @node C_VAR "The VAR Command" The Var command can be used to insert the contents of local and global environmental variables. It accepts the following argument template: @{i}FROM/A,NL=NEWLINE/S,G=GLOBAL/S,L=LOCAL/S@{ui} NAME: Name of the variable to insert. Must be given. NEWLINE: If specified then a newline will be inserted after the variable is printed. Can use NL for short. LOCAL: Specifies only to search for a local variable that matches NAME. By default a local variable is searched for first, then a global. Can use L for short. GLOBAL: Specifies only to search for a global variable. Can use G for short. For example: @{i}Process />Var process L<\, RC = />Var RC L<\, Secondary RC = />Var Result2 L<\ @{ui} would insert: @{i}Process 7, RC = 0, Secondary RC = 0@{ui} @{i}/>Setvar PROGRAM Umentiler<\/>Var PROGRAM L<\ @{ui} would insert: @{i}Umentiler@{ui} @endnode @remark &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& @node C_TAG "The TAG Command" The TAG command can be used to insert the contents of 'tags' from files into the document. A tag is defined as "$TAGNAME: text...". A prime example of a tag is the $VER version string used by the majority of programs. Some other programs use AUTHOR, ID, NAME and CONTACT tags. @{i}TAG/A,FILE/A,NONLCUT/S@{ui} TAG: Name of the tag to search for. Case sensitive! Must be given. FILE: File to search for the tag in. Must be given NONLCUT: No newline cut. By default the tag text will only be printed upto the first null byte, newline or return character. Setting this switch causes the text to only be terminated by a null byte. Use with caution as tags in text files will not be null terminated and will result in the rest of the file being inserted into the document! For example: @{i}/>tag VER Umentiler<\ @{ui} would insert: @{i}Umentiler 1.208 (10.1.96)@{ui} @{i}/>tag MOOD Umentiler<\ @{ui} would insert: @{i}Here is a short story:@{ui} @{i}/>tag MOOD Umentiler nonlcut<\ @{ui} would insert: @{i}Here is a short story: This is the start. This is the middle. And this is the end!@{ui} @endnode @remark &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& @node LEGAL "Disclaimer, Distrubution and Copyright" Disclaimer ~~~~~~~~~~ I hereby reject any liability or responsibility for these or any other consequences from the use of Umentiler whatsoever. This includes, but is not limited to, damage to your equipment, to your data, personal injuries, financial loss or any other kinds of side effects. Although Umentiler has been tested thoroughly on several different machines, I cannot rule out the possibility that Umentiler: 1. is somehow incompatible to your equipment 2. has bugs that show up on your equipment 3. does not do what it is supposed to do on your equipment 4. May damage you equipment It is your responsibility to take any precautions necessary to protect yourself from these or any other effects. I explicitly reject any liability or responsibility from the consequences of you using Umentiler Distribution ~~~~~~~~~~~~ Umentiler may be freely distributed and copied, as long as the following conditions are fulfilled: 1. All parts of the program and the documentation must be complete. The distribution of single parts or incomplete subsets of the original distribution is forbidden. 2. If Umentiler is to be included in a commercial distribution (including magazines!) then I must be sent a copy of the product (or if it is a mag that I am subscribed to then an increase in subscription). It would be better if you contacted me beforehand to ensure you have the latest version. In any case full credit must be given within the magazine (ie mention my name). 3. If the included source code is used in another program then credit must be given in the documentation. Note To Magazines ~~~~~~~~~~~~~~~~~ In the past I have had some of my programs included on magazine coverdisks without my permission when in the documentation it was stated that this was required... I want my programs on coverdisks but you _MUST_ read and fufil the "Distribution" section above. If you disagree then contact me or write a message in the AMIGA_MAGS echo... @endnode @remark &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& @node CONTACT "Contact" Means of contact, as of Monday 15 January 1996 Mail: Lee Kindness 8 Craigmarn Road Portlethen Village Aberdeen AB1 4QR SCOTLAND EMail: cs2lk@scms.rgu.ac.uk wangi@frost3.demon.co.uk wangi@spuddy.mew.co.uk wangi@fido.zetnet.co.uk : : Please use cs2lk@scms.rgu.ac.uk Fidonet: 2:259/26.20 2:259/15.46 2:250/366.34 Amiganet: 39:138/40.34 "Lee Kindness" I hope you find the program useful. The latest version of Umentiler can always be found on: _____ /_____) /(___________________________________ / _____________ ___________________ ) / / / (_ \/ +44-(0)1484-842341 (__) r o s t / ___) r e e \ / / Fidonet --- 2:250/366 \ \/ A m i g a B B S Amiganet -- 39:138/40 \ \-> Sysop Dave Naylor \-> Using Zeus BBS software! \-> The biggest UK Amiga BBS \-> Points welcome \-> Email! \-> 24 hours a day in sunny Yorkshire! Umentiler will be in the WANGI file area or you can freq it using the magic filename UMENTILER. --- __ ____ _ Wangi! / / ( __) /|/ ) Lee Kindness Amiga PD/shareware author _____/ (_/\ __\ \ / _ (______________ cs2lk@scms.rgu.ac.uk (___________)(_____)(__)\_______________) wangi@spuddy.mew.co.uk @endnode @remark &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& @node HISTORY "History" 1.186 : (29.10.95) + First release version. 1.187 : (29.10.95) + Added informaton about Umentiler being pure to the docs. 1.188 : (13.11.95) + Added NOPARSEDATE option to the Version command. 1.208 : (10.01.96) + Added the TAG command. + Added calls to SetVBuf() in order to improve performance with WB 3.1. + Added BUFFER option to main program. (Thanks to Magnus Holmgren for the suggestions) @endnode @remark &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& @node OTHER "Other Programs" Chunker: A cross platform file splitter and joiner. Has Amiga, MSDos and unix verions, includes ANSI C source. Umentiler: Compiles documents. For example you can insert files, dates and version numbers. SlowBoot: Offers a software solution to the problem of slow spin-up IDE drives. FindXXX: A utility for searching a (traplist) nodelist. GFindXXX: A utility for searching a (Gotcha) nodelist. NLFind: Provides multiline node support for traplist.library. (comm/fido/NLFind.lha) Erase: Delete a file for GOOD... you will not be able to recover it! (util/cli/Erase.lha) YourFault: Replace the system error requesters with your own... "Banana in drive DF0:" :)) (util/boot/YourFault.lha, YourFaultSrc.lha, YourFaultStr.lha) CaBoom: Windows explode/implode on opening/closing... (util/boot/CaBoom.lha) Shrub: Creates a directory tree, like Tree from MSDOS but it has a nice Workbench GUI, search facility, is very fast and a lot more. (util/wb/Shrub.lha) RubbishDump: A replacement for the trashcan... but it has SOUND! So when you delete a file a sample is played (can in reality send any ARexx command). (util/app/RubbDump.lha) AmigaGuidePrefs: (or AGPrefs to its friends...) A complete preference editor for amigaguide. Lets you modify the colours of certain attributes (has a preview), type of node and search paths. (text/hyper/AmigaGuidePref.lha) WangiPad: A powerful launchpad utility (ie. like toolmanger). The new version 2 should make WP more powerful than ToolManager... watchout for it! (util/wb/WangiPad.lha) Jiggler: A WB hack. Makes all window move towards the mouse pointer. (game/gag/Jiggler.lha) DROP INTO YOUR 'FRIENDS' WBSTARTUP DRAWER... DQua: A simple quadratic equation solver. (misc/math/DQua.lha) MacCash: Generates UK lottery numbers. Does not falsely predict them, it is 100% random. It hace a nice Workbench GUI. (misc/misc/MacCash.lha) DefDataTypeIconer: (or DefDTIcon...) Lets you change files icons, based on their datatype! (pix/icon/DefDTIcon.lha) NewEXT: With the AmigaDos rename command you can do "rename #?.txt TO #?.doc" with NewEXT you can... (util/batch/NewEXT) Startup-Menu: A startup menu/utility. Lets you change the 'startup-sequece' used. Very customisable. (util/boot/Startup-Menu.lha) Bush: Like Shrub but Shell only and slower... (util/cli/Bush.lha) USE SHRUB. DiceRoll: Emulates dice throws... ie. generate random numbers. (util/misc/DiceRoll.lha) Publican: PublicScreen utility. (util/misc/Publican.lha) MidMoose: Emulates middle mouse button for those with only two buttons on their mice. (util/mouse/MidMoose.lha) NaeGrey: Makes the grey borders around screens black. (util/misc/naegrey.lha) USE A PROGRAM LIKE MultiCX INSTEAD! SFPatch: Code showing how to patch Amiga library functions. (dev/c/SFPatch.lha) Torch: A blanker module for SwazBlanker. @endnode @remark MULTIVIEW BUG BARRIER!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!