Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Split the example file into many, and moved into the proper section. |
---|---|
Timelines: | family | ancestors | descendants | both | say-more |
Files: | files | file ages | folders |
SHA1: |
d1f3c1d5eef02009eab39f25df970550 |
User & Date: | andreask 2015-04-22 20:42:41.449 |
Context
2015-04-22
| ||
21:42 | say - Start on tests, and extended package to support output redirection, making the tests easier. check-in: 2cc0a755b9 user: andreask tags: say-more | |
20:42 | Split the example file into many, and moved into the proper section. check-in: d1f3c1d5ee user: andreask tags: say-more | |
20:19 | Fix small issue, clear header in a multi-line prompt, this is a fixed part we must not redraw on retry under this new scheme. check-in: defa6f6ead user: andreask tags: say-more | |
Changes
Added examples/say-barber-phases.
> > > > > > > > | 1 2 3 4 5 6 7 8 | #!/usr/bin/env tclsh # -*- tcl -*- package require Tcl 8.5 package require cmdr::say puts |[join [cmdr say barber-phases 16 {** }] |\n|]| exit |
Added examples/say-barberpole-1.
> > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | #!/usr/bin/env tclsh # -*- tcl -*- package require Tcl 8.5 package require cmdr::say # infinite barberpole set B [cmdr say barberpole -width 30] while {1} { after 100 cmdr say rewind $B step } exit |
Added examples/say-barberpole-2.
> > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | #!/usr/bin/env tclsh # -*- tcl -*- package require Tcl 8.5 package require cmdr::say # infinite barberpole with a prefix set B [cmdr say barberpole -width 30] cmdr say add "download ... " cmdr say lock-prefix while {1} { # # fake download, unknown size, sync ... actual use: # - fcopy callback, # - http progress-callback # - tcllib transfer callback after 100 # cmdr say rewind $B step } exit |
Added examples/say-counter.
> > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | #!/usr/bin/env tclsh # -*- tcl -*- package require Tcl 8.5 package require cmdr::say # progress counter. set B [cmdr say progress-counter 100] set i 0 cmdr say add "upload ... " cmdr say lock-prefix while {$i < 100} { # # fake upload, sync ... actual use: # - fcopy callback, # - http progress-callback # - tcllib transfer callback after 100 # cmdr say rewind incr i $B step $i } exit |
Added examples/say-general-1.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | #!/usr/bin/env tclsh # -*- tcl -*- package require Tcl 8.5 package require cmdr::say # scanner set B [cmdr say animate -phases { {[*** ]} {[** * ]} {[ ** * ]} {[ ** * ]} {[ ** * ]} {[ ** * ]} {[ ** *]} {[ ***]} {[ * **]} {[ * ** ]} {[ * ** ]} {[ * ** ]} {[ * ** ]} {[* ** ]} }] while {1} { after 100 cmdr say rewind $B step # NOTE: putting the rewind after the step means that we will # see the animation output only for a split second and the # erased/empty line for the 100 milli delay => the terminal # will look empty, with nothing happening. } exit |
Added examples/say-general-2.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | #!/usr/bin/env tclsh # -*- tcl -*- package require Tcl 8.5 package require cmdr::say # infinite slider - semi-barberpole set B [cmdr say animate -phases { {[ ]} {[* ]} {[** ]} {[*** ]} {[* ** ]} {[ * ** ]} {[ * ** ]} {[ * ** ]} {[ * ** ]} {[ * **]} {[ * *]} {[ * ]} {[ *]} }] while {1} { after 100 cmdr say rewind $B step } exit |
Added examples/say-larson.
> > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | #!/usr/bin/env tclsh # -*- tcl -*- package require Tcl 8.5 package require cmdr::say # larson scanner set B [cmdr say animate -phases [cmdr say larson-phases 9 ***]] while {1} { after 100 cmdr say rewind $B step # NOTE: putting the rewind after the step means that we will # see the animation output only for a split second and the # erased/empty line for the 100 milli delay => the terminal # will look empty, with nothing happening. } exit |
Added examples/say-larson-phases.
> > > > > > > > | 1 2 3 4 5 6 7 8 | #!/usr/bin/env tclsh # -*- tcl -*- package require Tcl 8.5 package require cmdr::say puts |[join [cmdr say larson-phases 23 ***] |\n|]| exit |
Added examples/say-percent.
> > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | #!/usr/bin/env tclsh # -*- tcl -*- package require Tcl 8.5 package require cmdr::say # percent progress counter set B [cmdr say percent -max 10000 -digits 2] set i 0 cmdr say add "upload ... " cmdr say lock-prefix while {$i < 10000} { # # fake upload, sync ... actual use: # - fcopy callback, # - http progress-callback # - tcllib transfer callback after 10 # cmdr say rewind incr i $B step $i } exit |
Added examples/say-progress-1.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | #!/usr/bin/env tclsh # -*- tcl -*- package require Tcl 8.5 package require cmdr::say # percent progress bar set B [cmdr say progress -max 1000 -width 50] set C [cmdr say percent -max 1000] set i 0 cmdr say add "upload ... " cmdr say lock-prefix while {$i < 1000} { # # fake upload, sync ... actual use: # - fcopy callback, # - http progress-callback # - tcllib transfer callback after 10 # cmdr say rewind incr i cmdr say add \[ $B step $i cmdr say add \] cmdr say add { } $C step $i } #after 10 #cmdr say rewind cmdr say line { OK} exit |
Added examples/say-progress-2.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | #!/usr/bin/env tclsh # -*- tcl -*- package require Tcl 8.5 package require cmdr::say # percent progress bar, full width set C [cmdr say percent -max 1000] set n [string length "upload ... \[\] "] incr n [$C width] set B [cmdr say progress -max 1000 -width -$n] set i 0 cmdr say add "upload ... " cmdr say lock-prefix while {$i < 1000} { # # fake upload, sync ... actual use: # - fcopy callback, # - http progress-callback # - tcllib transfer callback after 10 # cmdr say rewind incr i $C step $i cmdr say add { } cmdr say add \[ $B step $i cmdr say add \] } after 1000 cmdr say rewind cmdr say line { OK} exit |
Added examples/say-progress-phases.
> > > > > > > > | 1 2 3 4 5 6 7 8 | #!/usr/bin/env tclsh # -*- tcl -*- package require Tcl 8.5 package require cmdr::say puts |[join [cmdr say progress-phases 6 * ^] |\n|]| exit |
Added examples/say-pulse.
> > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | #!/usr/bin/env tclsh # -*- tcl -*- package require Tcl 8.5 package require cmdr::say # infinite pulse - semi-barberpole set B [cmdr say animate \ -phases [cmdr say pulse-phases 3 [cmdr color {bg-blue white} *]]] while {1} { after 100 cmdr say rewind $B step } exit |
Added examples/say-pulse-phases-1.
> > > > > > > > | 1 2 3 4 5 6 7 8 | #!/usr/bin/env tclsh # -*- tcl -*- package require Tcl 8.5 package require cmdr::say puts |[join [cmdr say pulse-phases 6 *] |\n|]| exit |
Added examples/say-pulse-phases-2.
> > > > > > > > | 1 2 3 4 5 6 7 8 | #!/usr/bin/env tclsh # -*- tcl -*- package require Tcl 8.5 package require cmdr::say puts |[join [cmdr say pulse-phases 3 [cmdr color red .]] |\n|]| exit |
Added examples/say-slider.
> > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | #!/usr/bin/env tclsh # -*- tcl -*- package require Tcl 8.5 package require cmdr::say # infinite slider - semi-barberpole set B [cmdr say animate -phases [cmdr say slider-phases 9 ***]] while {1} { after 100 cmdr say rewind $B step } exit |
Added examples/say-slider-phases.
> > > > > > > > | 1 2 3 4 5 6 7 8 | #!/usr/bin/env tclsh # -*- tcl -*- package require Tcl 8.5 package require cmdr::say puts |[join [cmdr say slider-phases 9 ***] |\n|]| exit |
Deleted say-ex.tcl.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |