summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtrac2md.py30
1 files changed, 0 insertions, 30 deletions
diff --git a/trac2md.py b/trac2md.py
index c97b569..7e3a495 100755
--- a/trac2md.py
+++ b/trac2md.py
@@ -26,36 +26,6 @@ wikiheading_patterns = tuple(
(level, re.compile("^{} (.*)[ \t]*=*$".format("=" * level)))
for level in range(1, 7))
-def to_timestamp(tm):
- ''' Convert to timestamp which can be jsonified '''
-
- tm = tm.replace('+00:00', '')
- date = datetime.strptime(tm, '%Y-%m-%dT%H:%M:%S')
- ts = str(time.mktime(date.timetuple()))[:-2] # Strip the .0
- return ts
-
-
-def strip_wikilink(content):
- ''' Need to remove wiki link format from custom fields. They come in a
- variety of forms that can be comma or whitespace separated. They can also
- include link names which must also be removed.
-
- [https://bugzilla.redhat.com/show_bug.cgi?id=772777]
- [https://bugzilla.com/123456789], [http://bugzilla.com/7777777 7777777]
- [https://bugzilla.com/6666666 6666666]
- '''
-
- links = []
- if wikilink_pattern.search(content):
- # Looks like we have a link in here
- links = []
- mylist = re.findall(r'\[([^]]*)\]', content)
- for i in mylist:
- links.append(i.split(' ', 1)[0])
- return ', '.join(links)
- else:
- return content
-
def convert_headers(line):
''' Convert wikiformat headers