19 19 <li><a href="#markitup">markitup!</a></li>
20 20 </ul>
21 21 </li>
22 22 <li><a href="#ticket-checkin-links">Link tickets to checkins</a></li>
23 23 <li><a href="#th1-usage">Fossil and Th1</a></li>
24 24 <li><a href="#versionCompressed">Versioning compressed files</a></li>
25 25 <li><a href="#ColorPicker">Color selector in check-in properties</a></li>
26 + <li><a href="#SearchWiki">Searching wiki text</a></li>
26 27 </ul>
27 28
28 29 <h2><a name="CGI">Using <cite>Fossil</cite>'s Built-In CGI</a></h2>
29 30 <h3>Motivation</h3>
30 31 * You want to share a repository through your existing web infrastructure.
31 32 * You want to share more than one repository at the same time.
32 33
................................................................................
946 947 html "var myPicker = new jscolor.color(document.getElementById('clrcust'), {hash:true})"
947 948 html "</script>"
948 949 }
949 950 </th1>
950 951 </verbatim>
951 952
952 953 This will only work with a version after 2010 Sep 29, 10:30
954 +
955 +<h2><a name="SearchWiki">Searching wiki text</a></h2>
956 +At present, Fossil does not have a method for searching the wiki pages for particular text. Sometimes that is annoying; but it is possible to get around this with a little bash-script (or perl or ...):
957 +<verbatim>
958 +#!/bin/bash
959 +searchfor=$1
960 +
961 +# get wiki page names, substitute spaces for something else:
962 +pagesraw=`fossil wiki list`
963 +pages=${pagesraw// /*}
964 +
965 +# for each page, see if our search term is in it:
966 +for page in $pages
967 +do
968 + p=${page//\*/ }
969 + foundtext=`fossil wiki export "$p" | grep -n "$searchfor"`
970 +
971 + if [ ! -z "$foundtext" ]
972 + then
973 + # found the search-term, so print where and what was found:
974 + echo "$p"
975 + echo "$foundtext"
976 + echo "----"
977 + fi
978 +done
979 +</verbatim>