BIPED
(BI-protocol Page EDitor)
Current version of BIPED is v1.03
by Doug Dunlop
<dunlop@eol.ists.ca>
What is BIPED?
BIPED is a nifty little Perl5 CGI script that allows you to view
both the source code and the rendering of your page within a single screen.
But there's more... If you change the source code you can save it back
to it's original location again (or to a different location).
But wait, that's not all... I'll bet when you're making
changes to your pages you want to see what the page looks like too, don't you?
How about check your HTML? And how about checking for those misspelled words?
Well now you can and that's where the bi-protocol part comes in.
You are going to need
Netscape because it seems that browsers
can be very different when if comes down to doing this bleeding edge stuff and
I just haven't handled all the possibilities. Yikes!
How does BIPED work?
BIPED uses uses 2 protocols to get the 2 views of the your page so that you can
both see the source code and also how the page is rendered through both the
server (httpd, gopherd
etc) and the WWW browser. What all this means is that in the FTP Protocol section
you will see your source code as it exists on disk without any filtering,
interpretation, etc. that normally happens when your httpd server sends the
document in response to an http protocol request and without the HTML
rendering that your
Browser normally does to make things look nice. BIPED presents all of this
source in a TEXTAREA
form element so that you can scroll around to see all the source, and edit it,
in a small (user defineable sized) box.
BIPED also does a GET using a standard URL (i.e. you can get http, gopher,
news, file, ftp) and presents that fully rendered document just like if you had
retrieved the document directly with your browser (well almost). CGI scripts will be
interpreted by the httpd server and the HTML will be interpreted by your Browser.
How much does BIPED cost?
Order today! If you place your order right now you'll get:
- The BIPED CGI script
- The updated ftplib.pl
- This great documentation
All for three easy payments of $0.00. That's right free! No payment til '96, no
payments in '96, no payments after '96. Please heed the
copyright though.
Go ahead, give it a try right from BIPED's home site
now. You don't even
have to install it and you can already use it.
What are all the form fields for?
So here is what the User Control section of the page looks like:
(If you can't see the form elements here then you can
forget about using BIPED with your current browser. BTW, this
form is fully operational)
All the field values in the User Controls will be maintained from one form
submission to the next so you won't have to keep entering them as you make
changes and save the document.
One exception is the Password field which can be maintained as
a user configurable option but is not maintained by default for
security reasons.
And here's what the individual User Controls are for:
- Host:
- The fully qualified host name of the machine where the file you want to edit
resides. For example eol.ists.ca.
- Username:
- The username for login via FTP. This is you actual account username so
be sure to read the section on Security Issues below.
- Password:
- The password for login via FTP. Same as for username but also you should
also know that your password will be passed around the Internet in
cleartext. Be sure to read the section on
Security Issues below.
- FTP Path:
- The actual path to the file when using FTP. If you get this wrong and the
file doesn't exist (or cannot be read for any reason) then the BIPED will
remove up to the first "/" and try to list the directory.
- URL:
- If you don't know what a URL is then you shouldn't be using BIPED. Do keep
in mind that the document retrieved via FTP and the URL are independent and may
bear no relation to one-another. It is up to you to make sure that you viewing
the same document because they don't have to be the same document or even on the
same host.
- Options:
- Show FTP dialog
- To help you figure out why you are not getting something via FTP this gives
you all of the dialog between BIPED and the FTP daemon on the Host.
- Reuse Password
- This is a very insecure convienence feature so that you don't have to type in
your password each time you submit. It is off by default. If you turn it on then
your password will be contained in the form that you receive back in cleartext.
The password field may look like it's unreadable by try viewing the source for the
page. Be sure to read the section on
Security Issues below.
- Render Page
- Sometimes you don't want to see the rendered page, sometime you do.
- Ruler
- Hokey ruler that allows easier character column counting.
- Edit Area
- Rows / Cols
- The number of rows/cols to use for the TEXTAREA box for editing the file.
- Actions
- Spell
- Send the document to a spell checker. All HTML tags will be ignored. The result
is a list of words found in the file which were not found in the dictionary. The
document is retrieved using using the URL not the Host, Username, FTP Path.
- Weblint
- Send the document to a Weblint checker which reports on HTML coding errors
found in the file. As for Spell Checking, the document is retrieved using the
URL.
- Reset
- Reset the form to how it was last sent. This does not undo saved changes!
- Load
- Load the document specified by Host, Username and FTP Path. If a
URL is given and Render Page is on then the page will also be rendered.
- Save
- Save changes made to the location given by Host, Username and FTP Path.
This does have to be the same as where it was loaded from so be
careful when saving. It is very easy to wipe out files other files accidentally.
- FTP Status
- FTP Status is meant to let you know if the FTP operation was successful or
not and, if not, why not. Some of its output is a bit raw. Be warned
there are a few FTP servers out there that BIPED just can't connect to
and the error when that's the case is "Invalid argument". If this happens to you then
BIPED probably won't work for you, but double check the values you
entered for Host, Username, Password and FTP Path just to be sure. If anyone
knows what causes this please let me know.
Cool Stealth Features
- If you use the Back button of your Browser (i.e. Netscape) then you
can "Undo" Editing changes that you have saved. Just back up to the last version
that you like and click Save again. The contents of the edit area on that
page will be save to the FTP location.
- If you can't remember the exact name or path of the file on the FTP server
then just enter a "/" in the FTP Path and you will get a directory
listing. Append a "/" to directory name that you want to decendend
into until you find the file name.
- Want to know the Read/Write permissions, Ownership and File size, then
use the Stealth Feature above to get a directory listing. Use another window
if you are in the middle of an Edit.
- If you discover that you have started editing something but can't save
because of write protections then save it somewhere else that you do have write
permission by changing the FTP Path. Be careful with this feature or you
could wipe out a file accidentally.
- Save the biped page with the form elements filled in and you can edit
off-line. Connect again later to the net and click "Save". Be sure to save
"Source" and not "Text" or this stealth feature won't work.
- Now with Netscape 2.0 lines are wrapped automatically making editing even
easier.
Relative URLs
A quick word about inline graphics and/or relative URLs contained with your
document. Because BIPED is getting the document for you and including it
within the BIPED page, relative URLs won't work unless you include the
following tag within the
portion of the document (substitute your own actual document URL).
Warning I feel that I should tell you that the BIPED script
presents some serious security concerns to it's users. Please consider the
following points carefully:
- You must supply your real username/password for FTP access to your account
and this will pass in cleartext form over the Internet each time the form is
submitted for any type of operation (i.e. Load, Save, Weblint, Spell)
- A script like this could save copies of your username/password as it runs. Be
sure you can trust the web administrator controlling the script's operation.
- If you select Re-use Password then your password is sent back in the form as
cleartext even though only bullets appear in the form. If you view source you can
read the password in cleartext.
- This script cannot render documents that are protected using the access
control methods of the www server (e.g. httpd, htaccess). This is because the
CGI interface does not pass the AUTHORIZATION part of the MIME header and this
script does not have the smarts to carry on the conversation to perform the
authorization on your behalf. This does not affect the ability to edit the
document, BIPED just can't render it.
If in doubt about security problems but you want to try BIPED out
anyway, then you can use BIPED to accesss an anonymous ftp server. Note
that you must still enter values in the Username/Password fields but for
anonymous ftp this is should be
either ftp/username@your.host or anonymous/username@your.host. Doing this poses
no security risks to to your personal Username/Password.
You could even upload the document, that you wish to work on, to an anonymous ftp
server and use the anonymous login procedure and use enter the value in the URL
field to get the file from the anonymous ftp server for rendering. For example:
. When you are done making changes then
retrieve it from the anonymous ftp server and put it back where it should be.
Doing this, again, poses no security threat to you Username/Password, however
someone else could edit or download your file document too, because if you can
access it anonymously, then so can everyone else on the Internet. Also, the
processing of any WWW server-side scripts will not happen.
Getting and Installing BIPED
If you have a burning need to install BIPED then you can pick it up right from here.
But just hold on a minute! You can just use BIPED right from it's
home site. But, even if you
are determined to install BIPED for yourself, then first we need to discuss what is required. You are going
to need:
If you are sure that all the requirements are met and functioning, then you
will need to copy
the BIPED script (i.e. biped) to a directory that allows you to execute
CGI scripts and ftplib to your perl lib directory (likely /usr/local/lib/perl5).
Change the first line in biped to point to your working version per perl5.
Well that's it. Any questions? Ask them using the HyperNews link at the bottom of
this page.
Acknowledgements
Many thanks to:
- Geoff Baysinger for contributing the biped logo gif.
- Larry Wall and all the folks that contributed to make Perl 5 such a
great scripting system.
- Luke Y. Lu, Gene Spafford, David Sundstrom and Randal Schwartz for jointly
massaging ftplib to the point I could create this script.
- Lincoln Stein for his excellent CGI.pm module that makes handling forms
so easy.
- Martijn Koster and Gisle Aas for creating LWP.pm which makes doing
all of the HTTP stuff so easy.
- The Earth Observations Lab / ISTS and John Miller for supporting the script's
development.
- Barb Moffatt (my wife) for thinking up the great name of BIPED
History
v1.00 Sep 28, 1995 Initial Release.
v1.01 Sep 29, 1995 Made security warning more prominent, no other changes.
v1.02 Nov 30, 1995 Improved handling of bad ftp paths.
v1.03 Nov 15, 1996 Updated for current libwww-perl use of is_success
Copyright ©
1995,
Doug Dunlop
This page last updated:
, Number of accesses:
biped-1.03.tgz last updated:
, Size is:
ftplib-1.2.tgz last updated:
, Size is: