{"id":48235429,"url":"https://github.com/idw111/table-renderer","last_synced_at":"2026-04-04T19:58:38.161Z","repository":{"id":42758808,"uuid":"278571454","full_name":"idw111/table-renderer","owner":"idw111","description":"convert table or spreadsheet data into an image","archived":false,"fork":false,"pushed_at":"2023-03-30T21:46:45.000Z","size":1964,"stargazers_count":16,"open_issues_count":12,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-31T06:55:07.277Z","etag":null,"topics":["image","node-canvas","saveimage","spreadsheet-data","table"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/idw111.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-07-10T07:43:26.000Z","updated_at":"2025-06-21T23:41:40.000Z","dependencies_parsed_at":"2024-10-14T02:40:35.378Z","dependency_job_id":null,"html_url":"https://github.com/idw111/table-renderer","commit_stats":{"total_commits":31,"total_committers":4,"mean_commits":7.75,"dds":0.3548387096774194,"last_synced_commit":"b2874e608df2e3270546f2514ea1dc882915f1a9"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/idw111/table-renderer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idw111%2Ftable-renderer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idw111%2Ftable-renderer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idw111%2Ftable-renderer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idw111%2Ftable-renderer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/idw111","download_url":"https://codeload.github.com/idw111/table-renderer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idw111%2Ftable-renderer/sbom","scorecard":{"id":481825,"data":{"date":"2025-08-11","repo":{"name":"github.com/idw111/table-renderer","commit":"b2874e608df2e3270546f2514ea1dc882915f1a9"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.4,"checks":[{"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":1,"reason":"Found 2/12 approved changesets -- score normalized to 1","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":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"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":"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":"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":"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":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"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 'master'"],"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 20 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"}},{"name":"Vulnerabilities","score":0,"reason":"25 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-x9w5-v3q2-3rhw","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-434g-2637-qmqr","Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m","Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw","Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p","Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747","Warn: Project is vulnerable to: GHSA-vjh7-7g9h-fjfh","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-76p3-8jx3-jpfq","Warn: Project is vulnerable to: GHSA-3rfm-jhwj-7488","Warn: Project is vulnerable to: GHSA-hhq3-ff78-jv3g","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-h7cp-r72f-jxh6","Warn: Project is vulnerable to: GHSA-v62p-rq8g-8h59","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36","Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T16:50:14.877Z","repository_id":42758808,"created_at":"2025-08-19T16:50:14.877Z","updated_at":"2025-08-19T16:50:14.877Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31411500,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T19:29:44.979Z","status":"ssl_error","status_checked_at":"2026-04-04T19:29:11.535Z","response_time":60,"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":["image","node-canvas","saveimage","spreadsheet-data","table"],"created_at":"2026-04-04T19:58:35.674Z","updated_at":"2026-04-04T19:58:38.156Z","avatar_url":"https://github.com/idw111.png","language":"JavaScript","readme":"# table-renderer\n\n\u003e convert table or spreadsheet data into an image\n\n## Background\n\nOne day, I had to build a slack slash command which reports marketing reports to our company slack channel. I wanted to format the command results look like table, but I could not find a simple way to do that. I decided to build a table-like view using markdown text, and struggled to do that. However, the layout was broken with small windows or with CJK charaters. So I decided to build the report as an image.\n\n![table-renderer](example.png)\n\nI hope this module will help someone who wants to convert a simple spreadsheet data into an image,\n\n## Install\n\n```bash\nnpm install table-renderer canvas\n```\n\n[node-canvas](https://github.com/Automattic/node-canvas) module is peer-dependency. You have to install it, too.\n\n## Examples\n\n-   [Single Table](./examples/single-table)\n-   [Multiple Tables](./examples/multiple-tables)\n-   [Styling Title](./examples/styling-title)\n-   [Horizontal and Vertical Lines](./examples/lines)\n-   [Horizontal and Vertical Padding](./examples/padding)\n-   [Custom Font](./examples/custom-font)\n\n## Usage\n\n```javascript\nimport path from 'path';\nimport TableRenderer, { saveImage } from 'table-renderer';\n\nconst renderTable = TableRenderer().render;\n\nconst canvas = renderTable({\n\ttitle: 'Marketing Summary',\n\tcolumns: [\n\t\t{ width: 200, title: 'Campaign', dataIndex: 'campaign' },\n\t\t{ width: 100, title: 'Install', dataIndex: 'install', align: 'right' },\n\t\t{ width: 100, title: 'Cost', dataIndex: 'cost', align: 'right' },\n\t],\n\tdataSource: [\n\t\t'-',\n\t\t{ campaign: 'Google CPC', install: '12', cost: '$ 400' },\n\t\t{ campaign: 'Facebook CPC', install: '3', cost: '$ 60' },\n\t\t{ campaign: 'Youtube Video', install: '131', cost: '$ 1,230' },\n\t\t'-',\n\t\t{ campaign: 'Total', install: '146', cost: '$ 1,690' },\n\t],\n});\n\nsaveImage(canvas, path.join(__dirname, 'example.png'));\n```\n\n![single table](example.png)\n\n## API\n\n-   [TableRenderer()](#tablerenderer)\n-   [TableRenderer#render()](#tablerendererrender)\n-   [saveImage()](#saveimage)\n\n### TableRenderer\n\n```javascript\nTableRenderer(options = {}) =\u003e ({ render: function });\n```\n\n#### options\n\n-   `cellWidth` {number} default width for a table cell. default = 100\n-   `cellHeight` {number} default height for a table cell. default = 40\n-   `offsetLeft` {number} default text offset from left border of table cell. default = 8\n-   `offsetTop` {number} default text offset from top border of table cell. default = 26\n-   `spacing` {number} spacing between tables. default = 20\n-   `titleSpacing` {number} spacing between title and a table. default = 10\n-   `fontFamily` {string} default = 'sans-serif'\n-   `paddingVertical` {number} vertical padding of a page. default = 0\n-   `paddingHorizontal` {number} horizontal padding of a page. default = 0\n-   `backgroundColor` {string} page background color. default = '#ffffff'\n\n### TableRenderer#render\n\n```javascript\nrender((tables: Object | Array)) =\u003e Canvas;\n```\n\ntables parameter is either Object or Array. Single table is comprised of title, columns, and dataSource, where title is optional. Parameters of render function resembles ant-design Table paramters.\n\nThe function returns Canvas object, which is an instance of [node-canvas](https://github.com/Automattic/node-canvas). So, you can add canvas operations to it.\n\n```javascript\nrender({\n    title: 'Marketing Summary',\n    columns: [...],\n    dataSource: [...]\n});\n```\n\n### saveImage\n\n```javascript\nsaveImage((canvas: Canvas), (filepath: String)) =\u003e Promise;\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidw111%2Ftable-renderer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fidw111%2Ftable-renderer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidw111%2Ftable-renderer/lists"}