Commits

Neil Muller  committed f93802a

Add helper function to extract TWD url from annotations

  • Participants
  • Parent commits bac9595

Comments (0)

Files changed (1)

File TWDA/twd_utils.py

         yield oCS
     sys.stderr.write('\n')
     sys.stderr.flush()
+
+
+def get_twd_url(sText):
+    if not sText:
+        return None
+    if not sTWDURLIndicator in sText:
+        return None
+    for sLine in sText.split('\n'):
+        if not sTWDURLIndicator in sLine:
+            continue
+        sLine = sLine.replace(sTWDURLIndicator, '')
+        return sLine.strip()
+    return None