{"id":13587073,"url":"https://github.com/aymericbeaumet/squeeze","last_synced_at":"2025-06-20T23:08:10.820Z","repository":{"id":66648792,"uuid":"240774872","full_name":"aymericbeaumet/squeeze","owner":"aymericbeaumet","description":":tangerine: Extract rich information from any text (urls, todos, etc)","archived":false,"fork":false,"pushed_at":"2021-12-10T02:19:35.000Z","size":2504,"stargazers_count":17,"open_issues_count":18,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-20T23:07:29.581Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","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/aymericbeaumet.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-02-15T19:23:09.000Z","updated_at":"2024-07-29T07:31:47.000Z","dependencies_parsed_at":"2023-02-21T22:15:13.904Z","dependency_job_id":null,"html_url":"https://github.com/aymericbeaumet/squeeze","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aymericbeaumet/squeeze","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aymericbeaumet%2Fsqueeze","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aymericbeaumet%2Fsqueeze/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aymericbeaumet%2Fsqueeze/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aymericbeaumet%2Fsqueeze/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aymericbeaumet","download_url":"https://codeload.github.com/aymericbeaumet/squeeze/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aymericbeaumet%2Fsqueeze/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261032097,"owners_count":23100050,"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":[],"created_at":"2024-08-01T15:06:00.319Z","updated_at":"2025-06-20T23:08:05.810Z","avatar_url":"https://github.com/aymericbeaumet.png","language":"Rust","funding_links":[],"categories":["Rust","\u003ca name=\"text-processing\"\u003e\u003c/a\u003eText processing","Other"],"sub_categories":[],"readme":"# squeeze [![GitHub Actions](https://github.com/aymericbeaumet/squeeze/actions/workflows/ci.yml/badge.svg)](https://github.com/aymericbeaumet/squeeze/actions/workflows/ci.yml)\n\n[squeeze](https://github.com/aymericbeaumet/squeeze) enables to extract rich\ninformation from any text (raw, JSON, HTML, YAML, etc).\n\nCurrently supported:\n\n- Codetags (as defined per [PEP 350](https://www.python.org/dev/peps/pep-0350/))\n- URIs/URLs/URNs (as defined per [RFC 3986](https://tools.ietf.org/html/rfc3986/))\n\nSee [integrations](#integrations) for some practical uses. Continue reading for\nthe install and getting started instructions.\n\n## Install\n\n### Using git\n\n_This method requires the [Rust\ntoolchain](https://www.rust-lang.org/tools/install) to be installed on your\nmachine._\n\n```shell\ngit clone --depth=1 https://github.com/aymericbeaumet/squeeze.git /tmp/squeeze\ncargo install --path=/tmp/squeeze/squeeze-cli\n```\n\n## Getting Started\n\nLet's start by extracting a URL, `squeeze` expects the text to be searched on\nits standard input, with the results being placed on its standard output:\n\n```shell\necho 'lorem https://github.com ipsum' | squeeze -1 --url\n```\n\n```\nhttps://github.com\n```\n\n\u003e The `-1` flag allows to immediately abort after one result has been found.\n\nIf you want to print all the URLs, just omit the `-1` flag:\n\n```shell\nsqueeze --url \u003c\u003c EOF\nthis a domain: github.com, but this is a url: https://aymericbeaumet.com\nthis is some markdown: [link](https://wikipedia.com)\nEOF\n```\n\n```\nhttps://aymericbeaumet.com\nhttps://wikipedia.com\n```\n\nIt is also possible to extract other types of information, like codetags\n(`TODO:`, `FIXME:`, etc). The usage remains very similar:\n\n```shell\nsqueeze --codetag=todo \u003c\u003c EOF\n// TODO: implement the main function\nfn main {}\nEOF\n```\n\n```\nTODO: implement the main function\n```\n\n\u003e Note that for convenience some aliases are defined. In this case, you can use\n`--todo` instead of `--codetag=todo`. In the same vein, `--url` is an alias to\nlimit the search to specific URI schemes.\n\nIt is possible to enable several finders at the same time, they will be run\nsequentially for each line:\n\n```shell\nsqueeze --uri=http,https --codetag=todo,fixme \u003c\u003c EOF\n// TODO: update with a better example\n// FIXME: all of https://github.com/aymericbeaumet/squeeze/issues\n// Some random comment to be ignored\nftp://localhost\nhttp://localhost\nEOF\n```\n\n```\nTODO: update with a better example\nFIXME: all of https://github.com/aymericbeaumet/squeeze/issues\nhttps://github.com/aymericbeaumet/squeeze/issues\nhttp://localhost\n```\n\nThis getting started should give you an overview of what's possible with\n`squeeze`. Have a look at all the possibilities with `squeeze --help`.\n\n## Integrations\n\nIntegrations with some popular tools.\n\n### vim/nvim\n\nPress `Enter` in visual mode to extract the first URL from the current\nselection and open it:\n\n```vim\n\" ~/.vimrc\nvnoremap \u003csilent\u003e \u003cCR\u003e :\u003cC-U\u003e'\u003c,'\u003ew !squeeze -1 --url --open\u003cCR\u003e\u003cCR\u003e\n```\n\n### tmux\n\nPress `Enter` in copy mode to extract the first URL from the current selection\nand open it:\n\n```tmux\n# ~/.tmux.conf\nbind -T copy-mode-vi enter send -X copy-pipe-and-cancel \"squeeze -1 --url --open\"\n```\n\n### shell (bash, zsh)\n\nDefine a `urls` function to list all the URLs in your shell history:\n\n```shell\n# ~/.bashrc ~/.zshrc\nurls() { fc -rl 1 | squeeze --url | sort -u; }\n```\n\n## Development\n\n### Run binary\n\n```shell\necho 'http://localhost' | cargo run -- --url\n```\n\n### Run tests\n\n```shell\ncargo test\nwatchexec --clear --restart 'cargo test'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faymericbeaumet%2Fsqueeze","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faymericbeaumet%2Fsqueeze","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faymericbeaumet%2Fsqueeze/lists"}