Python based CLI tool to agressively url-encode strings, rather than just encoding non-url characters this tool will encode every character in the URL.
Firstly make a function in your .bash_profile
to call the script
function url-encode()
{
python ~/<path to script>/url_encode.py $@
}
Now simply call the script from your command line :)
$ url-encode "foo"
foo
$ url-encode --agressive "foo"
%66%6f%6f
$ echo "foo" | url-encode
foo
$ echo "foo" | url-encode --agressive
%66%6f%6f
Thanks for this. I write this comment to explain the star that was there and which I removed - I usually use stars as bookmarks. Once I implemented functionality I needed I removed it, but my gratitude remains.