{"id":16615908,"url":"https://github.com/ko1nksm/url","last_synced_at":"2025-04-22T18:50:37.214Z","repository":{"id":189715778,"uuid":"681165025","full_name":"ko1nksm/url","owner":"ko1nksm","description":"URL builder with URL encoding for CLI and portable shell scripts","archived":false,"fork":false,"pushed_at":"2023-08-28T14:56:16.000Z","size":34,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-12T02:11:25.978Z","etag":null,"topics":["bash","curl","posix","shell","urlencode","wget"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"0bsd","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ko1nksm.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},"funding":{"github":"ko1nksm"}},"created_at":"2023-08-21T12:11:18.000Z","updated_at":"2024-07-01T22:23:15.000Z","dependencies_parsed_at":"2024-10-12T02:11:14.251Z","dependency_job_id":null,"html_url":"https://github.com/ko1nksm/url","commit_stats":null,"previous_names":["ko1nksm/sh-urllib","ko1nksm/url"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ko1nksm%2Furl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ko1nksm%2Furl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ko1nksm%2Furl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ko1nksm%2Furl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ko1nksm","download_url":"https://codeload.github.com/ko1nksm/url/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224983016,"owners_count":17402405,"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":["bash","curl","posix","shell","urlencode","wget"],"created_at":"2024-10-12T02:11:12.380Z","updated_at":"2024-11-16T23:41:11.941Z","avatar_url":"https://github.com/ko1nksm.png","language":"Shell","funding_links":["https://github.com/sponsors/ko1nksm"],"categories":[],"sub_categories":[],"readme":"# url\n\nURL builder with URL encoding for CLI and portable shell scripts.\nIt is suitable for building URLs for `curl`, `wget`, etc.\n\n## Usage\n\n**The specification is not yet stable.**\n\n```txt\nUsage: url [-rs]             [-nSN] [--] URLPATH [PARAMETERS]...\nUsage: url -p [-j DELIMITER] [-nSN] [--] FORMAT  [ARGUMENTS]...\nUsage: url -e [-m]            [-SN] [--] [ARGUMENTS]...\nUsage: url -d                  [-S] [--] [ARGUMENTS]...\n\n  URLPATH: url path\n  PARAMETERS: [ -KEY VALUE | =STRING | #FRAGMENT ]...\n\nGlobal options:\n  -n                      Do not print the trailing newline character\n  -p, --printf            printf mode (default: build mode)\n  -e, --encode            URL Encoder mode (accepts stdin)\n  -d, --decode            URL Decoder mode (accepts stdin)\n\nBuild mode options:\n  -s                      Sort keys\n  -r                      Remove empty value key\n\nPrintf mode options:\n  -j, --join DELIMITER    Joins strings with the delimiter (default: '\\n')\n\nEncode mode options:\n  -m                      Read multiple lines\n\nCharacter conversion Options:\n  -S  Use + instead of %20\n  -N  Normalize newline to \\r\\n\n```\n\n## Example\n\nbuild mode:\n\n```console\n$ url \"http://example.com/\" -param1 あ -param2 \"か\" \"#さ\"\nhttp://example.com/?param1=%E3%81%82\u0026param2=%E3%81%8B#%E3%81%95\n\n$ url \"http://example.com/\" =あいうえお\nhttp://example.com/?%E3%81%82%E3%81%84%E3%81%86%E3%81%88%E3%81%8A\n```\n\nprintf mode:\n\n```console\n$ url --printf \"http://example.com/?param1=%s\u0026param2=%s\" あ ａ ア Ａ\nhttp://example.com/?param1=%E3%81%82\u0026param2=%EF%BD%81\nhttp://example.com/?param1=%E3%82%A2\u0026param2=%EF%BC%A1\n```\n\n## Use as a library\n\nLicense is 0BSD. Feel free to copy and use the functions.\n\n### urlbuild\n\n```txt\nurlbuild URLPATH [ARGUMENTS]...\n  URLPATH: url path\n  ARGUMENTS: [ -KEY VALUE | =STRING | #FRAGMENT ]...\n\n  Variables:\n    SHURL_SPACE: A character to use instead of %20\n    SHURL_EOL: Characters used on new lines\n```\n\n### urlencode\n\n```txt\nurlencode [ARGUMENTS]...\n\n  ARGUMENTS: argument to be URL-encoded\n\n  Variables:\n    SHURL_SPACE: A character to use instead of %20\n    SHURL_EOL: Characters used on new lines\n```\n\n### urldecode\n\n```txt\nurldecode [ARGUMENTS]...\n\n  ARGUMENTS: argument to be URL-decoded\n\n  Variables:\n    SHURL_SPACE: A character to use instead of %20\n    SHURL_EOL: Characters used on new lines\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fko1nksm%2Furl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fko1nksm%2Furl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fko1nksm%2Furl/lists"}