Copyright ©1998 by Dick Whiting
Standard Disclaimer: I wrote it, it works for me, I don't guarantee
that it will do anything productive for anyone else, etc. etc. ;-)
HOWEVER, if you do find a use for it: I homeschool my kids and they would
love a postcard from where EVER you live. My daughter just started Spanish
lessons, so cards from Spanish speaking countries would especially be valued.
Postcards: Dick Whiting
28590 S. Beavercreek Rd.
Mulino, Oregon 97042
USA
Email: Dick Whiting <dwhiting@europa.com>
Web : www.europa.com/~dwhiting/
Description
-----------
This collection provides an HTML "builder" for CynusEd ©CygnusSoft Software,
using the features provided by URB. It is highly and easily configurable to
your tastes, preferences, and methods.
At the click of a button:
View the file being edited using IBrowse ©Omnipresence Intl.
Import models (Main html, tables, etc.)
Insert beginning and ending tags (same line, separate line options)
Insert KEYWORD="" for any keywords of your choice
Insert commonly used literals such as your email address.
Insert filenames with correct relative pathing, IF your work environment
matches your "production" directory structure.
Separate URB configured to insert 100 color values, selected by color name.
Separate URB configured to insert any of the Latin-1 codes, e.g. " "
Locate the matching beginning or end tag currently under the cursor.
Delete the value portion of a KEY=value pair
Delete the entire KEY=value pair
Delete the beginning and ending tags, i.e. <B>text</B> removes the <B> pair.
Delete the entire block bounded by a pair of tags.
Execute your most commond CED commands.
Miscellaneous additional scripts included.
Add, modify, rearrange, or remove any quite easily using the standard URB
configuration drag&drop features.
Requirements
------------
CygnusEd 3.5 or 4.x Copyright © 1987-1998 CygnusSoft Software.
URB available on Aminet as URB.lha in util/misc.
The view and other functions are currently setup for IBrowse1.22, but could
be easily modified for other browsers assuming the Arexx commands are available.
The script GetPicSize uses Visage - By Magnus Holmgren available on Aminet.
FILES INCLUDED IN THIS ARCHIVE:
Colors/ - directory with some *.html color tables.
Grabs/ - directory with some screen grabs of UCW.
Models/ - directory for models i.e. HTML page, Table, etc.
ReadMe - comments and requirements for UrbCedWWW
Rexx/ - directory containing the Arexx scripts for CED4.x.
Rexx35/ - directory containing the Arexx scripts for CED3.5.
Text/ - text files that were used to create the URBs.
UCW.cfg - URB configuration for main tool bar.
UCWCOLORS.cfg - URB configuration for color values tool bar.
UCWLATIN1.cfg - URB configuration for Latin-1 values tool bar.
Installation
------------
This looks a lot worse than it really is:)
URB related:
1. Unarchive directory to where you want to put it.
2. Start UrbConfig from your URB directory.
3. Select "Import Model" from the "Special" menu
4. Choose the "UCW.cfg" from the directory in step 1.
5. Select "Create New URB" from the "Special" menu
6. Name the new URB "UCW" and use the directory from step 1.
7. Click "OK" to create it and update the config with your pathing.
8. Repeat steps 3 through 7 using "UCWCOLORS.cfg" and "UCWCOLORS" for name.
9. Repeat steps 3 through 7 for "UCWLATIN1.cfg" and "UCWLATIN1" for name.
CED related:
1. Choose submenu "Install Dos/Arexx command" from "Dos/Arexx Interface" of the
"Special" menu.
2. Enter a number (corresponds to the function keys) in the requester.
3. Enter "C:wbrun xxx:UrbCedWWW/UCW" (without quote marks) checking that:
a) WBrun is in your C: directory
b) xxx/UrbCedWWW is the directory from URB step 1.
4. Select "OK"
5. Select submenu "Save DOS/Arexx commands" from "Dos/Arexx Interface" of the
"Special" menu.
6. If you run CED on its own screen, choose:
a) "Make screen public" from the "Rendering Choices" of the "Global" menu.
b) "Save Environment" from the "Global" menu and save as the default.
7. Press the function key specified in step 2 -- the main toolbar should appear.
If you have CED on a separate screen, look for UCW on the WorkBench screen.
You will probably have to open the MUI prefs for UCW and tell it to appear
on the CED screen, using the "System" page. Select "Save" and UCW should
move to the CED screen.
8. Press the button labeled "COLORS" and the colors toolbar will appear.
Repeat the MUI changes as necessary.
9. Press the button labeled "LATIN1" and repeat as in step 8.
10. Configure each URB using MUI and UrbConfig to get the layouts that you want.
11. See the screen grabs of mine for placement and sizing ideas.
Arexx related:
1. IF you have CED3.5:
a) Rename or delete the "Rexx" directory.
b) Rename the directory "Rexx35" to "Rexx".
2. IF you have CED4.x then just delete the Rexx35 directory.
There is one script that needs updating for the correct path to IBrowse.
1. Open UrbCedWWW/Rexx/Main.ucwx in CED.
2. Search for "runbr="
3. Change the path TEMP:IBROWSE/IBROWSE to match your system.
4. Save it.
There is one script that needs updating for the correct path to Visage.
1. Open UrbCedWWW/Rexx/GetPicSize.ucwx in CED.
2. Search for viewer='UTILS:VISAGE %f INFO'
3. Change the path UTILS:VISAGE to match your system.
4. Change the line ENABLED=0 to ENABLED=1
5. Save it.
Congratulations:)
Beyond the initial install, you can tailor the toolbars however you wish using
UrbConfig to add, delete, rearrange, etc. the buttons. Create models of HTML
code that fit your needs and place them in UrbCedWWW/Models and add buttons to
select them. Have fun.
What are those scripts?
-----------------------
Note: The VIEW script does a SAVE prior to viewing the file in IBrowse. If you
don't want your original overlayed, copy it to a different name prior to using
UrbCedWWW. Good practice to have backups, anyway:)
Note: All the scripts that insert text into a file turn "Insert Mode" on prior
to doing the inserts. They position the cursor in an appropriate place ready
for you to type still in insert mode on exiting.
Note: All scripts that delete text use the "CUT" command. This means that you
can use "UNDO" to reverse any action. You can also use "PASTE" to insert what
was cut somewhere else.
BldMap.ucwx
-------------
This one requires that GetPicSize.ucwx be enabled. See above for how to do
that. It builds the statements necessary for a client-side image map. You
are asked for the filename to use as the image, how many areas to define,
whether they are arranged Horizontally or Vertically, and whether to use
Rectangles or Cirles. It works very well for the typical navigation bar.
If you need to define asymmetrical areas or polygons, then this is not the
tool for that chore.
CloseUCW.ucwx
-------------
Quits all the UCW toolbars.
DelBlock.ucwx
-------------
Place the cursor within a tag. All text bounded by the beginning and ending
tags will be removed. Example: <B>This is some text</B> removes the tags
AND removes the text between them. Whole paragraphs, tables, etc. can be
deleted easily this way.
HINT: To change <B>This is some text</B> to <I>This is some text</I>
requires a few quick mouse clicks:
1. Place cursor inside <B>
2. Click "DelBlock"
3. Click "<I>" on the toolbar
4. Click "Paste"
5. Place cursor inside <B>
6. Click "DelTag"
This is a trivial example, but can be useful with larger chunks of text
and/or longer tags.
DelKV.ucwx
----------
Place the cursor within the KEYWORD part of a KEYWORD=VALUE pair.
Deletes the entire pair.
DelTag.ucwx
-----------
Place the cursor within a tag. The beginning and ending, if present, tag
will be removed. Other tags, text, etc. not included within the tag itself
will remain. Example: <B>This is some text</B> removes JUST the <B> and </B>
NOT the "This is some text."
DelVal.ucwx
-----------
Place the cursor within the VALUE part of a KEYWORD=VALUE pair.
Deletes ONLY the value part.
GetColor.ucwx
-------------
Inserts color code from table produced by BldColorTable.ucwx. See below.
GetModel.ucwx modelname/A
-------------------------
Inserts the model specified into the current file at the cursor position.
Store your models in the Model directory as xxxxx.model and call the script
with an argument of xxxxxx.
GetPicSize.ucwx
---------------
Inserts WIDTH="xxx" and HEIGHT="xxx" for a picture. This requires Visage
by Magnus Holmgren. To use it, place the cursor in a blank where you wish
the values to be inserted. Invoke the script and the sizes for the file
on the previous SRC= statement will be inserted.
Indent.ucwx amount/A/N
----------------------
Indents the selected block of text by 'amount' spaces. Includes the line
that the cursor is on. Default amount is 3 if not specified.
Insert.ucwx string/A
--------------------
Inserts the text specified on the argument. One level of quoting is removed
allowing you to use quote marks and apostrophes within a string.
MatchTag.ucwx
-------------
Place the cursor inside the beginning or ending tag. The cursor will jump to
the corresponding tag. Repeat and watch it bounce back and forth.
Put.ucwx string/A
-----------------
Inserts the characters specified as the argument of the script at the cursor
position. If the first character of the argument is "<" then the text is
just inserted, otherwise a space is inserted if necessary before the string.
One level of quoting is removed from the string.
QueryIB.ucwx [TITLE | URL]
-------------
Inserts the title from the current page displayed in IBrowse or
inserts the URL from the current page displayed in IBrowse.
And NOW for the BIG one:
Main.ucwx type/A [string]
------------------------
type=1 inserts the second argument as <ARGUMENT></ARGUMENT> on a single line.
The cursor is positioned betweent the tags.
type=2 does the same, but places the beginning tag on one line and the ending
tag on a second line, with a blank line between them. The cursor is
placed on the blank line.
type=Q inserts the string with two quote marks appended to the end.
Example: Q COLOR= inserts COLOR=""
The cursor is placed between the two quote marks.
type=VIEW without a second argument attempts to start IBrowse with the
current file loaded or reloaded as necessary. You must save the file
before you can view it.
type=VIEW with a second value (or using URB's %f) attempts to view that file
using IBrowse.
type=SRC uses the second argument to create <xxx SRC=""> type tags.
For xxx=IMG an ALT="" keyword is also inserted.
If the GetPicSize script has been correctly modified for your system,
then the WIDTH=nnn and HEIGHT=nnn values are also inserted.
A requester opens to select a file to place in the SRC= value.
type=FILE opens a requester for selecting a filename.
type=HREF without a second argument inserts: <A HREF=""></A>
with second argument of:
FILE opens a requester for a file name and inserts the appropriate line.
HTTP inserts: <A HREF="http://"></A>
NAME inserts: <A NAME=""></A>
#REF inserts: <A HREF="#"></A>
MAIL inserts: <A HREF="mailto:?subject="></A>
FTP inserts: <A HREF="ftp://"></A>
In each case the cursor is positioned in the first place needing text
entered, e.g. the email address for mailto:
type=COMMENT inserts: <!-- -->
type=DOC32 inserts a HTML 3.2 comment line.
Extra scripts:
BldColors.ucwx
--------------
This one generates an HTML table of colors. To use it, construct a file
with one 6 digit hex color code as the last word on each line. You can
have whatever preceding the code as you wish. Open the file in CED and
start the script. The file is edited into a table that can be included
in a standard HTML layout. Save it somewhere and QUIT to keep your
original file.
BldColorTable.ucwx colorcode filename [shade [ur ug ub [lr lg lb]]
------------------------------------------------------------------
Generates an HTML page with a table of colors. A couple examples of the
output produced are in the Colors directory. Basically, you specify the
6 digit hex color code for a color to appear in the center of the table.
Varying intensities of that color are displayed across that row, with the
amount to vary them controllable from the script. The colors are varied
upward from your original by a factor, such as making each row above the
center one redder. Similar control is specified for rows below the central
one. The end result is a 9x9 grid of related colors, with their hex value
codes showing as links. Copy the "url" to the clipboard and use the
GetColor.ucwx script to paste it into your html. See the script comments
for more information on how it works.
To run it, open a CLI, change directory to where the script is located.
Leave it in the same directory tree as the distribution. Then do:
rx BldColorTable.ucwx colorcode filename [other arguments]
The table is saved in the UrbCedWWW/Colors directory.
Future
------
If you have any suggestions, please email me. Also, if you create what you consider
the ideal configuration for these, I'd be interested in receiving the config files.
Dick Whiting
September 23, 1998
|