Manpower

Check-in [bb18dda27a]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:UI pretty much working now, need to polish and update user docs
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:bb18dda27aa3507e49a83c0f3efc45b88fd77d5d
User & Date: kevin 2019-08-21 06:18:15
Context
2019-08-24
15:01
Fix disappearing text in clickLink proc check-in: 9207cda0d8 user: kevin tags: trunk
2019-08-21
06:18
UI pretty much working now, need to polish and update user docs check-in: bb18dda27a user: kevin tags: trunk
2019-08-20
12:47
More progress check-in: 1e0323ae61 user: kevin tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to libs/manpower/manpower-main.tcl.

231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
...
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
...
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
...
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652

    ttk::separator .bottomsep1 -orient vertical 
    pack .bottomsep1 -side bottom -fill both -expand no -side bottom


    #additional bindings
    bind .tool.toolbar.frame.browser <Return> {singleManPage}
    bind .tool.toolbar.frame.entry <Return> {manSearch}
    
    ttk::frame .bottom
    pack .bottom -side bottom -fill both -expand no

    ttk::separator .bottomsep -orient vertical 
    pack .bottomsep -side bottom -fill both -expand no -side bottom

................................................................................
    global status
    global rmanpath
    global cachedir

    .middle.left.tree selection remove [.middle.left.tree selection]
    set manitem [.tool.toolbar.frame.browser get]

    puts "manitem is $manitem"

    clearData
    clearText
    .middle.right.lower.right.log configure -state normal

    after 50

    set rawman [exec man $manitem > $cachedir/$manitem-man.txt  2>$cachedir/manerror]
................................................................................
    if {$searchterm == ""} {
	return
    }

    clearData
    clearText

    .middle.left.tree selection set "Search"
    set status "Man pages with keyword \"$searchterm\""

    set parsesearch [lsearch -all -inline $manlist *$searchterm*]
    foreach "item" $parsesearch {
	.middle.right.upper.frame.listbox insert {} end -values $item
    }
}
................................................................................
proc manCat {} {
    global manlist
    set catlist ""

    clearData
    clearText

    set basecat [.middle.left.tree itemcget  [.middle.left.tree selection get] -text]
    set interimcat [lindex [split $basecat \.] 0]
    set catnum [lindex [split $interimcat] 1]

    foreach item $manlist {
	if {[regexp \\($catnum\\) [lindex $item 0]]} {
	    set manpage [lindex $item 0]
	    set description [lindex $item 1]
	    lappend interimcat [list $manpage $description]
	} else {
	    continue
	}
    }
    
    set sortlist [lsort -dictionary $interimcat]
    set catlist [lrange $sortlist 1 end-1]
    foreach item $catlist {	
	.middle.right.upper.frame.listbox insert {} end -values $item
    }

}







|







 







<
<







 







|







 







|
|
<
|

|







|







231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
...
490
491
492
493
494
495
496


497
498
499
500
501
502
503
...
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
...
623
624
625
626
627
628
629
630
631

632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649

    ttk::separator .bottomsep1 -orient vertical 
    pack .bottomsep1 -side bottom -fill both -expand no -side bottom


    #additional bindings
    bind .tool.toolbar.frame.browser <Return> {singleManPage}
    bind .tool.toolbar.frame.entry <Return> {.middle.left.tree selection set "Search"}
    
    ttk::frame .bottom
    pack .bottom -side bottom -fill both -expand no

    ttk::separator .bottomsep -orient vertical 
    pack .bottomsep -side bottom -fill both -expand no -side bottom

................................................................................
    global status
    global rmanpath
    global cachedir

    .middle.left.tree selection remove [.middle.left.tree selection]
    set manitem [.tool.toolbar.frame.browser get]



    clearData
    clearText
    .middle.right.lower.right.log configure -state normal

    after 50

    set rawman [exec man $manitem > $cachedir/$manitem-man.txt  2>$cachedir/manerror]
................................................................................
    if {$searchterm == ""} {
	return
    }

    clearData
    clearText

  
    set status "Man pages with keyword \"$searchterm\""

    set parsesearch [lsearch -all -inline $manlist *$searchterm*]
    foreach "item" $parsesearch {
	.middle.right.upper.frame.listbox insert {} end -values $item
    }
}
................................................................................
proc manCat {} {
    global manlist
    set catlist ""

    clearData
    clearText

    set basecat [.middle.left.tree item [.middle.left.tree selection] -text]
    set interimnum [lindex [split $basecat \.] 0]

  
    foreach item $manlist {
	if {[regexp \\($interimnum\\) [lindex $item 0]]} {
	    set manpage [lindex $item 0]
	    set description [lindex $item 1]
	    lappend interimcat [list $manpage $description]
	} else {
	    continue
	}
    }

    set sortlist [lsort -dictionary $interimcat]
    set catlist [lrange $sortlist 1 end-1]
    foreach item $catlist {	
	.middle.right.upper.frame.listbox insert {} end -values $item
    }

}