{"id":20514590,"url":"https://github.com/thatcodechap/wikidparse","last_synced_at":"2026-05-19T09:11:04.451Z","repository":{"id":188294365,"uuid":"678451905","full_name":"thatcodechap/wikidparse","owner":"thatcodechap","description":"Fast and lightweight parser for wikitionary","archived":false,"fork":false,"pushed_at":"2023-08-14T15:30:12.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-03-15T05:06:45.643Z","etag":null,"topics":["javascript","json","parser","wiki","wikimedia","wikitionary"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/wikidparse","language":"JavaScript","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/thatcodechap.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}},"created_at":"2023-08-14T15:28:22.000Z","updated_at":"2023-08-14T15:32:04.000Z","dependencies_parsed_at":"2023-08-14T19:51:43.691Z","dependency_job_id":"3da2e7e4-52fd-4021-b4cb-b24b111c0642","html_url":"https://github.com/thatcodechap/wikidparse","commit_stats":null,"previous_names":["thatcodechap/wikidparse"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/thatcodechap/wikidparse","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thatcodechap%2Fwikidparse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thatcodechap%2Fwikidparse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thatcodechap%2Fwikidparse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thatcodechap%2Fwikidparse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thatcodechap","download_url":"https://codeload.github.com/thatcodechap/wikidparse/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thatcodechap%2Fwikidparse/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265212407,"owners_count":23728529,"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":["javascript","json","parser","wiki","wikimedia","wikitionary"],"created_at":"2024-11-15T21:17:14.534Z","updated_at":"2026-05-19T09:10:59.431Z","avatar_url":"https://github.com/thatcodechap.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wikidparse\n[![NPM](https://img.shields.io/npm/v/wikidparse)](https://www.npmjs.com/package/wikidparse)\n[![NPM](https://img.shields.io/npm/l/wikidparse)](https://github.com/thatcodechap/wikidparse/blob/main/LICENSE)\n\nFast and lightweight parser for Wikitionary pages\n\nWikitionary endpoint : https://en.wiktionary.org/w/api.php\n## How to use\n1. Install the package\n```\nnpm install wikidparse\n```\n2. Import the parser in your code\n```\nimport parsePage from 'wikidparse'\n```\n3. Pass fetched html page to `parsePage` function\n```\nparsePage(`html-string`)\n```\n## Example\n```\nimport parsePage from 'wikidparse'\nimport fetch from 'node-fetch'\n\nconst ENDPOINT = 'https://en.wiktionary.org/w/api.php?action=parse\u0026format=json\u0026prop=text\u0026page=';\nconst WORD = 'cat';\nlet URL = ENDPOINT + WORD;\n\nfetch(URL)\n.then(response=\u003eresponse.json())\n.then(responseInJson=\u003e{\n  let html = responseInJson.parse.text['*'];\n  let output = parsePage(html);\n})\n```\n### JSON Output (truncated)\n```\n{\n  \"English\": {\n    \"Etymology 1\": {\n      \"Alternative forms\": {},\n      \"Noun\": {\n        \"1\": {\n          \"1\": \"A domesticated species (Felis catus) of feline animal, commonly kept as a house pet. \",\n          \"2\": \"Any similar animal of the family Felidae, which includes lions, tigers, bobcats, leopards, cougars, cheetahs, caracals, lynxes, and other such non-domesticated species.\",\n          \"type\": \"An animal of the family Felidae:\"\n        },\n        \"2\": \"(uncountable) The meat of this animal, eaten as food.\",\n        \"3\": {\n          \"1\": \"(offensive) A spiteful or angry woman. \",\n          \"2\": \"An enthusiast or player of jazz.\",\n          \"3\": \"(slang) A person (usually male).\",\n          \"4\": \"(slang) A prostitute. \",\n          \"type\": \"A person:\"\n        },\n        \"4\": \"(nautical) A strong tackle used to hoist an anchor to the cathead of a ship.\",\n        \"5\": \"(chiefly nautical) Short for cat-o'-nine-tails.\",\n        \"6\": \"(archaic) A sturdy merchant sailing vessel (now only in \\\"catboat\\\").\",\n        \"7\": {\n          \"1\": \"(archaic, countable) The trap in that game.\",\n          \"type\": \"(archaic, uncountable) The game of trap ball.\"\n        },\n        \"8\": \"(archaic) The pointed piece of wood that is struck in the game of tipcat.\"\n      }\n    }\n  }\n}\n```\n## Future updates\n1. Support for parse from non-api wikitionary pages like : https://en.wiktionary.org/wiki/cat\n2. Parse media files\n3. CommonJS module support","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthatcodechap%2Fwikidparse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthatcodechap%2Fwikidparse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthatcodechap%2Fwikidparse/lists"}