Index: www/mkindex.tcl ================================================================== --- www/mkindex.tcl +++ www/mkindex.tcl @@ -63,17 +63,26 @@ tickets.wiki {The Fossil Ticket System} theory1.wiki {Thoughts On The Design Of The Fossil DVCS} webui.wiki {The Fossil Web Interface} wikitheory.wiki {Wiki In Fossil} } + +proc emit_links {ch links} { + foreach entry $links { + foreach {title file} $entry break + puts $ch "
  • $title
  • " + } +} set permindex {} +set canonindex {} set stopwords {fossil and a in of on the to are about used by for or} foreach {file title} $doclist { set n [llength $title] regsub -all {\s+} $title { } title lappend permindex [list $title $file] + lappend canonindex [list $title $file] for {set i 0} {$i<$n-1} {incr i} { set prefix [lrange $title 0 $i] set suffix [lrange $title [expr {$i+1}] end] set firstword [string tolower [lindex $suffix 0]] if {[lsearch $stopwords $firstword]<0} { @@ -80,10 +89,11 @@ lappend permindex [list "$suffix — $prefix" $file] } } } set permindex [lsort -dict -index 0 $permindex] +set canonindex [lsort -dict -index 0 $canonindex] set out [open permutedindex.html w] fconfigure $out -encoding utf-8 -translation lf puts $out \ "
    " puts $out { @@ -100,14 +110,18 @@
  • Compiling and installing Fossil
  • License
  • Jim Schimpf's book
  • Command-line help + +

    Canonical Index:

    +(list of unique documents) +

    Permuted Index:

    +(ordered by keywords - multiple entries linking to the same document)
  • " Index: www/permutedindex.html ================================================================== --- www/permutedindex.html +++ www/permutedindex.html @@ -13,13 +13,74 @@
  • Compiling and installing Fossil
  • License
  • Jim Schimpf's book
  • Command-line help + +

    Canonical Index:

    +(list of unique documents) +

    Permuted Index:

    +(ordered by keywords - multiple entries linking to the same document)