{"id":16759402,"url":"https://github.com/cleoold/open-to-get-random-image","last_synced_at":"2025-04-05T07:11:26.911Z","repository":{"id":39263266,"uuid":"232934587","full_name":"cleoold/open-to-get-random-image","owner":"cleoold","description":"A simple server to let a randomly chosen image show up on the page","archived":false,"fork":false,"pushed_at":"2023-03-01T10:57:11.000Z","size":43,"stargazers_count":1,"open_issues_count":6,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-10T14:52:29.818Z","etag":null,"topics":["server"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cleoold.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}},"created_at":"2020-01-10T00:44:48.000Z","updated_at":"2021-07-09T00:38:39.000Z","dependencies_parsed_at":"2025-02-10T14:45:45.115Z","dependency_job_id":"e2a93abe-341a-4d02-8dff-391e0a0d6a51","html_url":"https://github.com/cleoold/open-to-get-random-image","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cleoold%2Fopen-to-get-random-image","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cleoold%2Fopen-to-get-random-image/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cleoold%2Fopen-to-get-random-image/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cleoold%2Fopen-to-get-random-image/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cleoold","download_url":"https://codeload.github.com/cleoold/open-to-get-random-image/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247299849,"owners_count":20916193,"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":["server"],"created_at":"2024-10-13T04:08:03.838Z","updated_at":"2025-04-05T07:11:26.894Z","avatar_url":"https://github.com/cleoold.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![License: CC0-1.0](https://img.shields.io/badge/License-CC0%201.0-lightgrey.svg)](http://creativecommons.org/publicdomain/zero/1.0/)\n\n# Random image displayer\nA simple server to let a randomly chosen image show up on the page when requested. The image pool can be either provided locally in a folder or by URIs.\n\n### Usage:\n#### MODE OPTIONS (CHOOSE ONE FROM TWO):\n `--directory -d`           will serve every image in the directory  \n `--file -d`                the file contains URIs to the image, separated by lines. will serve images targeted by links contained in the file\n\n#### REQUIRED OPTION:\n `--source-path -s \u003cname\u003e`  the source directory/file name provided for above two options\n\n#### OPTIONAL OPTION:\n `--port -p \u003cnumber\u003e`       specifies a port number. default 8080\n\n### Example\n* There is a folder called `rresource` parallel to `server.ts`. The folder  contains `1.jpg`, `2.jpg` and so on. In this case run\n  ```sh\n  ts-node server.ts -d -s ./rresource \n  ```\n* There is a file called `images.txt` in `./rrecource/` which is parallel to `server.ts`. The file contains:\n  ```\n  https://foo.bar/1.jpg\n  https://foo.gar/3.png\n  ...\n  ```\n  In this case run\n  ```sh\n  ts-node server.ts -f -s ./rresource/images.txt \n  ```\nEnter `localhost:8080` in the browser and the page will show up.\n\n### Install\n```sh\nnpm install\n```\n\n### Attribution\ncommand-line-args (https://www.npmjs.com/package/command-line-args)  \nExpress (https://www.npmjs.com/package/express)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcleoold%2Fopen-to-get-random-image","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcleoold%2Fopen-to-get-random-image","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcleoold%2Fopen-to-get-random-image/lists"}