{"id":26870982,"url":"https://github.com/btbytes/csv2html","last_synced_at":"2025-08-02T04:04:54.370Z","repository":{"id":66399701,"uuid":"269795998","full_name":"btbytes/csv2html","owner":"btbytes","description":"A script to convert a CSV file to HTML file with some options","archived":false,"fork":false,"pushed_at":"2020-06-05T22:39:28.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-17T17:23:41.404Z","etag":null,"topics":["csv","html","python","python3"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/btbytes.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,"zenodo":null}},"created_at":"2020-06-05T22:30:25.000Z","updated_at":"2023-03-04T07:46:53.000Z","dependencies_parsed_at":"2023-02-21T02:31:04.011Z","dependency_job_id":null,"html_url":"https://github.com/btbytes/csv2html","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/btbytes/csv2html","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/btbytes%2Fcsv2html","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/btbytes%2Fcsv2html/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/btbytes%2Fcsv2html/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/btbytes%2Fcsv2html/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/btbytes","download_url":"https://codeload.github.com/btbytes/csv2html/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/btbytes%2Fcsv2html/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268333986,"owners_count":24233782,"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","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["csv","html","python","python3"],"created_at":"2025-03-31T07:18:07.050Z","updated_at":"2025-08-02T04:04:54.360Z","avatar_url":"https://github.com/btbytes.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# csv2html\nA script to convert a CSV file to HTML file with some options.Reads a CSV File and writes the output to the terminal.\n\n\nOptions:\n\n1. Field delimiter\n2. Quote character\n3. HTML Table caption\n4. Page title\n5. First row has header information.\n\n\n\n\n```\n$ ./csv2html.py -h\nusage: csv2html.py [-h] [--delimiter DELIMITER] [--quotechar QUOTECHAR]\n                   [--title TITLE] [--caption CAPTION] [--header]\n                   csvfile\n\nCSV to HTML converter.\n\npositional arguments:\n  csvfile\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --delimiter DELIMITER\n                        Field delimiter. Default is , .\n  --quotechar QUOTECHAR\n                        Quote Character. Deault is nothing\n  --title TITLE         Page title. Will be printed in h1 tag.\n  --caption CAPTION     Table caption.\n  --header              data has header. First row will be \"th\".\n```\n\nExample input:\n\n```csv\nmpg,cylinders,displacement,horsepower,weight,acceleration,model_year,origin,name\n18,8,307,130,3504,12,70,1,chevrolet chevelle malibu\n15,8,350,165,3693,11.5,70,1,buick skylark 320\n18,8,318,150,3436,11,70,1,plymouth satellite\n```\n\nCommand: `./csv2html.py example.csv --header --caption \"Car MPGs\" \u003e example.html`\n\nOutput:\n\n```HTML\n\u003c!doctype html\u003e\u003chead\u003e\u003cstyle type=\"text/css\"\u003e\n                table {\n                  border-collapse: collapse;\n                  margin-bottom: 10px;\n                }\n\n                td,\n                th {\n                  padding: 6px;\n                  text-align: left;\n                }\n\n                thead {\n                  border-bottom: 1px solid var(--border);\n                }\n\n                tfoot {\n                  border-top: 1px solid var(--border);\n                }\n\n                tbody tr:nth-child(even) {\n                  background-color: var(--background-alt);\n                }\u003c/style\u003e\u003c/head\u003e\u003cbody\u003e\n                \n\u003ctable\u003e\n\u003ccaption\u003eCar MPGs\u003c/caption\u003e\n\u003ctr\u003e\n\u003cth\u003empg\u003c/th\u003e\n\u003cth\u003ecylinders\u003c/th\u003e\n\u003cth\u003edisplacement\u003c/th\u003e\n\u003cth\u003ehorsepower\u003c/th\u003e\n\u003cth\u003eweight\u003c/th\u003e\n\u003cth\u003eacceleration\u003c/th\u003e\n\u003cth\u003emodel_year\u003c/th\u003e\n\u003cth\u003eorigin\u003c/th\u003e\n\u003cth\u003ename\u003c/th\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e18\u003c/td\u003e\n\u003ctd\u003e8\u003c/td\u003e\n\u003ctd\u003e307\u003c/td\u003e\n\u003ctd\u003e130\u003c/td\u003e\n\u003ctd\u003e3504\u003c/td\u003e\n\u003ctd\u003e12\u003c/td\u003e\n\u003ctd\u003e70\u003c/td\u003e\n\u003ctd\u003e1\u003c/td\u003e\n\u003ctd\u003echevrolet chevelle malibu\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e15\u003c/td\u003e\n\u003ctd\u003e8\u003c/td\u003e\n\u003ctd\u003e350\u003c/td\u003e\n\u003ctd\u003e165\u003c/td\u003e\n\u003ctd\u003e3693\u003c/td\u003e\n\u003ctd\u003e11.5\u003c/td\u003e\n\u003ctd\u003e70\u003c/td\u003e\n\u003ctd\u003e1\u003c/td\u003e\n\u003ctd\u003ebuick skylark 320\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e18\u003c/td\u003e\n\u003ctd\u003e8\u003c/td\u003e\n\u003ctd\u003e318\u003c/td\u003e\n\u003ctd\u003e150\u003c/td\u003e\n\u003ctd\u003e3436\u003c/td\u003e\n\u003ctd\u003e11\u003c/td\u003e\n\u003ctd\u003e70\u003c/td\u003e\n\u003ctd\u003e1\u003c/td\u003e\n\u003ctd\u003eplymouth satellite\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbtbytes%2Fcsv2html","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbtbytes%2Fcsv2html","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbtbytes%2Fcsv2html/lists"}