{"id":18925600,"url":"https://github.com/nightmachinery/htmlmetadata","last_synced_at":"2026-03-14T15:30:17.840Z","repository":{"id":115498683,"uuid":"284139149","full_name":"NightMachinery/htmlmetadata","owner":"NightMachinery","description":"CLI Nim app that extracts metadata out of HTML. Extremely fast, but might not handle edge cases.","archived":false,"fork":false,"pushed_at":"2021-04-07T12:46:21.000Z","size":6,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-31T17:48:11.871Z","etag":null,"topics":["html","metadata","nim","nim-lang","opengraph","opengraph-data","opengraph-tags","opengraphprotocol","scraping","scraping-nim"],"latest_commit_sha":null,"homepage":"","language":"Nim","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/NightMachinery.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-31T22:13:27.000Z","updated_at":"2021-04-07T12:46:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"83202002-df64-429a-a5b2-e40881d48a55","html_url":"https://github.com/NightMachinery/htmlmetadata","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/NightMachinery%2Fhtmlmetadata","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NightMachinery%2Fhtmlmetadata/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NightMachinery%2Fhtmlmetadata/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NightMachinery%2Fhtmlmetadata/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NightMachinery","download_url":"https://codeload.github.com/NightMachinery/htmlmetadata/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239921844,"owners_count":19718844,"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":["html","metadata","nim","nim-lang","opengraph","opengraph-data","opengraph-tags","opengraphprotocol","scraping","scraping-nim"],"created_at":"2024-11-08T11:12:29.008Z","updated_at":"2026-03-14T15:30:17.774Z","avatar_url":"https://github.com/NightMachinery.png","language":"Nim","funding_links":[],"categories":[],"sub_categories":[],"readme":"# About\n\n`htmlmetadata` is a CLI app that extracts metadata out of HTML. Extremely fast (written in `Nim`), but might not handle edge cases.\n\nI use this tool often, so you can be sure that it's maintained (i.e., working), even if it has not had recent activity.\n\n# Installation\n\nInstall `nim`, which includes its own package manager `nimble`:\n\n``` sh\nbrew install nim\n# or\nsudo apt install nim\n# or ...\n```\n\nNow:\n\n`nimble install https://github.com/NightMachinary/htmlmetadata`\n\nDon't forget to add nimble's binary path (`~/.nimble/bin/` on my machine) to your PATH.\n\n# Usage\n\nYou need to send the HTML input through stdin, by using, e.g., `curl http://example.com | htmlmetadata ...`.\n\n```\n  htmlmetadata\n    Will print all the extracted metadata in a humanly readable format.\n  htmlmetadata \u003cname-of-metadata\u003e ...\n    Will print the requested metadata only, separated by the NUL character. (The separator can't be the newline because the description metadata often contains newlines.)\n```\n\n```\nAvailable metadata:\n  title: string\n  description: string\n  image: string\n  author: string\n  creator: string\n  site_name: string\n  keywords: string\n```\n\n## Examples\n\n``` sh\ncurl --silent https://slatestarcodex.com/2020/06/17/slightly-skew-systems-of-government/ | htmlmetadata\n```\n\n\u003e (title: \"Slightly Skew Systems Of Government\", description: \"[Related To: Legal Systems Very Different From Ours Because I Just Made Them Up, List Of Fictional Drugs Banned By The FDA] I. Clamzoria is an acausal democracy. The problem with democracy is that …\", image: \"https://s0.wp.com/i/blank.jpg\", author: \"\", creator: \"\", site_name: \"Slate Star Codex\", keywords: \"\")\n\n`curl --silent https://nintil.com/reversible-senescence | htmlmetadata`\n\u003e (title: \"Nintil - Is cellular senescence irreversible?\", description: \"The internet\\'s best blog!\", image: \"\", author: \"Jose Luis Ricon\", creator: \"\", site_name: \"\", keywords: \"economics, philosophy, technology, innovation, gdp growth, progress studies\")\n\nNote: `cat -v` is used to show the NUL character.\n\n`curl --silent https://nintil.com/reversible-senescence | htmlmetadata author | cat -v`\n\u003e Jose Luis Ricon\n\n`curl --silent https://nintil.com/reversible-senescence | htmlmetadata site_name author keywords |cat -v`\n\u003e ^@Jose Luis Ricon^@economics, philosophy, technology, innovation, gdp growth, progress studies\n\n# Need to extract a metadata tag not covered by the API?\n\nCheck out the source! It's extremely easy to extend `htmlmetadata`. You can add support for a new tag by adding ~3 lines of code.\n\n# Similar projects\n\n- [MetadataParser](https://github.com/jvanasco/metadata_parser) is a python library for extracting HTML metadata. It's 10x slower than `htmlmetadata`, but it handles edge cases better.\n\n# License\n\nDual-licensed under GPL3 (and its later versions) and MIT.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnightmachinery%2Fhtmlmetadata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnightmachinery%2Fhtmlmetadata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnightmachinery%2Fhtmlmetadata/lists"}