Changes To Cookbook
Not logged in

Changes to "Cookbook" between 2010-12-01 01:47:25 and 2011-01-07 06:54:18

19
20
21
22
23
24
25

26
27
28
29
30
31
32
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33







+







      <li><a href="#markitup">markitup!</a></li>
    </ul>
  </li>
  <li><a href="#ticket-checkin-links">Link tickets to checkins</a></li>
  <li><a href="#th1-usage">Fossil and Th1</a></li>
  <li><a href="#versionCompressed">Versioning compressed files</a></li>
  <li><a href="#ColorPicker">Color selector in check-in properties</a></li>
  <li><a href="#SearchWiki">Searching wiki text</a></li>
</ul>

<h2><a name="CGI">Using <cite>Fossil</cite>'s Built-In CGI</a></h2>
<h3>Motivation</h3>
  *  You want to share a repository through your existing web infrastructure.
  *  You want to share more than one repository at the same time.

946
947
948
949
950
951
952


























947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979







+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
    html "var myPicker = new jscolor.color(document.getElementById('clrcust'), {hash:true})"
    html "</script>"
  }
</th1>
</verbatim>

This will only work with a version after 2010 Sep 29, 10:30

<h2><a name="SearchWiki">Searching wiki text</a></h2>
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 ...):
<verbatim>
#!/bin/bash
searchfor=$1

# get wiki page names, substitute spaces for something else:
pagesraw=`fossil wiki list`
pages=${pagesraw// /*}

# for each page, see if our search term is in it:
for page in $pages
do
	p=${page//\*/ }
	foundtext=`fossil wiki export "$p" | grep -n "$searchfor"`

	if [ ! -z "$foundtext" ]
	then
		# found the search-term, so print where and what was found:
		echo "$p"
		echo "$foundtext"
		echo "----"
	fi
done
</verbatim>