{"id":14483685,"url":"https://github.com/file2html/file2html","last_synced_at":"2025-08-30T04:31:45.016Z","repository":{"id":57235683,"uuid":"93162817","full_name":"file2html/file2html","owner":"file2html","description":"JS convertor of files to HTML and CSS code","archived":true,"fork":false,"pushed_at":"2020-07-28T06:29:25.000Z","size":67,"stargazers_count":31,"open_issues_count":1,"forks_count":5,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-07-23T14:52:31.709Z","etag":null,"topics":["filereader","files","js","ooxml","reading"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/file2html.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}},"created_at":"2017-06-02T12:19:19.000Z","updated_at":"2023-07-29T22:40:04.000Z","dependencies_parsed_at":"2022-08-23T15:31:22.287Z","dependency_job_id":null,"html_url":"https://github.com/file2html/file2html","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/file2html/file2html","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/file2html%2Ffile2html","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/file2html%2Ffile2html/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/file2html%2Ffile2html/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/file2html%2Ffile2html/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/file2html","download_url":"https://codeload.github.com/file2html/file2html/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/file2html%2Ffile2html/sbom","scorecard":{"id":399356,"data":{"date":"2025-08-11","repo":{"name":"github.com/file2html/file2html","commit":"56419e06d6023ad0676bdc6e7631eade8be3d765"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","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":"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":"Maintained","score":0,"reason":"project is archived","details":["Warn: Repository is archived."],"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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"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"}}]},"last_synced_at":"2025-08-18T19:45:56.289Z","repository_id":57235683,"created_at":"2025-08-18T19:45:56.290Z","updated_at":"2025-08-18T19:45:56.290Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272805349,"owners_count":24995909,"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-30T02:00:09.474Z","response_time":77,"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":["filereader","files","js","ooxml","reading"],"created_at":"2024-09-03T00:01:59.523Z","updated_at":"2025-08-30T04:31:44.696Z","avatar_url":"https://github.com/file2html.png","language":"TypeScript","readme":"# file2html\n[![Build Status](https://travis-ci.org/file2html/file2html.svg?branch=master)](https://travis-ci.org/file2html/file2html)[![npm](https://img.shields.io/npm/dm/file2html.svg)](https://www.npmjs.com/package/file2html)\n[![npm](https://img.shields.io/npm/v/file2html.svg)](https://www.npmjs.com/package/file2html)\n[![npm](https://img.shields.io/npm/l/file2html.svg)](https://www.npmjs.com/package/file2html)\n[![Coverage Status](https://coveralls.io/repos/github/file2html/file2html/badge.svg?branch=master)](https://coveralls.io/github/file2html/file2html?branch=master)\n\n\u003e JS convertor of files to HTML and CSS code\n\n## Requirements\n* [Promise API](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise), [polyfill](https://github.com/lahmatiy/es6-promise-polyfill)\n* [Encoding API](https://developer.mozilla.org/en-US/docs/Web/API/Encoding_API), [polyfill](https://github.com/inexorabletash/text-encoding)\n* [Object.assign](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign), [polyfill](https://github.com/ljharb/object.assign)\n\n## Supported formats\n- [x] Text                [file2html-text](https://github.com/file2html/file2html-text)                 (.txt)\n- [x] Images              [file2html-image](https://github.com/file2html/file2html-image)               (.png, .jpg, .gif, .svg, .ico, .wbmp)\n- [x] OOXML Documents     [file2html-ooxml](https://github.com/file2html/file2html-ooxml)               (.docx)\n- [ ] OOXML Presentations (.pptx)\n- [ ] OOXML Spreadsheets  (.xlsx)\n- [x] ODF Text Files      [file2html-odf](https://github.com/file2html/file2html-odf)                   (.odt)\n- [x] DSV                 [file2html-dsv](https://github.com/file2html/file2html-dsv)                   (.csv, .tsv)\n- [x] FictionBook         [file2html-fiction-book](https://github.com/file2html/file2html-fiction-book) (.fb2)\n- [x] EPUB                [file2html-epub](https://github.com/file2html/file2html-epub)                 (.epub)\n- [ ] DjVu                (.djvu, .djv)\n- [ ] RTF                 (.rtf)\n- [ ] WCBFF               (.doc)\n\n## Usage\n### Installation\n\n```shell\n\u003e npm i file2html\n```\n\n### Installation of required engines for each file type:\n\n```shell\n\u003e npm i file2html-text file2html-ooxml file2html-image \n```\n\nCheck [supported formats](#supported-formats) to decide which engines you need.\n\n### Configuration\n\n```js\nimport * as file2html from 'file2html';\nimport TextReader from 'file2html-text';\nimport OOXMLReader from 'file2html-ooxml';\nimport ImageReader from 'file2html-image';\n\nfile2html.config({\n    readers: [\n        TextReader,\n        OOXMLReader,\n        ImageReader\n    ]\n});\n```\n\n### File reading\n\n```js\nfile2html.read({\n    fileBuffer, // ArrayBuffer\n    meta // file2html.FileMetaInformation\n}).then((file) =\u003e {\n    // file is an instance of file2html.File type \n    const {styles, content} = file.getData();    \n    \n    // \"render\" a file content with styles\n    document.body.innerHTML = styles + content;\n});\n```\n\n#### FileMetaInformation\n\n```js\n    {\n        fileType: number; // optional\n        mimeType: string; // optional\n        name: string; // optional\n        size: number; // optional\n        creator: string; // optional\n        createdAt: string; // optional\n        modifiedAt: string; // optional\n    }\n```\n\n#### File\n\n```js\n    {\n        getMeta () {\n            // returns object of file2html.FileMetaInformation    \n        }\n    \n        getData ()  {\n            // returns object of file2html.FileData\n        }\n    }\n```\n\n#### FileData\n\n```js\n    {\n        meta: file2html.FileMetaInformation;\n        styles: string; // css styles as a string\n        content: string; // html markup as a string\n    }\n```\n\n## Showcase\n### StormFiles\nBrowser extension, file viewer:\n  * [Chrome extension](https://chrome.google.com/webstore/detail/stormfiles/ickghndjocahgacnfaakbmbokmfneahd)\n  * [Firefox extension](https://addons.mozilla.org/firefox/addon/stormfiles)\n","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffile2html%2Ffile2html","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffile2html%2Ffile2html","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffile2html%2Ffile2html/lists"}