Skip to content

Prepare for syntax change in urls.md #7

@StoneyJackson

Description

@StoneyJackson

We are planning to change the format of urls.md. It will contain more data than just URLs. Something like this would probably do for now

import re
def parse_urls_md(lines):
  url_pattern = re.compile(r'- +(http.*\.git)')
  urls = []
  for line in lines:
    line = line.strip()
    match = url_pattern.search(line)
    if match is not None:
      urls.append(match.group(1))
  return urls

The regex can be tuned later if it turns out to be insufficient.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions