{"id":26780352,"url":"https://github.com/nichtlegacy/trakt-graph","last_synced_at":"2026-04-27T21:31:49.557Z","repository":{"id":284993676,"uuid":"956737431","full_name":"nichtlegacy/trakt-graph","owner":"nichtlegacy","description":"Generates a GitHub-style contribution graph based on your Trakt watch history. Uses Node.js to fetch API data, process entries, and create daily updated SVG visuals via GitHub Actions.","archived":false,"fork":false,"pushed_at":"2026-04-26T01:23:56.000Z","size":68805,"stargazers_count":1,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-26T03:28:34.491Z","etag":null,"topics":["api","contribution-graph","github-profile","heatmap","javascript","node-js","svg","trakt"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nichtlegacy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-03-28T19:16:09.000Z","updated_at":"2026-04-26T01:24:00.000Z","dependencies_parsed_at":"2025-05-05T01:28:27.219Z","dependency_job_id":"b134636f-3fbd-4c3b-8e28-4e6378e7b56d","html_url":"https://github.com/nichtlegacy/trakt-graph","commit_stats":null,"previous_names":["nichtlegacy/trakt-graph"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/nichtlegacy/trakt-graph","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nichtlegacy%2Ftrakt-graph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nichtlegacy%2Ftrakt-graph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nichtlegacy%2Ftrakt-graph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nichtlegacy%2Ftrakt-graph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nichtlegacy","download_url":"https://codeload.github.com/nichtlegacy/trakt-graph/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nichtlegacy%2Ftrakt-graph/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32356598,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T20:07:02.737Z","status":"ssl_error","status_checked_at":"2026-04-27T20:07:00.910Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","contribution-graph","github-profile","heatmap","javascript","node-js","svg","trakt"],"created_at":"2025-03-29T07:16:18.881Z","updated_at":"2026-04-27T21:31:49.551Z","avatar_url":"https://github.com/nichtlegacy.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📺 Trakt Contribution Graph\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/actions/workflow/status/nichtlegacy/trakt-graph/update-trakt-graph.yml?label=action\u0026style=flat-square\" alt=\"GitHub Workflow Status\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/release/nichtlegacy/trakt-graph.svg?style=flat-square\" alt=\"GitHub Release\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Made%20with-Node.js-green?style=flat-square\" alt=\"Made with Node.js\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/JavaScript-ES6+-yellow?style=flat-square\" alt=\"JavaScript\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/license-MIT-blue?style=flat-square\" alt=\"License\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eTransform your Trakt watch history into a beautiful GitHub-style contribution graph\u003c/strong\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://trakt.tv/users/TheLagacyMiner/\" target=\"_blank\"\u003e\n    \u003cpicture\u003e\n      \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/nichtlegacy/trakt-graph/raw/main/images/github-trakt-dark.svg\"\u003e\n      \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://github.com/nichtlegacy/trakt-graph/raw/main/images/github-trakt-light.svg\"\u003e\n      \u003cimg alt=\"Trakt contribution graph\" src=\"https://github.com/nichtlegacy/trakt-graph/raw/main/images/github-trakt-light.svg\" width=\"100%\"\u003e\n    \u003c/picture\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n## ✨ Features\n\n| Feature | Description |\n|---------|-------------|\n| 🎨 **Light \u0026 Dark Themes** | Automatically adapts to GitHub's theme preference |\n| 📊 **Activity Heatmap** | GitHub-style contribution graph showing movie \u0026 episode activity |\n| 👤 **Profile Integration** | Shows profile picture, display name, and all-time stats |\n| 🎬 **Content Filtering** | Display movies only, shows only, or everything together |\n| 📅 **Multi-Year Support** | Generate vertical graphs spanning multiple years |\n| 🎯 **Streak Highlighting** | Hover over stats to highlight your longest activity streak |\n| 💬 **Interactive Tooltips** | Hover over cells to see specific titles watched that day |\n| 🏎️ **Fast \u0026 Efficient** | Uses the Trakt API with intelligent pagination and caching |\n| 🔄 **Daily Updates** | Automated updates via GitHub Actions |\n\n---\n\n## 📸 Examples\n\n### Movies Only\n\u003cp align=\"center\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/nichtlegacy/trakt-graph/raw/main/images/trakt-movies-dark.svg\"\u003e\n    \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://github.com/nichtlegacy/trakt-graph/raw/main/images/trakt-movies-light.svg\"\u003e\n    \u003cimg alt=\"Trakt movies only graph\" src=\"https://github.com/nichtlegacy/trakt-graph/raw/main/images/trakt-movies-light.svg\" width=\"100%\"\u003e\n  \u003c/picture\u003e\n\u003c/p\u003e\n\n### Episodes Only\n\u003cp align=\"center\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/nichtlegacy/trakt-graph/raw/main/images/trakt-shows-dark.svg\"\u003e\n    \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://github.com/nichtlegacy/trakt-graph/raw/main/images/trakt-shows-light.svg\"\u003e\n    \u003cimg alt=\"Trakt episodes only graph\" src=\"https://github.com/nichtlegacy/trakt-graph/raw/main/images/trakt-shows-light.svg\" width=\"100%\"\u003e\n  \u003c/picture\u003e\n\u003c/p\u003e\n\n---\n\n## 🚀 Quick Start\n\n### 1. Fork this Repository\n\nClick the **Fork** button at the top-right of this page.\n\n### 2. Configure Trakt API\n\n1. Go to [Trakt API App Setup](https://trakt.tv/oauth/applications) and create a new application.\n2. For **Redirect URI**, use `urn:ietf:wg:oauth:2.0:oob`.\n3. Copy your **Client ID**.\n4. In your GitHub repository, go to **Settings** → **Secrets and variables** → **Actions**.\n5. Add a new **Repository secret**:\n   - Name: `TRAKT_API_KEY`\n   - Value: `(Your Trakt Client ID)`\n\n### 3. Update Your Username\n\nEdit `.github/workflows/update-trakt-graph.yml`:\n\n```yaml\nenv:\n  TRAKT_USERNAME: \"YOUR_TRAKT_USERNAME\"\n```\n\n### 4. Enable GitHub Actions\n\nGo to **Actions** tab → Enable workflows if prompted.\n\n### 5. Run the Workflow\n\nThe graph updates daily at midnight UTC, or trigger manually via the **Actions** tab.\n\n---\n\n## 📖 CLI Usage\n\n```bash\n# Install dependencies\nnpm install\n\n# Set your API Key (Client ID)\n$env:TRAKT_API_KEY = \"your_client_id\" # Windows PowerShell\n# export TRAKT_API_KEY=\"your_client_id\" # Linux/macOS\n\n# Basic usage\nnode src/cli.js \u003cusername\u003e\n\n# With options\nnode src/cli.js \u003cusername\u003e [options]\n```\n\n### Arguments\n\n| Flag | Description | Default |\n|------|-------------|---------|\n| `-y \u003cyears\u003e` | Year(s) to generate, comma-separated (e.g. `2025,2024`) | Current year |\n| `-t \u003ctype\u003e` | Content type: `movies`, `shows`, or `all` | `all` |\n| `-w \u003cday\u003e` | Week start: `sunday` or `monday` | `sunday` |\n| `-o \u003cpath\u003e` | Output path (without extension) | `images/github-trakt` |\n| `-g \u003cbool\u003e` | Enable username gradient: `true` or `false` | `true` |\n| `-p` | Export PNG files in addition to SVG | Disabled |\n\n---\n\n## 🔧 GitHub Actions Setup\n\n### 1. Repository Secret\n\nTo use the automated workflow, you must provide your Trakt API Key as a GitHub Secret:\n\n1. Go to your repository on GitHub.\n2. Navigate to **Settings** → **Secrets and variables** → **Actions**.\n3. Create a **New repository secret**.\n4. Set the name to `TRAKT_API_KEY` and the value to your Trakt **Client ID**.\n\n### 2. Workflow File\n\nFull configuration is available in the workflow file header:\n\n```yaml\nenv:\n  TRAKT_USERNAME: \"TheLagacyMiner\"\n  YEARS: \"\"              # e.g. \"2025,2024\" or empty for current\n  CONTENT_TYPE: \"all\"    # \"movies\", \"shows\", or \"all\"\n  WEEK_START: \"sunday\"\n  GRADIENT: \"true\"\n```\n\n---\n\n## 📂 Project Structure\n\n```\ntrakt-graph/\n├── .github/\n│   └── workflows/\n│       └── update-trakt-graph.yml\n├── fonts/               # Required for SVG text measurement\n├── images/              # Target directory for generated graphs\n├── src/\n│   ├── cli.js           # CLI entry point\n│   ├── fetcher.js       # Trakt API interaction\n│   ├── generator.js     # SVG layout and rendering\n│   ├── stats.js         # Activity calculations\n│   └── exporter.js      # PNG export (Sharp)\n├── package.json\n└── README.md\n```\n\n---\n\n## 🖼️ Embed in Your README\n\n```html\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://trakt.tv/users/YOUR_TRAKT_USERNAME/\" target=\"_blank\"\u003e\n    \u003cpicture\u003e\n      \u003csource\n        media=\"(prefers-color-scheme: dark)\"\n        srcset=\"https://github.com/YOUR_GITHUB_USERNAME/trakt-graph/blob/main/images/github-trakt-dark.svg\"\n      /\u003e\n      \u003csource\n        media=\"(prefers-color-scheme: light)\"\n        srcset=\"https://github.com/YOUR_GITHUB_USERNAME/trakt-graph/blob/main/images/github-trakt-light.svg\"\n      /\u003e\n      \u003cimg\n        alt=\"Trakt contribution graph\"\n        src=\"https://github.com/YOUR_GITHUB_USERNAME/trakt-graph/blob/main/images/github-trakt-light.svg\"\n      /\u003e\n    \u003c/picture\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n```\n\n---\n\n## 🛠️ Requirements\n\n- **Node.js** v18 or higher\n- **Trakt API Key** (Client ID)\n- **GitHub Actions** enabled for automation\n\n---\n\n## 🤝 Contributing \u0026 License\n\nMIT License. Contributions are welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnichtlegacy%2Ftrakt-graph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnichtlegacy%2Ftrakt-graph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnichtlegacy%2Ftrakt-graph/lists"}