summaryrefslogtreecommitdiff
path: root/.config/terminator
diff options
context:
space:
mode:
authorKévin Le Gouguec <kevin.legouguec@gmail.com>2018-06-24 17:08:30 +0200
committerKévin Le Gouguec <kevin.legouguec@gmail.com>2018-06-24 17:08:30 +0200
commitbe60ab716b0589ea15c24fe509eaa0eba066fb7f (patch)
treea0da2bb00a6a0234a2db23e3bae34b069e9d5b22 /.config/terminator
parent40f20dde22bf8668b7407ebaf8972138348ca0c8 (diff)
downloaddotfiles-be60ab716b0589ea15c24fe509eaa0eba066fb7f.tar.xz
Add trackers from gtk3-devel changelog
Leaving out: - 'bog' because it looks like a typo, - 'commit' because I cannot think of a way to make it work in the general case.
Diffstat (limited to '.config/terminator')
-rw-r--r--.config/terminator/plugins/susechangelog.py29
1 files changed, 12 insertions, 17 deletions
diff --git a/.config/terminator/plugins/susechangelog.py b/.config/terminator/plugins/susechangelog.py
index 95fc5ec..3c69810 100644
--- a/.config/terminator/plugins/susechangelog.py
+++ b/.config/terminator/plugins/susechangelog.py
@@ -8,37 +8,32 @@ AVAILABLE = ['SuseTrackersURLHandler']
_TRACKERS = {
+ 'bgo': 'https://bugzilla.gnome.org/show_bug.cgi?id={}',
+ 'bmo': 'https://bugzilla.mozilla.org/show_bug.cgi?id={}',
+ 'bnc': 'https://bugzilla.novell.com/show_bug.cgi?id={}',
+ 'boo': 'https://bugzilla.opensuse.org/show_bug.cgi?id={}',
'bsc': 'https://bugzilla.suse.com/show_bug.cgi?id={}',
'fate': 'https://features.opensuse.org/{}',
- 'fdo': 'https://bugs.freedesktop.org/show_bug.cgi?id={}'
+ 'fdo': 'https://bugs.freedesktop.org/show_bug.cgi?id={}',
+ 'glgo#gnome/gtk': 'https://gitlab.gnome.org/GNOME/gtk/issues/{}',
+ 'kde': 'https://bugs.kde.org/show_bug.cgi?id={}'
}
-_MATCH = r'(?i)(?P<tracker>{t})#(?P<id>{i})'.format(
+_PATTERN = r'(?i)(?P<tracker>{t})#(?P<id>{i})'.format(
t='|'.join(_TRACKERS),
i='[0-9]+(?:#c[0-9]+)?'
)
+_REGEX = re.compile(_PATTERN)
+
class SuseTrackersURLHandler(URLHandler):
capabilities = ['url_handler']
handler_name = 'suse_rpm_trackers'
- match = r'\b'+_MATCH+r'\b'
+ match = r'\b'+_PATTERN+r'\b'
def callback(self, ref):
- fields = re.match(_MATCH, ref).groupdict()
+ fields = _REGEX.match(ref).groupdict()
template = _TRACKERS[fields['tracker'].lower()]
bug_id = fields['id']
return template.format(bug_id)
-
-
-# Other ideas from gtk3-devel's changelog:
-# bgo#N
-# bmo#N
-# bnc#N
-# bog#N
-# boo#N
-# bsc#N
-# bug#N
-# commit#X
-# glgo#GNOME/GTK#N
-# kde#N