[Cryptech-Commits] [user/sra/pelican] 43/68: Unused and fairly sketchy code

git at cryptech.is git at cryptech.is
Mon Jul 19 22:25:22 UTC 2021


This is an automated email from the git hooks/post-receive script.

sra at hactrn.net pushed a commit to branch pelican
in repository user/sra/pelican.

commit 5c1f5611e2d35a27cde3207cf98ed1a8950fdc8b
Author: Rob Austein <sra at hactrn.net>
AuthorDate: Mon Feb 15 00:35:17 2021 +0000

    Unused and fairly sketchy code
---
 trac2md.py | 30 ------------------------------
 1 file changed, 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



More information about the Commits mailing list