{"id":19912386,"url":"https://github.com/nesterow/pickit","last_synced_at":"2026-05-01T23:33:10.213Z","repository":{"id":97832221,"uuid":"599943423","full_name":"nesterow/pickit","owner":"nesterow","description":"Extract files from tarballs and github repos using glob syntax or regular expressions.","archived":false,"fork":false,"pushed_at":"2023-02-11T14:33:24.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-28T00:14:45.349Z","etag":null,"topics":["deno","github","githubrelease","tar","tarball"],"latest_commit_sha":null,"homepage":"","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/nesterow.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-10T08:18:44.000Z","updated_at":"2023-02-11T11:27:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"0f82cbe4-b210-4a6e-b20d-40f686c5163f","html_url":"https://github.com/nesterow/pickit","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/nesterow/pickit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nesterow%2Fpickit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nesterow%2Fpickit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nesterow%2Fpickit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nesterow%2Fpickit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nesterow","download_url":"https://codeload.github.com/nesterow/pickit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nesterow%2Fpickit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32517222,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"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":["deno","github","githubrelease","tar","tarball"],"created_at":"2024-11-12T21:29:12.439Z","updated_at":"2026-05-01T23:33:10.198Z","avatar_url":"https://github.com/nesterow.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pickit\n\nThis utility helps you to extract files from tarballs and github repos using\nglob syntax or regular expressions. You can use either a config file or command\nline arguments.\n\n## Examples\n\n\u003e Pick files from a github repo to directory `scripts`:\n\n```bash\npickit nesterow/pickit@v0.0.1a scripts **/tests/*.ts\n```\n\n\u003e Pick files from a tarball to directory `logs`:\n\n```bash\npickit server_logs.tar.gz logs **/error.log\n```\n\n## Installation\n\n```bash\ndeno install -A https://deno.land/x/pickit/pickit.ts\n```\n\n## Using without installation\n\n```bash\ndeno run -A https://deno.land/x/pickit/pickit.ts [args]...\n```\n\n## Using config file\n\nIf you need to pick files from multiple sources, you can use a config file. The\nconfig file should export an array of `PickConfig` objects.\n\n```typescript\nimport type { PickConfig } from \"https://deno.land/x/pickit/mod.d.ts\";\nexport default [\n    {\n        source: \"username/repo@version\",\n        output: \"./outputDir\",\n        pick: [\n            /^.*/base/.*.css$/, // can be a regular expression\n            \"/src/index.js\",\n            \"/src/**/*.yaml\"\n        ],\n    },\n] as PickConfig;\n```\n\nSee the complete example\n[here](https://github.com/nesterow/pickit/blob/main/tests/config_mock.ts).\n\n\u003e Usage:\n\n```bash\npickit ./config.ts\n```\n\n## API\n\nMost methods are exported from `mod.ts` and can be used within your code. Read\nthe [API documentation](https://deno.land/x/pickit/mod.ts)\n\n\u003e All functions are using RegExp to match files. So you need to convert globs\n\u003e explicitly. Example:\n\n```typescript\nimport { githubPick } from \"https://deno.land/x/pickit@v0.0.3/mod.ts\";\nimport { globToRegExp, join } from \"$std/path/mod.ts\";\nimport { readAll } from \"$std/streams/conversion.ts\";\n\nfor await (\n  const cssFile of githubPick({\n    repo: \"saadeghi/daisyui\",\n    version: \"v2.47.0\",\n    pick: [\n      globToRegExp(\"**/src/components/**/*.css\"),\n    ],\n  })\n) {\n  const css = new TextDecoder(\"utf-8\").decode(await readAll(cssFile));\n  // do something with css\n}\n```\n\n## License\n\n```text\nMIT License\n\nCopyright (c) 2023 Pick it contributors\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n\n## Contributors\n\n[@nesterow](https://github.com/nesterow)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnesterow%2Fpickit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnesterow%2Fpickit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnesterow%2Fpickit/lists"}