Tcl Library Source Code

Check-in [a136e80afe]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

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

Overview
Comment:oauth - oauth - Tkt [8fd2561785] Removed bogus '{' character at beginning of regexp for `Split` (on first separator character). Version bump 1.0.3 - B (oauth)
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: a136e80afe45458546a45ad383b320df1b16f693d1de985f4a0052fa68bca0d8
User & Date: aku 2019-04-16 23:25:42
References
2019-04-16
23:30 Ticket [8fd2561785] Fix oauth::query defaulting POST requests to GET status still Open with 3 other changes artifact: 1e6b9df389 user: aku
Context
2019-04-18
20:32
Doctools: markdown. Fixed mishandling of multiple copyright clauses in MD generator. Version bump 1.5.6 - B (markdown) - T (markdown) check-in: d00283c095 user: aku tags: trunk
2019-04-17
02:13
Get more doctools fixes check-in: a9c3da3b35 user: aku tags: doc-overhaul
2019-04-16
23:25
oauth - oauth - Tkt [8fd2561785] Removed bogus '{' character at beginning of regexp for `Split` (on first separator character). Version bump 1.0.3 - B (oauth) check-in: a136e80afe user: aku tags: trunk
22:56
Doctools - markdown - Tkt [c17f7019ec] Multiple fixes - Handling of multi-line input to emphasis and similar doctools markup. The markdown markup for these are limited to inline. Fixed by emitting markup for each line of the input. - Flush command results in example_end. Fixes the markup of such commands getting wrongly moved to after the example. Tweaked example formatting, dropping trailing linebreak and empty line in block quote. Version bump 1.5.5 - B (markdown, text) - T (markdown, text) - D (Various manpages affected by the issues, and tweak) check-in: f5786278a4 user: aku tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to embedded/md/tcllib/files/modules/oauth/oauth.md.

1
2
3
4
5
6
7
8
9
10
11
12
..
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
[//000000001]: # (oauth \- oauth)
[//000000002]: # (Generated from file 'oauth\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2014 Javi P\. <[email protected]\.es>)
[//000000004]: # (oauth\(n\) 1\.0\.2 tcllib "oauth")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>
................................................................................
  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require oauth ?1\.0\.2?  

[__::oauth::config__](#1)  
[__::oauth::config__ ?*options*\.\.\.?](#2)  
[__::oauth::header__ *baseURL* ?*postQuery*?](#3)  
[__::oauth::query__ *baseURL* ?*postQuery*?](#4)  

# <a name='description'></a>DESCRIPTION



|







 







|







1
2
3
4
5
6
7
8
9
10
11
12
..
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
[//000000001]: # (oauth \- oauth)
[//000000002]: # (Generated from file 'oauth\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2014 Javi P\. <[email protected]\.es>)
[//000000004]: # (oauth\(n\) 1\.0\.3 tcllib "oauth")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>
................................................................................
  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require oauth ?1\.0\.3?  

[__::oauth::config__](#1)  
[__::oauth::config__ ?*options*\.\.\.?](#2)  
[__::oauth::header__ *baseURL* ?*postQuery*?](#3)  
[__::oauth::query__ *baseURL* ?*postQuery*?](#4)  

# <a name='description'></a>DESCRIPTION

Changes to idoc/man/files/modules/oauth/oauth.n.

1
2
3
4
5
6
7
8
9
10
11
12
...
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
'\"
'\" Generated from file 'oauth\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2014 Javi P\&. <[email protected]\&.es>
'\"
.TH "oauth" n 1\&.0\&.2 tcllib "oauth"
.\" 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,
................................................................................
..
.BS
.SH NAME
oauth \- oauth API base signature
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBoauth  ?1\&.0\&.2?\fR
.sp
\fB::oauth::config\fR
.sp
\fB::oauth::config\fR ?\fIoptions\fR\&.\&.\&.?
.sp
\fB::oauth::header\fR \fIbaseURL\fR ?\fIpostQuery\fR?
.sp



|







 







|







1
2
3
4
5
6
7
8
9
10
11
12
...
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
'\"
'\" Generated from file 'oauth\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2014 Javi P\&. <[email protected]\&.es>
'\"
.TH "oauth" n 1\&.0\&.3 tcllib "oauth"
.\" 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,
................................................................................
..
.BS
.SH NAME
oauth \- oauth API base signature
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBoauth  ?1\&.0\&.3?\fR
.sp
\fB::oauth::config\fR
.sp
\fB::oauth::config\fR ?\fIoptions\fR\&.\&.\&.?
.sp
\fB::oauth::header\fR \fIbaseURL\fR ?\fIpostQuery\fR?
.sp

Changes to idoc/www/tcllib/files/modules/oauth/oauth.html.

103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
...
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">oauth(n) 1.0.2 tcllib &quot;oauth&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>oauth - oauth API base signature</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="#copyright">Copyright</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.5</b></li>
<li>package require <b class="pkgname">oauth <span class="opt">?1.0.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::oauth::config</b></a></li>
<li><a href="#2"><b class="cmd">::oauth::config</b> <span class="opt">?<i class="arg">options</i>...?</span></a></li>
<li><a href="#3"><b class="cmd">::oauth::header</b> <i class="arg">baseURL</i> <span class="opt">?<i class="arg">postQuery</i>?</span></a></li>
<li><a href="#4"><b class="cmd">::oauth::query</b> <i class="arg">baseURL</i> <span class="opt">?<i class="arg">postQuery</i>?</span></a></li>
</ul>






|







 







|







103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
...
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">oauth(n) 1.0.3 tcllib &quot;oauth&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>oauth - oauth API base signature</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="#copyright">Copyright</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.5</b></li>
<li>package require <b class="pkgname">oauth <span class="opt">?1.0.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::oauth::config</b></a></li>
<li><a href="#2"><b class="cmd">::oauth::config</b> <span class="opt">?<i class="arg">options</i>...?</span></a></li>
<li><a href="#3"><b class="cmd">::oauth::header</b> <i class="arg">baseURL</i> <span class="opt">?<i class="arg">postQuery</i>?</span></a></li>
<li><a href="#4"><b class="cmd">::oauth::query</b> <i class="arg">baseURL</i> <span class="opt">?<i class="arg">postQuery</i>?</span></a></li>
</ul>

Changes to modules/oauth/oauth.man.

1
2
3
4
5
6
7
8
9
[comment {-*- tcl -*- doctools manpage}]
[vset PACKAGE_VERSION 1.0.2]
[manpage_begin oauth n [vset PACKAGE_VERSION]]
[keywords {oauth}]
[keywords {RFC 5849}]
[keywords {RFC 2718}]
[keywords twitter]
[copyright {2014 Javi P. <[email protected]>}]
[moddesc   {oauth}]
|







1
2
3
4
5
6
7
8
9
[comment {-*- tcl -*- doctools manpage}]
[vset PACKAGE_VERSION 1.0.3]
[manpage_begin oauth n [vset PACKAGE_VERSION]]
[keywords {oauth}]
[keywords {RFC 5849}]
[keywords {RFC 2718}]
[keywords twitter]
[copyright {2014 Javi P. <[email protected]>}]
[moddesc   {oauth}]

Changes to modules/oauth/oauth.tcl.

21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
...
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
#       1.5 Timestamp (oauth_timestamp) time in unix format of the request
#       1.6 Token (oauth_token) a parameter you can obtain in your account settings
#       1.7 Version (oauth_version) the OAuth version, actually 1.0

#  TODO: create online documentation

package require Tcl 8.5
package provide oauth 1.0.2

package require http
package require tls
package require base64
package require sha1

http::register https 443 ::tls::socket
................................................................................
    return $tmp
}

# Split -
#	Split the string on the first separator
#       and return both parts as a list.
proc ::oauth::Split {string sep} {
    regexp "\{^(\[^${sep}\]+)${sep}(.*)\$" $string -> key value
    list $key $value
}

# PercentEncode --
#       Encoding process in http://tools.ietf.org/html/rfc3986#section-2.1
#       for Twitter authentication. (http::formatQuery is lowcase)
proc ::oauth::PercentEncode {string} {






|







 







|







21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
...
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
#       1.5 Timestamp (oauth_timestamp) time in unix format of the request
#       1.6 Token (oauth_token) a parameter you can obtain in your account settings
#       1.7 Version (oauth_version) the OAuth version, actually 1.0

#  TODO: create online documentation

package require Tcl 8.5
package provide oauth 1.0.3

package require http
package require tls
package require base64
package require sha1

http::register https 443 ::tls::socket
................................................................................
    return $tmp
}

# Split -
#	Split the string on the first separator
#       and return both parts as a list.
proc ::oauth::Split {string sep} {
    regexp "^(\[^${sep}\]+)${sep}(.*)\$" $string -> key value
    list $key $value
}

# PercentEncode --
#       Encoding process in http://tools.ietf.org/html/rfc3986#section-2.1
#       for Twitter authentication. (http::formatQuery is lowcase)
proc ::oauth::PercentEncode {string} {

Changes to modules/oauth/pkgIndex.tcl.

1
2
if {![package vsatisfies [package provide Tcl] 8.5]} {return}
package ifneeded oauth 1.0.2 [list source [file join $dir oauth.tcl]]
|
1
2
if {![package vsatisfies [package provide Tcl] 8.5]} {return}
package ifneeded oauth 1.0.3 [list source [file join $dir oauth.tcl]]