{"id":24912839,"url":"https://github.com/raynardj/xdwarf","last_synced_at":"2026-05-17T02:07:59.184Z","repository":{"id":62589848,"uuid":"464806912","full_name":"raynardj/xdwarf","owner":"raynardj","description":"Mining XML to tabular data, FAAAAAAST","archived":false,"fork":false,"pushed_at":"2022-03-02T02:23:14.000Z","size":7081,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-02T08:42:50.093Z","etag":null,"topics":["html","mining","pmc","pyo3","rust","xml","xpath"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/raynardj.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":"2022-03-01T08:29:08.000Z","updated_at":"2022-03-01T10:05:00.000Z","dependencies_parsed_at":"2022-11-03T17:57:07.443Z","dependency_job_id":null,"html_url":"https://github.com/raynardj/xdwarf","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/raynardj%2Fxdwarf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raynardj%2Fxdwarf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raynardj%2Fxdwarf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raynardj%2Fxdwarf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raynardj","download_url":"https://codeload.github.com/raynardj/xdwarf/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245972642,"owners_count":20702710,"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","mining","pmc","pyo3","rust","xml","xpath"],"created_at":"2025-02-02T05:28:44.742Z","updated_at":"2026-05-17T02:07:54.140Z","avatar_url":"https://github.com/raynardj.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# xdwarf\nMining XML to tabular data, FAAAAAAST\n\n[![PyPI version](https://img.shields.io/pypi/v/xdwarf)](https://pypi.org/project/xdwarf)\n![Python version](https://img.shields.io/pypi/pyversions/xdwarf)\n![License](https://img.shields.io/github/license/raynardj/xdwarf)\n[![Test xdwarf](https://github.com/raynardj/xdwarf/actions/workflows/test.yml/badge.svg)](https://github.com/raynardj/xdwarf/actions/workflows/test.yml)\n![PyPI Downloads](https://img.shields.io/pypi/dm/xdwarf)\n\n## Install\n```shell\npip install xdwarf\n```\n\nThe library is an wrapping on ```rust_dwarf```, a rust based mining tool.\n\n## Mining\n```python\n# finding in glob pattern, project name, use all - 2 CPUs\ndwarf = Dwarf.from_glob(\"../test/data/*.xml\", \"PMC\",-2)\n```\n\nDefine the mining detail as xpath query pattern, chaining multistage mining is well supported.\n```python\ndwarf.find_one('article-meta \u003e article-id[pub-id-type=pmid]' , \"pmid\")\ndwarf.find_one(\"abstract\", \"abstract\").find_many(\"p\", \"paragraph\")\n\n# mining stage can be chained to longer detials\nreference = dwarf.find_one(\"ref-list\", \"ref_list\").find_many(\"ref\",\"reference\")\nreference.find_one(\"pub-id[pub-id-type=pmid]\", \"ref_id\")\nreference.find_one(\"pub-id[pub-id-type=doi]\", \"doi\")\nref_name = reference.find_many(\"name\", \"ref_name\")\nref_name.find_one(\"surname\", \"ref_surname\")\n```\n\n```python\ndwarf.set_necessary(\"pmid\")\ndwarf.create_children()\n```\n\nMining start\n```python\nresult = dwarf()\n```\n\nSee result\n```python\nresult.child_df().head(2)\n```\n\nSee child result\n```python\nresult['ref_list'].child_df().head()\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraynardj%2Fxdwarf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraynardj%2Fxdwarf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraynardj%2Fxdwarf/lists"}