Tkabber plugins

Check-in [5a1ff09048]
Login

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

Overview
Comment:Added custom URL for the Tkabber Fossil repository artifacts, like [3cd34577a3].
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 5a1ff0904831d5d2fb155604561f6019201dd9e8
User & Date: sgolovan 2015-12-22 08:50:13
Context
2015-12-22
13:13
Modified the custom URL procedure to allow more flexible URL definitions. In particular, regexps with more than one capture group are permitted. check-in: 6296c01b05 user: sgolovan tags: trunk
08:50
Added custom URL for the Tkabber Fossil repository artifacts, like [3cd34577a3]. check-in: 5a1ff09048 user: sgolovan tags: trunk
2015-12-19
19:58
Updated Ukrainian translations. check-in: 5f5c327566 user: sgolovan tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ChangeLog.






1
2
3
4
5
6
7





2015-12-19  Sergei Golovan  <sgolovan@nes.ru>

	* ejabberd/msgs/uk.msg: Updated Ukrainian translations.

	* cyrillize/cyrillize.tcl, cyrillize/engrus.tbl: Added the Ukrainian
	  keyboard layout support.

>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
2015-12-22  Sergei Golovan  <sgolovan@nes.ru>

	* custom-urls/custom-urls.tcl: Added custom URL for the Tkabber Fossil
	  repository artifacts, like [3cd34577a3].

2015-12-19  Sergei Golovan  <sgolovan@nes.ru>

	* ejabberd/msgs/uk.msg: Updated Ukrainian translations.

	* cyrillize/cyrillize.tcl, cyrillize/engrus.tbl: Added the Ukrainian
	  keyboard layout support.

Changes to custom-urls/custom-urls.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13






14
15
16
17
18
19
20
# custom-urls.tcl --
#
#       Custom URL Processing -- converts some strings into clickable URLs.
#
# Predefined examples include:
# 1) XEP links:
#    xep-0013 or jep-0013 or jep-13 or xep-13 or jep13 or xep13 ->
#        http://www.xmpp.org/extensions/xep-0013.html
# 2) RFC links:
#    rfc-1111 -> http://tools.ietf.org/html/rfc1111
# 3) Debian BTS links:
#    bug-345678 or #345678 ->
#        http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=345678






#
# Matching is case insensitive.
#
# To define your own custom numbered URL add its definition (similar to URLs
# below) to postload section of Tkabber config file. Note that the number must
# match the second regexp match variable, and the whole link must match the
# first match variable, so look closely at (?:) modifiers in the examples.













>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# custom-urls.tcl --
#
#       Custom URL Processing -- converts some strings into clickable URLs.
#
# Predefined examples include:
# 1) XEP links:
#    xep-0013 or jep-0013 or jep-13 or xep-13 or jep13 or xep13 ->
#        http://www.xmpp.org/extensions/xep-0013.html
# 2) RFC links:
#    rfc-1111 -> http://tools.ietf.org/html/rfc1111
# 3) Debian BTS links:
#    bug-345678 or #345678 ->
#        http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=345678
# 4) Tkabber wiki links:
#    wiki:en/Main_Page ->
#        http://chiselapp.com/user/sgolovan/repository/tkabber-wiki/doc/tip/wiki/en/Main_Page.md
# 5) Tkabber tickets or check-ins:
#    [3cd34577a3] ->
#        http://chiselapp.com/user/sgolovan/repository/tkabber/info/3cd34577a3
#
# Matching is case insensitive.
#
# To define your own custom numbered URL add its definition (similar to URLs
# below) to postload section of Tkabber config file. Note that the number must
# match the second regexp match variable, and the whole link must match the
# first match variable, so look closely at (?:) modifiers in the examples.
62
63
64
65
66
67
68


69
70
71
72
73
74
75
                          "http://www.xmpp.org/extensions/xep-%04d.html"]
    set url(rfc)    [list {\y(rfc(?:-|\s+)?(\d+))\y} \
                          "http://tools.ietf.org/html/rfc%d"]
    set url(debbug) [list {(?:^|\s)((?:(?:bug(?:-|\s+)?\#?)|\#)(\d+))\y} \
                          "http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=%d"]
    set url(wiki)   [list {\y(wiki:([\w/]+))\y} \
                          "https://chiselapp.com/user/sgolovan/repository/tkabber-wiki/doc/tip/wiki/%s.md"]



    ::richtext::register_entity custom-url \
            -parser [namespace current]::process_urls \
            -parser-priority 55

    ::richtext::entity_state custom-url 1
}







>
>







68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
                          "http://www.xmpp.org/extensions/xep-%04d.html"]
    set url(rfc)    [list {\y(rfc(?:-|\s+)?(\d+))\y} \
                          "http://tools.ietf.org/html/rfc%d"]
    set url(debbug) [list {(?:^|\s)((?:(?:bug(?:-|\s+)?\#?)|\#)(\d+))\y} \
                          "http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=%d"]
    set url(wiki)   [list {\y(wiki:([\w/]+))\y} \
                          "https://chiselapp.com/user/sgolovan/repository/tkabber-wiki/doc/tip/wiki/%s.md"]
    set url(artifact) [list {(\[([0-9a-f]{4,40})\])} \
                          "https://chiselapp.com/user/sgolovan/repository/tkabber/info/%s"]

    ::richtext::register_entity custom-url \
            -parser [namespace current]::process_urls \
            -parser-priority 55

    ::richtext::entity_state custom-url 1
}