+++ /dev/null
-**Editing <<HttpGet|edit>> for <<CgiVar|REMOTE_USER>> from <<CgiVar|REMOTE_HOST>>**
-<div class="editor">
-<form method="post" enctype="multipart/form-data" action="<<CgiVar|QUERY_STRING>>" >
-<input type="hidden" name="edit2" value="<<HttpGet|edit2>>">
-<textarea wrap="off" spellcheck="true" id="editor" name="savetext" rows="17" cols="100"><<HttpPost|savetext>></textarea>
-Or upload a file: <input type="file" name="file" value="<<HttpPost|file>>" />
-\\
-<input type="submit" name="save" value="Save" />
-<input type="submit" name="preview" value="Preview" />
-<input type="reset" value="Reset" />
-<input type="submit" name="cancel" value="Cancel" />
-\\
-</form></div>
-[[EditingTips]]
-
-<<HttpPost|savetext>>
Here's a title search. Try something like //wiki//:
<form method="get">
- <input name="titlesearch" size="30" value="<<HttpGet|search>>" />
+ <input name="q" size="30" value="<<HttpGet|search|>>" />
+ <input type="hidden" name="a" value="titlesearch" />
<input type="submit" value="Search" />
</form>
Here's a full-text search:
<form method="get">
- <input name="fullsearch" size="30" value="<<HttpGet|search>>" />
+ <input name="q" size="30" value="<<HttpGet|search|>>" />
+ <input type="hidden" name="a" value="fullsearch" />
<input type="submit" value="Search" />
</form>
-== Geeki Geeki, the Stupid Stupid Wiki Wiki ==
+<div style="float: right">{{GerryStich.png}}</div>
-<div style="float: right">GerryStich.png</div>
+== Geeki Geeki, the Stupid Stupid Wiki Wiki ==
GeekiGeeki is a minimalistic wiki with a [[http://git.or.cz/ | Git]]
backend, a high features/complexity ratio and a clean syntax.
===== Revision history =====
-Browse it online with GitWeb: http://www.codewiz.org/wikigit/geekigeeki.git
+Browse it with [[http://www.codewiz.org/wikigit/geekigeeki.git|GitWeb]]
===== Individual source files =====
-../../../Pictures/
\ No newline at end of file
+../../../Pictures
\ No newline at end of file
--- /dev/null
+**Editing <<HttpGet|q>> for <<CgiVar|REMOTE_USER>> from <<CgiVar|REMOTE_HOST>>**
+<div class="editor">
+<form method="post" enctype="multipart/form-data" action="<<HttpGet|q>>" >
+<input type="hidden" name="a" value="edit">
+<input type="hidden" name="q" value="<<HttpGet|q>>">
+<input type="input" id="editor" name="changelog" value="Edit page <<HttpGet|q>>" accesskey="c" />
+\\
+<textarea wrap="off" spellcheck="true" id="editor" name="savetext" rows="17" cols="100" accesskey="e"><<EDIT_BODY>></textarea>
+<label for="file" accesskey="u">Or upload a file:</label> <input type="file" name="file" value="<<HttpPost|file>>" />
+\\
+<input type="submit" name="save" value="Save" accesskey="s" />
+<input type="submit" name="preview" value="Preview" accesskey="p" />
+<input type="reset" value="Reset" />
+<input type="submit" name="cancel" value="Cancel" />
+\\
+</form></div>
+
+<script language="javascript">
+document.editform.savetext.focus()
+</script>
+
+[[EditingTips]]
<div id="footer"><hr />
<p class="copyright">
-<a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"><img class="license" alt="Creative Commons License" src="%s" /></a>
-<span class="benchmark">generated in FIXME</span> by <a href="http://www.codewiz.org/wiki/GeekiGeeki">GeekiGeeki</a> version FIXME
+[[http://creativecommons.org/licenses/by-sa/3.0/|sys/cc-by-sa.png|Creative Commons License|rel=license]]
+<span class="benchmark">generated in <<ELAPSED_TIME>>s</span>
+by [[http://www.codewiz.org/wiki/GeekiGeeki|GeekiGeeki]] version <<VERSION>>
</p>
-<p class="modified">last modified %s</p>
-</div></body></html>
+<p class="modified">last modified <<LAST_MODIFIED>></p>
+</div>
--- /dev/null
+#acl bernie:read,write All:read
+
+def _macro_CgiVar(*args, **kvargs):
+ return {
+ 'REMOTE_USER': remote_user(),
+ 'REMOTE_HOST': get_hostname(remote_host()),
+ 'REMOTE_ADDR': remote_host(),
+ 'QUERY_STRING': relative_url(query_string()),
+ }[args[1]]
--- /dev/null
+#acl bernie:read,write All:read
+
+def _macro_HttpGet(*args, **kvargs):
+ if args[1] in form:
+ return form[args[1]].value
+ elif len(args) > 2:
+ return args[2] # default value
+ raise Exception("Undefined argument " + args[1])
--- /dev/null
+#acl bernie:read,write All:read
+
+def _macro_HttpPost(*args, **kvargs):
+ if args[1] in form:
+ return form[argv[1]].value
+ elif len(args) > 2:
+ return args[2] # default value
+ raise Exception("Undefined argument " + args[1])
--- /dev/null
+#acl bernie:read,write All:read
+
+def _macro_TitleIndex(*args, **kvargs):
+ s = make_index_key()
+ pages = list(page_list())
+ pages.sort()
+ current_letter = None
+ for name in pages:
+ letter = name[0].lower()
+ if letter != current_letter:
+ s += '<a name="%s"><h3>%s</h3></a>' % (letter, letter)
+ current_letter = letter
+ else:
+ s += '<br />'
+ s += link_tag(name)
+ return s
--- /dev/null
+#acl bernie:read,write All:read
+
+def _macro_WordIndex(*args, **kvargs):
+ s = make_index_key()
+ pages = list(page_list())
+ map = {}
+ word_re = re.compile('[A-Z][a-z]+')
+ for name in pages:
+ for word in word_re.findall(name):
+ try:
+ map[word].append(name)
+ except KeyError:
+ map[word] = [name]
+
+ all_words = list(map.keys())
+ all_words.sort()
+ last_letter = None
+ # set title
+ for word in all_words:
+ letter = word[0].lower()
+ if letter != last_letter:
+ s += '<a name="%s"><h3>%s</h3></a>' % (letter, letter)
+ last_letter = letter
+
+ s += '<b>%s</b><ul>' % word
+ links = map[word]
+ links.sort()
+ last_page = None
+ for name in links:
+ if name == last_page: continue
+ s += '<li>' + link_tag(name) + '</li>'
+ s += '</ul>'
+ return s