{"id":19450334,"url":"https://github.com/ymc-github/sh-lib-url-parse","last_synced_at":"2025-08-24T05:20:22.164Z","repository":{"id":95798736,"uuid":"240575841","full_name":"YMC-GitHub/sh-lib-url-parse","owner":"YMC-GitHub","description":"like nodejs lib 'url'","archived":false,"fork":false,"pushed_at":"2020-02-14T18:41:01.000Z","size":2,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-25T09:23:31.631Z","etag":null,"topics":["lib","parse","shell","url"],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/YMC-GitHub.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":"2020-02-14T18:40:25.000Z","updated_at":"2020-04-09T18:33:14.000Z","dependencies_parsed_at":"2023-04-08T05:02:12.780Z","dependency_job_id":null,"html_url":"https://github.com/YMC-GitHub/sh-lib-url-parse","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/YMC-GitHub/sh-lib-url-parse","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YMC-GitHub%2Fsh-lib-url-parse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YMC-GitHub%2Fsh-lib-url-parse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YMC-GitHub%2Fsh-lib-url-parse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YMC-GitHub%2Fsh-lib-url-parse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/YMC-GitHub","download_url":"https://codeload.github.com/YMC-GitHub/sh-lib-url-parse/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YMC-GitHub%2Fsh-lib-url-parse/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262693349,"owners_count":23349719,"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":["lib","parse","shell","url"],"created_at":"2024-11-10T16:36:50.429Z","updated_at":"2025-06-30T01:33:34.946Z","avatar_url":"https://github.com/YMC-GitHub.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sh lib url parse\n\n## desc\n\nlike nodejs lib 'url'\n\n## feat\n- support protocol\n- support host\n- support port\n- support pathname\n- support search\n\n\n## how to use for poduction?\n\n```sh\n# get the code\n\n# run the index file\n# ./index.sh\n\n# or import to your sh file\n# source /path/to/the/index file\n\n# usage\nurl=\"http://videomy.xx.com:8091/20200126/IPX-xx/index.m3u8\"\nurl_protocol \"$url\" #it will return \"http\"\nurl_host \"$url\" #it will return \"videomy.xx.com\"\nurl_port \"$url\" #it will return \"8091\"\nurl_port \":90\" #it will return \"90\"\nurl_port \"xx.com/xx/xx\" #it will return \"80\"\nurl_pathname \"$url\" #it will return \"/20200126/IPX-xx/index.m3u8\"\nurl=\"xx/xx/xx/?appid=aaaa\u0026apidx=0\"\nurl_search \"$url\" #it will return \"?appid=aaaa\u0026apidx=0\"\nquery=\"appid=aaaa\u0026apidx=0\"\nparse_url_query $query \"appid\" #it will return \"aaaa\"\n\n```\n\n## how to use for developer?\n\n```sh\n# get the code\n\n# run test\n./test.sh\n#2 get some fail test\n./test.sh | grep \"it is false\"\n```\n\n## author\n\nyemiancheng \u003cymc.github@gmail.com\u003e\n\n## license\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fymc-github%2Fsh-lib-url-parse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fymc-github%2Fsh-lib-url-parse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fymc-github%2Fsh-lib-url-parse/lists"}