We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
One of the things that's always annoyed me with woof is that it requires all of the options before the arguments.
woof
Example:
$ woof /tmp/Screenshot_2022-01-13_11-12-40.png cannot bind to IP address '' port 8080 $ woof /tmp/Screenshot_2022-01-13_11-12-40.png -p 8000 Usage: woof [-i <ip_addr>] [-p <port>] [-c <count>] <file> woof [-i <ip_addr>] [-p <port>] [-c <count>] [-z|-j|-Z|-u] <dir> woof [-i <ip_addr>] [-p <port>] [-c <count>] -s woof [-i <ip_addr>] [-p <port>] [-c <count>] -U woof <url> ... [Snip]
But this is easily fixed by just calling gnu_getopt() instead of getopt()
gnu_getopt()
getopt()
$ git diff diff --git a/woof b/woof index 74784af..414deca 100755 --- a/woof +++ b/woof @@ -483,7 +483,7 @@ def main (): defaultmaxdown = maxdown try: - options, filenames = getopt.getopt (sys.argv[1:], "hUszjZui:c:p:") + options, filenames = getopt.gnu_getopt (sys.argv[1:], "hUszjZui:c:p:") except getopt.GetoptError as desc: usage (defaultport, defaultmaxdown, desc) $ ./woof /tmp/Screenshot_2022-01-13_11-12-40.png cannot bind to IP address '' port 8080 $ ./woof /tmp/Screenshot_2022-01-13_11-12-40.png -p 8000 Now serving on http://10.0.1.104:8000/Screenshot_2022-01-13_11-12-40.png
The text was updated successfully, but these errors were encountered:
f51e9db
Merge pull request #14 from pklapperich/master
3a3e153
Use gnu_getopt(); Closes #13
No branches or pull requests
One of the things that's always annoyed me with
woof
is that it requires all of the options before the arguments.Example:
But this is easily fixed by just calling
gnu_getopt()
instead ofgetopt()
The text was updated successfully, but these errors were encountered: