{"id":15594941,"url":"https://github.com/simonneutert/reddit-api-image-getter","last_synced_at":"2025-09-30T04:30:24.739Z","repository":{"id":43861041,"uuid":"233384599","full_name":"simonneutert/reddit-api-image-getter","owner":"simonneutert","description":"Gets images from a subreddit and optionally saves them.","archived":false,"fork":false,"pushed_at":"2025-09-13T12:40:11.000Z","size":38,"stargazers_count":5,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-13T14:51:24.847Z","etag":null,"topics":["axios","javascript","node","node-js","node-module","nodejs","npm-package","reddit","subreddit","xhr"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/reddit-api-image-getter","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/simonneutert.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":"2020-01-12T11:53:13.000Z","updated_at":"2025-09-13T12:40:11.000Z","dependencies_parsed_at":"2025-07-22T16:11:12.907Z","dependency_job_id":"3ade03e8-6f4b-4527-8dff-8ba11a6eb234","html_url":"https://github.com/simonneutert/reddit-api-image-getter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/simonneutert/reddit-api-image-getter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonneutert%2Freddit-api-image-getter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonneutert%2Freddit-api-image-getter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonneutert%2Freddit-api-image-getter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonneutert%2Freddit-api-image-getter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simonneutert","download_url":"https://codeload.github.com/simonneutert/reddit-api-image-getter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonneutert%2Freddit-api-image-getter/sbom","scorecard":{"id":824946,"data":{"date":"2025-08-11","repo":{"name":"github.com/simonneutert/reddit-api-image-getter","commit":"d4e9da20c1f78a180b28d4cd34ab648f5dd500a5"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.3,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/21 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":2,"reason":"3 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 9 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-23T16:27:01.211Z","repository_id":43861041,"created_at":"2025-08-23T16:27:01.211Z","updated_at":"2025-08-23T16:27:01.211Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275304889,"owners_count":25441168,"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","status":"online","status_checked_at":"2025-09-15T02:00:09.272Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["axios","javascript","node","node-js","node-module","nodejs","npm-package","reddit","subreddit","xhr"],"created_at":"2024-10-03T00:42:19.361Z","updated_at":"2025-09-30T04:30:24.732Z","avatar_url":"https://github.com/simonneutert.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Reddit API Image Getter\n\nCLI tool and Node.js library to fetch and download images from Reddit subreddits. Zero dependencies, uses modern Node.js built-in modules.\n\n## Install\n\n**As a CLI tool (global):**\n```bash\nnpm install -g reddit-api-image-getter\n```\n\n**As a Node.js library:**\n```bash\nnpm install reddit-api-image-getter --save\n```\n\n## CLI Usage\n\nAfter global installation, use the `reddit-images` command:\n\n```bash\n# Download hot images from a subreddit\nreddit-images ProgrammerHumor\n\n# Download top images instead of hot\nreddit-images typescript --top\n\n# Specify custom output directory\nreddit-images javascript --output ./my-images\n\n# Short flags\nreddit-images memes -t -o ~/Downloads/reddit-images\n\n# Show help\nreddit-images --help\n\n# Show version\nreddit-images --version\n```\n\n### CLI Options\n\n- `\u003csubreddit\u003e` - The subreddit name (without r/)\n- `-t, --top` - Get top images instead of hot (default: hot)\n- `-o, --output DIR` - Output directory (default: ./images)\n- `-h, --help` - Show help message\n- `-v, --version` - Show version number\n\nImages are automatically organized into subdirectories by subreddit name.\n\n## Library Usage (Node.js)\n\nUse as a Node.js library in your projects:\n\n## Example\n\n```javascript\nconst path = require('path');\nconst RedditApiImageGetter = require('reddit-api-image-getter');\n\nconst getter = new RedditApiImageGetter();\n\n// `getHotImagesOfSubReddit('subreddit')`\n// returns a Promise, that, when successful returns\n// an Array containing RedditImageEntry object instances.\n// \n// Each RedditImageEntry object is then passed to\n// `saveRedditImageEntryToDisk(imageEntry, path)`\n// to be saved to disk. \n//\n// See what each RedditImageEntry does in \n// lib/classes/RedditImageEntry.js and lib/classes/RedditEntry.js\n//\n// get the top images of a subreddit: using\n// getTopImagesOfSubReddit(subreddit = 'ProgrammerHumor')\n// \ngetter.getHotImagesOfSubReddit('ProgrammerHumor').then(function (result) {\n  for (imageEntry of result) {\n    const targetDirectory = path.resolve(__dirname, 'images', 'hot');\n    getter.saveRedditImageEntryToDisk(imageEntry, targetDirectory);\n  }\n}).catch(function (error) {\n  console.log(error)\n})\n\ngetter.getTopImagesOfSubReddit('ProgrammerHumor').then(function (result) {\n  for (imageEntry of result) {\n    // do begin with a starting '/' if you need to: \n    // https://nodejs.org/api/path.html#path_path_resolve_paths\n    const targetDirectory = path.resolve(__dirname, 'images', 'top');\n    getter.saveRedditImageEntryToDisk(imageEntry, targetDirectory);\n  }\n}).catch(function (error) {\n  console.log(error);\n});\n```\n\n### Modern async/await syntax:\n\n```javascript\nconst RedditApiImageGetter = require('reddit-api-image-getter');\nconst path = require('path');\n\nasync function downloadImages() {\n  const getter = new RedditApiImageGetter();\n\n  try {\n    // Get hot images\n    const hotImages = await getter.getHotImagesOfSubReddit('ProgrammerHumor');\n    const targetDirectory = path.resolve(__dirname, 'images', 'hot');\n\n    for (const imageEntry of hotImages) {\n      if (imageEntry.imageUrl) {\n        getter.saveRedditImageEntryToDisk(imageEntry, targetDirectory);\n      }\n    }\n\n    console.log(`Downloaded ${hotImages.length} images`);\n  } catch (error) {\n    console.error('Error:', error);\n  }\n}\n\ndownloadImages();\n```\n\n## Requirements\n\n- Node.js \u003e=21.0.0 (for built-in `fetch` support)\n- Zero dependencies!\n\n## Features\n\n- ✅ **Zero dependencies** - Uses only Node.js built-in modules\n- ✅ **CLI tool** - Use from command line globally\n- ✅ **Node.js library** - Integrate into your projects\n- ✅ **TypeScript support** - Full type definitions included\n- ✅ **Modern async/await** - Clean, modern JavaScript\n- ✅ **Automatic file organization** - Images sorted by subreddit\n- ✅ **Duplicate prevention** - Won't overwrite existing files\n\n## Example with Telegram Bot\n\nhttps://www.simon-neutert.de/2020/telegraf-bot-nodejs/\n\n## Contributing\n\nCheck out the source code on GitHub and feel free to contribute!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonneutert%2Freddit-api-image-getter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonneutert%2Freddit-api-image-getter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonneutert%2Freddit-api-image-getter/lists"}