Overview
Comment: | Updated to support creating a wiki page for the Tcl Nano manual page |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
3bf973af2195e0632b5fab8fb470b475 |
User & Date: | rkeene on 2018-07-09 16:52:24 |
Other Links: | manifest | tags |
Context
2018-07-09
| ||
22:12 | Include download page in wiki pages updated check-in: 333c671a3a user: rkeene tags: trunk | |
16:52 | Updated to support creating a wiki page for the Tcl Nano manual page check-in: 3bf973af21 user: rkeene tags: trunk | |
15:33 | Updated man page check-in: c0dd083188 user: rkeene tags: trunk | |
Changes
Added build/update-wiki version [044a2d83b9].
> > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | #! /usr/bin/env bash set -e cd "$(dirname "${BASH_SOURCE[0]}")/.." tclNanoVersion=0.1 tclNanoReleaseDate='09-Jul-2018' wikiPageManual='Manual' manPage="$(groff -mandoc -Thtml nano.man | sed -r 's@</*(body|html)( [^>]*|)>@@g;/<head>/,/<\/head>/ d' | sed "s/@@VERS@@/${tclNanoVersion}/g;s/@@SHORT_DATE@@/${tclNanoRelaseDate}/g" | sed 's/\[/\[/g;s/\]/\]/' | tail -n +5)" oldManPage="$(fossil wiki export "${wikiPageManual}" 2>/dev/null)" || oldManPage='' if [ "${oldManPage}" != "${manPage}" ]; then echo "${manPage}" | fossil wiki commit --mimetype text/x-fossil-wiki "${wikiPageManual}" || \ echo "${manPage}" | fossil wiki create --mimetype text/x-fossil-wiki "${wikiPageManual}" fi exit 0 |
Modified nano.man from [f7be80da2e] to [df544245cb].
︙ | ︙ | |||
19 20 21 22 23 24 25 26 27 28 29 30 31 32 | .. .de JB If the optional .B -json argument is used and specified as true the result is a JSON representation, otherwise a Tcl dict representation is used. .. .PU .TH NANO N "@@SHORT_DATE@@" "nano @@VERS@@" .SH NAME nano \- Tcl bindings for Nano .SH SYNOPSIS .B nano:: | > > > > > > > > | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | .. .de JB If the optional .B -json argument is used and specified as true the result is a JSON representation, otherwise a Tcl dict representation is used. .. .de RR The .I representation portion of the command name may be one of .B dict or .BR json . .. .PU .TH NANO N "@@SHORT_DATE@@" "nano @@VERS@@" .SH NAME nano \- Tcl bindings for Nano .SH SYNOPSIS .B nano:: |
︙ | ︙ | |||
415 416 417 418 419 420 421 422 423 424 425 426 427 428 | .SS Low-level Block .TP .BI ::nano::block:: representation ::toBlock .I blockRepresentation .RI " -> " blockData Converts from one of the internal representations (either Tcl dictionary or JSON) to a Nano block. .TP .B ::nano::block::json::fromDict .I blockDict .RI " -> " blockJSON Converts from a Tcl dictionary representation to a JSON representation of a block. | > | 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 | .SS Low-level Block .TP .BI ::nano::block:: representation ::toBlock .I blockRepresentation .RI " -> " blockData Converts from one of the internal representations (either Tcl dictionary or JSON) to a Nano block. .RR .TP .B ::nano::block::json::fromDict .I blockDict .RI " -> " blockJSON Converts from a Tcl dictionary representation to a JSON representation of a block. |
︙ | ︙ | |||
440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 | .RB ? -xrb | -nano ? .XI ? -type= blockType ? .XI ? -signKey= privateKey ? .RI " -> " blockRepresentation Parses a Nano block and returns either a Tcl dictionary or a JSON object. .XN .TP .BI ::nano::block:: representation ::sign .I blockRepresentation .I privateKey .RB ? -update | -signature " ?" -hex | binary ?? .RI " -> " signature | blockJSON Sign a block, in either Tcl dictionary or JSON representation, with the specified .IR privateKey . If the .B -update option is used, return the object with the updated attribute. If the .B -signature option is used, return just the signature. .HB .TP .BI ::nano::block:: representation ::verifySignature .I blockRepresentation .RI " -> " boolean Verify the signature on a block, in either Tcl dictionary or JSON representation, matches the public key specified in the .B account attribute of that object. This may not work correctly for old-style blocks unless you manually add the .B account attribute. .TP .BI ::nano::block:: representation ::work .I blockRepresentation .RB ? -update | -work " ?" -hex | binary ?? .RI " -> " work | blockRepresentation Generate proof-of-work (PoW) required to submit a given block to the network. Nano uses PoW to increase the cost of submitting blocks to the network to cut down on spam. The .I work that is computed is based on the hash of the previous block on this chain, or if there is no previous block on this chain (i.e., because it is the first block on an account) the public key of the account. If the .B -update option is used, return the object with the updated attribute. If the .B -work option is used, just return the work. .HB .TP .BI ::nano::block:: representation ::validateWork .I blockRepresentation .RI " -> " boolean Validate the proof-of-work (PoW) in the object specified as .I blockRepresentation with the attribute .B work is valid for the block passed in. .TP .B ::nano::block::hash .I blockData .RB ? -hex | -binary ? .RI " -> " blockHash | > > > > > | 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 | .RB ? -xrb | -nano ? .XI ? -type= blockType ? .XI ? -signKey= privateKey ? .RI " -> " blockRepresentation Parses a Nano block and returns either a Tcl dictionary or a JSON object. .XN .RR .TP .BI ::nano::block:: representation ::sign .I blockRepresentation .I privateKey .RB ? -update | -signature " ?" -hex | binary ?? .RI " -> " signature | blockJSON Sign a block, in either Tcl dictionary or JSON representation, with the specified .IR privateKey . If the .B -update option is used, return the object with the updated attribute. If the .B -signature option is used, return just the signature. .HB .RR .TP .BI ::nano::block:: representation ::verifySignature .I blockRepresentation .RI " -> " boolean Verify the signature on a block, in either Tcl dictionary or JSON representation, matches the public key specified in the .B account attribute of that object. This may not work correctly for old-style blocks unless you manually add the .B account attribute. .RR .TP .BI ::nano::block:: representation ::work .I blockRepresentation .RB ? -update | -work " ?" -hex | binary ?? .RI " -> " work | blockRepresentation Generate proof-of-work (PoW) required to submit a given block to the network. Nano uses PoW to increase the cost of submitting blocks to the network to cut down on spam. The .I work that is computed is based on the hash of the previous block on this chain, or if there is no previous block on this chain (i.e., because it is the first block on an account) the public key of the account. If the .B -update option is used, return the object with the updated attribute. If the .B -work option is used, just return the work. .HB .RR .TP .BI ::nano::block:: representation ::validateWork .I blockRepresentation .RI " -> " boolean Validate the proof-of-work (PoW) in the object specified as .I blockRepresentation with the attribute .B work is valid for the block passed in. .RR .TP .B ::nano::block::hash .I blockData .RB ? -hex | -binary ? .RI " -> " blockHash |
︙ | ︙ | |||
871 872 873 874 875 876 877 | set seed [::nano::key::newSeed -hex] puts "Generated seed: $seed" for {set index 0} {$index < 10} {incr index} { set accountPrivateKey [::nano::key::fromSeed $seed $index -hex] set accountAddress [::nano::address::fromPrivateKey $accountPrivateKey] | < | 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 | set seed [::nano::key::newSeed -hex] puts "Generated seed: $seed" for {set index 0} {$index < 10} {incr index} { set accountPrivateKey [::nano::key::fromSeed $seed $index -hex] set accountAddress [::nano::address::fromPrivateKey $accountPrivateKey] puts " - $index: $accountAddress" } .EE .SS Example 2 .SS Example 3 .SH AUTHOR .Sp Roy Keene .RI < rkeene@nano.org > |