With the HTTXPlugin you can use HTTX from within AWeb to save or print HTML
pages as text.
This version of the plugin requires at least AWeb II 3.3
(normal or SE version), HTTX 2.0c or newer and
AWNPipe 2.49 or newer by William Parker. Also, the command
"Delete" must be present in your C: directory.
Il you are using AWeb 3.3SE or AWeb 3.4SE you can't define menus or keys. You must use the HTTX Control Panel and "link" it to a user button.
The Control Panel is also useful to normal AWeb users as it can be left on screen and it tracks the active AWeb window. It speeds up the saving, or printing of multiple pages.
If HTTX configuration GUI or HTTX Control Panel are started while another copy of them is running, the second one will simply move the first copy in front of all other windows and quit.
How to properly set up HTTX in AWeb:
Menu, buttons, keys:
You can add three entries, one for Save as text (HTTXPlugin.awebrx), one for Print as text (HTTXPluginPRT.awebrx) and one for the HTTX and plugin configuration (HTTXPluginCFG.awebrx).
Or you can add a single entry for HTTX Control Panel (HTTXPluginCP.awebrx).
Popup menu (frame)
Add the entries "Save As Text" and "Print As Text" (if required) using the following commands.
Save:
RUN AWebPath:Plugins/HTTX/HTTXPlugin.awebrx TARGET %i
Print:
RUN AWebPath:Plugins/HTTX/HTTXPluginPRT.awebrx TARGET %i
Now it will be possible to save or print a single frame directly from the popup menu (without using the plugin "Select frames" function).
HTTXPluginCFG.awebrx with AWeb to configure HTTX.
A Reaction GUI will be displayed.
The standard HTTX settings will be saved in the environment variables
HTTX.prefs (for Save as text) and HTTXprt.prefs
(for Print as text).
Other options (like FORCE or INCLUDE) are managed directly from the
Plugin.
Refer to
HTTX documentation
for a full explanation of options.
Example of the added text:
Header: HTTP/1.0 200 OK Server: Netscape-Enterprise/2.01 Date: Sat, 26 Apr 1997 06:38:12 GMT Accept-ranges: bytes Last-modified: Tue, 15 Apr 1997 13:57:46 GMT Content-length: 7085 Content-type: text/html Content-Type: text/html; charset=ISO-8859-1
"SYS:Utilities/" drawer). After closing MultiView a
requester will ask if the document should be kept or deleted. Select Delete
and the file will be removed and no conversion informations will be shown.Note that MultiView doesn't support VT100 cursor control sequences used (in indentation, for example) when "optimized" ANSI mode is enabled. See HTTX documentation for more informations.
This option is only used when saving as text.
The HTTX-AWeb settings are saved in the environment variable
HTTXPlugin.config.
Saving preferences for HTTX works like the standard WB preference programs.
Use the "Save" or "Use" option to store data. With
"Save" the settings are stored in ENVARC: and the
changes are permanent. With "Use" they are saved only in
ENV: so changes are lost when you reboot. The first time you
configure HTTX you MUST use the "Save" option.
If page contains frames a requester will open. You may choose to save all frames to a single file or use a requester to save or skip each frame.
If preview is active when saving, after conversion of any document, the converted document will be shown and then the keep or delete requester will be shown.
Thanks to the power of AWNPipe: both HTTX configuration GUI and HTTX Control Panel have an ARexx interface.
The ARexx host is called AWEBHTTXCFG for the configuration GUI and AWEBHTTXCP for Control Panel. Available commands are:
If you have written a program that forces AWeb to open a new window, you can bring HTTX configuration GUI and/or HTTX Control Panel back to the front automatically. Here is a short example.
'NEW "file://localhost/'filename'"'
if Show('P','AWEBHTTXCFG') then address AWEBHTTXCFG 'front'
if Show('P','AWEBHTTXCP') then address AWEBHTTXCP 'front'ARexx host can be useful also for the AWeb shutdown script. By adding these limes (if not already present or if you change the default script) HTTX related interfaces will be automatically closed while quitting from AWeb:
if Show('P','AWEBHTTXCFG') then address AWEBHTTXCFG 'quit'
if Show('P','AWEBHTTXCP') then address AWEBHTTXCP 'quit'