{"id":45869827,"url":"https://github.com/psu-libraries/alt_text","last_synced_at":"2026-02-27T09:43:32.978Z","repository":{"id":315480243,"uuid":"1038204432","full_name":"psu-libraries/alt_text","owner":"psu-libraries","description":"AltText helps with accessibility by generating alt text for images.","archived":false,"fork":false,"pushed_at":"2025-11-18T15:39:29.000Z","size":86,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-29T17:48:36.624Z","etag":null,"topics":["ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/psu-libraries.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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-08-14T19:42:33.000Z","updated_at":"2025-11-18T15:38:39.000Z","dependencies_parsed_at":"2025-09-18T22:27:48.344Z","dependency_job_id":"05c971fe-c573-4fa1-823a-361f5eff8e1e","html_url":"https://github.com/psu-libraries/alt_text","commit_stats":null,"previous_names":["psu-libraries/alt_text"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/psu-libraries/alt_text","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psu-libraries%2Falt_text","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psu-libraries%2Falt_text/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psu-libraries%2Falt_text/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psu-libraries%2Falt_text/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/psu-libraries","download_url":"https://codeload.github.com/psu-libraries/alt_text/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psu-libraries%2Falt_text/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29889829,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T08:34:21.514Z","status":"ssl_error","status_checked_at":"2026-02-27T08:32:38.035Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["ruby"],"created_at":"2026-02-27T09:43:32.176Z","updated_at":"2026-02-27T09:43:32.972Z","avatar_url":"https://github.com/psu-libraries.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Alt Text Generator\n\nThis uses Ruby's AWS SDK to send images and a prompt to an LLM in Amazon's Bedrock to generate Alt Text for the images.\n\n### Ruby Client Usage\n\nThis gem uses imagemagick to resize large images, so you will need to install imagemagick:\n\nMac:\n\n```\nbrew install imagemagick\n```\n\nUbuntu:\n\n```\napt-get update\napt-get install imagemagick\n```\n\nThen, add the gem to your project:\n\nIn the Gemfile:\n```\n# Gemfile\ngem 'alt_text'\n```\n```\nbundle install\n```\n\nOr, via `gem install`:\n\n```\ngem install alt_text\n```\n\nInstantiate the client with injected AWS credentials:\n\n```\nclient = AltText::Client.new {\n  access_key_id: ENV['YOUR_ACCESS_KEY_ID'],\n  secret_access_key: ENV['YOUR_SECRET_ACCESS_KEY'],\n  region: 'us-east-1'\n}\n```\n\nCall the `#process_image` method with the image path, prompt, and LLM ID as arguments:\n\n```\nclient.process_image('folder/image.png', 'Please generate alt text', 'sonnet3.51`)\n```\n\n*Note: A sample prompt can be found in `prompt.txt`.*\n\n### CLI Usage\n\nCopy the `.env.sample` file to `.env` and add your AWS credentials.\n\n```\ncp .env.sample .env\n```\n\nGeneral CLI command to generate Alt Text for images in the `images/` directory:\n\n```\nbundle exec bin/alt_text \\\n  -s output/output.txt \\\n  -l default \\\n  -d images \\\n  -p prompt.txt\n```\n\nRun this for help:\n\n```\nbundle exec bin/alt_text -h\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpsu-libraries%2Falt_text","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpsu-libraries%2Falt_text","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpsu-libraries%2Falt_text/lists"}