{"id":15606100,"url":"https://github.com/encoreshao/github-trending","last_synced_at":"2025-04-12T16:38:15.482Z","repository":{"id":249662140,"uuid":"832149199","full_name":"encoreshao/github-trending","owner":"encoreshao","description":"GitHub Weekly Trending Repositories","archived":false,"fork":false,"pushed_at":"2025-04-11T04:20:06.000Z","size":2077,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-11T05:27:26.232Z","etag":null,"topics":["github","trending-repositories"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/encoreshao.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2024-07-22T12:54:25.000Z","updated_at":"2025-04-11T04:20:09.000Z","dependencies_parsed_at":"2024-10-26T08:49:07.505Z","dependency_job_id":null,"html_url":"https://github.com/encoreshao/github-trending","commit_stats":null,"previous_names":["encoreshao/github-trending"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/encoreshao%2Fgithub-trending","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/encoreshao%2Fgithub-trending/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/encoreshao%2Fgithub-trending/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/encoreshao%2Fgithub-trending/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/encoreshao","download_url":"https://codeload.github.com/encoreshao/github-trending/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248597727,"owners_count":21130931,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["github","trending-repositories"],"created_at":"2024-10-03T04:21:10.473Z","updated_at":"2025-04-12T16:38:15.460Z","avatar_url":"https://github.com/encoreshao.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitHub - Weekly Trending Repositories (2024 Active)\n\nThis project is a Node.js script that fetches the top 20 trending GitHub repositories created in the last week, and saves the data into a markdown file.\nThe markdown file is saved in the `docs` directory with the current date as the filename.\nThe script is set up to run daily as a cron job, automatically generating the markdown file, committing the changes to a Git repository, and pushing the updates.\n\n## Features\n\n- Fetches top 20 trending GitHub repositories created in the last week.\n- Saves repository data into a markdown file in the `docs` directory.\n- Each markdown file includes repository details such as name, stars, owner, avatar, description, topics, URLs, and other relevant details.\n- Automatically runs daily via a cron job, commits the changes, and pushes to a Git repository.\n\n## Prerequisites\n\n- Node.js\n- npm (Node Package Manager)\n- Git\n- A GitHub Personal Access Token with `repo` and `read:user` scopes.\n\n## Setup\n\n1. **Clone the repository:**\n\n   ```sh\n   git clone https://github.com/encoreshao/github-trending.git\n   cd github-trending\n   ```\n\n2. **Install dependencies:**\n\n   ```sh\n   npm install\n   ```\n\n3. **Set up environment variables:**\n\n   Create a `.env` file in the root directory of the project and add your GitHub Personal Access Token:\n\n   ```env\n   GITHUB_TOKEN=your_github_token\n   ```\n\n## Usage\n\n1. **Run the script manually:**\n\n   You can run the script manually to fetch the trending repositories and save the data into a markdown file:\n\n   ```sh\n   node index.js\n   ```\n\n2. **Set up the cron job:**\n\n   To automate the process, set up a cron job to run the script daily. Edit your crontab file:\n\n   ```sh\n   crontab -e\n   ```\n\n   Add the following line to run the script every day at midnight:\n\n   ```sh\n   0 0 * * * /path/to/your/project/scripts/run.sh\n   ```\n\n   Replace `/path/to/your/project/scripts/run.sh` with the actual path to your `run.sh` script.\n\n## License\n\nGithub-Trending is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fencoreshao%2Fgithub-trending","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fencoreshao%2Fgithub-trending","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fencoreshao%2Fgithub-trending/lists"}