{"id":29901032,"url":"https://gitlab.com/pommalabs/htmlark","last_synced_at":"2025-09-03T06:43:46.075Z","repository":{"id":50642030,"uuid":"20692244","full_name":"pommalabs/htmlark","owner":"pommalabs","description":"HtmlArk packs a webpage into a single HTML file: https://htmlark-docs.pommalabs.xyz/","archived":false,"fork":false,"pushed_at":null,"size":null,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":null,"default_branch":"main","last_synced_at":"2025-08-01T14:52:11.733Z","etag":null,"topics":["audios","css","data","embed","fonts","html","images","javascript","uri","videos"],"latest_commit_sha":null,"homepage":null,"language":null,"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://gitlab.com/uploads/-/system/project/avatar/20692244/pommalabs-logo.g4b.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2020-08-23T13:52:46.255Z","updated_at":"2025-07-18T12:13:35.772Z","dependencies_parsed_at":"2022-08-21T00:50:36.993Z","dependency_job_id":null,"html_url":"https://gitlab.com/pommalabs/htmlark","commit_stats":null,"previous_names":[],"tags_count":7,"template":null,"template_full_name":null,"purl":"pkg:gitlab/pommalabs/htmlark","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repositories/pommalabs%2Fhtmlark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repositories/pommalabs%2Fhtmlark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repositories/pommalabs%2Fhtmlark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repositories/pommalabs%2Fhtmlark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/owners/pommalabs","download_url":"https://gitlab.com/pommalabs/htmlark/-/archive/main/htmlark-main.zip","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repositories/pommalabs%2Fhtmlark/sbom","scorecard":null,"host":{"name":"gitlab.com","url":"https://gitlab.com","kind":"gitlab","repositories_count":4520238,"owners_count":7137,"icon_url":"https://github.com/gitlab.png","version":null,"created_at":"2022-05-30T11:31:42.605Z","updated_at":"2024-07-18T11:24:13.055Z","status":"online","status_checked_at":"2025-09-01T02:00:09.374Z","response_time":284,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.382Z","robots_txt_url":"https://gitlab.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/owners"}},"keywords":["audios","css","data","embed","fonts","html","images","javascript","uri","videos"],"created_at":"2025-08-01T14:13:56.161Z","updated_at":"2025-09-03T06:43:46.067Z","avatar_url":"https://gitlab.com/uploads/-/system/project/avatar/20692244/pommalabs-logo.g4b.png","language":null,"funding_links":["https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=ELJWKEYS9QGKA"],"categories":[],"sub_categories":[],"readme":"# HtmlArk\n\n[![License: MIT][project-license-badge]][project-license]\n[![Donate][paypal-donations-badge]][paypal-donations]\n[![Docs][docfx-docs-badge]][docfx-docs]\n[![NuGet version][nuget-version-badge]][nuget-package]\n[![NuGet downloads][nuget-downloads-badge]][nuget-package]\n\n[![standard-readme compliant][github-standard-readme-badge]][github-standard-readme]\n[![GitLab pipeline status][gitlab-pipeline-status-badge]][gitlab-pipelines]\n[![Quality gate][sonar-quality-gate-badge]][sonar-website]\n[![Code coverage][sonar-coverage-badge]][sonar-website]\n[![Renovate enabled][renovate-badge]][renovate-website]\n\nEmbeds images, fonts, CSS and JavaScript into an HTML file.\nResources are embedded using [data URIs][mdn-data-uris].\n\nThis project is a .NET rewrite of the [homonymous Python project][github-htmlark],\nfrom which the command line interface has been copied in order to ease interoperability.\n\nMost disclaimers which were valid for the original library apply here too:\n\n- :warning: **HtmlArk should be used with trusted HTML pages only or in a sandboxed environment.**\n  Untrusted HTML pages might contain resource links which are valid for HtmlArk\n  but they might pose a serious security risk to your organization.\n- **HtmlArk works with static HTML pages only.**\n  If an image or other resource is loaded with JavaScript, HtmlArk won't even know it exists.\n- **Most browsers support data URIs, but as usual IE support might be less than ideal.**\n  Check data URIs compatibility on [Can I use][caniuse-data-uris].\n\nHtmlArk can be used to \"pack\" web pages into single HTML files.\nHowever, HtmlArk is not a crawler, so it must be paired with one in order to pack entire websites.\n\n:bulb: If you plan to serve packed web pages, please remember to turn on GZIP compression.\nIt usually yields good results and it helps to reduce download size.\n\n## Table of Contents\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Library](#library)\n  - [Tool](#tool)\n- [Maintainers](#maintainers)\n- [Contributing](#contributing)\n  - [Editing](#editing)\n  - [Restoring dependencies](#restoring-dependencies)\n  - [Running tests](#running-tests)\n- [License](#license)\n\n## Install\n\nNuGet package [PommaLabs.HtmlArk][nuget-package] is available for download:\n\n```bash\ndotnet add package PommaLabs.HtmlArk\n```\n\n[HtmlArk .NET tool][nuget-package-tool] can be installed with following command:\n\n```bash\ndotnet tool install PommaLabs.HtmlArk.Tool\n```\n\n## Usage\n\n### Library\n\nAs a library, HtmlArk can be included with the following `using` statement in your class:\n\n```cs\nusing PommaLabs.HtmlArk;\n```\n\nAnd then, it can be used like this, for example:\n\n```cs\nIHtmlArchiver htmlArchiver = new HtmlArchiver(NullLogger\u003cHtmlArchiver\u003e.Instance);\nstring archivedHtml = await htmlArchiver.ArchiveAsync(new Uri(\"https://www.example.com/\"));\n```\n\nIf you use dependency injection, it can be registered this way:\n\n```cs\nservices.AddHtmlArchiver(); // Maps IHtmlArchiver to HtmlArchiver as singleton.\n```\n\n### Tool\n\nHtmlArk .NET tool accepts the following command line arguments:\n\n```txt\n  -M, --http-client-max-resource-size    How many bytes can be downloaded for each resource.\n\n  -T, --http-client-timeout              Timeout of the internal HTTP client.\n\n  -A, --ignore-audios                    Ignores audios during archival.\n\n  -C, --ignore-css                       Ignores style sheets during archival.\n\n  -E, --ignore-errors                    Ignores unreadable resources.\n\n  -I, --ignore-images                    Ignores images during archival.\n\n  -J, --ignore-js                        Ignores external JavaScript during archival.\n\n  -V, --ignore-videos                    Ignores videos during archival.\n\n  -m, --minify                           Minifies output HTML.\n\n  -o, --output                           Output file path. If not specified, output will be written to STDOUT.\n\n  -v, --verbose                          Prints detailed information during HTML archival.\n\n  --help                                 Display this help screen.\n\n  --version                              Display version information.\n\n  input (pos. 0)                         Required. Input URI or file path.\n```\n\nInterface is modeled after the [original Python project][github-htmlark],\nso it should be pretty easy to switch between them.\n\n## Maintainers\n\n[@pomma89][gitlab-pomma89].\n\n## Contributing\n\nMRs accepted.\n\nSmall note: If editing the README, please conform to the [standard-readme][github-standard-readme] specification.\n\n### Editing\n\n[Visual Studio Code][vscode-website], with [Remote Containers extension][vscode-remote-containers],\nis the recommended way to work on this project.\n\nA development container has been configured with all required tools.\n\n[Visual Studio Community][vs-website] is also supported\nand an updated solution file, `htmlark.sln`, has been provided.\n\n### Restoring dependencies\n\nWhen opening the development container, dependencies should be automatically restored.\n\nAnyway, dependencies can be restored with following command:\n\n```bash\ndotnet restore\n```\n\n### Running tests\n\nTests can be run with following command:\n\n```bash\ndotnet test\n```\n\nTests can also be run with following command, which collects coverage information:\n\n```bash\n./build.sh --target run-tests\n```\n\n## License\n\nMIT © 2020-2024 [PommaLabs Team and Contributors][pommalabs-website]\n\n[caniuse-data-uris]: https://caniuse.com/datauri\n[docfx-docs]: https://htmlark-docs.pommalabs.xyz/\n[docfx-docs-badge]: https://img.shields.io/badge/DocFX-OK-green?style=flat-square\n[github-htmlark]: https://github.com/BitLooter/htmlark\n[github-standard-readme]: https://github.com/RichardLitt/standard-readme\n[github-standard-readme-badge]: https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square\n[gitlab-pipeline-status-badge]: https://gitlab.com/pommalabs/htmlark/badges/main/pipeline.svg?style=flat-square\n[gitlab-pipelines]: https://gitlab.com/pommalabs/htmlark/pipelines\n[gitlab-pomma89]: https://gitlab.com/pomma89\n[mdn-data-uris]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs\n[nuget-downloads-badge]: https://img.shields.io/nuget/dt/PommaLabs.HtmlArk?style=flat-square\n[nuget-package]: https://www.nuget.org/packages/PommaLabs.HtmlArk/\n[nuget-package-tool]: https://www.nuget.org/packages/PommaLabs.HtmlArk.Tool/\n[nuget-version-badge]: https://img.shields.io/nuget/v/PommaLabs.HtmlArk?style=flat-square\n[paypal-donations]: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=ELJWKEYS9QGKA\n[paypal-donations-badge]: https://img.shields.io/badge/Donate-PayPal-important.svg?style=flat-square\n[pommalabs-website]: https://pommalabs.xyz/\n[project-license]: https://gitlab.com/pommalabs/htmlark/-/blob/main/LICENSE\n[project-license-badge]: https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square\n[renovate-badge]: https://img.shields.io/badge/renovate-enabled-brightgreen.svg?style=flat-square\n[renovate-website]: https://renovate.whitesourcesoftware.com/\n[sonar-coverage-badge]: https://img.shields.io/sonar/coverage/pommalabs_htmlark?server=https%3A%2F%2Fsonarcloud.io\u0026sonarVersion=8\u0026style=flat-square\n[sonar-quality-gate-badge]: https://img.shields.io/sonar/quality_gate/pommalabs_htmlark?server=https%3A%2F%2Fsonarcloud.io\u0026sonarVersion=8\u0026style=flat-square\n[sonar-website]: https://sonarcloud.io/dashboard?id=pommalabs_htmlark\n[vs-website]: https://visualstudio.microsoft.com/\n[vscode-remote-containers]: https://code.visualstudio.com/docs/remote/containers\n[vscode-website]: https://code.visualstudio.com/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/gitlab.com%2Fpommalabs%2Fhtmlark","html_url":"https://awesome.ecosyste.ms/projects/gitlab.com%2Fpommalabs%2Fhtmlark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/gitlab.com%2Fpommalabs%2Fhtmlark/lists"}