{"id":16488692,"url":"https://github.com/grongor/go-url-parser","last_synced_at":"2025-03-23T12:34:13.340Z","repository":{"id":74374706,"uuid":"223655031","full_name":"grongor/go-url-parser","owner":"grongor","description":"Simple library/CLI utility for parsing URLs (who wants to mess with sed/awk/cut/...). Supports \"template\" formatting.","archived":false,"fork":false,"pushed_at":"2024-08-06T17:31:28.000Z","size":27,"stargazers_count":3,"open_issues_count":3,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-12T13:39:33.792Z","etag":null,"topics":["cli","go","golang","parser","unix","url","url-parser"],"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/grongor.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}},"created_at":"2019-11-23T21:24:03.000Z","updated_at":"2024-09-07T08:51:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"2a5cd26f-06b7-4248-9cf6-818c9662735b","html_url":"https://github.com/grongor/go-url-parser","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grongor%2Fgo-url-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grongor%2Fgo-url-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grongor%2Fgo-url-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grongor%2Fgo-url-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grongor","download_url":"https://codeload.github.com/grongor/go-url-parser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221851109,"owners_count":16891716,"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":["cli","go","golang","parser","unix","url","url-parser"],"created_at":"2024-10-11T13:39:40.668Z","updated_at":"2024-10-28T15:51:35.619Z","avatar_url":"https://github.com/grongor.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"url-parser\n==========\n\n```\nurl-parser\n    Parses given URLs and prints the desired parts of them.\n\nUsage:\n    url-parser \u003coption\u003e [url]...\n\nOptions:\n    -c, --component=COMPONENT\n\n        Prints single URL component from each. URL.\n\n        Valid values: scheme, authority, auth, user, password,\n                      hostport, host, tld, port, path, query,\n                      fragment, basePath, file, ext, relativeUrl\n\n        Additionally, some components may be further formatted:\n            host:x, host:x:y            print only desired (sub)domains\n            hostport:x, hostport:x:y    same as host:*, but also includes port\n            path:x, path:x:y            print only desired parts of the path\n            query:NAME                  print only query parameter named NAME\n            fragment:NAME               print only fragment part named NAME\n\n                x    starting position; use -x to start from end\n                y    count; how many parts of the component you want to print\n\n    -f, --format=FORMAT\n\n        Prints URLs formatted according to FORMAT.\n\n        FORMAT is an arbitrary string containing component placeholders\n        enclosed in curly brackets. Each {COMPONENT} will be replaced\n        as if url-parser was called with option -c COMPONENT\n\nExamples:\n\nreference URL: https://www.example.com/lorem/ipsum/dolor/sit.html?metus=lectus#at=nostra\u0026unde=omnis\n\nurl-parser -c host:1 \u003curl\u003e               example.com\nurl-parser -c path:-0:2 \u003curl\u003e            /dolor/sit.html\nurl-parser -c path:-1 \u003curl\u003e              /lorem/ipsum/dolor\nurl-parser -c path:0:2 \u003curl\u003e             /lorem/ipsum\nurl-parser -c fragment:unde \u003curl\u003e        unde=omnis\nurl-parser -c relativeUrl \u003curl\u003e          /lorem/ipsum/dolor/sit.html?metus=lectus#at=nostra\u0026unde=omnis\nurl-parser -f {scheme}://{host} \u003curl\u003e    https://www.example.com\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrongor%2Fgo-url-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrongor%2Fgo-url-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrongor%2Fgo-url-parser/lists"}