[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
r5332 - in trunk/www: . htdig utils utils/webhelpers web/project web/sha
From: |
jcater |
Subject: |
r5332 - in trunk/www: . htdig utils utils/webhelpers web/project web/shared |
Date: |
Tue, 16 Mar 2004 15:13:16 -0600 (CST) |
Author: jcater
Date: 2004-03-16 15:13:13 -0600 (Tue, 16 Mar 2004)
New Revision: 5332
Added:
trunk/www/htdig/
trunk/www/htdig/footer.html
trunk/www/htdig/header.html
trunk/www/htdig/long.html
trunk/www/htdig/nomatch.html
trunk/www/htdig/short.html
trunk/www/htdig/syntax.html
trunk/www/htdig/wrapper.html
trunk/www/utils/webhelpers/htdig.py
Modified:
trunk/www/utils/create-website
trunk/www/web/project/search.php
trunk/www/web/shared/_footer.php
trunk/www/web/shared/_menu.php
trunk/www/web/shared/base.css
Log:
Added support for htdig, plus separate searches for "Web site", "IRC Logs", and
"Mailing Lists".
Added: trunk/www/htdig/footer.html
===================================================================
--- trunk/www/htdig/footer.html 2004-03-16 17:20:33 UTC (rev 5331)
+++ trunk/www/htdig/footer.html 2004-03-16 21:13:13 UTC (rev 5332)
@@ -0,0 +1,8 @@
+$(PAGEHEADER)
+$(PREVPAGE) $(PAGELIST) $(NEXTPAGE)
+
+<p class="searchcredit">Powered by <a
href="http://www.htdig.org/">ht://Dig</a></p>
+
+</div>
+
+<?php include "$GEXEDIR$BASEDIR/shared/_footer.php"; ?>
Added: trunk/www/htdig/header.html
===================================================================
--- trunk/www/htdig/header.html 2004-03-16 17:20:33 UTC (rev 5331)
+++ trunk/www/htdig/header.html 2004-03-16 21:13:13 UTC (rev 5332)
@@ -0,0 +1,29 @@
+<?php $BASEDIR="..";
+ $MODULE="project";
+ $TITLE="Search results for '\$&(WORDS)'";
+ include "$GEXEDIR$BASEDIR/shared/_header.php"; ?>
+
+<div id="body">
+
+
+ <h1>Search Results</h1>
+ <p>Search results for '$&(LOGICAL_WORDS)'</p>
+ <form method="get" action="$(CGI)">
+ <formset>
+ <input type="hidden" name="config" value="$&(CONFIG)"/>
+ <input type="hidden" name="format" value="$&(FORMAT)"/>
+ <input type="hidden" name="restrict" value="$&(RESTRICT)"/>
+ <input type="hidden" name="exclude" value="$&(EXCLUDE)"/>
+ Match: $(METHOD)
+ Sort by: $(SORT)
+ <br/>
+ Refine search:
+ <input type="text" size="30" name="words" value="$&(WORDS)">
+ <input type="submit" value="Search">
+ </formset>
+ </form>
+ <hr/>
+ <strong>Documents $(FIRSTDISPLAYED) - $(LASTDISPLAYED) of $(MATCHES) matches.
+ More <img src="/htdig/star.gif" alt="*"/>'s indicate a better match.
+ </strong>
+ <hr/>
Added: trunk/www/htdig/long.html
===================================================================
--- trunk/www/htdig/long.html 2004-03-16 17:20:33 UTC (rev 5331)
+++ trunk/www/htdig/long.html 2004-03-16 21:13:13 UTC (rev 5332)
@@ -0,0 +1,6 @@
+<dl><dt><strong><a href="$&(URL)">$&(TITLE)</a></strong>$(STARSLEFT)
+</dt><dd>$(EXCERPT)<br>
+<em><a href="$&(URL)">$&(URL)</a></em>
+<font size="-1">$(MODIFIED), $(SIZE) bytes</font>
+</dd></dl>
+
Added: trunk/www/htdig/nomatch.html
===================================================================
--- trunk/www/htdig/nomatch.html 2004-03-16 17:20:33 UTC (rev 5331)
+++ trunk/www/htdig/nomatch.html 2004-03-16 21:13:13 UTC (rev 5332)
@@ -0,0 +1,57 @@
+<?php $BASEDIR="..";
+ $MODULE="project";
+ $TITLE="Search results for '\$&(WORDS)'";
+ include "$GEXEDIR$BASEDIR/shared/_header.php"; ?>
+
+<div id="body">
+
+
+ <h1>Search Results</h1>
+<p>No matches were found for '$&(LOGICAL_WORDS)'</p>
+<p>
+Check the spelling of the search word(s) you used.
+If the spelling is correct and you only used one word,
+try using one or more similar search words with "<strong>Any</strong>."
+</p><p>
+If the spelling is correct and you used more than one
+word with "<strong>Any</strong>," try using one or more similar search
+words with "<strong>Any</strong>."</p><p>
+If the spelling is correct and you used more than one
+word with "<strong>All</strong>," try using one or more of the same words
+with "<strong>Any</strong>."</p>
+
+
+ <h2>Refine Search</h2>
+ <form method="get" action="$(CGI)">
+ <fieldset>
+ <input type="hidden" name="config" value="$&(CONFIG)">
+ <input type="hidden" name="format" value="$&(FORMAT)">
+ <input type="hidden" name="restrict" value="$&(RESTRICT)">
+ <input type="hidden" name="exclude" value="$&(EXCLUDE)">
+ <p>
+ <label for="search">Search:</label>
+ <input type="text" size="30" name="words" value="$&(WORDS)"
id="search" />
+ <input type="submit" value="Search" />
+ </p>
+ <p>
+ <label for="method">Match: </label>
+ $(METHOD)
+
+ <!-- <label for="format">Format:</label>
+ <select name="format" id="format">
+ <option value="builtin-long" selected="selected">Long</option>
+ <option value="builtin-short">Short</option>
+ </select> -->
+
+ <label for="sort">Sort by: </label>
+ $(SORT)
+ </p>
+ </fieldset>
+ </form>
+
+
+<p class="searchcredit">Powered by <a
href="http://www.htdig.org/">ht://Dig</a></p>
+
+</div>
+
+<?php include "$GEXEDIR$BASEDIR/shared/_footer.php"; ?>
Added: trunk/www/htdig/short.html
===================================================================
--- trunk/www/htdig/short.html 2004-03-16 17:20:33 UTC (rev 5331)
+++ trunk/www/htdig/short.html 2004-03-16 21:13:13 UTC (rev 5332)
@@ -0,0 +1 @@
+$(STARSRIGHT) <strong><a href="$&(URL)">$&(TITLE)</a></strong><br>
Added: trunk/www/htdig/syntax.html
===================================================================
--- trunk/www/htdig/syntax.html 2004-03-16 17:20:33 UTC (rev 5331)
+++ trunk/www/htdig/syntax.html 2004-03-16 21:13:13 UTC (rev 5332)
@@ -0,0 +1,57 @@
+<?php $BASEDIR="..";
+ $MODULE="project";
+ $TITLE="Error in Boolean search for '\$&(WORDS)";
+ include "$GEXEDIR$BASEDIR/shared/_header.php"; ?>
+
+<div id="body">
+
+
+<h1>Search Error</h1>
+<p>Error in Boolean search for '$&(LOGICAL_WORDS)'</p>
+<p>Boolean expressions need to be 'correct' in order for the search
+system to use them.
+The expression you entered has errors in it.</p>
+<p>
+Examples of correct expressions are: <strong>cat and dog</strong>, <strong>cat
+not dog</strong>, <strong>cat or (dog not nose)</strong>.<br>Note that
+the operator <strong>not</strong> has the meaning of 'without'.</p>
+<blockquote><strong>
+$(SYNTAXERROR)
+</strong></blockquote>
+<hr>
+
+
+ <h2>Refine Search</h2>
+ <form method="get" action="$(CGI)">
+ <fieldset>
+ <input type="hidden" name="config" value="$&(CONFIG)">
+ <input type="hidden" name="format" value="$&(FORMAT)">
+ <input type="hidden" name="restrict" value="$&(RESTRICT)">
+ <input type="hidden" name="exclude" value="$&(EXCLUDE)">
+ <p>
+ <label for="search">Search:</label>
+ <input type="text" size="30" name="words" value="$&(WORDS)"
id="search" />
+ <input type="submit" value="Search" />
+ </p>
+ <p>
+ <label for="method">Match: </label>
+ $(METHOD)
+
+ <!-- <label for="format">Format:</label>
+ <select name="format" id="format">
+ <option value="builtin-long" selected="selected">Long</option>
+ <option value="builtin-short">Short</option>
+ </select> -->
+
+ <label for="sort">Sort by: </label>
+ $(SORT)
+ </p>
+ </fieldset>
+ </form>
+
+
+<p class="searchcredit">Powered by <a
href="http://www.htdig.org/">ht://Dig</a></p>
+
+</div>
+
+<?php include "$GEXEDIR$BASEDIR/shared/_footer.php"; ?>
Added: trunk/www/htdig/wrapper.html
===================================================================
--- trunk/www/htdig/wrapper.html 2004-03-16 17:20:33 UTC (rev 5331)
+++ trunk/www/htdig/wrapper.html 2004-03-16 21:13:13 UTC (rev 5332)
@@ -0,0 +1,38 @@
+<?php $BASEDIR="..";
+ $MODULE="project";
+ $TITLE="Search results for '\$&(WORDS)'";
+ include "$GEXEDIR$BASEDIR/shared/_header.php"; ?>
+
+<div id="body">
+
+
+ <h1>Search Results</h1>
+ <p>Search results for '$&(LOGICAL_WORDS)'</p>
+ <form method="get" action="$(CGI)">
+ <formset>
+ <input type="hidden" name="config" value="$&(CONFIG)"/>
+ <input type="hidden" name="format" value="$&(FORMAT)"/>
+ <input type="hidden" name="restrict" value="$&(RESTRICT)"/>
+ <input type="hidden" name="exclude" value="$&(EXCLUDE)"/>
+ Match: $(METHOD)
+ Sort by: $(SORT)
+ <br/>
+ Refine search:
+ <input type="text" size="30" name="words" value="$&(WORDS)">
+ <input type="submit" value="Search">
+ </formset>
+ </form>
+ <hr/>
+ <p><strong>Documents $(FIRSTDISPLAYED) - $(LASTDISPLAYED) of $(MATCHES)
matches.
+ More <img src="/htdig/star.gif" alt="*"/>'s indicate a better match.
+ </strong></p>
+ <hr>
+ $(HTSEARCH_RESULTS)
+ $(PAGEHEADER)
+ $(PREVPAGE) $(PAGELIST) $(NEXTPAGE)
+
+<p class="searchcredit">Powered by <a
href="http://www.htdig.org/">ht://Dig</a></p>
+
+</div>
+
+<?php include "$GEXEDIR$BASEDIR/shared/_footer.php"; ?>
Modified: trunk/www/utils/create-website
===================================================================
--- trunk/www/utils/create-website 2004-03-16 17:20:33 UTC (rev 5331)
+++ trunk/www/utils/create-website 2004-03-16 21:13:13 UTC (rev 5332)
@@ -3,7 +3,7 @@
from webhelpers.utils import *
-from webhelpers import news, tools, utils
+from webhelpers import news, tools, utils, htdig
import sys, os, string
@@ -16,10 +16,13 @@
running the wrong script.
If you really want to run this script, run:
- %s --update [--dest <path>]
+ %s --update [--dest <path>] [--htdig /path/to/htdig/templates]
Be warned! It will try to update your /var/www/ unless you run
it with the --dest option.
+
+ You normally won't want to run --htdig on a test machine. It
+ overwrites htdig templates in /etc/htdig/
""" % (sys.argv[0])
sys.exit(1)
@@ -51,8 +54,15 @@
# Create the tools/ structure
tools.run()
+ # Create the search engine pages
+ try:
+ HTDIG=sys.argv[sys.argv.index('--htdig')+1]
+ htdig.run(HTDIG)
+ except ValueError:
+ pass
+
if __name__ == '__main__':
run()
Added: trunk/www/utils/webhelpers/htdig.py
===================================================================
--- trunk/www/utils/webhelpers/htdig.py 2004-03-16 17:20:33 UTC (rev 5331)
+++ trunk/www/utils/webhelpers/htdig.py 2004-03-16 21:13:13 UTC (rev 5332)
@@ -0,0 +1,15 @@
+# Contains global create-website stuff
+from utils import *
+
+import os, glob
+
+# Writes out the htDig template files
+def run(HTDIG_BASE):
+
+ os.system('mkdir -p %s' % HTDIG_BASE)
+ for file in glob.glob('%s/www/htdig/*.html' % SVN_BASE):
+ f = file.split('/')[-1]
+ os.system("""(echo '<?php $GEXEDIR="%s/www/web/shared/"; $BASEDIR="..";
?>'; cat %s ) |
+ php4 -d include_path=%s/www/web/shared/ > %s"""% (
+ SVN_BASE, file, SVN_BASE, os.path.join(HTDIG_BASE,f)))
+
Modified: trunk/www/web/project/search.php
===================================================================
--- trunk/www/web/project/search.php 2004-03-16 17:20:33 UTC (rev 5331)
+++ trunk/www/web/project/search.php 2004-03-16 21:13:13 UTC (rev 5332)
@@ -9,45 +9,134 @@
<h1>Site Search</h1>
<p>
Please enter the items you'd like to search for in the space
- provided below.
+ provided below. You can either search our main <a href="#web">project web
pages</a>,
+ our <a href="#lists">mailing lists</a>, or our <a href="#irc">IRC logs</a>,
+ where a lot of development communication takes place.
</p>
- <form method="post" action="/cgi-bin/htsearch">
+
+ <h2><a name="web">Search Project Web Pages</a></h2>
+ <p>This search will be limited to our <a
href="http://www.gnuenterprise.org/">main web site</a>.</p>
+ <form method="post" action="http://www.gnuenterprise.org/cgi-bin/htsearch">
<fieldset>
- <input type="hidden" name="config" value="htdig"/>
- <input type="hidden" name="restrict" value=""/>
- <input type="hidden" name="exclude" value=""/>
- <p>
- <label for="search">Search:</label>
- <input type="text" size="30" name="words" value="" id="search" />
- <input type="submit" value="Search" />
- </p>
- <p>
- <label for="method">Match: </label>
- <select name="method" id="method">
- <option value="and" selected="selected">All</option>
- <option value="or">Any</option>
- <option value="boolean">Boolean</option>
- </select>
+ <input type="hidden" name="config" value="htdig"/>
+ <input type="hidden" name="format" value="builtin-long"/>
+ <input type="hidden" name="restrict" value=""/>
+ <input type="hidden" name="exclude" value="/irc-logs/|/archive/html/"/>
+ <p>
+ <label for="search">Search:</label>
+ <input type="text" size="30" name="words" value="" id="search" />
+ <input type="submit" value="Search" />
+ </p>
+ <p>
+ <label for="method">Match: </label>
+ <select name="method" id="method">
+ <option value="and" selected="selected">All</option>
+ <option value="or">Any</option>
+ <option value="boolean">Boolean</option>
+ </select>
- <label for="format">Format:</label>
- <select name="format" id="format">
- <option value="builtin-long" selected="selected">Long</option>
- <option value="builtin-short">Short</option>
- </select>
+ <!-- <label for="format">Format:</label>
+ <select name="format" id="format">
+ <option value="builtin-long" selected="selected">Long</option>
+ <option value="builtin-short">Short</option>
+ </select> -->
- <label for="sort">Sort by: </label>
- <select name="sort" id="sort">
- <option value="score" selected="selected">Score</option>
- <option value="time">Time</option>
- <option value="title">Title</option>
- <option value="revscore">Reverse Score</option>
- <option value="revtime">Reverse Time</option>
- <option value="revtitle">Reverse Title</option>
- </select>
- </p>
+ <label for="sort">Sort by: </label>
+ <select name="sort" id="sort">
+ <option value="score" selected="selected">Score</option>
+ <option value="time">Time</option>
+ <option value="title">Title</option>
+ <option value="revscore">Reverse Score</option>
+ <option value="revtime">Reverse Time</option>
+ <option value="revtitle">Reverse Title</option>
+ </select>
+ </p>
</fieldset>
</form>
+
+
+ <h2><a name="irc">Search Mailing Lists</a></h2>
+ <p>This search will be limited to our mailing lists.</p>
+ <form method="post" action="http://www.gnuenterprise.org/cgi-bin/htsearch">
+ <fieldset>
+ <input type="hidden" name="config" value="htdig"/>
+ <input type="hidden" name="format" value="builtin-long"/>
+ <input type="hidden" name="restrict" value="/archive/html/"/>
+ <input type="hidden" name="exclude" value=""/>
+ <p>
+ <label for="search">Search:</label>
+ <input type="text" size="30" name="words" value="" id="search" />
+ <input type="submit" value="Search" />
+ </p>
+ <p>
+ <label for="method">Match: </label>
+ <select name="method" id="method">
+ <option value="and" selected="selected">All</option>
+ <option value="or">Any</option>
+ <option value="boolean">Boolean</option>
+ </select>
+
+ <!-- <label for="format">Format:</label>
+ <select name="format" id="format">
+ <option value="builtin-long" selected="selected">Long</option>
+ <option value="builtin-short">Short</option>
+ </select> -->
+
+ <label for="sort">Sort by: </label>
+ <select name="sort" id="sort">
+ <option value="score" selected="selected">Score</option>
+ <option value="time">Time</option>
+ <option value="title">Title</option>
+ <option value="revscore">Reverse Score</option>
+ <option value="revtime">Reverse Time</option>
+ <option value="revtitle">Reverse Title</option>
+ </select>
+ </p>
+ </fieldset>
+ </form>
+
+ <h2><a name="irc">Search IRC Logs</a></h2>
+ <p>This search will be limited to our
+ <a href="http://www.gnuenterprise.org/irc-logs/">IRC Logs</a>.</p>
+ <form method="post" action="http://www.gnuenterprise.org/cgi-bin/htsearch">
+ <fieldset>
+ <input type="hidden" name="config" value="htdig"/>
+ <input type="hidden" name="format" value="builtin-long"/>
+ <input type="hidden" name="restrict" value="/irc-logs/"/>
+ <input type="hidden" name="exclude" value=""/>
+ <p>
+ <label for="search">Search:</label>
+ <input type="text" size="30" name="words" value="" id="search" />
+ <input type="submit" value="Search" />
+ </p>
+ <p>
+ <label for="method">Match: </label>
+ <select name="method" id="method">
+ <option value="and" selected="selected">All</option>
+ <option value="or">Any</option>
+ <option value="boolean">Boolean</option>
+ </select>
+
+ <!-- <label for="format">Format:</label>
+ <select name="format" id="format">
+ <option value="builtin-long" selected="selected">Long</option>
+ <option value="builtin-short">Short</option>
+ </select> -->
+
+ <label for="sort">Sort by: </label>
+ <select name="sort" id="sort">
+ <option value="score" selected="selected">Score</option>
+ <option value="time">Time</option>
+ <option value="title">Title</option>
+ <option value="revscore">Reverse Score</option>
+ <option value="revtime">Reverse Time</option>
+ <option value="revtitle">Reverse Title</option>
+ </select>
+ </p>
+ </fieldset>
+ </form>
+
<p class="searchcredit">Powered by <a
href="http://www.htdig.org/">ht://Dig</a></p>
</div>
Modified: trunk/www/web/shared/_footer.php
===================================================================
--- trunk/www/web/shared/_footer.php 2004-03-16 17:20:33 UTC (rev 5331)
+++ trunk/www/web/shared/_footer.php 2004-03-16 21:13:13 UTC (rev 5332)
@@ -1,5 +1,5 @@
<br/>
-<?php include "$BASEDIR/shared/_menu.php" ?>
+<?php include "$GEXEDIR$BASEDIR/shared/_menu.php" ?>
<br/>
</div>
</body>
Modified: trunk/www/web/shared/_menu.php
===================================================================
--- trunk/www/web/shared/_menu.php 2004-03-16 17:20:33 UTC (rev 5331)
+++ trunk/www/web/shared/_menu.php 2004-03-16 21:13:13 UTC (rev 5332)
@@ -16,7 +16,7 @@
<?php @include("_extra_menu.php") ?>
- <?php @include("$BASEDIR/$MODULE/_module_menu.php")?>
+ <?php @include("$GEXEDIR$BASEDIR/$MODULE/_module_menu.php")?>
</div>
Modified: trunk/www/web/shared/base.css
===================================================================
--- trunk/www/web/shared/base.css 2004-03-16 17:20:33 UTC (rev 5331)
+++ trunk/www/web/shared/base.css 2004-03-16 21:13:13 UTC (rev 5332)
@@ -270,7 +270,7 @@
margin-left: 5px;
}
-
+/* Search Page */
p.searchcredit {
font-size: 9px;
text-align: right;
@@ -278,4 +278,15 @@
fieldset p {
margin-top: 0px;
+}
+
+fieldset {
+ width: 90%;
+ background-color: #f9f9f9;
+}
+
+hr {
+ height: 1px;
+ color: #0099ff;
+ background-color: #0099ff;
}
\ No newline at end of file
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- r5332 - in trunk/www: . htdig utils utils/webhelpers web/project web/shared,
jcater <=