{"id":21595178,"url":"https://github.com/euank/snailquote","last_synced_at":"2025-04-13T10:57:23.239Z","repository":{"id":32705133,"uuid":"140893035","full_name":"euank/snailquote","owner":"euank","description":"A shell-inspired escape+unescape library for strings","archived":false,"fork":false,"pushed_at":"2023-04-08T06:36:44.000Z","size":46,"stargazers_count":37,"open_issues_count":3,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T02:11:32.421Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/euank.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2018-07-13T21:07:19.000Z","updated_at":"2025-02-08T13:30:56.000Z","dependencies_parsed_at":"2024-06-20T18:59:02.959Z","dependency_job_id":"01a57363-cad5-4de5-af13-40c40888c69a","html_url":"https://github.com/euank/snailquote","commit_stats":{"total_commits":29,"total_committers":5,"mean_commits":5.8,"dds":0.1724137931034483,"last_synced_commit":"e3e0ce09f275011d8734b87906472aa1a46df6c2"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/euank%2Fsnailquote","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/euank%2Fsnailquote/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/euank%2Fsnailquote/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/euank%2Fsnailquote/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/euank","download_url":"https://codeload.github.com/euank/snailquote/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248703194,"owners_count":21148117,"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-11-24T17:33:33.603Z","updated_at":"2025-04-13T10:57:23.218Z","avatar_url":"https://github.com/euank.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"## snailquote\n\n[![Build Status](https://github.com/euank/snailquote/actions/workflows/rust.yml/badge.svg?branch=master)](https://github.com/euank/snailquote/actions/workflows/rust.yml)\n\n[![Docs](https://docs.rs/snailquote/badge.svg)](https://docs.rs/snailquote)\n\nThis library provides functions to escape and unescape strings.\n\nIt escapes them in a roughly 'sh' compatible way (e.g. double quotes supporting\nbackslash escapes, single quotes supporting no escapes).\n\nIn addition, it provides support for common c-like ascii escapes (like `\\n` for\nnewline, `\\v` for vertical tab, etc) and rust-string-like unicode (via\n`\\u{12ff}` style escapes).\n\nMore importantly, this library also provides the ability to un-escape a given\nescaped text to recover the original string.\n\nFor more information on usage and what escape sequences will work, see the [docs](https://docs.rs/snailquote).\n\n### Compatibility\n\nsnailquote intends to explicitly be compatible with the following use-cases:\n\n1. Readable encoding of arbitrary strings for user's editing; re-parsing of\n   said strings after being edited.\n1. Reading and writing the values of [`os-release`](https://www.freedesktop.org/software/systemd/man/os-release.html) files.\n\nOther files may have a similar shell-inspired format that snailescape works with, but it's up to you to verify it really is similar enough to be correct.\n\nsnailquote is inspired by, but not compatible with, the following:\n\n1. gnulib [quotearg](https://www.gnu.org/software/gnulib/manual/html_node/Quoting.html), as used for 'ls' output -- snailquote handles unicode escapes differently.\n2. ANSI-c string literal quoting -- snailquote handles unicode differently and supports shell-related escapes, like '$'.\n3. sh string quoting -- snailquote handles unicode differently and is more lax about shell special characters.\n\n### Why not use \\\u003cother library\\\u003e\n\nOther libraries in rust I've found have one or more of the following problems:\n\n1. The escaped text is not as easily human-editable\n1. There is no way to un-escape text\n1. NIH\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feuank%2Fsnailquote","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feuank%2Fsnailquote","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feuank%2Fsnailquote/lists"}