Skip to content

Instantly share code, notes, and snippets.

@ream88
Last active April 8, 2022 08:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ream88/436c15fe42d799c73edf0346b23706a3 to your computer and use it in GitHub Desktop.
Save ream88/436c15fe42d799c73edf0346b23706a3 to your computer and use it in GitHub Desktop.
Convert a Zoom link into a zoomus:// link
#!/usr/bin/env elixir
[url] = System.argv()
%URI{path: "/j/" <> confno} = url = URI.parse(url)
url
|> Map.update!(:query, fn query ->
query
|> URI.decode_query()
|> Map.merge(%{action: "join", confno: confno})
|> URI.encode_query()
end)
|> Map.merge(%{scheme: "zoomus", host: "zoom.us", port: nil, path: "/join", fragment: nil})
|> URI.to_string()
|> IO.puts()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment