{"id":19068815,"url":"https://github.com/cutenode/bateman","last_synced_at":"2025-04-28T14:02:14.447Z","repository":{"id":44014182,"uuid":"233757268","full_name":"cutenode/bateman","owner":"cutenode","description":"Fetch a remote card file and displaying it tastefully.","archived":false,"fork":false,"pushed_at":"2023-01-05T05:12:15.000Z","size":1361,"stargazers_count":9,"open_issues_count":14,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-16T02:20:41.159Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cutenode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-01-14T04:35:57.000Z","updated_at":"2022-04-19T03:02:24.000Z","dependencies_parsed_at":"2023-02-03T12:02:16.234Z","dependency_job_id":null,"html_url":"https://github.com/cutenode/bateman","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/cutenode%2Fbateman","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cutenode%2Fbateman/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cutenode%2Fbateman/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cutenode%2Fbateman/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cutenode","download_url":"https://codeload.github.com/cutenode/bateman/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251326746,"owners_count":21571631,"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-11-09T01:12:06.879Z","updated_at":"2025-04-28T14:02:14.402Z","avatar_url":"https://github.com/cutenode.png","language":"JavaScript","funding_links":["https://patreon.com/protagonist","https://github.com/sponsors/protagonist","https://opencollective.com/protagonist"],"categories":["JavaScript"],"sub_categories":[],"readme":"# bateman\n\nbateman is an extension of npm cards, which allows you to remotely fetch a `card.json` file and display it prettily as a npm card.\n\n\u003cdiv align=\"center\"\u003e\n  \u003cbr\u003e\n  \u003cbr\u003e\n  \u003cimg src=\"./img/bateman-demo.gif\" width=\"500\" alt=\"Example of `bateman` running `bateman bnb.im` within Hyper\"\u003e\n  \u003cbr\u003e\n  \u003cbr\u003e\n\u003c/div\u003e\n\n## Usage\n\nTo use bateman with `npx`. The `\u003curl\u003e` **must** be a website HTTPS which has a file located at the path `\u003curl\u003e/card.json`.\n\n```bash\nnpx bateman \u003curl\u003e\n```\n\nTo install bateman globally, you can use the following command:\n\n```bash\nnpm i -g bateman\n```\n\nOnce installed globally, then you can use bateman to call a URL that has published a `card.json`. This URL **must** be HTTPS.\n\n```bash\nbateman \u003curl\u003e\n```\n\n## Publishing a `card.json`\n\nbateman expects a `card.json` file. If you want to have your own card, you'll have to publish such a file on a website. Note that bateman is not particularly strict about where cards are published, but it is opinionated on _how_ they are published. Some details:\n\n* Cards must be published to websites that use HTTPS.\n* Card files must be called `card.json`.\n* The fetched `card.json` file must return a 200 OK HTTP response.\n  * tl;dr you can't mask your `card.json` with an HTTP redirect.\n\nHere's the structure of a `card.json` file:\n\n* `name` String (required) - Your name\n* `handle` String (required) - Your preferred online handle\n* `website` String (required) - Your website\n* `pronouns` String (required) - Your pronouns\n* `work` Object (optional) - An object that holds some metadata about your work\n  * `title` String (optional) - Your title at your work\n  * `company` String (optional) - The company you work at\n* `code` Object (optional) - Some links that specifically refer to code-focused websites\n  * `npm` String (optional) - Link to your account on npm\n  * `github` String (optional) - Link to your account on GitHub\n* `social` Object (optional) - Links to your social Media\n  * `twitter` String (optional) - Link to your Twitter account\n  * `instagram` String (optional) - Link to your Instagram account\n  * `snapchat` String (optional) - Link to your Snapchat account\n  * `facebook` String (optional) - Link to your Facebook account\n  * `twitch` String (optional) - Link to your Twitch account\n  * `tiktok` String (optional) - Link to your TikTok account\n  * `tumblr` String (optional) - Link to your Tumblr account\n  * `spotify` String (optional) - Link to your Sptofiy account\n  * `youtube` String (optional) - Link to your YouTube account\n  * `vimeo` String (optional) - Link to your Vimeo account\n  * `linkedin` String (optional) - Link to your LinkedIn account\n* `proofs` Object (optional) - Things that prove you're you\n  * `keybase` String (optional) - Link to your Keybase account\n* `support` Object (optional)\n  * `patreon` String (option) - Link to your Patreon\n  * `githubSponsors` String (option) - Link to your GitHub Sponsors page\n  * `openCollective` String (option) - Link to an Open Collective\n\nHere's a minimal example using only required properties:\n\n```json\n{\n  \"name\": \"Yours Truly\",\n  \"handle\": \"yt\",\n  \"website\": \"https://yt.blog\",\n  \"pronouns\": \"she/her\"\n}\n```\n\nHere's an example of a completely filled out `card.json`:\n\n```json\n{\n  \"name\": \"Hiro Protagonist\",\n  \"handle\": \"protagonist\",\n  \"website\": \"https://hiro.protagonist.org\",\n  \"pronouns\": \"he/him\",\n  \"work\": {\n    \"title\": \"Delivery Advocate\",\n    \"company\": \"Mafia\"\n  },\n  \"code\": {\n    \"npm\": \"https://npm.im/~protagonist\",\n    \"github\": \"https://github.com/protagonist\"\n  },\n  \"social\": {\n    \"twitter\": \"https://twitter.com/protagonist\",\n    \"instagram\": \"https://instagram.com/protagonist\",\n    \"snapchat\": \"https://snapchat.com/add/protagonist\",\n    \"facebook\": \"https://facebook.com/protagonist\",\n    \"twitch\": \"https://twitch.tv/protagonist\",\n    \"tiktok\": \"https://tiktok.com/protagonist\",\n    \"tumblr\": \"https://protagonist.tumblr.com\",\n    \"spotify\": \"https://open.spotify.com/user/01101000011100100110100101101111\",\n    \"youtube\": \"https://youtube.com/protagonist\",\n    \"vimeo\": \"https://vimeo.com/protagonist\",\n    \"linkedin\": \"https://linkedin.com/in/protagonist/\"\n  },\n  \"proofs\": {\n    \"keybase\": \"https://keybase.io/protagonist\"\n  },\n  \"support\": {\n    \"patreon\": \"https://patreon.com/protagonist\",\n    \"githubSponsors\": \"https://github.com/sponsors/protagonist\",\n    \"openCollective\": \"https://opencollective.com/protagonist\"\n  }\n}\n```\n\n## Contributing\n\n### Adding New Properties\n\nThe current schema is by no means \"complete\". I'm sure there are a bunch of things that could be added that are relevant to folks outside of the spaces I participate in, or tweaks that could be made to imrpove the existing schema.\n\nIf you'd like to contribute an addition, by all means please do. Here's a quick list of things you'll need to do:\n\n* update `helpers/fetch.js` with the appropriate changes\n* update `helpers/output.js` with the appropriate changes\n* update `README.md`\n  * update `Publishing a card.json file` section\n  * update examples\n* update the relevant card.json files in `tests/cards/`\n\n## Contributing Enhancements\n\nEnhancements to the codebase are more than welcome. Adding features would be awesome, as would enhancements to the codebase. If you're looking to add some features, here's some ideas:\n\n* `card.json` generator tool, similar to `npm init`. Perhaps `bateman create`.\n* `card.json` validator tool to ensure that a card is valid. This should both accept local paths and remote files. Perhaps it could be `bateman validate`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcutenode%2Fbateman","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcutenode%2Fbateman","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcutenode%2Fbateman/lists"}