{"id":15722100,"url":"https://github.com/iloveitaly/datasette-enrichments-shell","last_synced_at":"2025-05-13T02:51:14.855Z","repository":{"id":221611993,"uuid":"743016977","full_name":"iloveitaly/datasette-enrichments-shell","owner":"iloveitaly","description":"Enrich data using datasette and arbitrary commands on your local machine","archived":false,"fork":false,"pushed_at":"2025-05-02T12:00:48.000Z","size":139,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-02T13:19:54.405Z","etag":null,"topics":["datasette","datasette-enrichments","shell","sqlite"],"latest_commit_sha":null,"homepage":null,"language":"Python","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/iloveitaly.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null},"funding":{"github":["iloveitaly"]}},"created_at":"2024-01-14T03:47:32.000Z","updated_at":"2025-05-02T12:01:26.000Z","dependencies_parsed_at":"2024-07-31T04:29:38.623Z","dependency_job_id":"be834478-b500-4a0e-aa96-59f9625d511c","html_url":"https://github.com/iloveitaly/datasette-enrichments-shell","commit_stats":{"total_commits":37,"total_committers":3,"mean_commits":"12.333333333333334","dds":0.4054054054054054,"last_synced_commit":"19d534df46b283a7b59daa2a8c6e7da655b283a9"},"previous_names":["iloveitaly/datasette-enrichments-shell"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iloveitaly%2Fdatasette-enrichments-shell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iloveitaly%2Fdatasette-enrichments-shell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iloveitaly%2Fdatasette-enrichments-shell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iloveitaly%2Fdatasette-enrichments-shell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iloveitaly","download_url":"https://codeload.github.com/iloveitaly/datasette-enrichments-shell/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253862740,"owners_count":21975583,"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":["datasette","datasette-enrichments","shell","sqlite"],"created_at":"2024-10-03T22:03:58.142Z","updated_at":"2025-05-13T02:51:14.830Z","avatar_url":"https://github.com/iloveitaly.png","language":"Python","funding_links":["https://github.com/sponsors/iloveitaly"],"categories":[],"sub_categories":[],"readme":"# datasette-enrichments-shell\n\nSomething I've always wanted to do is to be able to easily run a map reduce operation on a CSV. This is something that all the nifty command line tools (zq, jq, etc) don't allow you to do.\n\nHowever, I noticed that Datasette recently added the ability to write enrichment plugins. I hacked together this enrichment plugin that allows you to run an arbitrary shell script and if the script was successful, save the resulting output to a new column.\n\n## Installation\n\nInstall this plugin in the same environment as Datasette.\n\n```shell\ndatasette install -U datasette-enrichments-shell\n```\n\nOr, if you are hacking on this locally:\n\n```shell\ndatasette install -U ~/Projects/python/datasette-enrichments-shell\n```\n\n## Usage\n\nAfter installing the plugin, you'll see the shell enrichment option in the UI. You can use this to run a shell command and save the output to a new column.\n\n### Examples\n\nHere's how to test a shell script before plugging it into the web UI:\n\n```shell\necho '{\"rowid\": 1, \"firstName\": \"Forest\", \"lastName\": \"Tree\"}' | \\\njq -r '\"-p firstName \\(.firstName) -p lastName \\(.lastName)\"' | \\\nxargs -I {} /Users/mike/.asdf/shims/sqlite-utils query email_personal.db \"SELECT * FROM address_book WHERE first_name = :firstName AND last_name = :lastName LIMIT 1\" {}\n```\n\n## Development\n\nTo set up this plugin locally, first checkout the code. Then create a new virtual environment:\n\n```bash\ncd datasette-enrichments-shell\npoetry install\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filoveitaly%2Fdatasette-enrichments-shell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Filoveitaly%2Fdatasette-enrichments-shell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filoveitaly%2Fdatasette-enrichments-shell/lists"}