Check-in [3dd438190f]

Not logged in

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

Overview
Comment:Fixed issues in meta data generation for Tcl apps, and usage.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:3dd438190f9af84394f1cee39c5bf44caf9f7118
User & Date: aku 2014-02-18 05:13:42
Context
2014-03-28
19:15
Split the build/install instructions for unix vs. windows. check-in: 1bc1443535 user: andreask tags: trunk
2014-02-18
05:13
Fixed issues in meta data generation for Tcl apps, and usage. check-in: 3dd438190f user: aku tags: trunk
2013-10-18
18:25
Extended the special command @setup to place fossil repository links into the generated code. check-in: ec34acae87 user: andreask tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to meta.tcl.

121
122
123
124
125
126
127

128
129
130
131
132
133
134
...
248
249
250
251
252
253
254

255
256
257
258
259
260
261
    return \n$mbegin\n$prefix[join [Assemble $name $ver $type $md] \n$prefix]\n$mend
}

proc ::kettle::meta::insert {dst type name} {
    variable mbegin
    variable mend


    set md [Get $type $name ver]
    set pfx "# "
    set block $pfx[join [Assemble $name $ver $type $md] "\n$pfx"]

    lassign [GetInternal [path cat $dst]] header _ trailer
    path write $dst $header\n$mbegin\n$block\n$mend\n$trailer
    return
................................................................................

    set key [list $type $name]

    if {![dict exists $mduser $key]} {
	io warn {
	    io puts "[string totitle $type] $name: No user-specified teapot meta data found."
	}

    }

    set m [dict get $md $key]

    io trace {  = $m}

    set ver [dict get $m version]







>







 







>







121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
...
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
    return \n$mbegin\n$prefix[join [Assemble $name $ver $type $md] \n$prefix]\n$mend
}

proc ::kettle::meta::insert {dst type name} {
    variable mbegin
    variable mend

    set ver 0
    set md [Get $type $name ver]
    set pfx "# "
    set block $pfx[join [Assemble $name $ver $type $md] "\n$pfx"]

    lassign [GetInternal [path cat $dst]] header _ trailer
    path write $dst $header\n$mbegin\n$block\n$mend\n$trailer
    return
................................................................................

    set key [list $type $name]

    if {![dict exists $mduser $key]} {
	io warn {
	    io puts "[string totitle $type] $name: No user-specified teapot meta data found."
	}
	return
    }

    set m [dict get $md $key]

    io trace {  = $m}

    set ver [dict get $m version]

Changes to tclapp.tcl.

62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
..
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97

    # For applications without user-specified meta data we initialize
    # a recipe which allows the developer to quickly insert a basic
    # structure with standard keys, which can then be completed
    # manually.

    if {![meta defined? application $name]} {
	recipe define meta-generate-application-$fname "Generate empty data for application $fname" {root files pn pv} {

	    dict set m platform    tcl
	    dict set m author      ?
	    dict set m summary     ?
	    dict set m description ?
	    dict set m subject     ?
	    dict set m category    ?
................................................................................
	    if {![dict exists $m location]} {
		dict set m location ?
	    }

	    set m [meta format-internal application $name ? $m]
	    path write-modify $src \
		[list kettle path add-top-comment $m]
	} $src

	recipe parent meta-generate-application-$fname  meta-generate-tcl-applications
	recipe parent meta-generate-tcl-applications    meta-generate-applications
	recipe parent meta-generate-applications        meta-generate
    }
    return
}

# # ## ### ##### ######## ############# #####################
return







|







 







|










62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
..
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97

    # For applications without user-specified meta data we initialize
    # a recipe which allows the developer to quickly insert a basic
    # structure with standard keys, which can then be completed
    # manually.

    if {![meta defined? application $name]} {
	recipe define meta-generate-application-$fname "Generate empty data for application $fname" {src name} {

	    dict set m platform    tcl
	    dict set m author      ?
	    dict set m summary     ?
	    dict set m description ?
	    dict set m subject     ?
	    dict set m category    ?
................................................................................
	    if {![dict exists $m location]} {
		dict set m location ?
	    }

	    set m [meta format-internal application $name ? $m]
	    path write-modify $src \
		[list kettle path add-top-comment $m]
	} $src $name

	recipe parent meta-generate-application-$fname  meta-generate-tcl-applications
	recipe parent meta-generate-tcl-applications    meta-generate-applications
	recipe parent meta-generate-applications        meta-generate
    }
    return
}

# # ## ### ##### ######## ############# #####################
return