Extract and enrich GitHub pinned repository data from profile pins HTML
Extract and enrich GitHub pinned repository data from profile HTML.
GitHub doesn’t provide an API to fetch pinned repositories (#39589). This tool extracts them from profile HTML and enriches with API metadata.
This allows to show a full list of projects contributed to.
uv sync
undefinedExport pins HTML: Profile → Edit pins → DevTools (F12) → Copy HTML → Save to input/profile-pins.html
undefinedConfigure:undefined
export DEFAULT_PREFIX=your-github-username
export GITHUB_TOKEN=ghp_xxx # Optional, for higher rate limits
undefinedRun:undefined
python -m src.main
undefinedOutput: output/repos.json
docker build -t dargmuesli/contributed-to .
docker run --rm \
-e DEFAULT_PREFIX=your-username \
-v "$(pwd)/input:/srv/app/input:ro" \
-v "$(pwd)/output:/srv/app/output" \
-v "$(pwd)/github_cache:/srv/app/github_cache" \
dargmuesli/contributed-to
from src.main import extract_repos_and_stars
with open("input/profile-pins.html") as f:
repos = extract_repos_and_stars(f.read())
for item in repos:
print(f"{item['repository']['name']}: {item['repository']['stars']} stars")
[{
"repository": {
"name": "repo-name",
"description": "Description",
"stars": 1234,
"fork": false,
"url": "https://github.com/owner/repo",
"owner": {
"name": "owner",
"type": "User",
"avatar_url": "https://avatars.githubusercontent.com/u/123",
"url": "https://github.com/owner"
}
}
}]
# Install development dependencies
uv sync
# Run tests
pytest
# Code quality
ruff format
ruff check --fix
mypy .
We use cookies
We use cookies to analyze traffic and improve your experience. You can accept or reject analytics cookies.