diff options
author | tdro <tdro@users.noreply.github.com> | 2023-10-01 17:14:28 -0400 |
---|---|---|
committer | tdro <tdro@users.noreply.github.com> | 2023-10-01 17:14:28 -0400 |
commit | 4f2f30fe7fa7cf7b7669c1fd90d38b100712b26c (patch) | |
tree | ca4f8615003bfd195f81ad332c06b0bffa5adfdb /.local/bin/plumber | |
parent | 5b337aedf01e82c6be4e99f473e47b45c98bcd0a (diff) | |
download | dotfiles-4f2f30fe7fa7cf7b7669c1fd90d38b100712b26c.tar.gz dotfiles-4f2f30fe7fa7cf7b7669c1fd90d38b100712b26c.tar.bz2 dotfiles-4f2f30fe7fa7cf7b7669c1fd90d38b100712b26c.zip |
.local/bin/plumber: Add URL encoding pipe
Diffstat (limited to '.local/bin/plumber')
-rwxr-xr-x | .local/bin/plumber | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/.local/bin/plumber b/.local/bin/plumber index e2c186d..2cf250f 100755 --- a/.local/bin/plumber +++ b/.local/bin/plumber @@ -29,12 +29,16 @@ defmodule ArgParser do reverse_words: "reverse->words", singleline: "text->singleline", slugize: "text->slugize", + urlize: "text->urlize", ] cond do opts[:option] == options[:letterize] -> TextPlumber.firstLetterOfWordsIn(opts[:text]) |> IO.binwrite() + opts[:option] == options[:urlize] -> + URI.encode(opts[:text]) |> IO.binwrite() + opts[:option] == options[:slugize] -> opts[:text] |> String.normalize(:nfd) |