{"id":32366813,"url":"https://github.com/jftuga/wrapline","last_synced_at":"2026-07-14T03:31:11.535Z","repository":{"id":318600254,"uuid":"1071967502","full_name":"jftuga/wrapline","owner":"jftuga","description":"CLI tool that wraps each line of input with a specified delimiter","archived":false,"fork":false,"pushed_at":"2025-10-24T01:05:57.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-24T03:15:57.716Z","etag":null,"topics":["cli","command-line","command-line-tool","go","golang","text-processing"],"latest_commit_sha":null,"homepage":"","language":"Go","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/jftuga.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-08T04:33:57.000Z","updated_at":"2025-10-24T01:03:46.000Z","dependencies_parsed_at":"2025-10-08T06:23:37.280Z","dependency_job_id":"08b114bf-03e4-439c-a727-9662ceb60de2","html_url":"https://github.com/jftuga/wrapline","commit_stats":null,"previous_names":["jftuga/wrapline"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/jftuga/wrapline","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jftuga%2Fwrapline","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jftuga%2Fwrapline/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jftuga%2Fwrapline/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jftuga%2Fwrapline/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jftuga","download_url":"https://codeload.github.com/jftuga/wrapline/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jftuga%2Fwrapline/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35445233,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-14T02:00:06.603Z","response_time":114,"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":["cli","command-line","command-line-tool","go","golang","text-processing"],"created_at":"2025-10-24T18:53:15.296Z","updated_at":"2026-07-14T03:31:11.529Z","avatar_url":"https://github.com/jftuga.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wrapline\n\nA command-line tool that wraps each line of input with a specified delimiter.\nUseful for formatting text data, preparing strings for code, or processing structured data.\n\n## Features\n\n- Wrap lines with any delimiter (default: double-quote)\n- Support for hexadecimal delimiter notation\n- Strip whitespace before wrapping\n- Skip empty lines\n- Escape delimiter characters within lines\n- Read from files or STDIN (auto-detects piped input - `-` is optional when reading from a pipe)\n- Write to files or STDOUT\n- Process null-terminated input (compatible with `find -print0`, `xargs -0`)\n- Automatically skip empty last lines\n\n## Installation\n\n### Build from source\n\n```bash\ngit clone https://github.com/jftuga/wrapline\ncd wrapline\nmake\n```\n\nThis creates the `wrapline` executable in the current directory.\n\n## Usage\n\n```\nwrapline [options] \u003cfilename|-\u003e\n```\n\n### Options\n\n- `-d \u003cdelimiter\u003e` - Delimiter to wrap lines with (default: `\"`)\n  - Supports literal strings: `-d \"|\"`\n  - Supports hex notation: `-d 0x27` for single quote\n- `-s` - Strip whitespace from lines before wrapping\n- `-e` - Do not emit empty lines\n- `-escape` - Escape delimiter characters within lines using backslash\n- `-o \u003cfile\u003e` - Write output to file instead of STDOUT\n- `-0` - Read null-terminated records instead of newlines\n- `-v` - Show version and exit\n\n### Input\n\n- Provide a filename to read from a file\n- Use `-` to read from STDIN\n- When data is piped into `wrapline`, reading from STDIN is assumed automatically — the `-` argument is optional\n\n## Examples\n\n### Basic usage\n\nWrap lines with double quotes (default):\n\n```bash\nwrapline input.txt\n```\n\n**Input:**\n```\nhello\nworld\n```\n\n**Output:**\n```\n\"hello\"\n\"world\"\n```\n\n### Custom delimiter\n\nWrap lines with single quotes:\n\n```bash\nwrapline -d \"'\" input.txt\n```\n\n**Output:**\n```\n'hello'\n'world'\n```\n\n### Hexadecimal delimiters\n\nUse hexadecimal notation for delimiters (useful for special characters):\n\n```bash\n# Pipe character (0x7C = ASCII 124)\nwrapline -d 0x7C input.txt\n\n# Tab character (0x09)\nwrapline -d 0x09 input.txt\n```\n\n### Strip whitespace\n\nRemove leading and trailing whitespace before wrapping:\n\n```bash\nwrapline -s input.txt\n```\n\n**Input:**\n```\n  hello\n   world\n```\n\n**Output:**\n```\n\"hello\"\n\"world\"\n```\n\n### Skip empty lines\n\nDon't output empty lines:\n\n```bash\nwrapline -e input.txt\n```\n\n**Input:**\n```\nhello\n\nworld\n```\n\n**Output:**\n```\n\"hello\"\n\"world\"\n```\n\n### Escape delimiters\n\nEscape delimiter characters found within lines:\n\n```bash\nwrapline -escape input.txt\n```\n\n**Input:**\n```\nShe said \"hello\" to me\n```\n\n**Output:**\n```\n\"She said \\\"hello\\\" to me\"\n```\n\n### Output to file\n\nWrite results to a file instead of STDOUT:\n\n```bash\nwrapline -d \"|\" input.txt -o output.txt\n```\n\n### Read from STDIN\n\n`wrapline` automatically reads from piped input, so the `-` argument is optional:\n\n```bash\necho \"hello world\" | wrapline\ncat input.txt | wrapline -d \"'\" -s\n```\n\nYou can still use `-` explicitly if preferred:\n\n```bash\necho \"hello world\" | wrapline -\n```\n\n### Null-terminated input\n\nProcess null-terminated records (like `find -print0`):\n\n```bash\nfind . -name \"*.txt\" -print0 | wrapline -0 -\n```\n\nThis is useful when filenames may contain newlines or special characters.\n\n### Combining options\n\nCombine multiple options for complex processing:\n\n```bash\n# Strip whitespace, skip empty lines, escape quotes, write to file\nwrapline -s -e -escape -o output.txt input.txt\n\n# Process null-terminated, custom delimiter, output to file\nfind . -type f -print0 | wrapline -0 -d \"'\" -o filelist.txt -\n```\n\n### Create a single-line, comma-delimited list\n\n`wrapline` can be used in conjunction with `paste` to produce a CSV-style list:\n\n```bash\nseq 1 10 | wrapline | paste -sd, -\n\n\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\"\n```\n\n## Common Use Cases\n\n### Prepare strings for code\n\nConvert a list of values into quoted strings for code:\n\n```bash\nwrapline cities.txt\n```\n\n**Input:**\n```\nNew York\nLos Angeles\nChicago\n```\n\n**Output:**\n```\n\"New York\"\n\"Los Angeles\"\n\"Chicago\"\n```\n\n### Create CSV-ready data\n\nWrap fields with quotes:\n\n```bash\nwrapline -escape data.txt\n```\n\n### Format file lists\n\nProcess files found by `find`:\n\n```bash\nfind /var/log -name \"*.log\" -print0 | wrapline -0 -d \"'\" -\n```\n\n### Clean up text data\n\nStrip whitespace and remove empty lines:\n\n```bash\nwrapline -s -e messy_data.txt -o clean_data.txt\n```\n\n## Notes\n\n- Empty lines at the end of input are always skipped, regardless of flags\n- When using `-e`, all empty lines are skipped\n- The `-s` flag strips whitespace before checking if a line is empty\n- Hexadecimal delimiter values must be prefixed with `0x`\n- Without the `0x` prefix, numeric strings are treated as literal delimiters\n- `wrapline` automatically detects piped input and does not require `-` when reading from a pipe\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjftuga%2Fwrapline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjftuga%2Fwrapline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjftuga%2Fwrapline/lists"}