{"id":13475856,"url":"https://github.com/piuccio/cowsay","last_synced_at":"2025-05-14T13:09:26.166Z","repository":{"id":5451303,"uuid":"6644974","full_name":"piuccio/cowsay","owner":"piuccio","description":"cowsay is a configurable talking cow","archived":false,"fork":false,"pushed_at":"2024-09-24T07:32:35.000Z","size":210,"stargazers_count":1193,"open_issues_count":12,"forks_count":169,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-05-04T00:32:17.025Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/piuccio.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":"2012-11-11T21:43:43.000Z","updated_at":"2025-05-01T02:19:49.000Z","dependencies_parsed_at":"2024-01-12T06:04:03.067Z","dependency_job_id":"fa274a2f-5ab8-4800-b084-40729e6d9b38","html_url":"https://github.com/piuccio/cowsay","commit_stats":{"total_commits":70,"total_committers":26,"mean_commits":"2.6923076923076925","dds":0.6714285714285715,"last_synced_commit":"be1b0a2f3db2219ad39072ef297ac39b3f0e7e82"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piuccio%2Fcowsay","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piuccio%2Fcowsay/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piuccio%2Fcowsay/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piuccio%2Fcowsay/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/piuccio","download_url":"https://codeload.github.com/piuccio/cowsay/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254149975,"owners_count":22022852,"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":[],"created_at":"2024-07-31T16:01:24.153Z","updated_at":"2025-05-14T13:09:21.155Z","avatar_url":"https://github.com/piuccio.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","Requirements","Terminal","Miscellaneous","Just for Fun"],"sub_categories":["Static","Fancies","Isomorphic","Image Processing"],"readme":"# cowsay\n\n````\n __________________\n\u003c srsly dude, why? \u003e\n ------------------\n        \\   ^__^\n         \\  (oo)\\_______\n            (__)\\       )\\/\\\n                ||----w |\n                ||     ||\n````\n\ncowsay is a configurable talking cow, originally written in Perl by [Tony Monroe](https://github.com/tnalpgge/rank-amateur-cowsay)\n\nThis project is a translation in JavaScript of the original program and an attempt to bring the same silliness to node.js.\n\n## Install\n\n    npm install -g cowsay\n\n## Usage\n\n    cowsay JavaScript FTW!\n\nor\n\n    cowthink node.js is cool\n\nIt acts in the same way as the original cowsay, so consult `cowsay(1)` or run `cowsay -h`\n\n````\n ________\n\u003c indeed \u003e\n --------\n    \\\n     \\\n                                   .::!!!!!!!:.\n  .!!!!!:.                        .:!!!!!!!!!!!!\n  ~~~~!!!!!!.                 .:!!!!!!!!!UWWW$$$\n      :$$NWX!!:           .:!!!!!!XUWW$$$$$$$$$P\n      $$$$$##WX!:      .\u003c!!!!UW$$$$\"  $$$$$$$$#\n      $$$$$  $$$UX   :!!UW$$$$$$$$$   4$$$$$*\n      ^$$$B  $$$$\\     $$$$$$$$$$$$   d$$R\"\n        \"*$bd$$$$      '*$$$$$$$$$$$o+#\"\n             \"\"\"\"          \"\"\"\"\"\"\"\n````\n\n## Usage as a module\n\ncowsay can be used as any other npm dependency\n```js\nconst cowsay = require(\"cowsay\");\n\nconsole.log(cowsay.say({\n    text : \"I'm a moooodule\",\n    e : \"oO\",\n    T : \"U \"\n}));\n\n// or cowsay.think()\n```\n````\n _________________\n( I'm a moooodule )\n -----------------\n        o   ^__^\n         o  (oO)\\_______\n            (__)\\       )\\/\\\n             U  ||----w |\n                ||     ||\n````\n\ngetting a list of cow names:\n```js\nfunction get_cows(error, cow_names) {\n    if (error) {\n        console.log(error)\n    }\n    else if (cow_names) {\n        console.log(`Number of cows available: ${cow_names.length}`);\n    }\n}\n\ncowsay.list(get_cows);\n```\n\n#### Typescript examples:\n```ts\nimport * as cowsay from \"cowsay\"\n\nlet output: string = cowsay.say({ text: 'Hello from typescript!' });\n\nconsole.log(output);\n```\n\ngetting a list of cow names:\n```ts\nfunction get_cows(error: NodeJS.ErrnoException, cow_names: Array\u003cstring\u003e): void {\n    if (error) {\n        console.log(`Error getting cow names: ${error.message}`)\n    }\n    else if (cow_names) {\n        console.log(`Number of cows available: ${cow_names.length}`);\n    }\n}\n\ncowsay.list(get_cows);\n```\n\nimporting the `IOptions` interface directly:\n```ts\nimport { IOptions } from \"cowsay\" // optional\n\nlet opts: IOptions = {\n    text: \"Hello from TypeScript!\",\n    e: '^^',\n    r: true,\n};\n\nconsole.log(cowsay.say(opts));\n```\n\n\n## Pipe from standard input\n\n    echo please repeat | cowsay\n\n## Usage in the browser\n\ncowsay works in your browser too with rollup / webpack / browserify / you name it.\n\n```js\nimport { say } from 'cowsay';\n\nconsole.log(say({ text: 'grazing in the browser' }));\n```\n\nYou can customize the cow by importing the relevant one\n\n```js\nimport { think, SQUIRREL } from 'cowsay';\n\nconsole.log(think({\n  text: 'grazing in the browser',\n  cow: SQUIRREL,\n  eyes: 'pp',\n  tongue: ';;',\n}));\n```\n\nAll cows are included in the bundle, but you can use rollup / webpack tree-shake feature to reduce the final bundle size.\n\n### Browser options\n\n```js\nsay({\n  text: 'hello',\n  cow: '', // Template for a cow, get inspiration from `./cows`\n  eyes: 'oo', // Select the appearance of the cow's eyes, equivalent to cowsay -e\n  tongue: 'L|', // The tongue is configurable similarly to the eyes through -T and tongue_string, equivalent to cowsay -T\n  wrap: false, // If it is specified, the given message will not be word-wrapped. equivalent to cowsay -n\n  wrapLength: 40, // Specifies roughly where the message should be wrapped. equivalent to cowsay -W\n  mode: 'b', // One of \t\"b\", \"d\", \"g\", \"p\", \"s\", \"t\", \"w\", \"y\"\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiuccio%2Fcowsay","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpiuccio%2Fcowsay","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiuccio%2Fcowsay/lists"}