#!/usr/bin/perl -w
use strict;
print "\nEnter a pmurl or nothing for www.perlmonks.org : ";
my $pmurl = <>;
chomp($pmurl);
my %v;
($v{main},$v{search},$v{talk},$v{help})= split /\n\n/, join '', <DATA>
+;
print "\nmodifying pmurl to $pmurl ... \n" if $pmurl;
$v{main} =~ s/www.perlmonks.org/$pmurl/g if $pmurl;
for my $section(qw(help main search talk)) {
my $fn = "zedulator.$section.html";
$fn =~ s/\.main//;
print "creating $fn ... \n";
open(my $fh,">$fn");
print $fh $v{$section};
close $fh;
}
print "all done! ... \n";
__DATA__
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<html><head>
<title>Perlmonks zedulator</title>
<!--
jZed's hack of tye's hack of fullpage chat
-->
<link type= "text/css" rel="stylesheet"
href= "http://www.perlmonks.org/css/common.css"
/>
<link rel="icon" href="http://www.perlmonks.org/favicon.ico" />
<script language="JavaScript"><!--
var zed = {
shortcut : {
"cb60" : "http://mini-cb60.flux8.com/",
"cbhistory" : "http://nbpfaus.net/~pfau/cbhistory.cgi?site
+=PM",
"nn" : "http://www.perlmonks.org/?node=newest nodes
+",
"zed" : "zedulator.help.html",
"float" : "javascript:parent.zed.popupwin(470,360)"
/* add your own shortcuts here */
},
search : function(form) {
var url = form.display_node.value;
var pos = url.indexOf("/");
if(pos==0){
var action_name = url.substring(1,url.length);
url = this.shortcut[action_name] || action_name;
form.action = url;
}
else {
form.action="http://www.perlmonks.org/?"
}
if( url == undefined ) { return false; }
form.node.value = url;
form.display_node.value = '';
},
talk : function(form) {
var url = form.display_message.value;
if( url == undefined ) { return false; }
form.action="http://www.perlmonks.org/?"
form.message.value = url;
form.display_message.value = '';
},
popupwin : function(w,h) {
var remote;
var main;
window.name = "main";
settings = 'height='+h+',width='+w+',scrollbars=auto,toolb
+ar=no,'
+'location=no,status=yes,menubar=no,left=0,top=0';
remote = window.open('zedulator.html','remote',settings);
}
};
// --></script>
</head>
<frameset rows="30,24,*">
<frameset cols="50%,50%">
<frame id="talk" scrolling="no" src="zedulator.talk.html" />
<frame id="search" scrolling="no" src="zedulator.search.html"
+ />
</frameset>
<frameset cols="50%,50%">
<frame src="http://www.perlmonks.org/?displaytype=raw;type=sup
+erdoc;node=privatemessages" />
<frame src="http://www.perlmonks.org/?displaytype=raw;node=sho
+wotherusers" />
</frameset>
<frameset rows="50%,50%">
<frame src="http://www.perlmonks.org/?displaytype=raw;node=show
+chatmessages;" scrolling="auto" />
<frame name="browse_frame" src="zedulator.help.html" scrolling=
+"auto" />
</frameset>
<noframes>
<p>No Frames?
<a href="http://www.perlmonks.org/?displaytype=raw;node=sho
+wchatmessages">Chat Here</a>
</p>
</noframes>
</frameset>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>
<title>Zedulator Search</title>
</head>
<body bgColor="black">
<form id="search_form"
method="get"
enctype="application/x-www-form-urlencoded"
target="browse_frame"
onSubmit="parent.zed.search(this);"
>
<input type="hidden" name="node" value="" />
<input type="text" name="display_node" size=22 maxlength=80 />
<input type="submit" name="go_button" value="search" />
</form>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>
<title>Zedulator Talk</title>
</head>
<body bgColor="black">
<iframe name="devnull" style="display:none"></iframe>
<form method="post" enctype="application/x-www-form-urlencoded"
target="devnull"
onSubmit="parent.zed.talk(this);"
>
<input type="hidden" name="node_id" value="163868">
<input type="hidden" name="op" value="message">
<input type="hidden" name="message" value="" />
<input type="text" name="display_message" size=22 maxlength=240 />
<input type="submit" name="message_send" value="talk" />
</form>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Zedulator Help</title>
</head>
<style>
* {
background-color:black;
color:lightgray;
font-family:Verdana,Sans-Serif;
font-size:small;
}
.heading {
font-weight:bold;
font-size:1.25em;
margin-bottom: 0px;
margin-right: 3em;
color:orange;
}
td {
padding-right:2em;
border-bottom:1px solid gray;
}
.menu a{ color:lightblue; }
.menu { margin-bottom:0.5em; }
dt, dt a { font-weight:bold; color:orange; }
dd { margin-left:1em; margin-bottom:0.5em; }
pre, .intro b { color:orange; }
.intro a { color:lightblue; }
</style>
<body>
<table><tr>
<td valign="top" class="intro">
<p>
<b>ZEDULATOR</b> tiles your browser with frames as shown in the diagra
+m. Use the frame borders to contract or expand the frames as needed.
</p>
<p>
You can search using PerlMonks shortcuts or go directly to any URI usi
+ng zedulator shortcuts. (see <a href="#searching">searching</a>)
</p>
<p>
The search results are, by default, targeted to the browsing frame. Li
+nks in the private messages, other users, and chat frames can also be
+ targeted to the browsing frame.(see <a href="#displaying">targeting<
+/a>)
</p>
<p>
You can customize shortcuts, frames, and targeting. (see <a href="#til
+ing">customizing</a>)
</p>
</td>
<td valign="top">
<pre style="font-family:monospace">
+---------------+---------------+
| talk input | search input +
+---------------+---------------+
| private msgs | other users |
+---------------+---------------+
| |
| chat frame |
| |
+-------------------------------+
| |
| browsing frame |
| |
+-------------------------------+
</pre>
</td></tr></table>
<dl>
<dt><a name="searching">Zedulator: search shortcuts</a></dt>
<dd>
The default search goes directly to Perlmonks search. However, if the
+search term starts with a forward slash, it gets treated as a <i>zedu
+lator</i> search and uses the built-in or custom zedulator shortcuts
+and goes directly to the requested page, bypassing Perlmonks. Custom
+ shortcuts can be calls to local javaScript functions, see the shortc
+ut definitions in zedulator.html.<br />
<table>
<tr><td valign="top">/zed</td valign="top"><td valign="top">open this
+help page</td valign="top"></tr>
<tr><td valign="top">gogle://</td><td valign="top">any standard PerlMo
+nks shortcut like pad://, cpan:, etc.</td></tr>
<tr><td valign="top">/cb60</td valign="top"><td valign="top">open mini
+-cb60.flux8.com</td valign="top"></tr>
<tr><td valign="top">/nn</td valign="top"><td valign="top">open Newest
+ Nodes</td valign="top"></tr>
<tr><td valign="top">/float</td valign="top"><td valign="top">float ze
+dulator in a chromeless window</td>
<tr><td valign="top">/filepath</td valign="top"><td valign="top">open
+a local file</td>
</tr>
</table>
<dt ><a name="displaying">Zedulator : targeting links to the bottom fr
+ame</a></dt>
<dd>
<table>
<tr><td valign="top" nowrap>searches</td><td valign="top">automaticall
+y appear in bottom frame</td></tr>
<tr><td valign="top" nowrap>links in other zedulator frames</td><td va
+lign="top">drag and drop the link to the search input box and submit
+the search</td></tr>
<tr><td valign="top">browser bookmarks</td><td valign="top">copy the l
+ink, paste it into the search input box and submit the search</td></t
+r>
</table>
<dt><a name="tiling">Zedulator : customizing</a></dt>
<dd>
<table><tr>
<td valign="top">create custom search shortcuts</td><td >edit the shor
+tcut/url associations in zedulator.html</td></tr>
<td valign="top">start with page other than zedulator help</td><td>edi
+t the browse_frame.src in zedulator.html</td></tr>
<td valign="top">permanent resize/move/ delete frame</td><td valign="t
+op">edit framesets in zedulator.html</td></tr>
<td valign="top">retarget search to tab or window</td><td valign="top"
+>edit the form target in zedulator.search.html</td></tr>
</table>
</dl>
</body>
</html>
|