|
6311ff7…
|
andygoth
|
1 |
#!/usr/bin/env tclsh |
|
169a10d…
|
drh
|
2 |
# |
|
34820b4…
|
jan.nijtmans
|
3 |
# Run this TCL script to generate a WIKI page that contains a |
|
169a10d…
|
drh
|
4 |
# permuted index of the various documentation files. |
|
169a10d…
|
drh
|
5 |
# |
|
d32155d…
|
jan.nijtmans
|
6 |
# tclsh mkindex.tcl |
|
d32155d…
|
jan.nijtmans
|
7 |
# |
|
47a4c4c…
|
drh
|
8 |
# 2021-02-26: The permuted index feature has been removed because |
|
47a4c4c…
|
drh
|
9 |
# moderns don't understand such things, and seeing so many entries |
|
47a4c4c…
|
drh
|
10 |
# confuses them. |
|
47a4c4c…
|
drh
|
11 |
# |
|
169a10d…
|
drh
|
12 |
|
|
169a10d…
|
drh
|
13 |
set doclist { |
|
c55f54d…
|
drh
|
14 |
aboutcgi.wiki {How CGI Works In Fossil} |
|
fb38d31…
|
drh
|
15 |
aboutdownload.wiki {How The Download Page Works} |
|
018a983…
|
drh
|
16 |
adding_code.wiki {Adding New Features To Fossil} |
|
018a983…
|
drh
|
17 |
adding_code.wiki {Hacking Fossil} |
|
2ef70be…
|
wyoung
|
18 |
alerts.md {Email Alerts And Notifications} |
|
c9082b2…
|
drh
|
19 |
antibot.wiki {Defense against Spiders and Robots} |
|
c6522a0…
|
drh
|
20 |
backoffice.md {The "Backoffice" mechanism of Fossil} |
|
5c2ef2a…
|
wyoung
|
21 |
backup.md {Backing Up a Remote Fossil Repository} |
|
91af24e…
|
drh
|
22 |
blame.wiki {The Annotate/Blame Algorithm Of Fossil} |
|
1ddb400…
|
wyoung
|
23 |
blockchain.md {Is Fossil A Blockchain?} |
|
169a10d…
|
drh
|
24 |
branching.wiki {Branching, Forking, Merging, and Tagging} |
|
91af24e…
|
drh
|
25 |
bugtheory.wiki {Bug Tracking In Fossil} |
|
44610be…
|
drh
|
26 |
build.wiki {Compiling and Installing Fossil} |
|
3ddd56d…
|
wyoung
|
27 |
cap-theorem.md {Fossil and the CAP Theorem} |
|
23b91f3…
|
wyoung
|
28 |
caps/ {Administering User Capabilities (a.k.a. Permissions)} |
|
779ddef…
|
wyoung
|
29 |
caps/admin-v-setup.md {Differences Between Setup and Admin Users} |
|
779ddef…
|
wyoung
|
30 |
caps/ref.html {User Capability Reference} |
|
fbc3b2f…
|
drh
|
31 |
cgi.wiki {CGI Script Configuration Options} |
|
dddc58d…
|
drh
|
32 |
changes.wiki {Fossil Changelog} |
|
f2ec37e…
|
drh
|
33 |
chat.md {Fossil Chat} |
|
fe38a76…
|
drh
|
34 |
checkin_names.wiki {Check-in And Version Names} |
|
fe38a76…
|
drh
|
35 |
checkin.wiki {Check-in Checklist} |
|
dddc58d…
|
drh
|
36 |
childprojects.wiki {Child Projects} |
|
f2ec37e…
|
drh
|
37 |
chroot.md {Server Chroot Jail} |
|
b6b1b70…
|
wyoung
|
38 |
ckout-workflows.md {Check-Out Workflows} |
|
a5ea789…
|
wyoung
|
39 |
co-vs-up.md {Checkout vs Update} |
|
7c99ebc…
|
wyoung
|
40 |
colordiff.md {Colorized Diffs} |
|
98f1131…
|
drh
|
41 |
copyright-release.html {Contributor License Agreement} |
|
169a10d…
|
drh
|
42 |
concepts.wiki {Fossil Core Concepts} |
|
f2ec37e…
|
drh
|
43 |
contact.md {Developer Contact Information} |
|
92982dc…
|
wyoung
|
44 |
containers.md {OCI Containers} |
|
98f1131…
|
drh
|
45 |
contribute.wiki {Contributing Code or Documentation To The Fossil Project} |
|
5900530…
|
stephan
|
46 |
css-tricks.md {Fossil CSS Tips and Tricks} |
|
42e7733…
|
joel
|
47 |
customgraph.md {Theming: Customizing the Timeline Graph} |
|
c397fe5…
|
drh
|
48 |
customskin.md {Theming: Customizing The Appearance of Web Pages} |
|
2aa4ef9…
|
drh
|
49 |
customskin.md {Custom Skins} |
|
169a10d…
|
drh
|
50 |
custom_ticket.wiki {Customizing The Ticket System} |
|
4e6d36d…
|
wyoung
|
51 |
defcsp.md {The Default Content Security Policy} |
|
fbd16f3…
|
stephan
|
52 |
delta-manifests.md {Delta Manifests} |
|
169a10d…
|
drh
|
53 |
delta_encoder_algorithm.wiki {Fossil Delta Encoding Algorithm} |
|
169a10d…
|
drh
|
54 |
delta_format.wiki {Fossil Delta Format} |
|
169a10d…
|
drh
|
55 |
embeddeddoc.wiki {Embedded Project Documentation} |
|
7fd6009…
|
drh
|
56 |
encryptedrepos.wiki {How To Use Encrypted Repositories} |
|
1ad4ae2…
|
rberteig
|
57 |
env-opts.md {Environment Variables and Global Options} |
|
169a10d…
|
drh
|
58 |
event.wiki {Events} |
|
169a10d…
|
drh
|
59 |
faq.wiki {Frequently Asked Questions} |
|
1243bf3…
|
stephan
|
60 |
fileedit-page.md {The fileedit Page} |
|
169a10d…
|
drh
|
61 |
fileformat.wiki {Fossil File Format} |
|
a0ce33c…
|
drh
|
62 |
fiveminutes.wiki {Up and Running in 5 Minutes as a Single User} |
|
7bd7b2c…
|
wyoung
|
63 |
forum.wiki {Fossil Forums} |
|
34177b0…
|
drh
|
64 |
foss-cklist.wiki {Checklist For Successful Open-Source Projects} |
|
33c651c…
|
drh
|
65 |
fossil-from-msvc.wiki {Integrating Fossil in the Microsoft Express 2010 IDE} |
|
c17054a…
|
stephan
|
66 |
fossil-is-not-relational.md {Introduction to the (Non-relational) Fossil Data Model} |
|
41d6540…
|
drh
|
67 |
fossil_prompt.wiki {Fossilized Bash Prompt} |
|
169a10d…
|
drh
|
68 |
fossil-v-git.wiki {Fossil Versus Git} |
|
13f8eb0…
|
wyoung
|
69 |
gitusers.md {Git to Fossil Translation Guide} |
|
a58d952…
|
wyoung
|
70 |
globs.md {File Name Glob Patterns} |
|
a58d952…
|
wyoung
|
71 |
glossary.md {Glossary} |
|
4af31f1…
|
andygoth
|
72 |
grep.md {Fossil grep vs POSIX grep} |
|
04af93e…
|
drh
|
73 |
hacker-howto.wiki {Hacker How-To} |
|
29c3e99…
|
drh
|
74 |
hacker-howto.wiki {Fossil Developers Guide} |
|
33bec29…
|
wyoung
|
75 |
hashes.md {Hashes: Fossil Artifact Identification} |
|
e92133a…
|
drh
|
76 |
hashpolicy.wiki {Hash Policy: Choosing Between SHA1 and SHA3-256} |
|
46cebc8…
|
drh
|
77 |
/help {Lists of Commands and Webpages} |
|
fda5b81…
|
drh
|
78 |
hints.wiki {Fossil Tips And Usage Hints} |
|
b8ad564…
|
drh
|
79 |
history.md {The Purpose And History Of Fossil} |
|
169a10d…
|
drh
|
80 |
index.wiki {Home Page} |
|
169a10d…
|
drh
|
81 |
inout.wiki {Import And Export To And From Git} |
|
f4dc114…
|
drh
|
82 |
interwiki.md {Interwiki Links} |
|
41579b4…
|
wyoung
|
83 |
image-format-vs-repo-size.md {Image Format vs Fossil Repo Size} |
|
39d3baa…
|
wyoung
|
84 |
javascript.md {Use of JavaScript in Fossil} |
|
d355faf…
|
stephan
|
85 |
json-api/index.md {JSON API} |
|
f2ec37e…
|
drh
|
86 |
loadmgmt.md {Managing Server Load} |
|
c429b52…
|
drh
|
87 |
makefile.wiki {The Fossil Build Process} |
|
41d6540…
|
drh
|
88 |
mirrorlimitations.md {Limitations On Git Mirrors} |
|
21b57fa…
|
drh
|
89 |
mirrortogithub.md {How To Mirror A Fossil Repository On GitHub} |
|
46cebc8…
|
drh
|
90 |
/md_rules {Markdown Formatting Rules} |
|
1006126…
|
drh
|
91 |
newrepo.wiki {How To Create A New Fossil Repository} |
|
e0d6110…
|
drh
|
92 |
patchcmd.md {The "fossil patch" Command} |
|
169a10d…
|
drh
|
93 |
password.wiki {Password Management And Authentication} |
|
f2ec37e…
|
drh
|
94 |
pikchr.md {The Pikchr Diagram Language} |
|
5789677…
|
andygoth
|
95 |
pop.wiki {Principles Of Operation} |
|
c97c6aa…
|
drh
|
96 |
private.wiki {Creating, Syncing, and Deleting Private Branches} |
|
169a10d…
|
drh
|
97 |
qandc.wiki {Questions And Criticisms} |
|
169a10d…
|
drh
|
98 |
quickstart.wiki {Fossil Quick Start Guide} |
|
8bdd09e…
|
drh
|
99 |
quotes.wiki |
|
8bdd09e…
|
drh
|
100 |
{Quotes: What People Are Saying About Fossil, Git, and DVCSes in General} |
|
98f1131…
|
drh
|
101 |
../test/release-checklist.wiki {Pre-Release Testing Checklist} |
|
569cc74…
|
drh
|
102 |
rebaseharm.md {Rebase Considered Harmful} |
|
1006126…
|
drh
|
103 |
reviews.wiki {Reviews} |
|
169a10d…
|
drh
|
104 |
selfcheck.wiki {Fossil Repository Integrity Self Checks} |
|
169a10d…
|
drh
|
105 |
selfhost.wiki {Fossil Self Hosting Repositories} |
|
f146e21…
|
drh
|
106 |
server/ {How To Configure A Fossil Server} |
|
41d6540…
|
drh
|
107 |
serverext.wiki {CGI Server Extensions} |
|
41d6540…
|
drh
|
108 |
serverext.wiki {Adding Extensions To A Fossil Server Using CGI Scripts} |
|
9a0c995…
|
drh
|
109 |
settings.wiki {Fossil Settings} |
|
46cebc8…
|
drh
|
110 |
/sitemap {Site Map} |
|
5fb963a…
|
drh
|
111 |
shunning.wiki {Shunning: Deleting Content From Fossil} |
|
169a10d…
|
drh
|
112 |
stats.wiki {Performance Statistics} |
|
98f1131…
|
drh
|
113 |
style.wiki {Source Code Style Guidelines} |
|
9a0c995…
|
drh
|
114 |
ssl.wiki {Using SSL with Fossil} |
|
890b49f…
|
drh
|
115 |
ssl-server.md {SSL/TLS Server Mode} |
|
169a10d…
|
drh
|
116 |
sync.wiki {The Fossil Sync Protocol} |
|
5fb963a…
|
drh
|
117 |
tech_overview.wiki {A Technical Overview Of The Design And Implementation |
|
5fb963a…
|
drh
|
118 |
Of Fossil} |
|
5fb963a…
|
drh
|
119 |
tech_overview.wiki {SQLite Databases Used By Fossil} |
|
c397fe5…
|
drh
|
120 |
th1.md {The TH1 Scripting Language} |
|
169a10d…
|
drh
|
121 |
theory1.wiki {Thoughts On The Design Of The Fossil DVCS} |
|
f2ec37e…
|
drh
|
122 |
tickets.wiki {The Fossil Ticket System} |
|
f187ada…
|
drh
|
123 |
unvers.wiki {Unversioned Files} |
|
03a64a6…
|
drh
|
124 |
webpage-ex.md {Webpage Examples} |
|
169a10d…
|
drh
|
125 |
webui.wiki {The Fossil Web Interface} |
|
a204e32…
|
drh
|
126 |
whyallinone.md {Why Bundle Forum, Wiki, and other Web Software With Your DVCS?} |
|
d8b18eb…
|
drh
|
127 |
whyusefossil.wiki {Why You Should Use Fossil} |
|
d8b18eb…
|
drh
|
128 |
whyusefossil.wiki {Benefits Of Version Control} |
|
169a10d…
|
drh
|
129 |
wikitheory.wiki {Wiki In Fossil} |
|
46cebc8…
|
drh
|
130 |
/wiki_rules {Wiki Formatting Rules} |
|
169a10d…
|
drh
|
131 |
} |
|
169a10d…
|
drh
|
132 |
|
|
169a10d…
|
drh
|
133 |
set permindex {} |
|
95bb5a2…
|
andygoth
|
134 |
set stopwords { |
|
95bb5a2…
|
andygoth
|
135 |
a about against and are as by for fossil from in of on or should the to use |
|
95bb5a2…
|
andygoth
|
136 |
used with |
|
95bb5a2…
|
andygoth
|
137 |
} |
|
169a10d…
|
drh
|
138 |
foreach {file title} $doclist { |
|
169a10d…
|
drh
|
139 |
set n [llength $title] |
|
1006126…
|
drh
|
140 |
regsub -all {\s+} $title { } title |
|
6311ff7…
|
andygoth
|
141 |
lappend permindex [list $title $file 1] |
|
47a4c4c…
|
drh
|
142 |
|
|
47a4c4c…
|
drh
|
143 |
# Disable the permutations. |
|
47a4c4c…
|
drh
|
144 |
# for {set i 0} {$i<$n-1} {incr i} { |
|
47a4c4c…
|
drh
|
145 |
# set prefix [lrange $title 0 $i] |
|
47a4c4c…
|
drh
|
146 |
# set suffix [lrange $title [expr {$i+1}] end] |
|
47a4c4c…
|
drh
|
147 |
# set firstword [string tolower [lindex $suffix 0]] |
|
47a4c4c…
|
drh
|
148 |
# if {[lsearch $stopwords $firstword]<0} { |
|
47a4c4c…
|
drh
|
149 |
# lappend permindex [list "$suffix — $prefix" $file 0] |
|
47a4c4c…
|
drh
|
150 |
# } |
|
47a4c4c…
|
drh
|
151 |
# } |
|
1006126…
|
drh
|
152 |
} |
|
1006126…
|
drh
|
153 |
set permindex [lsort -dict -index 0 $permindex] |
|
63c2c73…
|
drh
|
154 |
set out [open permutedindex.html w] |
|
1006126…
|
drh
|
155 |
fconfigure $out -encoding utf-8 -translation lf |
|
63c2c73…
|
drh
|
156 |
puts $out \ |
|
63c2c73…
|
drh
|
157 |
"<div class='fossil-doc' data-title='Index Of Fossil Documentation'>" |
|
1006126…
|
drh
|
158 |
puts $out { |
|
4d21ec8…
|
wyoung
|
159 |
<form action='$ROOT/docsrch' method='GET' style="text-align:center"> |
|
c799881…
|
drh
|
160 |
<input type="text" name="s" size="40" autofocus> |
|
63c2c73…
|
drh
|
161 |
<input type="submit" value="Search Docs"> |
|
63c2c73…
|
drh
|
162 |
</form> |
|
1006126…
|
drh
|
163 |
<h2>Primary Documents:</h2> |
|
1006126…
|
drh
|
164 |
<ul> |
|
63c2c73…
|
drh
|
165 |
<li> <a href='quickstart.wiki'>Quick-start Guide</a> |
|
02a7c72…
|
drh
|
166 |
<li> <a href='$ROOT/help'>Built-in help for commands and webpages</a> |
|
b8ad564…
|
drh
|
167 |
<li> <a href='history.md'>Purpose and History of Fossil</a> |
|
63c2c73…
|
drh
|
168 |
<li> <a href='build.wiki'>Compiling and installing Fossil</a> |
|
488fb14…
|
drh
|
169 |
<li> <a href='../COPYRIGHT-BSD2.txt'>License</a> |
|
b3af9d6…
|
drh
|
170 |
<li> <a href='userlinks.wiki'>Miscellaneous Docs for Fossil Users</a> |
|
29c3e99…
|
drh
|
171 |
<li> <a href='hacker-howto.wiki'>Fossil Developer's Guide</a> |
|
8a1ba49…
|
wyoung
|
172 |
<li><a href='$ROOT/wiki?name=Release Build How-To'>Release Build How-To</a>, |
|
8a1ba49…
|
wyoung
|
173 |
a.k.a. how deliverables are built</li> |
|
9f3945f…
|
stephan
|
174 |
</li> |
|
0457c40…
|
drh
|
175 |
<li> <a href='$ROOT/wiki?name=To+Do+List'>To Do List (Wiki)</a> |
|
143f1db…
|
wyoung
|
176 |
<li> <a href='https://fossil-scm.org/fossil-book/'>Fossil book</a> |
|
fd9fd4c…
|
drh
|
177 |
</ul> |
|
93cee1f…
|
wyoung
|
178 |
<h2 id="pindex">Other Documents:</h2> |
|
1006126…
|
drh
|
179 |
<ul>} |
|
1006126…
|
drh
|
180 |
foreach entry $permindex { |
|
6311ff7…
|
andygoth
|
181 |
foreach {title file bold} $entry break |
|
47a4c4c…
|
drh
|
182 |
# if {$bold} {set title <b>$title</b>} |
|
9c41227…
|
drh
|
183 |
if {[string match /* $file]} {set file ../../..$file} |
|
34177b0…
|
drh
|
184 |
puts $out "<li><a href=\"$file\">$title</a></li>" |
|
169a10d…
|
drh
|
185 |
} |
|
63c2c73…
|
drh
|
186 |
puts $out "</ul></div>" |