rtutil: Add docstring with basic rationale.
This commit is contained in:
parent
2fb7826ab4
commit
a3630ab04e
1 changed files with 11 additions and 0 deletions
|
@ -30,6 +30,17 @@ from typing import (
|
||||||
RTId = Union[int, str]
|
RTId = Union[int, str]
|
||||||
|
|
||||||
class RT:
|
class RT:
|
||||||
|
"""RT utility wrapper class
|
||||||
|
|
||||||
|
Given an RT client object, this class provides common functionality for
|
||||||
|
working with RT links in Beancount metadata:
|
||||||
|
|
||||||
|
* Parse links
|
||||||
|
* Verify that they refer to extant objects in RT
|
||||||
|
* Convert metadata links to RT web links
|
||||||
|
* Cache results, to reduce network requests
|
||||||
|
"""
|
||||||
|
|
||||||
PARSE_REGEXPS = [
|
PARSE_REGEXPS = [
|
||||||
re.compile(r'^rt:([0-9]+)(?:/([0-9]+))?/?$'),
|
re.compile(r'^rt:([0-9]+)(?:/([0-9]+))?/?$'),
|
||||||
re.compile(r'^rt://ticket/([0-9]+)(?:/attachments?/([0-9]+))?/?$'),
|
re.compile(r'^rt://ticket/([0-9]+)(?:/attachments?/([0-9]+))?/?$'),
|
||||||
|
|
Loading…
Reference in a new issue