Julian Noble
12 months ago
139 changed files with 4270 additions and 764 deletions
@ -1,29 +0,0 @@
|
||||
::lindex tcl;#\ |
||||
@call tclsh "%~dp0%~n0.bat" %* & goto :eof |
||||
# --- --- --- --- --- --- --- --- --- --- --- --- ---begin Tcl |
||||
# -*- tcl -*- |
||||
# @@ Meta Begin |
||||
# Application dtplite 1.0.5 |
||||
# Meta platform tcl |
||||
# Meta summary Lightweight DocTools Processor |
||||
# Meta description This application is a simple processor |
||||
# Meta description for documents written in the doctools |
||||
# Meta description markup language. It covers the most |
||||
# Meta description common use cases, but is not as |
||||
# Meta description configurable as its big brother dtp. |
||||
# Meta category Processing doctools documents |
||||
# Meta subject doctools doctoc docidx |
||||
# Meta require {dtplite 1.0.5} |
||||
# Meta author Andreas Kupries |
||||
# Meta license BSD |
||||
# @@ Meta End |
||||
|
||||
package require dtplite 1.0.5 |
||||
|
||||
# dtp lite - Lightweight DocTools Processor |
||||
# ======== = ============================== |
||||
|
||||
exit [dtplite::do $argv] |
||||
|
||||
# ### ### ### ######### ######### ######### |
||||
exit |
@ -1,28 +0,0 @@
|
||||
#! /usr/bin/env tclsh |
||||
# -*- tcl -*- |
||||
|
||||
# @@ Meta Begin |
||||
# Application dtplite 1.0.5 |
||||
# Meta platform tcl |
||||
# Meta summary Lightweight DocTools Processor |
||||
# Meta description This application is a simple processor |
||||
# Meta description for documents written in the doctools |
||||
# Meta description markup language. It covers the most |
||||
# Meta description common use cases, but is not as |
||||
# Meta description configurable as its big brother dtp. |
||||
# Meta category Processing doctools documents |
||||
# Meta subject doctools doctoc docidx |
||||
# Meta require {dtplite 1.0.5} |
||||
# Meta author Andreas Kupries |
||||
# Meta license BSD |
||||
# @@ Meta End |
||||
|
||||
package require dtplite 1.0.5 |
||||
|
||||
# dtp lite - Lightweight DocTools Processor |
||||
# ======== = ============================== |
||||
|
||||
exit [dtplite::do $argv] |
||||
|
||||
# ### ### ### ######### ######### ######### |
||||
exit |
@ -1,46 +0,0 @@
|
||||
::lindex tcl;#\ |
||||
@call tclsh "%~dp0%~n0.bat" %* & goto :eof |
||||
# --- --- --- --- --- --- --- --- --- --- --- --- ---begin Tcl |
||||
#!/usr/bin/env C:/tcl/bin/tclsh.exe |
||||
# -*- tcl -*- |
||||
# # ## ### ##### ######## ############# ##################### |
||||
## Kettle application |
||||
|
||||
# @@ Meta Begin |
||||
# Application kettle 1 |
||||
# Meta author {Andreas Kupries} |
||||
# Meta build::by jnoble |
||||
# Meta build::date 2023-07-20 |
||||
# Meta category Builder/Developer support |
||||
# Meta description Kettle is a system to make building Tcl packages quick |
||||
# Meta description and easy. More importantly, possibly, to make writing |
||||
# Meta description the build system for Tcl packages easy. As such kettle |
||||
# Meta description is several things: (1) A DSL helping you to write build |
||||
# Meta description systems for your packages. (2) A package implementing |
||||
# Meta description this DSL. (3) An application which can serve as the |
||||
# Meta description interpreter for a build file containing commands in the |
||||
# Meta description above DSL. |
||||
# Meta location https://core.tcl.tk/akupries/kettle |
||||
# Meta platform tcl |
||||
# Meta require {Tcl 8.5-} |
||||
# Meta require kettle |
||||
# Meta subject {build support} critcl teapot {meta data} doctools |
||||
# Meta subject diagram |
||||
# Meta summary Build support application. |
||||
# Meta vc::revision fatal: No annotated tags can describe |
||||
# Meta vc::revision '96a08d425f3f151966cea8a0005758fd97115958'. |
||||
# Meta vc::system git |
||||
# @@ Meta End |
||||
|
||||
apply {{self} { |
||||
set selfdir [file dirname $self] |
||||
if {[file exists $selfdir/kettle.tcl]} { |
||||
# Look for a local copy first, for when we install ourselves. |
||||
source $selfdir/kettle.tcl |
||||
} else { |
||||
# use the installed core. |
||||
package require kettle |
||||
} |
||||
kettle::option::set @kettle $self |
||||
kettle::Application |
||||
}} [file dirname [file normalize [info script]/__]] |
@ -0,0 +1,71 @@
|
||||
|
||||
# -*- tcl -* |
||||
# Maintenance Instruction: leave the 999999.xxx.x as is and use 'pmix make' or src/make.tcl to update from <pkg>-buildversion.txt |
||||
# |
||||
# Please consider using a BSD or MIT style license for greatest compatibility with the Tcl ecosystem. |
||||
# Code using preferred Tcl licenses can be eligible for inclusion in Tcllib, Tklib and the punk package repository. |
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
# (C) 2023 |
||||
# |
||||
# @@ Meta Begin |
||||
# Application punk::docgen 0.1.0 |
||||
# Meta platform tcl |
||||
# Meta license BSD |
||||
# @@ Meta End |
||||
|
||||
|
||||
|
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
## Requirements |
||||
##e.g package require frobz |
||||
|
||||
package require punk::repo |
||||
|
||||
|
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
namespace eval punk::docgen { |
||||
proc get_doctools_comments {fname} { |
||||
#does no validation of doctools commands |
||||
#existence of string match #\**!doctools is taken as evidence enough that the file has inline doctools - review |
||||
if {![file exists $fname]} { |
||||
error "get_doctools_comments file '$fname' not found" |
||||
} |
||||
set fd [open $fname r] |
||||
set data [read $fd] |
||||
close $fd |
||||
if {![string match "*#\**!doctools*" $data]} { |
||||
return |
||||
} |
||||
set data [string map [list \r\n \n] $data] |
||||
set in_doctools 0 |
||||
set doctools "" |
||||
foreach ln [split $data \n] { |
||||
set ln [string trim $ln] |
||||
if {$in_doctools && [string index $ln 0] != "#"} { |
||||
set in_doctools 0 |
||||
} elseif {[string range $ln 0 1] == "#*"} { |
||||
#todo - process doctools ordering hints in tail of line |
||||
set in_doctools 1 |
||||
} elseif {$in_doctools} { |
||||
append doctools [string range $ln 1 end] \n |
||||
} |
||||
} |
||||
return $doctools |
||||
} |
||||
#todo - proc autogen_doctools_comments {fname} {} |
||||
# - will probably need to use something like parsetcl - as we won't be able to reliably source in an interp without side-effects and use info body etc. |
||||
# - mechanism will be to autodocument namespaces, procs, methods where no #*** doctools indication present - but use existing doctools comments for that particular item if it is present. |
||||
|
||||
|
||||
|
||||
} |
||||
|
||||
|
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
## Ready |
||||
package provide punk::docgen [namespace eval punk::docgen { |
||||
variable pkg punk::docgen |
||||
variable version |
||||
set version 0.1.0 |
||||
}] |
||||
return |
@ -0,0 +1,397 @@
|
||||
# -*- tcl -*- |
||||
# Maintenance Instruction: leave the 999999.xxx.x as is and use 'pmix make' or src/make.tcl to update from <pkg>-buildversion.txt |
||||
# |
||||
# Please consider using a BSD or MIT style license for greatest compatibility with the Tcl ecosystem. |
||||
# Code using preferred Tcl licenses can be eligible for inclusion in Tcllib, Tklib and the punk package repository. |
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
# (C) 2023 |
||||
# |
||||
# @@ Meta Begin |
||||
# Application punk::path 0.1.0 |
||||
# Meta platform tcl |
||||
# Meta license <unspecified> |
||||
# @@ Meta End |
||||
|
||||
|
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
# doctools header |
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
#*** !doctools |
||||
#[manpage_begin punkshell_module_punk::path 0 0.1.0] |
||||
#[copyright "2023"] |
||||
#[titledesc {Filesystem path utilities}] [comment {-- Name section and table of contents description --}] |
||||
#[moddesc {punk path filesystem utils}] [comment {-- Description at end of page heading --}] |
||||
#[require punk::path] |
||||
#[description] |
||||
#[keywords module path filesystem] |
||||
|
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
|
||||
#*** !doctools |
||||
#[section Overview] |
||||
#[para] overview of punk::path |
||||
#[para] Filesystem path utility functions |
||||
#[subsection Concepts] |
||||
#[para] - |
||||
|
||||
|
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
## Requirements |
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
|
||||
#*** !doctools |
||||
#[subsection dependencies] |
||||
#[para] packages used by punk::path |
||||
#[list_begin itemized] |
||||
|
||||
package require Tcl 8.6 |
||||
#*** !doctools |
||||
#[item] [package {Tcl 8.6}] |
||||
|
||||
# #package require frobz |
||||
# #*** !doctools |
||||
# #[item] [package {frobz}] |
||||
|
||||
#*** !doctools |
||||
#[list_end] |
||||
|
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
|
||||
#*** !doctools |
||||
#[section API] |
||||
|
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
# oo::class namespace |
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
namespace eval punk::path::class { |
||||
#*** !doctools |
||||
#[subsection {Namespace punk::path::class}] |
||||
#[para] class definitions |
||||
if {[info commands [namespace current]::interface_sample1] eq ""} { |
||||
#*** !doctools |
||||
#[list_begin enumerated] |
||||
|
||||
# oo::class create interface_sample1 { |
||||
# #*** !doctools |
||||
# #[enum] CLASS [class interface_sample1] |
||||
# #[list_begin definitions] |
||||
|
||||
# method test {arg1} { |
||||
# #*** !doctools |
||||
# #[call class::interface_sample1 [method test] [arg arg1]] |
||||
# #[para] test method |
||||
# puts "test: $arg1" |
||||
# } |
||||
|
||||
# #*** !doctools |
||||
# #[list_end] [comment {-- end definitions interface_sample1}] |
||||
# } |
||||
|
||||
#*** !doctools |
||||
#[list_end] [comment {--- end class enumeration ---}] |
||||
} |
||||
} |
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
|
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
# Base namespace |
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
namespace eval punk::path { |
||||
namespace export * |
||||
#variable xyz |
||||
|
||||
#*** !doctools |
||||
#[subsection {Namespace punk::path}] |
||||
#[para] Core API functions for punk::path |
||||
#[list_begin definitions] |
||||
|
||||
|
||||
proc pathglob_as_re {pathglob} { |
||||
#*** !doctools |
||||
#[call [fun pathglob_as_re] [arg pathglob]] |
||||
#[para] Returns a regular expression for matching a path to a glob pattern which can contain glob chars *|? in any segment of the path structure |
||||
#[para] ** matches any number of subdirectories. |
||||
#[para] e.g /etc/**/*.txt will match any .txt files at any depth below /etc (except directly within /etc itself) |
||||
#[para] e.g /etc/**.txt will match any .txt files at any depth below /etc |
||||
#[para] any segment that does not contain ** must match exactly one segment in the path |
||||
#[para] e.g the glob /etc/*/*.doc - will match any .doc files that are exactly one tree level below /etc |
||||
#[para] The pathglob doesn't have to contain glob characters, in which case the returned regex will match the pathglob exactly as specified. |
||||
#[para] Regular expression syntax is deliberateley not supported within the pathglob string so that supplied regex characters will be treated as literals |
||||
|
||||
|
||||
#todo - consider whether a way to escape the glob chars ? * is practical - to allow literals ? * |
||||
# - would require counting immediately-preceding backslashes |
||||
set pats [list] |
||||
foreach seg [file split $pathglob] { |
||||
if {[string range $seg end end] eq "/"} { |
||||
set seg [string range $seg 0 end-1] ;# e.g c:/ -> c: / -> "" so that join at end doesn't double up |
||||
} |
||||
if {$seg eq "*"} { |
||||
lappend pats {[^/]*} |
||||
} elseif {$seg eq "**"} { |
||||
lappend pats {.*} |
||||
} else { |
||||
set seg [string map [list {^ {\^} $ {\$} [} {\[} ( {\(} \{ \\\{ \\ {\\}] $seg] ;#treat regex characters in the input as literals |
||||
set seg [string map [list . {[.]}] $seg] |
||||
if {[regexp {[*?]} $seg]} { |
||||
set pat [string map [list ** {.*} * {[^/]*} ? {[^/]}] $seg] |
||||
lappend pats "$pat" |
||||
} else { |
||||
lappend pats "$seg" |
||||
} |
||||
} |
||||
} |
||||
return "^[join $pats /]\$" |
||||
} |
||||
proc globmatchpath {pathglob path args} { |
||||
#*** !doctools |
||||
#[call [fun globmatchpath] [arg pathglob] [arg path] [opt {option value...}]] |
||||
#[para] Return true if the pathglob matches the path |
||||
#[para] see [fun pathglob_as_re] for pathglob description |
||||
#[para] Caller must ensure that file separator is forward slash. (e.g use file normalize on windows) |
||||
#[para] |
||||
#[para] Known options: |
||||
#[para] -nocase 0|1 (default 0 - case sensitive) |
||||
#[para] If -nocase is not supplied - default to case sensitive *except for driveletter* |
||||
#[para] ie - the driveletter alone in paths such as c:/etc will still be case insensitive. (ie c:/ETC/* will match C:/ETC/blah but not C:/etc/blah) |
||||
#[para] Explicitly specifying -nocase 0 will require the entire case to match including the driveletter. |
||||
|
||||
set defaults [dict create\ |
||||
-nocase \uFFFF\ |
||||
] |
||||
set known_opts [dict keys $defaults] |
||||
set opts [dict merge $defaults $args] |
||||
dict for {k v} $args { |
||||
if {$k ni $known_opts} { |
||||
error "Unrecognised options $k - known options: $known_opts" |
||||
} |
||||
} |
||||
# -- --- --- --- --- --- |
||||
set opt_nocase [dict get $opts -nocase] |
||||
set explicit_nocase 1 ;#default to disprove |
||||
if {$opt_nocase eq "\uFFFF"} { |
||||
set opt_nocase 0 |
||||
set explicit_nocase 0 |
||||
} |
||||
# -- --- --- --- --- --- |
||||
if {$opt_nocase} { |
||||
return [regexp -nocase [pathglob_as_re $pathglob] $path] |
||||
} else { |
||||
set re [pathglob_as_re $pathglob] |
||||
if {$explicit_nocase} { |
||||
set ismatch [regexp $re $path] ;#explicit -nocase 0 - require exact match of path literals including driveletter |
||||
} else { |
||||
#caller is using default for -nocase - which indicates case sensitivity - but we have an exception for the driveletter. |
||||
set re_segments [file split $re] ;#Note that file split c:/etc gives {c:/ etc} but file split ^c:/etc gives {^c: etc} |
||||
set first_seg [lindex $re_segments 0] |
||||
if {[regexp {^\^(.{1}):$} $first_seg _match driveletter]} { |
||||
#first part of re is like "^c:" i.e a drive letter |
||||
set chars [string tolower $driveletter][string toupper $driveletter] |
||||
set re [join [concat "^\[$chars\]:" [lrange $re_segments 1 end]] /] ;#rebuild re with case insensitive driveletter only - use join - not file join. file join will misinterpret leading re segment. |
||||
} |
||||
#puts stderr "-->re: $re" |
||||
set ismatch [regexp $re $path] |
||||
} |
||||
} |
||||
return $ismatch |
||||
} |
||||
|
||||
#todo - implement treefiles which acts like dirfiles but allows path globbing in the same way as punk::ns::ns/ |
||||
#then review if treefiles can replace dirfiles or if both should exist (dirfiles can have literal glob chars in path segments - but that is a rare usecase) |
||||
proc treefilenames {basepath tailglob args} { |
||||
#*** !doctools |
||||
#[call [fun treefilenames] [arg basepath] [arg tailglob] [opt {option value...}]] |
||||
#basic (glob based) list of filenames matching tailglob - recursive |
||||
#no natsorting - so order is dependent on filesystem |
||||
set defaults [dict create\ |
||||
-call-depth-internal 0\ |
||||
-antiglob_paths {}\ |
||||
] |
||||
set opts [dict merge $defaults $args] |
||||
set opt_antiglob_paths [dict get $opts -antiglob_paths] |
||||
set CALLDEPTH [dict get $opts -call-depth-internal] |
||||
|
||||
set files [list] |
||||
if {$CALLDEPTH == 0} { |
||||
if {![file isdirectory $basepath]} { |
||||
return [list] |
||||
} |
||||
} |
||||
|
||||
set skip 0 |
||||
foreach anti $opt_antiglob_paths { |
||||
if {[globmatchpath $anti $basepath]} { |
||||
set skip 1 |
||||
break |
||||
} |
||||
} |
||||
if {$skip} { |
||||
return [list] |
||||
} |
||||
|
||||
#todo - account for vfs where matched path could appear to be a directory but is mounted so could be a desired match? |
||||
set dirfiles [glob -nocomplain -dir $basepath -type f $tailglob] |
||||
lappend files {*}$dirfiles |
||||
set dirdirs [glob -nocomplain -dir $basepath -type d *] |
||||
foreach dir $dirdirs { |
||||
set skip 0 |
||||
foreach anti $opt_antiglob_paths { |
||||
if {[globmatchpath $anti $dir]} { |
||||
set skip 1 |
||||
break |
||||
} |
||||
} |
||||
if {$skip} { |
||||
continue |
||||
} |
||||
set nextargs [dict merge $args [list -call-depth-internal [incr CALLDEPTH]]] |
||||
lappend files {*}[treefilenames $dir $tailglob {*}$nextargs] |
||||
} |
||||
return $files |
||||
} |
||||
|
||||
#maint warning - also in punkcheck |
||||
proc relative {reference location} { |
||||
#*** !doctools |
||||
#[call [fun relative] [arg reference] [arg location]] |
||||
#[para] Taking two directory paths, a reference and a location, computes the path |
||||
# of the location relative to the reference. |
||||
#[list_begin itemized] |
||||
#[item] |
||||
#[para] Arguments: |
||||
# [list_begin arguments] |
||||
# [arg_def string reference] The path from which the relative path to location is determined. |
||||
# [arg_def string location] The location path which may be above or below the reference path |
||||
# [list_end] |
||||
#[item] |
||||
#[para] Results: |
||||
#[para] The relative path of the location to the reference path. |
||||
#[para] Will return a single dot "." if the paths are the same |
||||
#[item] |
||||
#[para] Notes: |
||||
#[para] Both paths must be the same type - ie both absolute or both relative |
||||
#[para] Case sensitive. ie relative /etc /etC |
||||
# will return ../etC |
||||
#[para] On windows, the drive-letter component (only) is not case sensitive |
||||
#[para] ie relative c:/etc C:/etc returns . |
||||
#[para] but relative c:/etc C:/Etc returns ../Etc |
||||
#[para] On windows, if the paths are absolute and specifiy different volumes, only the location will be returned. |
||||
# ie relative c:/etc d:/etc/blah |
||||
# returns d:/etc/blah |
||||
#[list_end] |
||||
|
||||
#see also kettle |
||||
# Modified copy of ::fileutil::relative (tcllib) |
||||
# Adapted to 8.5 ({*}). |
||||
|
||||
#review - check volume info on windows.. UNC paths? |
||||
if {[file pathtype $reference] ne [file pathtype $location]} { |
||||
return -code error "Unable to compute relation for paths of different pathtypes: [file pathtype $reference] vs. [file pathtype $location], ($reference vs. $location)" |
||||
} |
||||
|
||||
#avoid normalizing if possible (file normalize *very* expensive on windows) |
||||
set do_normalize 0 |
||||
if {[file pathtype $reference] eq "relative"} { |
||||
#if reference is relative so is location |
||||
if {[regexp {[.]{2}} [list $reference $location]]} { |
||||
set do_normalize 1 |
||||
} |
||||
if {[regexp {[.]/} [list $reference $location]]} { |
||||
set do_normalize 1 |
||||
} |
||||
} else { |
||||
set do_normalize 1 |
||||
} |
||||
if {$do_normalize} { |
||||
set reference [file normalize $reference] |
||||
set location [file normalize $location] |
||||
} |
||||
|
||||
set save $location |
||||
set reference [file split $reference] |
||||
set location [file split $location] |
||||
|
||||
while {[lindex $location 0] eq [lindex $reference 0]} { |
||||
set location [lrange $location 1 end] |
||||
set reference [lrange $reference 1 end] |
||||
if {![llength $location]} {break} |
||||
} |
||||
|
||||
set location_len [llength $location] |
||||
set reference_len [llength $reference] |
||||
|
||||
if {($location_len == 0) && ($reference_len == 0)} { |
||||
# Cases: |
||||
# (a) reference == location |
||||
|
||||
set location . |
||||
} else { |
||||
# Cases: |
||||
# (b) ref is: ref/sub = sub |
||||
# loc is: ref = {} |
||||
|
||||
# (c) ref is: ref = {} |
||||
# loc is: ref/sub = sub |
||||
|
||||
while {$reference_len > 0} { |
||||
set location [linsert $location 0 ..] |
||||
incr reference_len -1 |
||||
} |
||||
set location [file join {*}$location] |
||||
} |
||||
return $location |
||||
} |
||||
|
||||
|
||||
|
||||
#*** !doctools |
||||
#[list_end] [comment {--- end definitions namespace punk::path ---}] |
||||
} |
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
|
||||
|
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
# Secondary API namespace |
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
namespace eval punk::path::lib { |
||||
namespace export * |
||||
namespace path [namespace parent] |
||||
#*** !doctools |
||||
#[subsection {Namespace punk::path::lib}] |
||||
#[para] Secondary functions that are part of the API |
||||
#[list_begin definitions] |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#*** !doctools |
||||
#[list_end] [comment {--- end definitions namespace punk::path::lib ---}] |
||||
} |
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
|
||||
|
||||
|
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
#*** !doctools |
||||
#[section Internal] |
||||
namespace eval punk::path::system { |
||||
#*** !doctools |
||||
#[subsection {Namespace punk::path::system}] |
||||
#[para] Internal functions that are not part of the API |
||||
|
||||
|
||||
|
||||
} |
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
## Ready |
||||
package provide punk::path [namespace eval punk::path { |
||||
variable pkg punk::path |
||||
variable version |
||||
set version 0.1.0 |
||||
}] |
||||
return |
||||
|
||||
#*** !doctools |
||||
#[manpage_end] |
||||
|
@ -0,0 +1,3 @@
|
||||
[section Changes] |
||||
[include changes_0.1.inc] |
||||
|
@ -0,0 +1,28 @@
|
||||
[subsection {Changes for version 0.1}] |
||||
|
||||
This release 0.1 of project punkshell |
||||
|
||||
[para] Summary |
||||
[list_begin enumerated] |
||||
[enum] feature 1 |
||||
[enum] feature 2 |
||||
[list_end] |
||||
|
||||
|
||||
[para] In detail: |
||||
[list_begin enumerated] |
||||
[comment {- - -- --- ----- -------- ------------- ---------------------}] |
||||
|
||||
[enum] punkshell requires Tcl 8.6 or higher. Tcl 8.5 or less is not |
||||
supported. |
||||
|
||||
[comment {- - -- --- ----- -------- ------------- ---------------------}] |
||||
|
||||
[enum] |
||||
|
||||
[comment {- - -- --- ----- -------- ------------- ---------------------}] |
||||
[list_end] |
||||
|
||||
|
||||
|
||||
[comment {- - -- --- ----- -------- ------------- ---------------------}] |
@ -0,0 +1,18 @@
|
||||
[comment {-*- tcl -*- --- !doctools --- manpage}] |
||||
[comment {- - -- --- ----- -------- ------------- ---------------------}] |
||||
[section {Bugs, Ideas, Feedback}] |
||||
[vset project_tracker https://gitea1.intx.com.au/jn/punkshell/issues] |
||||
[vset project_email julian+punkshell@precisium.com.au] |
||||
|
||||
This document, and the package it describes, will undoubtedly contain |
||||
bugs and other problems. |
||||
|
||||
Please report such at the |
||||
[uri [vset project_tracker] {punkshell tracker}]. |
||||
|
||||
Please also report any ideas for enhancements you may have for either |
||||
package and/or documentation. |
||||
|
||||
Contact: [uri mailto:[vset project_email] [vset project_email]] |
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
[comment {-*- tcl -*- --- !doctools --- manpage}] |
||||
[comment {- -- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---}] |
||||
[moddesc {punkshell - a Tcl }] |
||||
[moddesc {punkshell - a Tcl project}] |
||||
[category {shell}] |
||||
[keywords shell repl punk] |
||||
[require Tcl 8.6] |
||||
|
@ -0,0 +1,3 @@
|
||||
[comment {Please consider retaining a link to PunkShell to support the project}] |
||||
[vset punkshell_project https://www.gitea1.intx.com.au/jn/punkshell] |
||||
[para] This project uses [uri [vset punkshell_project] {PunkShell}] as a deployment management and documentation tool. |
@ -0,0 +1,15 @@
|
||||
[comment {-*- tcl -*- doctools manpage}] |
||||
[manpage_begin punkshell__project_changes n 8] |
||||
[include include/general.inc] |
||||
[category changelog] [comment {-- override category from general.inc -- }] |
||||
[keywords changelog] [comment {-- additional keyword to those from general.inc --}] |
||||
[titledesc {punkshell Changes}] |
||||
[description] |
||||
[include include/welcome_basic.inc] |
||||
[para] |
||||
This document provides an overview of the changes [package punkshell] |
||||
underwent from version to version. |
||||
|
||||
[include include/changes.inc] |
||||
[include include/feedback.inc] |
||||
[manpage_end] |
@ -0,0 +1,15 @@
|
||||
[comment {-*- tcl -*- doctools manpage}] |
||||
[manpage_begin punkshell__project_intro n 8] |
||||
[include include/general.inc] |
||||
[titledesc {Introduction to punkshell}] |
||||
[description] |
||||
[include include/welcome_basic.inc] |
||||
[para] |
||||
Introduction to punkshell |
||||
|
||||
[include include/feedback.inc] |
||||
|
||||
[comment {Please consider retaining a link to PunkShell to support the project}] |
||||
[include include/punkshell.inc] |
||||
[manpage_end] |
||||
|
@ -0,0 +1,313 @@
|
||||
'\" |
||||
'\" Generated from file 'project_changes\&.man' by tcllib/doctools with format 'nroff' |
||||
'\" |
||||
.TH "punkshell__project_changes" n 8 doc "punkshell - a Tcl project" |
||||
.\" The -*- nroff -*- definitions below are for supplemental macros used |
||||
.\" in Tcl/Tk manual entries. |
||||
.\" |
||||
.\" .AP type name in/out ?indent? |
||||
.\" Start paragraph describing an argument to a library procedure. |
||||
.\" type is type of argument (int, etc.), in/out is either "in", "out", |
||||
.\" or "in/out" to describe whether procedure reads or modifies arg, |
||||
.\" and indent is equivalent to second arg of .IP (shouldn't ever be |
||||
.\" needed; use .AS below instead) |
||||
.\" |
||||
.\" .AS ?type? ?name? |
||||
.\" Give maximum sizes of arguments for setting tab stops. Type and |
||||
.\" name are examples of largest possible arguments that will be passed |
||||
.\" to .AP later. If args are omitted, default tab stops are used. |
||||
.\" |
||||
.\" .BS |
||||
.\" Start box enclosure. From here until next .BE, everything will be |
||||
.\" enclosed in one large box. |
||||
.\" |
||||
.\" .BE |
||||
.\" End of box enclosure. |
||||
.\" |
||||
.\" .CS |
||||
.\" Begin code excerpt. |
||||
.\" |
||||
.\" .CE |
||||
.\" End code excerpt. |
||||
.\" |
||||
.\" .VS ?version? ?br? |
||||
.\" Begin vertical sidebar, for use in marking newly-changed parts |
||||
.\" of man pages. The first argument is ignored and used for recording |
||||
.\" the version when the .VS was added, so that the sidebars can be |
||||
.\" found and removed when they reach a certain age. If another argument |
||||
.\" is present, then a line break is forced before starting the sidebar. |
||||
.\" |
||||
.\" .VE |
||||
.\" End of vertical sidebar. |
||||
.\" |
||||
.\" .DS |
||||
.\" Begin an indented unfilled display. |
||||
.\" |
||||
.\" .DE |
||||
.\" End of indented unfilled display. |
||||
.\" |
||||
.\" .SO ?manpage? |
||||
.\" Start of list of standard options for a Tk widget. The manpage |
||||
.\" argument defines where to look up the standard options; if |
||||
.\" omitted, defaults to "options". The options follow on successive |
||||
.\" lines, in three columns separated by tabs. |
||||
.\" |
||||
.\" .SE |
||||
.\" End of list of standard options for a Tk widget. |
||||
.\" |
||||
.\" .OP cmdName dbName dbClass |
||||
.\" Start of description of a specific option. cmdName gives the |
||||
.\" option's name as specified in the class command, dbName gives |
||||
.\" the option's name in the option database, and dbClass gives |
||||
.\" the option's class in the option database. |
||||
.\" |
||||
.\" .UL arg1 arg2 |
||||
.\" Print arg1 underlined, then print arg2 normally. |
||||
.\" |
||||
.\" .QW arg1 ?arg2? |
||||
.\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). |
||||
.\" |
||||
.\" .PQ arg1 ?arg2? |
||||
.\" Print an open parenthesis, arg1 in quotes, then arg2 normally |
||||
.\" (for trailing punctuation) and then a closing parenthesis. |
||||
.\" |
||||
.\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. |
||||
.if t .wh -1.3i ^B |
||||
.nr ^l \n(.l |
||||
.ad b |
||||
.\" # Start an argument description |
||||
.de AP |
||||
.ie !"\\$4"" .TP \\$4 |
||||
.el \{\ |
||||
. ie !"\\$2"" .TP \\n()Cu |
||||
. el .TP 15 |
||||
.\} |
||||
.ta \\n()Au \\n()Bu |
||||
.ie !"\\$3"" \{\ |
||||
\&\\$1 \\fI\\$2\\fP (\\$3) |
||||
.\".b |
||||
.\} |
||||
.el \{\ |
||||
.br |
||||
.ie !"\\$2"" \{\ |
||||
\&\\$1 \\fI\\$2\\fP |
||||
.\} |
||||
.el \{\ |
||||
\&\\fI\\$1\\fP |
||||
.\} |
||||
.\} |
||||
.. |
||||
.\" # define tabbing values for .AP |
||||
.de AS |
||||
.nr )A 10n |
||||
.if !"\\$1"" .nr )A \\w'\\$1'u+3n |
||||
.nr )B \\n()Au+15n |
||||
.\" |
||||
.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n |
||||
.nr )C \\n()Bu+\\w'(in/out)'u+2n |
||||
.. |
||||
.AS Tcl_Interp Tcl_CreateInterp in/out |
||||
.\" # BS - start boxed text |
||||
.\" # ^y = starting y location |
||||
.\" # ^b = 1 |
||||
.de BS |
||||
.br |
||||
.mk ^y |
||||
.nr ^b 1u |
||||
.if n .nf |
||||
.if n .ti 0 |
||||
.if n \l'\\n(.lu\(ul' |
||||
.if n .fi |
||||
.. |
||||
.\" # BE - end boxed text (draw box now) |
||||
.de BE |
||||
.nf |
||||
.ti 0 |
||||
.mk ^t |
||||
.ie n \l'\\n(^lu\(ul' |
||||
.el \{\ |
||||
.\" Draw four-sided box normally, but don't draw top of |
||||
.\" box if the box started on an earlier page. |
||||
.ie !\\n(^b-1 \{\ |
||||
\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' |
||||
.\} |
||||
.el \}\ |
||||
\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' |
||||
.\} |
||||
.\} |
||||
.fi |
||||
.br |
||||
.nr ^b 0 |
||||
.. |
||||
.\" # VS - start vertical sidebar |
||||
.\" # ^Y = starting y location |
||||
.\" # ^v = 1 (for troff; for nroff this doesn't matter) |
||||
.de VS |
||||
.if !"\\$2"" .br |
||||
.mk ^Y |
||||
.ie n 'mc \s12\(br\s0 |
||||
.el .nr ^v 1u |
||||
.. |
||||
.\" # VE - end of vertical sidebar |
||||
.de VE |
||||
.ie n 'mc |
||||
.el \{\ |
||||
.ev 2 |
||||
.nf |
||||
.ti 0 |
||||
.mk ^t |
||||
\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' |
||||
.sp -1 |
||||
.fi |
||||
.ev |
||||
.\} |
||||
.nr ^v 0 |
||||
.. |
||||
.\" # Special macro to handle page bottom: finish off current |
||||
.\" # box/sidebar if in box/sidebar mode, then invoked standard |
||||
.\" # page bottom macro. |
||||
.de ^B |
||||
.ev 2 |
||||
'ti 0 |
||||
'nf |
||||
.mk ^t |
||||
.if \\n(^b \{\ |
||||
.\" Draw three-sided box if this is the box's first page, |
||||
.\" draw two sides but no top otherwise. |
||||
.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c |
||||
.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c |
||||
.\} |
||||
.if \\n(^v \{\ |
||||
.nr ^x \\n(^tu+1v-\\n(^Yu |
||||
\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c |
||||
.\} |
||||
.bp |
||||
'fi |
||||
.ev |
||||
.if \\n(^b \{\ |
||||
.mk ^y |
||||
.nr ^b 2 |
||||
.\} |
||||
.if \\n(^v \{\ |
||||
.mk ^Y |
||||
.\} |
||||
.. |
||||
.\" # DS - begin display |
||||
.de DS |
||||
.RS |
||||
.nf |
||||
.sp |
||||
.. |
||||
.\" # DE - end display |
||||
.de DE |
||||
.fi |
||||
.RE |
||||
.sp |
||||
.. |
||||
.\" # SO - start of list of standard options |
||||
.de SO |
||||
'ie '\\$1'' .ds So \\fBoptions\\fR |
||||
'el .ds So \\fB\\$1\\fR |
||||
.SH "STANDARD OPTIONS" |
||||
.LP |
||||
.nf |
||||
.ta 5.5c 11c |
||||
.ft B |
||||
.. |
||||
.\" # SE - end of list of standard options |
||||
.de SE |
||||
.fi |
||||
.ft R |
||||
.LP |
||||
See the \\*(So manual entry for details on the standard options. |
||||
.. |
||||
.\" # OP - start of full description for a single option |
||||
.de OP |
||||
.LP |
||||
.nf |
||||
.ta 4c |
||||
Command-Line Name: \\fB\\$1\\fR |
||||
Database Name: \\fB\\$2\\fR |
||||
Database Class: \\fB\\$3\\fR |
||||
.fi |
||||
.IP |
||||
.. |
||||
.\" # CS - begin code excerpt |
||||
.de CS |
||||
.RS |
||||
.nf |
||||
.ta .25i .5i .75i 1i |
||||
.. |
||||
.\" # CE - end code excerpt |
||||
.de CE |
||||
.fi |
||||
.RE |
||||
.. |
||||
.\" # UL - underline word |
||||
.de UL |
||||
\\$1\l'|0\(ul'\\$2 |
||||
.. |
||||
.\" # QW - apply quotation marks to word |
||||
.de QW |
||||
.ie '\\*(lq'"' ``\\$1''\\$2 |
||||
.\"" fix emacs highlighting |
||||
.el \\*(lq\\$1\\*(rq\\$2 |
||||
.. |
||||
.\" # PQ - apply parens and quotation marks to word |
||||
.de PQ |
||||
.ie '\\*(lq'"' (``\\$1''\\$2)\\$3 |
||||
.\"" fix emacs highlighting |
||||
.el (\\*(lq\\$1\\*(rq\\$2)\\$3 |
||||
.. |
||||
.\" # QR - quoted range |
||||
.de QR |
||||
.ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 |
||||
.\"" fix emacs highlighting |
||||
.el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 |
||||
.. |
||||
.\" # MT - "empty" string |
||||
.de MT |
||||
.QW "" |
||||
.. |
||||
.BS |
||||
.SH NAME |
||||
punkshell__project_changes \- punkshell Changes |
||||
.SH SYNOPSIS |
||||
package require \fBTcl 8\&.6\fR |
||||
.sp |
||||
.BE |
||||
.SH DESCRIPTION |
||||
.PP |
||||
Welcome to the punkshell project\&. |
||||
.PP |
||||
This document provides an overview of the changes \fBpunkshell\fR |
||||
underwent from version to version\&. |
||||
.SH CHANGES |
||||
.SS "CHANGES FOR VERSION 0\&.1" |
||||
This release 0\&.1 of project punkshell |
||||
.PP |
||||
Summary |
||||
.IP [1] |
||||
feature 1 |
||||
.IP [2] |
||||
feature 2 |
||||
.PP |
||||
.PP |
||||
In detail: |
||||
.IP [1] |
||||
punkshell requires Tcl 8\&.6 or higher\&. Tcl 8\&.5 or less is not |
||||
supported\&. |
||||
.IP [2] |
||||
.PP |
||||
.SH "BUGS, IDEAS, FEEDBACK" |
||||
This document, and the package it describes, will undoubtedly contain |
||||
bugs and other problems\&. |
||||
Please report such at the |
||||
\fIpunkshell tracker\fR [https://gitea1\&.intx\&.com\&.au/jn/punkshell/issues]\&. |
||||
Please also report any ideas for enhancements you may have for either |
||||
package and/or documentation\&. |
||||
Contact: \fIjulian+punkshell@precisium\&.com\&.au\fR [mailto:julian+punkshell@precisium\&.com\&.au] |
||||
.SH KEYWORDS |
||||
changelog, punk, repl, shell |
||||
.SH CATEGORY |
||||
changelog |
@ -0,0 +1,297 @@
|
||||
'\" |
||||
'\" Generated from file 'project_intro\&.man' by tcllib/doctools with format 'nroff' |
||||
'\" |
||||
.TH "punkshell__project_intro" n 8 doc "punkshell - a Tcl project" |
||||
.\" The -*- nroff -*- definitions below are for supplemental macros used |
||||
.\" in Tcl/Tk manual entries. |
||||
.\" |
||||
.\" .AP type name in/out ?indent? |
||||
.\" Start paragraph describing an argument to a library procedure. |
||||
.\" type is type of argument (int, etc.), in/out is either "in", "out", |
||||
.\" or "in/out" to describe whether procedure reads or modifies arg, |
||||
.\" and indent is equivalent to second arg of .IP (shouldn't ever be |
||||
.\" needed; use .AS below instead) |
||||
.\" |
||||
.\" .AS ?type? ?name? |
||||
.\" Give maximum sizes of arguments for setting tab stops. Type and |
||||
.\" name are examples of largest possible arguments that will be passed |
||||
.\" to .AP later. If args are omitted, default tab stops are used. |
||||
.\" |
||||
.\" .BS |
||||
.\" Start box enclosure. From here until next .BE, everything will be |
||||
.\" enclosed in one large box. |
||||
.\" |
||||
.\" .BE |
||||
.\" End of box enclosure. |
||||
.\" |
||||
.\" .CS |
||||
.\" Begin code excerpt. |
||||
.\" |
||||
.\" .CE |
||||
.\" End code excerpt. |
||||
.\" |
||||
.\" .VS ?version? ?br? |
||||
.\" Begin vertical sidebar, for use in marking newly-changed parts |
||||
.\" of man pages. The first argument is ignored and used for recording |
||||
.\" the version when the .VS was added, so that the sidebars can be |
||||
.\" found and removed when they reach a certain age. If another argument |
||||
.\" is present, then a line break is forced before starting the sidebar. |
||||
.\" |
||||
.\" .VE |
||||
.\" End of vertical sidebar. |
||||
.\" |
||||
.\" .DS |
||||
.\" Begin an indented unfilled display. |
||||
.\" |
||||
.\" .DE |
||||
.\" End of indented unfilled display. |
||||
.\" |
||||
.\" .SO ?manpage? |
||||
.\" Start of list of standard options for a Tk widget. The manpage |
||||
.\" argument defines where to look up the standard options; if |
||||
.\" omitted, defaults to "options". The options follow on successive |
||||
.\" lines, in three columns separated by tabs. |
||||
.\" |
||||
.\" .SE |
||||
.\" End of list of standard options for a Tk widget. |
||||
.\" |
||||
.\" .OP cmdName dbName dbClass |
||||
.\" Start of description of a specific option. cmdName gives the |
||||
.\" option's name as specified in the class command, dbName gives |
||||
.\" the option's name in the option database, and dbClass gives |
||||
.\" the option's class in the option database. |
||||
.\" |
||||
.\" .UL arg1 arg2 |
||||
.\" Print arg1 underlined, then print arg2 normally. |
||||
.\" |
||||
.\" .QW arg1 ?arg2? |
||||
.\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). |
||||
.\" |
||||
.\" .PQ arg1 ?arg2? |
||||
.\" Print an open parenthesis, arg1 in quotes, then arg2 normally |
||||
.\" (for trailing punctuation) and then a closing parenthesis. |
||||
.\" |
||||
.\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. |
||||
.if t .wh -1.3i ^B |
||||
.nr ^l \n(.l |
||||
.ad b |
||||
.\" # Start an argument description |
||||
.de AP |
||||
.ie !"\\$4"" .TP \\$4 |
||||
.el \{\ |
||||
. ie !"\\$2"" .TP \\n()Cu |
||||
. el .TP 15 |
||||
.\} |
||||
.ta \\n()Au \\n()Bu |
||||
.ie !"\\$3"" \{\ |
||||
\&\\$1 \\fI\\$2\\fP (\\$3) |
||||
.\".b |
||||
.\} |
||||
.el \{\ |
||||
.br |
||||
.ie !"\\$2"" \{\ |
||||
\&\\$1 \\fI\\$2\\fP |
||||
.\} |
||||
.el \{\ |
||||
\&\\fI\\$1\\fP |
||||
.\} |
||||
.\} |
||||
.. |
||||
.\" # define tabbing values for .AP |
||||
.de AS |
||||
.nr )A 10n |
||||
.if !"\\$1"" .nr )A \\w'\\$1'u+3n |
||||
.nr )B \\n()Au+15n |
||||
.\" |
||||
.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n |
||||
.nr )C \\n()Bu+\\w'(in/out)'u+2n |
||||
.. |
||||
.AS Tcl_Interp Tcl_CreateInterp in/out |
||||
.\" # BS - start boxed text |
||||
.\" # ^y = starting y location |
||||
.\" # ^b = 1 |
||||
.de BS |
||||
.br |
||||
.mk ^y |
||||
.nr ^b 1u |
||||
.if n .nf |
||||
.if n .ti 0 |
||||
.if n \l'\\n(.lu\(ul' |
||||
.if n .fi |
||||
.. |
||||
.\" # BE - end boxed text (draw box now) |
||||
.de BE |
||||
.nf |
||||
.ti 0 |
||||
.mk ^t |
||||
.ie n \l'\\n(^lu\(ul' |
||||
.el \{\ |
||||
.\" Draw four-sided box normally, but don't draw top of |
||||
.\" box if the box started on an earlier page. |
||||
.ie !\\n(^b-1 \{\ |
||||
\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' |
||||
.\} |
||||
.el \}\ |
||||
\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' |
||||
.\} |
||||
.\} |
||||
.fi |
||||
.br |
||||
.nr ^b 0 |
||||
.. |
||||
.\" # VS - start vertical sidebar |
||||
.\" # ^Y = starting y location |
||||
.\" # ^v = 1 (for troff; for nroff this doesn't matter) |
||||
.de VS |
||||
.if !"\\$2"" .br |
||||
.mk ^Y |
||||
.ie n 'mc \s12\(br\s0 |
||||
.el .nr ^v 1u |
||||
.. |
||||
.\" # VE - end of vertical sidebar |
||||
.de VE |
||||
.ie n 'mc |
||||
.el \{\ |
||||
.ev 2 |
||||
.nf |
||||
.ti 0 |
||||
.mk ^t |
||||
\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' |
||||
.sp -1 |
||||
.fi |
||||
.ev |
||||
.\} |
||||
.nr ^v 0 |
||||
.. |
||||
.\" # Special macro to handle page bottom: finish off current |
||||
.\" # box/sidebar if in box/sidebar mode, then invoked standard |
||||
.\" # page bottom macro. |
||||
.de ^B |
||||
.ev 2 |
||||
'ti 0 |
||||
'nf |
||||
.mk ^t |
||||
.if \\n(^b \{\ |
||||
.\" Draw three-sided box if this is the box's first page, |
||||
.\" draw two sides but no top otherwise. |
||||
.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c |
||||
.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c |
||||
.\} |
||||
.if \\n(^v \{\ |
||||
.nr ^x \\n(^tu+1v-\\n(^Yu |
||||
\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c |
||||
.\} |
||||
.bp |
||||
'fi |
||||
.ev |
||||
.if \\n(^b \{\ |
||||
.mk ^y |
||||
.nr ^b 2 |
||||
.\} |
||||
.if \\n(^v \{\ |
||||
.mk ^Y |
||||
.\} |
||||
.. |
||||
.\" # DS - begin display |
||||
.de DS |
||||
.RS |
||||
.nf |
||||
.sp |
||||
.. |
||||
.\" # DE - end display |
||||
.de DE |
||||
.fi |
||||
.RE |
||||
.sp |
||||
.. |
||||
.\" # SO - start of list of standard options |
||||
.de SO |
||||
'ie '\\$1'' .ds So \\fBoptions\\fR |
||||
'el .ds So \\fB\\$1\\fR |
||||
.SH "STANDARD OPTIONS" |
||||
.LP |
||||
.nf |
||||
.ta 5.5c 11c |
||||
.ft B |
||||
.. |
||||
.\" # SE - end of list of standard options |
||||
.de SE |
||||
.fi |
||||
.ft R |
||||
.LP |
||||
See the \\*(So manual entry for details on the standard options. |
||||
.. |
||||
.\" # OP - start of full description for a single option |
||||
.de OP |
||||
.LP |
||||
.nf |
||||
.ta 4c |
||||
Command-Line Name: \\fB\\$1\\fR |
||||
Database Name: \\fB\\$2\\fR |
||||
Database Class: \\fB\\$3\\fR |
||||
.fi |
||||
.IP |
||||
.. |
||||
.\" # CS - begin code excerpt |
||||
.de CS |
||||
.RS |
||||
.nf |
||||
.ta .25i .5i .75i 1i |
||||
.. |
||||
.\" # CE - end code excerpt |
||||
.de CE |
||||
.fi |
||||
.RE |
||||
.. |
||||
.\" # UL - underline word |
||||
.de UL |
||||
\\$1\l'|0\(ul'\\$2 |
||||
.. |
||||
.\" # QW - apply quotation marks to word |
||||
.de QW |
||||
.ie '\\*(lq'"' ``\\$1''\\$2 |
||||
.\"" fix emacs highlighting |
||||
.el \\*(lq\\$1\\*(rq\\$2 |
||||
.. |
||||
.\" # PQ - apply parens and quotation marks to word |
||||
.de PQ |
||||
.ie '\\*(lq'"' (``\\$1''\\$2)\\$3 |
||||
.\"" fix emacs highlighting |
||||
.el (\\*(lq\\$1\\*(rq\\$2)\\$3 |
||||
.. |
||||
.\" # QR - quoted range |
||||
.de QR |
||||
.ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 |
||||
.\"" fix emacs highlighting |
||||
.el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 |
||||
.. |
||||
.\" # MT - "empty" string |
||||
.de MT |
||||
.QW "" |
||||
.. |
||||
.BS |
||||
.SH NAME |
||||
punkshell__project_intro \- Introduction to punkshell |
||||
.SH SYNOPSIS |
||||
package require \fBTcl 8\&.6\fR |
||||
.sp |
||||
.BE |
||||
.SH DESCRIPTION |
||||
.PP |
||||
Welcome to the punkshell project\&. |
||||
.PP |
||||
Introduction to punkshell |
||||
.SH "BUGS, IDEAS, FEEDBACK" |
||||
This document, and the package it describes, will undoubtedly contain |
||||
bugs and other problems\&. |
||||
Please report such at the |
||||
\fIpunkshell tracker\fR [https://gitea1\&.intx\&.com\&.au/jn/punkshell/issues]\&. |
||||
Please also report any ideas for enhancements you may have for either |
||||
package and/or documentation\&. |
||||
Contact: \fIjulian+punkshell@precisium\&.com\&.au\fR [mailto:julian+punkshell@precisium\&.com\&.au] |
||||
.PP |
||||
This project uses \fIPunkShell\fR [https://www\&.gitea1\&.intx\&.com\&.au/jn/punkshell] as a deployment management and documentation tool\&. |
||||
.SH KEYWORDS |
||||
punk, repl, shell |
||||
.SH CATEGORY |
||||
shell |
@ -1,6 +1,8 @@
|
||||
[toc_begin {Table Of Contents} doc] |
||||
[item doc/files/punk/_module_cap-0.1.0.tm.md punk::cap {capability provider and handler plugin system}] |
||||
[item doc/files/punk/mix/commandset/_module_project-0.1.0.tm.md punk::mix::commandset::project {pmix commandset - project}] |
||||
[item doc/files/punk/_module_path-0.1.0.tm.md punk::path {Filesystem path utilities}] |
||||
[item doc/files/main.md punkshell {punkshell - Core}] |
||||
[item doc/files/main.md punkshell {punkshell - Core}] |
||||
[item doc/files/project_changes.md punkshell__project_changes {punkshell Changes}] |
||||
[item doc/files/project_intro.md punkshell__project_intro {Introduction to punkshell}] |
||||
[item doc/files/punk/_module_cap-0.1.0.tm.md punkshell_module_punk::cap {capability provider and handler plugin system}] |
||||
[item doc/files/punk/mix/commandset/_module_project-0.1.0.tm.md punkshell_module_punk::mix::commandset::project {pmix commandset - project}] |
||||
[item doc/files/punk/_module_path-0.1.0.tm.md punkshell_module_punk::path {Filesystem path utilities}] |
||||
[toc_end] |
||||
|
@ -1 +1 @@
|
||||
{shell {{doc/files/main.md punkshell}} punk {{doc/files/main.md punkshell}} repl {{doc/files/main.md punkshell}}} {{repl doc/files/main.md punkshell} . {shell doc/files/main.md punkshell} . {punk doc/files/main.md punkshell} .} 3 {shell shell punk punk repl repl} |
||||
{shell {{doc/files/project_intro.md punkshell__project_intro} {doc/files/project_changes.md punkshell__project_changes} {doc/files/main.md punkshell}} changelog {{doc/files/project_changes.md punkshell__project_changes}} filesystem {{doc/files/punk/_module_path-0.1.0.tm.md punkshell_module_punk::path}} path {{doc/files/punk/_module_path-0.1.0.tm.md punkshell_module_punk::path}} capability {{doc/files/punk/_module_cap-0.1.0.tm.md punkshell_module_punk::cap}} module {{doc/files/punk/_module_cap-0.1.0.tm.md punkshell_module_punk::cap} {doc/files/punk/_module_path-0.1.0.tm.md punkshell_module_punk::path}} punk {{doc/files/project_intro.md punkshell__project_intro} {doc/files/project_changes.md punkshell__project_changes} {doc/files/main.md punkshell}} plugin {{doc/files/punk/_module_cap-0.1.0.tm.md punkshell_module_punk::cap}} repl {{doc/files/project_intro.md punkshell__project_intro} {doc/files/project_changes.md punkshell__project_changes} {doc/files/main.md punkshell}}} {{changelog doc/files/project_changes.md punkshell__project_changes} . {shell doc/files/project_changes.md punkshell__project_changes} . {shell doc/files/main.md punkshell} . {repl doc/files/project_intro.md punkshell__project_intro} . {module doc/files/punk/_module_cap-0.1.0.tm.md punkshell_module_punk::cap} . {plugin doc/files/punk/_module_cap-0.1.0.tm.md punkshell_module_punk::cap} . {filesystem doc/files/punk/_module_path-0.1.0.tm.md punkshell_module_punk::path} . {path doc/files/punk/_module_path-0.1.0.tm.md punkshell_module_punk::path} . {module doc/files/punk/_module_path-0.1.0.tm.md punkshell_module_punk::path} . {shell doc/files/project_intro.md punkshell__project_intro} . {punk doc/files/project_changes.md punkshell__project_changes} . {punk doc/files/main.md punkshell} . {repl doc/files/project_changes.md punkshell__project_changes} . {punk doc/files/project_intro.md punkshell__project_intro} . {repl doc/files/main.md punkshell} . {capability doc/files/punk/_module_cap-0.1.0.tm.md punkshell_module_punk::cap} .} 9 {shell shell changelog changelog filesystem filesystem path path capability capability module module punk punk plugin plugin repl repl} |
@ -1 +1 @@
|
||||
doc {doc/toc {{doc/files/punk/_module_cap-0.1.0.tm.md punk::cap {capability provider and handler plugin system}} {doc/files/punk/_module_path-0.1.0.tm.md punk::path {Filesystem path utilities}} {doc/files/punk/mix/commandset/_module_project-0.1.0.tm.md punk::mix::commandset::project {pmix commandset - project}} {doc/files/main.md punkshell {punkshell - Core}}}} |
||||
doc {doc/toc {{doc/files/punk/_module_cap-0.1.0.tm.md punkshell_module_punk::cap {capability provider and handler plugin system}} {doc/files/project_intro.md punkshell__project_intro {Introduction to punkshell}} {doc/files/punk/_module_path-0.1.0.tm.md punkshell_module_punk::path {Filesystem path utilities}} {doc/files/project_changes.md punkshell__project_changes {punkshell Changes}} {doc/files/punk/mix/commandset/_module_project-0.1.0.tm.md punkshell_module_punk::mix::commandset::project {pmix commandset - project}} {doc/files/main.md punkshell {punkshell - Core}}}} |
@ -1 +1 @@
|
||||
sa,punk::path(0) doc/files/punk/_module_path-0.1.0.tm.md {capability provider and handler plugin system} doc/files/punk/_module_cap-0.1.0.tm.md punk::mix::commandset::project doc/files/punk/mix/commandset/_module_project-0.1.0.tm.md punk::mix::commandset::project(0) doc/files/punk/mix/commandset/_module_project-0.1.0.tm.md repl {index.md repl} kw,punk {index.md punk} punkshell(n) doc/files/main.md sa,punk::cap doc/files/punk/_module_cap-0.1.0.tm.md {Filesystem path utilities} doc/files/punk/_module_path-0.1.0.tm.md punkshell doc/files/main.md sa,punk::cap(0) doc/files/punk/_module_cap-0.1.0.tm.md sa,punk::path doc/files/punk/_module_path-0.1.0.tm.md punk::path(0) doc/files/punk/_module_path-0.1.0.tm.md shell {index.md shell} kw,repl {index.md repl} sa,punk::mix::commandset::project doc/files/punk/mix/commandset/_module_project-0.1.0.tm.md sa,punk::mix::commandset::project(0) doc/files/punk/mix/commandset/_module_project-0.1.0.tm.md {punkshell - Core} doc/files/main.md {pmix commandset - project} doc/files/punk/mix/commandset/_module_project-0.1.0.tm.md sa,punkshell(n) doc/files/main.md punk::cap doc/files/punk/_module_cap-0.1.0.tm.md sa,punkshell doc/files/main.md kw,shell {index.md shell} punk {index.md punk} punk::cap(0) doc/files/punk/_module_cap-0.1.0.tm.md punk::path doc/files/punk/_module_path-0.1.0.tm.md |
||||
kw,capability {index.md capability} punkshell_module_punk::path(0) doc/files/punk/_module_path-0.1.0.tm.md sa,punkshell_module_punk::mix::commandset::project(0) doc/files/punk/mix/commandset/_module_project-0.1.0.tm.md {punkshell Changes} doc/files/project_changes.md {Introduction to punkshell} doc/files/project_intro.md punkshell_module_punk::mix::commandset::project(0) doc/files/punk/mix/commandset/_module_project-0.1.0.tm.md sa,punkshell(n) doc/files/main.md filesystem {index.md filesystem} sa,punkshell doc/files/main.md kw,shell {index.md shell} sa,punkshell_module_punk::cap doc/files/punk/_module_cap-0.1.0.tm.md sa,punkshell_module_punk::cap(0) doc/files/punk/_module_cap-0.1.0.tm.md sa,punkshell__project_changes(n) doc/files/project_changes.md kw,path {index.md path} kw,module {index.md module} punkshell(n) doc/files/main.md kw,plugin {index.md plugin} punkshell doc/files/main.md punkshell_module_punk::cap doc/files/punk/_module_cap-0.1.0.tm.md changelog {index.md changelog} punkshell_module_punk::cap(0) doc/files/punk/_module_cap-0.1.0.tm.md punkshell__project_changes(n) doc/files/project_changes.md sa,punkshell__project_changes doc/files/project_changes.md path {index.md path} sa,punkshell_module_punk::path doc/files/punk/_module_path-0.1.0.tm.md punkshell__project_changes doc/files/project_changes.md kw,filesystem {index.md filesystem} sa,punkshell_module_punk::mix::commandset::project doc/files/punk/mix/commandset/_module_project-0.1.0.tm.md shell {index.md shell} punkshell_module_punk::path doc/files/punk/_module_path-0.1.0.tm.md kw,repl {index.md repl} capability {index.md capability} punkshell_module_punk::mix::commandset::project doc/files/punk/mix/commandset/_module_project-0.1.0.tm.md {punkshell - Core} doc/files/main.md {pmix commandset - project} doc/files/punk/mix/commandset/_module_project-0.1.0.tm.md {capability provider and handler plugin system} doc/files/punk/_module_cap-0.1.0.tm.md repl {index.md repl} kw,punk {index.md punk} sa,punkshell__project_intro(n) doc/files/project_intro.md sa,punkshell__project_intro doc/files/project_intro.md {Filesystem path utilities} doc/files/punk/_module_path-0.1.0.tm.md sa,punkshell_module_punk::path(0) doc/files/punk/_module_path-0.1.0.tm.md punkshell__project_intro(n) doc/files/project_intro.md punkshell__project_intro doc/files/project_intro.md kw,changelog {index.md changelog} punk {index.md punk} module {index.md module} plugin {index.md plugin} |
@ -0,0 +1,75 @@
|
||||
|
||||
[//000000001]: # (punkshell\_\_project\_changes \- punkshell \- a Tcl project) |
||||
[//000000002]: # (Generated from file 'project\_changes\.man' by tcllib/doctools with format 'markdown') |
||||
[//000000003]: # (punkshell\_\_project\_changes\(n\) 8 doc "punkshell \- a Tcl project") |
||||
|
||||
<hr> [ <a href="../../toc.md">Main Table Of Contents</a> | <a |
||||
href="../toc.md">Table Of Contents</a> | <a |
||||
href="../../index.md">Keyword Index</a> ] <hr> |
||||
|
||||
# NAME |
||||
|
||||
punkshell\_\_project\_changes \- punkshell Changes |
||||
|
||||
# <a name='toc'></a>Table Of Contents |
||||
|
||||
- [Table Of Contents](#toc) |
||||
|
||||
- [Synopsis](#synopsis) |
||||
|
||||
- [Description](#section1) |
||||
|
||||
- [Changes](#section2) |
||||
|
||||
- [Changes for version 0\.1](#subsection1) |
||||
|
||||
- [Bugs, Ideas, Feedback](#section3) |
||||
|
||||
- [Keywords](#keywords) |
||||
|
||||
- [Category](#category) |
||||
|
||||
# <a name='synopsis'></a>SYNOPSIS |
||||
|
||||
package require Tcl 8\.6 |
||||
|
||||
# <a name='description'></a>DESCRIPTION |
||||
|
||||
Welcome to the punkshell project\. |
||||
|
||||
This document provides an overview of the changes |
||||
__[punkshell](main\.md)__ underwent from version to version\. |
||||
|
||||
# <a name='section2'></a>Changes |
||||
|
||||
## <a name='subsection1'></a>Changes for version 0\.1 |
||||
|
||||
This release 0\.1 of project punkshell |
||||
|
||||
Summary |
||||
|
||||
1. feature 1 |
||||
|
||||
1. feature 2 |
||||
|
||||
In detail: |
||||
|
||||
1. punkshell requires Tcl 8\.6 or higher\. Tcl 8\.5 or less is not supported\. |
||||
|
||||
# <a name='section3'></a>Bugs, Ideas, Feedback |
||||
|
||||
This document, and the package it describes, will undoubtedly contain bugs and |
||||
other problems\. Please report such at the [punkshell |
||||
tracker](https://gitea1\.intx\.com\.au/jn/punkshell/issues)\. Please also report |
||||
any ideas for enhancements you may have for either package and/or documentation\. |
||||
Contact: |
||||
[julian\+punkshell@precisium\.com\.au](mailto:julian\+punkshell@precisium\.com\.au) |
||||
|
||||
# <a name='keywords'></a>KEYWORDS |
||||
|
||||
[changelog](\.\./\.\./index\.md\#changelog), [punk](\.\./\.\./index\.md\#punk), |
||||
[repl](\.\./\.\./index\.md\#repl), [shell](\.\./\.\./index\.md\#shell) |
||||
|
||||
# <a name='category'></a>CATEGORY |
||||
|
||||
changelog |
@ -0,0 +1,57 @@
|
||||
|
||||
[//000000001]: # (punkshell\_\_project\_intro \- punkshell \- a Tcl project) |
||||
[//000000002]: # (Generated from file 'project\_intro\.man' by tcllib/doctools with format 'markdown') |
||||
[//000000003]: # (punkshell\_\_project\_intro\(n\) 8 doc "punkshell \- a Tcl project") |
||||
|
||||
<hr> [ <a href="../../toc.md">Main Table Of Contents</a> | <a |
||||
href="../toc.md">Table Of Contents</a> | <a |
||||
href="../../index.md">Keyword Index</a> ] <hr> |
||||
|
||||
# NAME |
||||
|
||||
punkshell\_\_project\_intro \- Introduction to punkshell |
||||
|
||||
# <a name='toc'></a>Table Of Contents |
||||
|
||||
- [Table Of Contents](#toc) |
||||
|
||||
- [Synopsis](#synopsis) |
||||
|
||||
- [Description](#section1) |
||||
|
||||
- [Bugs, Ideas, Feedback](#section2) |
||||
|
||||
- [Keywords](#keywords) |
||||
|
||||
- [Category](#category) |
||||
|
||||
# <a name='synopsis'></a>SYNOPSIS |
||||
|
||||
package require Tcl 8\.6 |
||||
|
||||
# <a name='description'></a>DESCRIPTION |
||||
|
||||
Welcome to the punkshell project\. |
||||
|
||||
Introduction to punkshell |
||||
|
||||
# <a name='section2'></a>Bugs, Ideas, Feedback |
||||
|
||||
This document, and the package it describes, will undoubtedly contain bugs and |
||||
other problems\. Please report such at the [punkshell |
||||
tracker](https://gitea1\.intx\.com\.au/jn/punkshell/issues)\. Please also report |
||||
any ideas for enhancements you may have for either package and/or documentation\. |
||||
Contact: |
||||
[julian\+punkshell@precisium\.com\.au](mailto:julian\+punkshell@precisium\.com\.au) |
||||
|
||||
This project uses [PunkShell](https://www\.gitea1\.intx\.com\.au/jn/punkshell) |
||||
as a deployment management and documentation tool\. |
||||
|
||||
# <a name='keywords'></a>KEYWORDS |
||||
|
||||
[punk](\.\./\.\./index\.md\#punk), [repl](\.\./\.\./index\.md\#repl), |
||||
[shell](\.\./\.\./index\.md\#shell) |
||||
|
||||
# <a name='category'></a>CATEGORY |
||||
|
||||
shell |
@ -1,6 +1,8 @@
|
||||
[toc_begin {Table Of Contents} doc] |
||||
[item doc/files/punk/_module_cap-0.1.0.tm.html punk::cap {capability provider and handler plugin system}] |
||||
[item doc/files/punk/mix/commandset/_module_project-0.1.0.tm.html punk::mix::commandset::project {pmix commandset - project}] |
||||
[item doc/files/punk/_module_path-0.1.0.tm.html punk::path {Filesystem path utilities}] |
||||
[item doc/files/main.html punkshell {punkshell - Core}] |
||||
[item doc/files/main.html punkshell {punkshell - Core}] |
||||
[item doc/files/project_changes.html punkshell__project_changes {punkshell Changes}] |
||||
[item doc/files/project_intro.html punkshell__project_intro {Introduction to punkshell}] |
||||
[item doc/files/punk/_module_cap-0.1.0.tm.html punkshell_module_punk::cap {capability provider and handler plugin system}] |
||||
[item doc/files/punk/mix/commandset/_module_project-0.1.0.tm.html punkshell_module_punk::mix::commandset::project {pmix commandset - project}] |
||||
[item doc/files/punk/_module_path-0.1.0.tm.html punkshell_module_punk::path {Filesystem path utilities}] |
||||
[toc_end] |
||||
|
@ -1 +1 @@
|
||||
{shell {{doc/files/main.html punkshell}} punk {{doc/files/main.html punkshell}} repl {{doc/files/main.html punkshell}}} {{repl doc/files/main.html punkshell} . {shell doc/files/main.html punkshell} . {punk doc/files/main.html punkshell} .} 3 {shell shell punk punk repl repl} |
||||
{shell {{doc/files/project_intro.html punkshell__project_intro} {doc/files/project_changes.html punkshell__project_changes} {doc/files/main.html punkshell}} changelog {{doc/files/project_changes.html punkshell__project_changes}} filesystem {{doc/files/punk/_module_path-0.1.0.tm.html punkshell_module_punk::path}} path {{doc/files/punk/_module_path-0.1.0.tm.html punkshell_module_punk::path}} capability {{doc/files/punk/_module_cap-0.1.0.tm.html punkshell_module_punk::cap}} module {{doc/files/punk/_module_cap-0.1.0.tm.html punkshell_module_punk::cap} {doc/files/punk/_module_path-0.1.0.tm.html punkshell_module_punk::path}} punk {{doc/files/project_intro.html punkshell__project_intro} {doc/files/project_changes.html punkshell__project_changes} {doc/files/main.html punkshell}} plugin {{doc/files/punk/_module_cap-0.1.0.tm.html punkshell_module_punk::cap}} repl {{doc/files/project_intro.html punkshell__project_intro} {doc/files/project_changes.html punkshell__project_changes} {doc/files/main.html punkshell}}} {{repl doc/files/main.html punkshell} . {punk doc/files/project_intro.html punkshell__project_intro} . {capability doc/files/punk/_module_cap-0.1.0.tm.html punkshell_module_punk::cap} . {changelog doc/files/project_changes.html punkshell__project_changes} . {shell doc/files/project_changes.html punkshell__project_changes} . {shell doc/files/main.html punkshell} . {repl doc/files/project_intro.html punkshell__project_intro} . {module doc/files/punk/_module_cap-0.1.0.tm.html punkshell_module_punk::cap} . {plugin doc/files/punk/_module_cap-0.1.0.tm.html punkshell_module_punk::cap} . {filesystem doc/files/punk/_module_path-0.1.0.tm.html punkshell_module_punk::path} . {path doc/files/punk/_module_path-0.1.0.tm.html punkshell_module_punk::path} . {module doc/files/punk/_module_path-0.1.0.tm.html punkshell_module_punk::path} . {punk doc/files/project_changes.html punkshell__project_changes} . {shell doc/files/project_intro.html punkshell__project_intro} . {punk doc/files/main.html punkshell} . {repl doc/files/project_changes.html punkshell__project_changes} .} 9 {shell shell changelog changelog filesystem filesystem path path capability capability module module punk punk plugin plugin repl repl} |
@ -1 +1 @@
|
||||
doc {doc/toc {{doc/files/punk/_module_cap-0.1.0.tm.html punk::cap {capability provider and handler plugin system}} {doc/files/punk/_module_path-0.1.0.tm.html punk::path {Filesystem path utilities}} {doc/files/punk/mix/commandset/_module_project-0.1.0.tm.html punk::mix::commandset::project {pmix commandset - project}} {doc/files/main.html punkshell {punkshell - Core}}}} |
||||
doc {doc/toc {{doc/files/punk/_module_cap-0.1.0.tm.html punkshell_module_punk::cap {capability provider and handler plugin system}} {doc/files/project_intro.html punkshell__project_intro {Introduction to punkshell}} {doc/files/punk/_module_path-0.1.0.tm.html punkshell_module_punk::path {Filesystem path utilities}} {doc/files/project_changes.html punkshell__project_changes {punkshell Changes}} {doc/files/punk/mix/commandset/_module_project-0.1.0.tm.html punkshell_module_punk::mix::commandset::project {pmix commandset - project}} {doc/files/main.html punkshell {punkshell - Core}}}} |
@ -1 +1 @@
|
||||
sa,punk::path(0) doc/files/punk/_module_path-0.1.0.tm.html {capability provider and handler plugin system} doc/files/punk/_module_cap-0.1.0.tm.html punk::mix::commandset::project doc/files/punk/mix/commandset/_module_project-0.1.0.tm.html punk::mix::commandset::project(0) doc/files/punk/mix/commandset/_module_project-0.1.0.tm.html repl {index.html repl} kw,punk {index.html punk} punkshell(n) doc/files/main.html sa,punk::cap doc/files/punk/_module_cap-0.1.0.tm.html {Filesystem path utilities} doc/files/punk/_module_path-0.1.0.tm.html punkshell doc/files/main.html sa,punk::cap(0) doc/files/punk/_module_cap-0.1.0.tm.html sa,punk::path doc/files/punk/_module_path-0.1.0.tm.html punk::path(0) doc/files/punk/_module_path-0.1.0.tm.html shell {index.html shell} kw,repl {index.html repl} sa,punk::mix::commandset::project doc/files/punk/mix/commandset/_module_project-0.1.0.tm.html sa,punk::mix::commandset::project(0) doc/files/punk/mix/commandset/_module_project-0.1.0.tm.html {punkshell - Core} doc/files/main.html {pmix commandset - project} doc/files/punk/mix/commandset/_module_project-0.1.0.tm.html sa,punkshell(n) doc/files/main.html punk::cap doc/files/punk/_module_cap-0.1.0.tm.html sa,punkshell doc/files/main.html kw,shell {index.html shell} punk {index.html punk} punk::cap(0) doc/files/punk/_module_cap-0.1.0.tm.html punk::path doc/files/punk/_module_path-0.1.0.tm.html |
||||
kw,capability {index.html capability} punkshell_module_punk::path(0) doc/files/punk/_module_path-0.1.0.tm.html sa,punkshell_module_punk::mix::commandset::project(0) doc/files/punk/mix/commandset/_module_project-0.1.0.tm.html {punkshell Changes} doc/files/project_changes.html {Introduction to punkshell} doc/files/project_intro.html punkshell_module_punk::mix::commandset::project(0) doc/files/punk/mix/commandset/_module_project-0.1.0.tm.html sa,punkshell(n) doc/files/main.html filesystem {index.html filesystem} sa,punkshell doc/files/main.html kw,shell {index.html shell} sa,punkshell_module_punk::cap doc/files/punk/_module_cap-0.1.0.tm.html sa,punkshell_module_punk::cap(0) doc/files/punk/_module_cap-0.1.0.tm.html sa,punkshell__project_changes(n) doc/files/project_changes.html kw,path {index.html path} kw,module {index.html module} punkshell(n) doc/files/main.html kw,plugin {index.html plugin} punkshell doc/files/main.html punkshell_module_punk::cap doc/files/punk/_module_cap-0.1.0.tm.html changelog {index.html changelog} punkshell_module_punk::cap(0) doc/files/punk/_module_cap-0.1.0.tm.html punkshell__project_changes(n) doc/files/project_changes.html sa,punkshell__project_changes doc/files/project_changes.html path {index.html path} sa,punkshell_module_punk::path doc/files/punk/_module_path-0.1.0.tm.html punkshell__project_changes doc/files/project_changes.html kw,filesystem {index.html filesystem} sa,punkshell_module_punk::mix::commandset::project doc/files/punk/mix/commandset/_module_project-0.1.0.tm.html shell {index.html shell} punkshell_module_punk::path doc/files/punk/_module_path-0.1.0.tm.html kw,repl {index.html repl} capability {index.html capability} punkshell_module_punk::mix::commandset::project doc/files/punk/mix/commandset/_module_project-0.1.0.tm.html {punkshell - Core} doc/files/main.html {pmix commandset - project} doc/files/punk/mix/commandset/_module_project-0.1.0.tm.html {capability provider and handler plugin system} doc/files/punk/_module_cap-0.1.0.tm.html repl {index.html repl} kw,punk {index.html punk} sa,punkshell__project_intro(n) doc/files/project_intro.html sa,punkshell__project_intro doc/files/project_intro.html {Filesystem path utilities} doc/files/punk/_module_path-0.1.0.tm.html sa,punkshell_module_punk::path(0) doc/files/punk/_module_path-0.1.0.tm.html punkshell__project_intro(n) doc/files/project_intro.html punkshell__project_intro doc/files/project_intro.html kw,changelog {index.html changelog} punk {index.html punk} module {index.html module} plugin {index.html plugin} |
@ -0,0 +1,169 @@
|
||||
<!DOCTYPE html><html><head> |
||||
<title>punkshell__project_changes - punkshell - a Tcl project</title> |
||||
<style type="text/css"><!-- |
||||
HTML { |
||||
background: #FFFFFF; |
||||
color: black; |
||||
} |
||||
BODY { |
||||
background: #FFFFFF; |
||||
color: black; |
||||
} |
||||
DIV.doctools { |
||||
margin-left: 10%; |
||||
margin-right: 10%; |
||||
} |
||||
DIV.doctools H1,DIV.doctools H2 { |
||||
margin-left: -5%; |
||||
} |
||||
H1, H2, H3, H4 { |
||||
margin-top: 1em; |
||||
font-family: sans-serif; |
||||
font-size: large; |
||||
color: #005A9C; |
||||
background: transparent; |
||||
text-align: left; |
||||
} |
||||
H1.doctools_title { |
||||
text-align: center; |
||||
} |
||||
UL,OL { |
||||
margin-right: 0em; |
||||
margin-top: 3pt; |
||||
margin-bottom: 3pt; |
||||
} |
||||
UL LI { |
||||
list-style: disc; |
||||
} |
||||
OL LI { |
||||
list-style: decimal; |
||||
} |
||||
DT { |
||||
padding-top: 1ex; |
||||
} |
||||
UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL { |
||||
font: normal 12pt/14pt sans-serif; |
||||
list-style: none; |
||||
} |
||||
LI.doctools_section, LI.doctools_subsection { |
||||
list-style: none; |
||||
margin-left: 0em; |
||||
text-indent: 0em; |
||||
padding: 0em; |
||||
} |
||||
PRE { |
||||
display: block; |
||||
font-family: monospace; |
||||
white-space: pre; |
||||
margin: 0%; |
||||
padding-top: 0.5ex; |
||||
padding-bottom: 0.5ex; |
||||
padding-left: 1ex; |
||||
padding-right: 1ex; |
||||
width: 100%; |
||||
} |
||||
PRE.doctools_example { |
||||
color: black; |
||||
background: #f5dcb3; |
||||
border: 1px solid black; |
||||
} |
||||
UL.doctools_requirements LI, UL.doctools_syntax LI { |
||||
list-style: none; |
||||
margin-left: 0em; |
||||
text-indent: 0em; |
||||
padding: 0em; |
||||
} |
||||
DIV.doctools_synopsis { |
||||
color: black; |
||||
background: #80ffff; |
||||
border: 1px solid black; |
||||
font-family: serif; |
||||
margin-top: 1em; |
||||
margin-bottom: 1em; |
||||
} |
||||
UL.doctools_syntax { |
||||
margin-top: 1em; |
||||
border-top: 1px solid black; |
||||
} |
||||
UL.doctools_requirements { |
||||
margin-bottom: 1em; |
||||
border-bottom: 1px solid black; |
||||
} |
||||
--></style> |
||||
</head> |
||||
<!-- Generated from file 'project_changes.man' by tcllib/doctools with format 'html' |
||||
--> |
||||
<!-- punkshell__project_changes.n |
||||
--> |
||||
<body><hr> [ |
||||
<a href="../../toc.html">Main Table Of Contents</a> |
||||
| <a href="../toc.html">Table Of Contents</a> |
||||
| <a href="../../index.html">Keyword Index</a> |
||||
] <hr> |
||||
<div class="doctools"> |
||||
<h1 class="doctools_title">punkshell__project_changes(n) 8 doc "punkshell - a Tcl project"</h1> |
||||
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2> |
||||
<p>punkshell__project_changes - punkshell Changes</p> |
||||
</div> |
||||
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2> |
||||
<ul class="doctools_toc"> |
||||
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li> |
||||
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li> |
||||
<li class="doctools_section"><a href="#section1">Description</a></li> |
||||
<li class="doctools_section"><a href="#section2">Changes</a> |
||||
<ul> |
||||
<li class="doctools_subsection"><a href="#subsection1">Changes for version 0.1</a></li> |
||||
</ul> |
||||
</li> |
||||
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li> |
||||
<li class="doctools_section"><a href="#keywords">Keywords</a></li> |
||||
<li class="doctools_section"><a href="#category">Category</a></li> |
||||
</ul> |
||||
</div> |
||||
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2> |
||||
<div class="doctools_synopsis"> |
||||
<ul class="doctools_requirements"> |
||||
<li>package require <b class="pkgname">Tcl 8.6</b></li> |
||||
</ul> |
||||
</div> |
||||
</div> |
||||
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2> |
||||
<p>Welcome to the punkshell project.</p> |
||||
<p>This document provides an overview of the changes <b class="package"><a href="main.html">punkshell</a></b> |
||||
underwent from version to version.</p> |
||||
</div> |
||||
<div id="section2" class="doctools_section"><h2><a name="section2">Changes</a></h2> |
||||
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Changes for version 0.1</a></h3> |
||||
<p>This release 0.1 of project punkshell</p> |
||||
<p>Summary</p> |
||||
<ol class="doctools_enumerated"> |
||||
|
||||
<li><p>feature 1</p></li> |
||||
<li><p>feature 2</p></li> |
||||
</ol> |
||||
<p>In detail:</p> |
||||
<ol class="doctools_enumerated"> |
||||
|
||||
|
||||
<li><p>punkshell requires Tcl 8.6 or higher. Tcl 8.5 or less is not |
||||
supported.</p></li> |
||||
<li></li> |
||||
</ol> |
||||
</div> |
||||
</div> |
||||
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2> |
||||
<p>This document, and the package it describes, will undoubtedly contain |
||||
bugs and other problems. |
||||
Please report such at the |
||||
<a href="https://gitea1.intx.com.au/jn/punkshell/issues">punkshell tracker</a>. |
||||
Please also report any ideas for enhancements you may have for either |
||||
package and/or documentation. |
||||
Contact: <a href="mailto:julian+punkshell@precisium.com.au">julian+punkshell@precisium.com.au</a></p> |
||||
</div> |
||||
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2> |
||||
<p><a href="../../index.html#changelog">changelog</a>, <a href="../../index.html#punk">punk</a>, <a href="../../index.html#repl">repl</a>, <a href="../../index.html#shell">shell</a></p> |
||||
</div> |
||||
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2> |
||||
<p>changelog</p> |
||||
</div> |
||||
</div></body></html> |
@ -0,0 +1,145 @@
|
||||
<!DOCTYPE html><html><head> |
||||
<title>punkshell__project_intro - punkshell - a Tcl project</title> |
||||
<style type="text/css"><!-- |
||||
HTML { |
||||
background: #FFFFFF; |
||||
color: black; |
||||
} |
||||
BODY { |
||||
background: #FFFFFF; |
||||
color: black; |
||||
} |
||||
DIV.doctools { |
||||
margin-left: 10%; |
||||
margin-right: 10%; |
||||
} |
||||
DIV.doctools H1,DIV.doctools H2 { |
||||
margin-left: -5%; |
||||
} |
||||
H1, H2, H3, H4 { |
||||
margin-top: 1em; |
||||
font-family: sans-serif; |
||||
font-size: large; |
||||
color: #005A9C; |
||||
background: transparent; |
||||
text-align: left; |
||||
} |
||||
H1.doctools_title { |
||||
text-align: center; |
||||
} |
||||
UL,OL { |
||||
margin-right: 0em; |
||||
margin-top: 3pt; |
||||
margin-bottom: 3pt; |
||||
} |
||||
UL LI { |
||||
list-style: disc; |
||||
} |
||||
OL LI { |
||||
list-style: decimal; |
||||
} |
||||
DT { |
||||
padding-top: 1ex; |
||||
} |
||||
UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL { |
||||
font: normal 12pt/14pt sans-serif; |
||||
list-style: none; |
||||
} |
||||
LI.doctools_section, LI.doctools_subsection { |
||||
list-style: none; |
||||
margin-left: 0em; |
||||
text-indent: 0em; |
||||
padding: 0em; |
||||
} |
||||
PRE { |
||||
display: block; |
||||
font-family: monospace; |
||||
white-space: pre; |
||||
margin: 0%; |
||||
padding-top: 0.5ex; |
||||
padding-bottom: 0.5ex; |
||||
padding-left: 1ex; |
||||
padding-right: 1ex; |
||||
width: 100%; |
||||
} |
||||
PRE.doctools_example { |
||||
color: black; |
||||
background: #f5dcb3; |
||||
border: 1px solid black; |
||||
} |
||||
UL.doctools_requirements LI, UL.doctools_syntax LI { |
||||
list-style: none; |
||||
margin-left: 0em; |
||||
text-indent: 0em; |
||||
padding: 0em; |
||||
} |
||||
DIV.doctools_synopsis { |
||||
color: black; |
||||
background: #80ffff; |
||||
border: 1px solid black; |
||||
font-family: serif; |
||||
margin-top: 1em; |
||||
margin-bottom: 1em; |
||||
} |
||||
UL.doctools_syntax { |
||||
margin-top: 1em; |
||||
border-top: 1px solid black; |
||||
} |
||||
UL.doctools_requirements { |
||||
margin-bottom: 1em; |
||||
border-bottom: 1px solid black; |
||||
} |
||||
--></style> |
||||
</head> |
||||
<!-- Generated from file 'project_intro.man' by tcllib/doctools with format 'html' |
||||
--> |
||||
<!-- punkshell__project_intro.n |
||||
--> |
||||
<body><hr> [ |
||||
<a href="../../toc.html">Main Table Of Contents</a> |
||||
| <a href="../toc.html">Table Of Contents</a> |
||||
| <a href="../../index.html">Keyword Index</a> |
||||
] <hr> |
||||
<div class="doctools"> |
||||
<h1 class="doctools_title">punkshell__project_intro(n) 8 doc "punkshell - a Tcl project"</h1> |
||||
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2> |
||||
<p>punkshell__project_intro - Introduction to punkshell</p> |
||||
</div> |
||||
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2> |
||||
<ul class="doctools_toc"> |
||||
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li> |
||||
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li> |
||||
<li class="doctools_section"><a href="#section1">Description</a></li> |
||||
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li> |
||||
<li class="doctools_section"><a href="#keywords">Keywords</a></li> |
||||
<li class="doctools_section"><a href="#category">Category</a></li> |
||||
</ul> |
||||
</div> |
||||
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2> |
||||
<div class="doctools_synopsis"> |
||||
<ul class="doctools_requirements"> |
||||
<li>package require <b class="pkgname">Tcl 8.6</b></li> |
||||
</ul> |
||||
</div> |
||||
</div> |
||||
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2> |
||||
<p>Welcome to the punkshell project.</p> |
||||
<p>Introduction to punkshell</p> |
||||
</div> |
||||
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2> |
||||
<p>This document, and the package it describes, will undoubtedly contain |
||||
bugs and other problems. |
||||
Please report such at the |
||||
<a href="https://gitea1.intx.com.au/jn/punkshell/issues">punkshell tracker</a>. |
||||
Please also report any ideas for enhancements you may have for either |
||||
package and/or documentation. |
||||
Contact: <a href="mailto:julian+punkshell@precisium.com.au">julian+punkshell@precisium.com.au</a></p> |
||||
<p>This project uses <a href="https://www.gitea1.intx.com.au/jn/punkshell">PunkShell</a> as a deployment management and documentation tool.</p> |
||||
</div> |
||||
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2> |
||||
<p><a href="../../index.html#punk">punk</a>, <a href="../../index.html#repl">repl</a>, <a href="../../index.html#shell">shell</a></p> |
||||
</div> |
||||
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2> |
||||
<p>shell</p> |
||||
</div> |
||||
</div></body></html> |
@ -0,0 +1,71 @@
|
||||
|
||||
# -*- tcl -* |
||||
# Maintenance Instruction: leave the 999999.xxx.x as is and use 'pmix make' or src/make.tcl to update from <pkg>-buildversion.txt |
||||
# |
||||
# Please consider using a BSD or MIT style license for greatest compatibility with the Tcl ecosystem. |
||||
# Code using preferred Tcl licenses can be eligible for inclusion in Tcllib, Tklib and the punk package repository. |
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
# (C) 2023 |
||||
# |
||||
# @@ Meta Begin |
||||
# Application punk::docgen 0.1.0 |
||||
# Meta platform tcl |
||||
# Meta license BSD |
||||
# @@ Meta End |
||||
|
||||
|
||||
|
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
## Requirements |
||||
##e.g package require frobz |
||||
|
||||
package require punk::repo |
||||
|
||||
|
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
namespace eval punk::docgen { |
||||
proc get_doctools_comments {fname} { |
||||
#does no validation of doctools commands |
||||
#existence of string match #\**!doctools is taken as evidence enough that the file has inline doctools - review |
||||
if {![file exists $fname]} { |
||||
error "get_doctools_comments file '$fname' not found" |
||||
} |
||||
set fd [open $fname r] |
||||
set data [read $fd] |
||||
close $fd |
||||
if {![string match "*#\**!doctools*" $data]} { |
||||
return |
||||
} |
||||
set data [string map [list \r\n \n] $data] |
||||
set in_doctools 0 |
||||
set doctools "" |
||||
foreach ln [split $data \n] { |
||||
set ln [string trim $ln] |
||||
if {$in_doctools && [string index $ln 0] != "#"} { |
||||
set in_doctools 0 |
||||
} elseif {[string range $ln 0 1] == "#*"} { |
||||
#todo - process doctools ordering hints in tail of line |
||||
set in_doctools 1 |
||||
} elseif {$in_doctools} { |
||||
append doctools [string range $ln 1 end] \n |
||||
} |
||||
} |
||||
return $doctools |
||||
} |
||||
#todo - proc autogen_doctools_comments {fname} {} |
||||
# - will probably need to use something like parsetcl - as we won't be able to reliably source in an interp without side-effects and use info body etc. |
||||
# - mechanism will be to autodocument namespaces, procs, methods where no #*** doctools indication present - but use existing doctools comments for that particular item if it is present. |
||||
|
||||
|
||||
|
||||
} |
||||
|
||||
|
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
## Ready |
||||
package provide punk::docgen [namespace eval punk::docgen { |
||||
variable pkg punk::docgen |
||||
variable version |
||||
set version 0.1.0 |
||||
}] |
||||
return |
@ -0,0 +1,397 @@
|
||||
# -*- tcl -*- |
||||
# Maintenance Instruction: leave the 999999.xxx.x as is and use 'pmix make' or src/make.tcl to update from <pkg>-buildversion.txt |
||||
# |
||||
# Please consider using a BSD or MIT style license for greatest compatibility with the Tcl ecosystem. |
||||
# Code using preferred Tcl licenses can be eligible for inclusion in Tcllib, Tklib and the punk package repository. |
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
# (C) 2023 |
||||
# |
||||
# @@ Meta Begin |
||||
# Application punk::path 0.1.0 |
||||
# Meta platform tcl |
||||
# Meta license <unspecified> |
||||
# @@ Meta End |
||||
|
||||
|
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
# doctools header |
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
#*** !doctools |
||||
#[manpage_begin punkshell_module_punk::path 0 0.1.0] |
||||
#[copyright "2023"] |
||||
#[titledesc {Filesystem path utilities}] [comment {-- Name section and table of contents description --}] |
||||
#[moddesc {punk path filesystem utils}] [comment {-- Description at end of page heading --}] |
||||
#[require punk::path] |
||||
#[description] |
||||
#[keywords module path filesystem] |
||||
|
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
|
||||
#*** !doctools |
||||
#[section Overview] |
||||
#[para] overview of punk::path |
||||
#[para] Filesystem path utility functions |
||||
#[subsection Concepts] |
||||
#[para] - |
||||
|
||||
|
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
## Requirements |
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
|
||||
#*** !doctools |
||||
#[subsection dependencies] |
||||
#[para] packages used by punk::path |
||||
#[list_begin itemized] |
||||
|
||||
package require Tcl 8.6 |
||||
#*** !doctools |
||||
#[item] [package {Tcl 8.6}] |
||||
|
||||
# #package require frobz |
||||
# #*** !doctools |
||||
# #[item] [package {frobz}] |
||||
|
||||
#*** !doctools |
||||
#[list_end] |
||||
|
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
|
||||
#*** !doctools |
||||
#[section API] |
||||
|
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
# oo::class namespace |
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
namespace eval punk::path::class { |
||||
#*** !doctools |
||||
#[subsection {Namespace punk::path::class}] |
||||
#[para] class definitions |
||||
if {[info commands [namespace current]::interface_sample1] eq ""} { |
||||
#*** !doctools |
||||
#[list_begin enumerated] |
||||
|
||||
# oo::class create interface_sample1 { |
||||
# #*** !doctools |
||||
# #[enum] CLASS [class interface_sample1] |
||||
# #[list_begin definitions] |
||||
|
||||
# method test {arg1} { |
||||
# #*** !doctools |
||||
# #[call class::interface_sample1 [method test] [arg arg1]] |
||||
# #[para] test method |
||||
# puts "test: $arg1" |
||||
# } |
||||
|
||||
# #*** !doctools |
||||
# #[list_end] [comment {-- end definitions interface_sample1}] |
||||
# } |
||||
|
||||
#*** !doctools |
||||
#[list_end] [comment {--- end class enumeration ---}] |
||||
} |
||||
} |
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
|
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
# Base namespace |
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
namespace eval punk::path { |
||||
namespace export * |
||||
#variable xyz |
||||
|
||||
#*** !doctools |
||||
#[subsection {Namespace punk::path}] |
||||
#[para] Core API functions for punk::path |
||||
#[list_begin definitions] |
||||
|
||||
|
||||
proc pathglob_as_re {pathglob} { |
||||
#*** !doctools |
||||
#[call [fun pathglob_as_re] [arg pathglob]] |
||||
#[para] Returns a regular expression for matching a path to a glob pattern which can contain glob chars *|? in any segment of the path structure |
||||
#[para] ** matches any number of subdirectories. |
||||
#[para] e.g /etc/**/*.txt will match any .txt files at any depth below /etc (except directly within /etc itself) |
||||
#[para] e.g /etc/**.txt will match any .txt files at any depth below /etc |
||||
#[para] any segment that does not contain ** must match exactly one segment in the path |
||||
#[para] e.g the glob /etc/*/*.doc - will match any .doc files that are exactly one tree level below /etc |
||||
#[para] The pathglob doesn't have to contain glob characters, in which case the returned regex will match the pathglob exactly as specified. |
||||
#[para] Regular expression syntax is deliberateley not supported within the pathglob string so that supplied regex characters will be treated as literals |
||||
|
||||
|
||||
#todo - consider whether a way to escape the glob chars ? * is practical - to allow literals ? * |
||||
# - would require counting immediately-preceding backslashes |
||||
set pats [list] |
||||
foreach seg [file split $pathglob] { |
||||
if {[string range $seg end end] eq "/"} { |
||||
set seg [string range $seg 0 end-1] ;# e.g c:/ -> c: / -> "" so that join at end doesn't double up |
||||
} |
||||
if {$seg eq "*"} { |
||||
lappend pats {[^/]*} |
||||
} elseif {$seg eq "**"} { |
||||
lappend pats {.*} |
||||
} else { |
||||
set seg [string map [list {^ {\^} $ {\$} [} {\[} ( {\(} \{ \\\{ \\ {\\}] $seg] ;#treat regex characters in the input as literals |
||||
set seg [string map [list . {[.]}] $seg] |
||||
if {[regexp {[*?]} $seg]} { |
||||
set pat [string map [list ** {.*} * {[^/]*} ? {[^/]}] $seg] |
||||
lappend pats "$pat" |
||||
} else { |
||||
lappend pats "$seg" |
||||
} |
||||
} |
||||
} |
||||
return "^[join $pats /]\$" |
||||
} |
||||
proc globmatchpath {pathglob path args} { |
||||
#*** !doctools |
||||
#[call [fun globmatchpath] [arg pathglob] [arg path] [opt {option value...}]] |
||||
#[para] Return true if the pathglob matches the path |
||||
#[para] see [fun pathglob_as_re] for pathglob description |
||||
#[para] Caller must ensure that file separator is forward slash. (e.g use file normalize on windows) |
||||
#[para] |
||||
#[para] Known options: |
||||
#[para] -nocase 0|1 (default 0 - case sensitive) |
||||
#[para] If -nocase is not supplied - default to case sensitive *except for driveletter* |
||||
#[para] ie - the driveletter alone in paths such as c:/etc will still be case insensitive. (ie c:/ETC/* will match C:/ETC/blah but not C:/etc/blah) |
||||
#[para] Explicitly specifying -nocase 0 will require the entire case to match including the driveletter. |
||||
|
||||
set defaults [dict create\ |
||||
-nocase \uFFFF\ |
||||
] |
||||
set known_opts [dict keys $defaults] |
||||
set opts [dict merge $defaults $args] |
||||
dict for {k v} $args { |
||||
if {$k ni $known_opts} { |
||||
error "Unrecognised options $k - known options: $known_opts" |
||||
} |
||||
} |
||||
# -- --- --- --- --- --- |
||||
set opt_nocase [dict get $opts -nocase] |
||||
set explicit_nocase 1 ;#default to disprove |
||||
if {$opt_nocase eq "\uFFFF"} { |
||||
set opt_nocase 0 |
||||
set explicit_nocase 0 |
||||
} |
||||
# -- --- --- --- --- --- |
||||
if {$opt_nocase} { |
||||
return [regexp -nocase [pathglob_as_re $pathglob] $path] |
||||
} else { |
||||
set re [pathglob_as_re $pathglob] |
||||
if {$explicit_nocase} { |
||||
set ismatch [regexp $re $path] ;#explicit -nocase 0 - require exact match of path literals including driveletter |
||||
} else { |
||||
#caller is using default for -nocase - which indicates case sensitivity - but we have an exception for the driveletter. |
||||
set re_segments [file split $re] ;#Note that file split c:/etc gives {c:/ etc} but file split ^c:/etc gives {^c: etc} |
||||
set first_seg [lindex $re_segments 0] |
||||
if {[regexp {^\^(.{1}):$} $first_seg _match driveletter]} { |
||||
#first part of re is like "^c:" i.e a drive letter |
||||
set chars [string tolower $driveletter][string toupper $driveletter] |
||||
set re [join [concat "^\[$chars\]:" [lrange $re_segments 1 end]] /] ;#rebuild re with case insensitive driveletter only - use join - not file join. file join will misinterpret leading re segment. |
||||
} |
||||
#puts stderr "-->re: $re" |
||||
set ismatch [regexp $re $path] |
||||
} |
||||
} |
||||
return $ismatch |
||||
} |
||||
|
||||
#todo - implement treefiles which acts like dirfiles but allows path globbing in the same way as punk::ns::ns/ |
||||
#then review if treefiles can replace dirfiles or if both should exist (dirfiles can have literal glob chars in path segments - but that is a rare usecase) |
||||
proc treefilenames {basepath tailglob args} { |
||||
#*** !doctools |
||||
#[call [fun treefilenames] [arg basepath] [arg tailglob] [opt {option value...}]] |
||||
#basic (glob based) list of filenames matching tailglob - recursive |
||||
#no natsorting - so order is dependent on filesystem |
||||
set defaults [dict create\ |
||||
-call-depth-internal 0\ |
||||
-antiglob_paths {}\ |
||||
] |
||||
set opts [dict merge $defaults $args] |
||||
set opt_antiglob_paths [dict get $opts -antiglob_paths] |
||||
set CALLDEPTH [dict get $opts -call-depth-internal] |
||||
|
||||
set files [list] |
||||
if {$CALLDEPTH == 0} { |
||||
if {![file isdirectory $basepath]} { |
||||
return [list] |
||||
} |
||||
} |
||||
|
||||
set skip 0 |
||||
foreach anti $opt_antiglob_paths { |
||||
if {[globmatchpath $anti $basepath]} { |
||||
set skip 1 |
||||
break |
||||
} |
||||
} |
||||
if {$skip} { |
||||
return [list] |
||||
} |
||||
|
||||
#todo - account for vfs where matched path could appear to be a directory but is mounted so could be a desired match? |
||||
set dirfiles [glob -nocomplain -dir $basepath -type f $tailglob] |
||||
lappend files {*}$dirfiles |
||||
set dirdirs [glob -nocomplain -dir $basepath -type d *] |
||||
foreach dir $dirdirs { |
||||
set skip 0 |
||||
foreach anti $opt_antiglob_paths { |
||||
if {[globmatchpath $anti $dir]} { |
||||
set skip 1 |
||||
break |
||||
} |
||||
} |
||||
if {$skip} { |
||||
continue |
||||
} |
||||
set nextargs [dict merge $args [list -call-depth-internal [incr CALLDEPTH]]] |
||||
lappend files {*}[treefilenames $dir $tailglob {*}$nextargs] |
||||
} |
||||
return $files |
||||
} |
||||
|
||||
#maint warning - also in punkcheck |
||||
proc relative {reference location} { |
||||
#*** !doctools |
||||
#[call [fun relative] [arg reference] [arg location]] |
||||
#[para] Taking two directory paths, a reference and a location, computes the path |
||||
# of the location relative to the reference. |
||||
#[list_begin itemized] |
||||
#[item] |
||||
#[para] Arguments: |
||||
# [list_begin arguments] |
||||
# [arg_def string reference] The path from which the relative path to location is determined. |
||||
# [arg_def string location] The location path which may be above or below the reference path |
||||
# [list_end] |
||||
#[item] |
||||
#[para] Results: |
||||
#[para] The relative path of the location to the reference path. |
||||
#[para] Will return a single dot "." if the paths are the same |
||||
#[item] |
||||
#[para] Notes: |
||||
#[para] Both paths must be the same type - ie both absolute or both relative |
||||
#[para] Case sensitive. ie relative /etc /etC |
||||
# will return ../etC |
||||
#[para] On windows, the drive-letter component (only) is not case sensitive |
||||
#[para] ie relative c:/etc C:/etc returns . |
||||
#[para] but relative c:/etc C:/Etc returns ../Etc |
||||
#[para] On windows, if the paths are absolute and specifiy different volumes, only the location will be returned. |
||||
# ie relative c:/etc d:/etc/blah |
||||
# returns d:/etc/blah |
||||
#[list_end] |
||||
|
||||
#see also kettle |
||||
# Modified copy of ::fileutil::relative (tcllib) |
||||
# Adapted to 8.5 ({*}). |
||||
|
||||
#review - check volume info on windows.. UNC paths? |
||||
if {[file pathtype $reference] ne [file pathtype $location]} { |
||||
return -code error "Unable to compute relation for paths of different pathtypes: [file pathtype $reference] vs. [file pathtype $location], ($reference vs. $location)" |
||||
} |
||||
|
||||
#avoid normalizing if possible (file normalize *very* expensive on windows) |
||||
set do_normalize 0 |
||||
if {[file pathtype $reference] eq "relative"} { |
||||
#if reference is relative so is location |
||||
if {[regexp {[.]{2}} [list $reference $location]]} { |
||||
set do_normalize 1 |
||||
} |
||||
if {[regexp {[.]/} [list $reference $location]]} { |
||||
set do_normalize 1 |
||||
} |
||||
} else { |
||||
set do_normalize 1 |
||||
} |
||||
if {$do_normalize} { |
||||
set reference [file normalize $reference] |
||||
set location [file normalize $location] |
||||
} |
||||
|
||||
set save $location |
||||
set reference [file split $reference] |
||||
set location [file split $location] |
||||
|
||||
while {[lindex $location 0] eq [lindex $reference 0]} { |
||||
set location [lrange $location 1 end] |
||||
set reference [lrange $reference 1 end] |
||||
if {![llength $location]} {break} |
||||
} |
||||
|
||||
set location_len [llength $location] |
||||
set reference_len [llength $reference] |
||||
|
||||
if {($location_len == 0) && ($reference_len == 0)} { |
||||
# Cases: |
||||
# (a) reference == location |
||||
|
||||
set location . |
||||
} else { |
||||
# Cases: |
||||
# (b) ref is: ref/sub = sub |
||||
# loc is: ref = {} |
||||
|
||||
# (c) ref is: ref = {} |
||||
# loc is: ref/sub = sub |
||||
|
||||
while {$reference_len > 0} { |
||||
set location [linsert $location 0 ..] |
||||
incr reference_len -1 |
||||
} |
||||
set location [file join {*}$location] |
||||
} |
||||
return $location |
||||
} |
||||
|
||||
|
||||
|
||||
#*** !doctools |
||||
#[list_end] [comment {--- end definitions namespace punk::path ---}] |
||||
} |
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
|
||||
|
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
# Secondary API namespace |
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
namespace eval punk::path::lib { |
||||
namespace export * |
||||
namespace path [namespace parent] |
||||
#*** !doctools |
||||
#[subsection {Namespace punk::path::lib}] |
||||
#[para] Secondary functions that are part of the API |
||||
#[list_begin definitions] |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#*** !doctools |
||||
#[list_end] [comment {--- end definitions namespace punk::path::lib ---}] |
||||
} |
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
|
||||
|
||||
|
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
#*** !doctools |
||||
#[section Internal] |
||||
namespace eval punk::path::system { |
||||
#*** !doctools |
||||
#[subsection {Namespace punk::path::system}] |
||||
#[para] Internal functions that are not part of the API |
||||
|
||||
|
||||
|
||||
} |
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
## Ready |
||||
package provide punk::path [namespace eval punk::path { |
||||
variable pkg punk::path |
||||
variable version |
||||
set version 0.1.0 |
||||
}] |
||||
return |
||||
|
||||
#*** !doctools |
||||
#[manpage_end] |
||||
|
@ -0,0 +1,71 @@
|
||||
|
||||
# -*- tcl -* |
||||
# Maintenance Instruction: leave the 999999.xxx.x as is and use 'pmix make' or src/make.tcl to update from <pkg>-buildversion.txt |
||||
# |
||||
# Please consider using a BSD or MIT style license for greatest compatibility with the Tcl ecosystem. |
||||
# Code using preferred Tcl licenses can be eligible for inclusion in Tcllib, Tklib and the punk package repository. |
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
# (C) 2023 |
||||
# |
||||
# @@ Meta Begin |
||||
# Application punk::docgen 0.1.0 |
||||
# Meta platform tcl |
||||
# Meta license BSD |
||||
# @@ Meta End |
||||
|
||||
|
||||
|
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
## Requirements |
||||
##e.g package require frobz |
||||
|
||||
package require punk::repo |
||||
|
||||
|
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
namespace eval punk::docgen { |
||||
proc get_doctools_comments {fname} { |
||||
#does no validation of doctools commands |
||||
#existence of string match #\**!doctools is taken as evidence enough that the file has inline doctools - review |
||||
if {![file exists $fname]} { |
||||
error "get_doctools_comments file '$fname' not found" |
||||
} |
||||
set fd [open $fname r] |
||||
set data [read $fd] |
||||
close $fd |
||||
if {![string match "*#\**!doctools*" $data]} { |
||||
return |
||||
} |
||||
set data [string map [list \r\n \n] $data] |
||||
set in_doctools 0 |
||||
set doctools "" |
||||
foreach ln [split $data \n] { |
||||
set ln [string trim $ln] |
||||
if {$in_doctools && [string index $ln 0] != "#"} { |
||||
set in_doctools 0 |
||||
} elseif {[string range $ln 0 1] == "#*"} { |
||||
#todo - process doctools ordering hints in tail of line |
||||
set in_doctools 1 |
||||
} elseif {$in_doctools} { |
||||
append doctools [string range $ln 1 end] \n |
||||
} |
||||
} |
||||
return $doctools |
||||
} |
||||
#todo - proc autogen_doctools_comments {fname} {} |
||||
# - will probably need to use something like parsetcl - as we won't be able to reliably source in an interp without side-effects and use info body etc. |
||||
# - mechanism will be to autodocument namespaces, procs, methods where no #*** doctools indication present - but use existing doctools comments for that particular item if it is present. |
||||
|
||||
|
||||
|
||||
} |
||||
|
||||
|
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
## Ready |
||||
package provide punk::docgen [namespace eval punk::docgen { |
||||
variable pkg punk::docgen |
||||
variable version |
||||
set version 0.1.0 |
||||
}] |
||||
return |
@ -0,0 +1,397 @@
|
||||
# -*- tcl -*- |
||||
# Maintenance Instruction: leave the 999999.xxx.x as is and use 'pmix make' or src/make.tcl to update from <pkg>-buildversion.txt |
||||
# |
||||
# Please consider using a BSD or MIT style license for greatest compatibility with the Tcl ecosystem. |
||||
# Code using preferred Tcl licenses can be eligible for inclusion in Tcllib, Tklib and the punk package repository. |
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
# (C) 2023 |
||||
# |
||||
# @@ Meta Begin |
||||
# Application punk::path 0.1.0 |
||||
# Meta platform tcl |
||||
# Meta license <unspecified> |
||||
# @@ Meta End |
||||
|
||||
|
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
# doctools header |
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
#*** !doctools |
||||
#[manpage_begin punkshell_module_punk::path 0 0.1.0] |
||||
#[copyright "2023"] |
||||
#[titledesc {Filesystem path utilities}] [comment {-- Name section and table of contents description --}] |
||||
#[moddesc {punk path filesystem utils}] [comment {-- Description at end of page heading --}] |
||||
#[require punk::path] |
||||
#[description] |
||||
#[keywords module path filesystem] |
||||
|
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
|
||||
#*** !doctools |
||||
#[section Overview] |
||||
#[para] overview of punk::path |
||||
#[para] Filesystem path utility functions |
||||
#[subsection Concepts] |
||||
#[para] - |
||||
|
||||
|
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
## Requirements |
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
|
||||
#*** !doctools |
||||
#[subsection dependencies] |
||||
#[para] packages used by punk::path |
||||
#[list_begin itemized] |
||||
|
||||
package require Tcl 8.6 |
||||
#*** !doctools |
||||
#[item] [package {Tcl 8.6}] |
||||
|
||||
# #package require frobz |
||||
# #*** !doctools |
||||
# #[item] [package {frobz}] |
||||
|
||||
#*** !doctools |
||||
#[list_end] |
||||
|
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
|
||||
#*** !doctools |
||||
#[section API] |
||||
|
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
# oo::class namespace |
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
namespace eval punk::path::class { |
||||
#*** !doctools |
||||
#[subsection {Namespace punk::path::class}] |
||||
#[para] class definitions |
||||
if {[info commands [namespace current]::interface_sample1] eq ""} { |
||||
#*** !doctools |
||||
#[list_begin enumerated] |
||||
|
||||
# oo::class create interface_sample1 { |
||||
# #*** !doctools |
||||
# #[enum] CLASS [class interface_sample1] |
||||
# #[list_begin definitions] |
||||
|
||||
# method test {arg1} { |
||||
# #*** !doctools |
||||
# #[call class::interface_sample1 [method test] [arg arg1]] |
||||
# #[para] test method |
||||
# puts "test: $arg1" |
||||
# } |
||||
|
||||
# #*** !doctools |
||||
# #[list_end] [comment {-- end definitions interface_sample1}] |
||||
# } |
||||
|
||||
#*** !doctools |
||||
#[list_end] [comment {--- end class enumeration ---}] |
||||
} |
||||
} |
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
|
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
# Base namespace |
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
namespace eval punk::path { |
||||
namespace export * |
||||
#variable xyz |
||||
|
||||
#*** !doctools |
||||
#[subsection {Namespace punk::path}] |
||||
#[para] Core API functions for punk::path |
||||
#[list_begin definitions] |
||||
|
||||
|
||||
proc pathglob_as_re {pathglob} { |
||||
#*** !doctools |
||||
#[call [fun pathglob_as_re] [arg pathglob]] |
||||
#[para] Returns a regular expression for matching a path to a glob pattern which can contain glob chars *|? in any segment of the path structure |
||||
#[para] ** matches any number of subdirectories. |
||||
#[para] e.g /etc/**/*.txt will match any .txt files at any depth below /etc (except directly within /etc itself) |
||||
#[para] e.g /etc/**.txt will match any .txt files at any depth below /etc |
||||
#[para] any segment that does not contain ** must match exactly one segment in the path |
||||
#[para] e.g the glob /etc/*/*.doc - will match any .doc files that are exactly one tree level below /etc |
||||
#[para] The pathglob doesn't have to contain glob characters, in which case the returned regex will match the pathglob exactly as specified. |
||||
#[para] Regular expression syntax is deliberateley not supported within the pathglob string so that supplied regex characters will be treated as literals |
||||
|
||||
|
||||
#todo - consider whether a way to escape the glob chars ? * is practical - to allow literals ? * |
||||
# - would require counting immediately-preceding backslashes |
||||
set pats [list] |
||||
foreach seg [file split $pathglob] { |
||||
if {[string range $seg end end] eq "/"} { |
||||
set seg [string range $seg 0 end-1] ;# e.g c:/ -> c: / -> "" so that join at end doesn't double up |
||||
} |
||||
if {$seg eq "*"} { |
||||
lappend pats {[^/]*} |
||||
} elseif {$seg eq "**"} { |
||||
lappend pats {.*} |
||||
} else { |
||||
set seg [string map [list {^ {\^} $ {\$} [} {\[} ( {\(} \{ \\\{ \\ {\\}] $seg] ;#treat regex characters in the input as literals |
||||
set seg [string map [list . {[.]}] $seg] |
||||
if {[regexp {[*?]} $seg]} { |
||||
set pat [string map [list ** {.*} * {[^/]*} ? {[^/]}] $seg] |
||||
lappend pats "$pat" |
||||
} else { |
||||
lappend pats "$seg" |
||||
} |
||||
} |
||||
} |
||||
return "^[join $pats /]\$" |
||||
} |
||||
proc globmatchpath {pathglob path args} { |
||||
#*** !doctools |
||||
#[call [fun globmatchpath] [arg pathglob] [arg path] [opt {option value...}]] |
||||
#[para] Return true if the pathglob matches the path |
||||
#[para] see [fun pathglob_as_re] for pathglob description |
||||
#[para] Caller must ensure that file separator is forward slash. (e.g use file normalize on windows) |
||||
#[para] |
||||
#[para] Known options: |
||||
#[para] -nocase 0|1 (default 0 - case sensitive) |
||||
#[para] If -nocase is not supplied - default to case sensitive *except for driveletter* |
||||
#[para] ie - the driveletter alone in paths such as c:/etc will still be case insensitive. (ie c:/ETC/* will match C:/ETC/blah but not C:/etc/blah) |
||||
#[para] Explicitly specifying -nocase 0 will require the entire case to match including the driveletter. |
||||
|
||||
set defaults [dict create\ |
||||
-nocase \uFFFF\ |
||||
] |
||||
set known_opts [dict keys $defaults] |
||||
set opts [dict merge $defaults $args] |
||||
dict for {k v} $args { |
||||
if {$k ni $known_opts} { |
||||
error "Unrecognised options $k - known options: $known_opts" |
||||
} |
||||
} |
||||
# -- --- --- --- --- --- |
||||
set opt_nocase [dict get $opts -nocase] |
||||
set explicit_nocase 1 ;#default to disprove |
||||
if {$opt_nocase eq "\uFFFF"} { |
||||
set opt_nocase 0 |
||||
set explicit_nocase 0 |
||||
} |
||||
# -- --- --- --- --- --- |
||||
if {$opt_nocase} { |
||||
return [regexp -nocase [pathglob_as_re $pathglob] $path] |
||||
} else { |
||||
set re [pathglob_as_re $pathglob] |
||||
if {$explicit_nocase} { |
||||
set ismatch [regexp $re $path] ;#explicit -nocase 0 - require exact match of path literals including driveletter |
||||
} else { |
||||
#caller is using default for -nocase - which indicates case sensitivity - but we have an exception for the driveletter. |
||||
set re_segments [file split $re] ;#Note that file split c:/etc gives {c:/ etc} but file split ^c:/etc gives {^c: etc} |
||||
set first_seg [lindex $re_segments 0] |
||||
if {[regexp {^\^(.{1}):$} $first_seg _match driveletter]} { |
||||
#first part of re is like "^c:" i.e a drive letter |
||||
set chars [string tolower $driveletter][string toupper $driveletter] |
||||
set re [join [concat "^\[$chars\]:" [lrange $re_segments 1 end]] /] ;#rebuild re with case insensitive driveletter only - use join - not file join. file join will misinterpret leading re segment. |
||||
} |
||||
#puts stderr "-->re: $re" |
||||
set ismatch [regexp $re $path] |
||||
} |
||||
} |
||||
return $ismatch |
||||
} |
||||
|
||||
#todo - implement treefiles which acts like dirfiles but allows path globbing in the same way as punk::ns::ns/ |
||||
#then review if treefiles can replace dirfiles or if both should exist (dirfiles can have literal glob chars in path segments - but that is a rare usecase) |
||||
proc treefilenames {basepath tailglob args} { |
||||
#*** !doctools |
||||
#[call [fun treefilenames] [arg basepath] [arg tailglob] [opt {option value...}]] |
||||
#basic (glob based) list of filenames matching tailglob - recursive |
||||
#no natsorting - so order is dependent on filesystem |
||||
set defaults [dict create\ |
||||
-call-depth-internal 0\ |
||||
-antiglob_paths {}\ |
||||
] |
||||
set opts [dict merge $defaults $args] |
||||
set opt_antiglob_paths [dict get $opts -antiglob_paths] |
||||
set CALLDEPTH [dict get $opts -call-depth-internal] |
||||
|
||||
set files [list] |
||||
if {$CALLDEPTH == 0} { |
||||
if {![file isdirectory $basepath]} { |
||||
return [list] |
||||
} |
||||
} |
||||
|
||||
set skip 0 |
||||
foreach anti $opt_antiglob_paths { |
||||
if {[globmatchpath $anti $basepath]} { |
||||
set skip 1 |
||||
break |
||||
} |
||||
} |
||||
if {$skip} { |
||||
return [list] |
||||
} |
||||
|
||||
#todo - account for vfs where matched path could appear to be a directory but is mounted so could be a desired match? |
||||
set dirfiles [glob -nocomplain -dir $basepath -type f $tailglob] |
||||
lappend files {*}$dirfiles |
||||
set dirdirs [glob -nocomplain -dir $basepath -type d *] |
||||
foreach dir $dirdirs { |
||||
set skip 0 |
||||
foreach anti $opt_antiglob_paths { |
||||
if {[globmatchpath $anti $dir]} { |
||||
set skip 1 |
||||
break |
||||
} |
||||
} |
||||
if {$skip} { |
||||
continue |
||||
} |
||||
set nextargs [dict merge $args [list -call-depth-internal [incr CALLDEPTH]]] |
||||
lappend files {*}[treefilenames $dir $tailglob {*}$nextargs] |
||||
} |
||||
return $files |
||||
} |
||||
|
||||
#maint warning - also in punkcheck |
||||
proc relative {reference location} { |
||||
#*** !doctools |
||||
#[call [fun relative] [arg reference] [arg location]] |
||||
#[para] Taking two directory paths, a reference and a location, computes the path |
||||
# of the location relative to the reference. |
||||
#[list_begin itemized] |
||||
#[item] |
||||
#[para] Arguments: |
||||
# [list_begin arguments] |
||||
# [arg_def string reference] The path from which the relative path to location is determined. |
||||
# [arg_def string location] The location path which may be above or below the reference path |
||||
# [list_end] |
||||
#[item] |
||||
#[para] Results: |
||||
#[para] The relative path of the location to the reference path. |
||||
#[para] Will return a single dot "." if the paths are the same |
||||
#[item] |
||||
#[para] Notes: |
||||
#[para] Both paths must be the same type - ie both absolute or both relative |
||||
#[para] Case sensitive. ie relative /etc /etC |
||||
# will return ../etC |
||||
#[para] On windows, the drive-letter component (only) is not case sensitive |
||||
#[para] ie relative c:/etc C:/etc returns . |
||||
#[para] but relative c:/etc C:/Etc returns ../Etc |
||||
#[para] On windows, if the paths are absolute and specifiy different volumes, only the location will be returned. |
||||
# ie relative c:/etc d:/etc/blah |
||||
# returns d:/etc/blah |
||||
#[list_end] |
||||
|
||||
#see also kettle |
||||
# Modified copy of ::fileutil::relative (tcllib) |
||||
# Adapted to 8.5 ({*}). |
||||
|
||||
#review - check volume info on windows.. UNC paths? |
||||
if {[file pathtype $reference] ne [file pathtype $location]} { |
||||
return -code error "Unable to compute relation for paths of different pathtypes: [file pathtype $reference] vs. [file pathtype $location], ($reference vs. $location)" |
||||
} |
||||
|
||||
#avoid normalizing if possible (file normalize *very* expensive on windows) |
||||
set do_normalize 0 |
||||
if {[file pathtype $reference] eq "relative"} { |
||||
#if reference is relative so is location |
||||
if {[regexp {[.]{2}} [list $reference $location]]} { |
||||
set do_normalize 1 |
||||
} |
||||
if {[regexp {[.]/} [list $reference $location]]} { |
||||
set do_normalize 1 |
||||
} |
||||
} else { |
||||
set do_normalize 1 |
||||
} |
||||
if {$do_normalize} { |
||||
set reference [file normalize $reference] |
||||
set location [file normalize $location] |
||||
} |
||||
|
||||
set save $location |
||||
set reference [file split $reference] |
||||
set location [file split $location] |
||||
|
||||
while {[lindex $location 0] eq [lindex $reference 0]} { |
||||
set location [lrange $location 1 end] |
||||
set reference [lrange $reference 1 end] |
||||
if {![llength $location]} {break} |
||||
} |
||||
|
||||
set location_len [llength $location] |
||||
set reference_len [llength $reference] |
||||
|
||||
if {($location_len == 0) && ($reference_len == 0)} { |
||||
# Cases: |
||||
# (a) reference == location |
||||
|
||||
set location . |
||||
} else { |
||||
# Cases: |
||||
# (b) ref is: ref/sub = sub |
||||
# loc is: ref = {} |
||||
|
||||
# (c) ref is: ref = {} |
||||
# loc is: ref/sub = sub |
||||
|
||||
while {$reference_len > 0} { |
||||
set location [linsert $location 0 ..] |
||||
incr reference_len -1 |
||||
} |
||||
set location [file join {*}$location] |
||||
} |
||||
return $location |
||||
} |
||||
|
||||
|
||||
|
||||
#*** !doctools |
||||
#[list_end] [comment {--- end definitions namespace punk::path ---}] |
||||
} |
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
|
||||
|
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
# Secondary API namespace |
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
namespace eval punk::path::lib { |
||||
namespace export * |
||||
namespace path [namespace parent] |
||||
#*** !doctools |
||||
#[subsection {Namespace punk::path::lib}] |
||||
#[para] Secondary functions that are part of the API |
||||
#[list_begin definitions] |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#*** !doctools |
||||
#[list_end] [comment {--- end definitions namespace punk::path::lib ---}] |
||||
} |
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
|
||||
|
||||
|
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
#*** !doctools |
||||
#[section Internal] |
||||
namespace eval punk::path::system { |
||||
#*** !doctools |
||||
#[subsection {Namespace punk::path::system}] |
||||
#[para] Internal functions that are not part of the API |
||||
|
||||
|
||||
|
||||
} |
||||
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
||||
## Ready |
||||
package provide punk::path [namespace eval punk::path { |
||||
variable pkg punk::path |
||||
variable version |
||||
set version 0.1.0 |
||||
}] |
||||
return |
||||
|
||||
#*** !doctools |
||||
#[manpage_end] |
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue