{"action":"created","issue":{"url":"https://api.github.com/repos/zulip/python-zulip-api/issues/1","repository_url":"https://api.github.com/repos/zulip/python-zulip-api","labels_url":"https://api.github.com/repos/zulip/python-zulip-api/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/zulip/python-zulip-api/issues/1/comments","events_url":"https://api.github.com/repos/zulip/python-zulip-api/issues/1/events","html_url":"https://github.com/zulip/python-zulip-api/issues/1","id":241053006,"number":1,"title":"Update Python API examples with accurate usage messages","user":{"login":"showell","id":142908,"avatar_url":"https://avatars6.githubusercontent.com/u/142908?v=4","gravatar_id":"","url":"https://api.github.com/users/showell","html_url":"https://github.com/showell","followers_url":"https://api.github.com/users/showell/followers","following_url":"https://api.github.com/users/showell/following{/other_user}","gists_url":"https://api.github.com/users/showell/gists{/gist_id}","starred_url":"https://api.github.com/users/showell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/showell/subscriptions","organizations_url":"https://api.github.com/users/showell/orgs","repos_url":"https://api.github.com/users/showell/repos","events_url":"https://api.github.com/users/showell/events{/privacy}","received_events_url":"https://api.github.com/users/showell/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-07-06T18:56:47Z","updated_at":"2017-07-16T04:21:53Z","closed_at":null,"body":"originally here: https://github.com/zulip/zulip/issues/3365\r\n\r\nfrom dehnert:\r\n\r\nThe Python API examples use generate_option_group and init_from_options to support a common set of options, but (mostly?) hardcode their usage messages. They should ideally display a more complete usage message as well (or instead) that reflects the other options, especially --config-file (though others are also occasionally useful, certainly)."},"comment":{"url":"https://api.github.com/repos/zulip/python-zulip-api/issues/comments/315584560","html_url":"https://github.com/zulip/python-zulip-api/issues/1#issuecomment-315584560","issue_url":"https://api.github.com/repos/zulip/python-zulip-api/issues/1","id":315584560,"user":{"login":"dehnert","id":85198,"avatar_url":"https://avatars7.githubusercontent.com/u/85198?v=4","gravatar_id":"","url":"https://api.github.com/users/dehnert","html_url":"https://github.com/dehnert","followers_url":"https://api.github.com/users/dehnert/followers","following_url":"https://api.github.com/users/dehnert/following{/other_user}","gists_url":"https://api.github.com/users/dehnert/gists{/gist_id}","starred_url":"https://api.github.com/users/dehnert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dehnert/subscriptions","organizations_url":"https://api.github.com/users/dehnert/orgs","repos_url":"https://api.github.com/users/dehnert/repos","events_url":"https://api.github.com/users/dehnert/events{/privacy}","received_events_url":"https://api.github.com/users/dehnert/received_events","type":"User","site_admin":false},"created_at":"2017-07-16T04:21:52Z","updated_at":"2017-07-16T04:21:52Z","body":"Okay, maybe my source of confusion was that if you try an unknown option, you get the usage message (which is misleading) but it's not immediately obvious that `--help` will be more informative. Unfortunately, it doesn't appear that you can add prefatory text to `--help` output using `optparse` without also also having it appear when an unknown option is passed.\r\n\r\nI wonder if the right way to format the usage messages is to base them on the assumption that `~/.zuliprc` will exist, and just do `send-message [options] recipients` or similar. The\"`You can omit --user and --api-key arguments if you have a properly set up ~/.zuliprc\" line might be better as something like \"If you do not have a zuliprc set up, you can pass the site, user, and API key on the command line or in the environment. See documentation for details.\" or something."}}
{"actor":{"display_login":"dehnert"}}