INNER CODE UNIT · Python
extract_repo_details
timschneeb/awesome-shizuku · scripts/check_links.py:11
def extract_repo_details(text):
"""Extracts unique GitHub repository paths and their declared licenses from a given text."""
repo_details = {}
# Regex for GitHub repo paths
repo_pattern = r"https://github\.com/([\w.-]+/[\w.-]+)"
# Regex for tags in backticks
tag_pattern = r"`([^`]+)`"
non_repo_paths = {
'sindresorhus/awesome',
'timschneeb/changelog-awesome-shizuku',
'RikkaApps/Shizuku-API',
}
for line in text.splitlines():
if not line.strip().startswith('*'):
continue