How to use the urlwatch.__doc__ function in urlwatch

To help you get started, we’ve selected a few urlwatch examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github thp / urlwatch / lib / urlwatch / config.py View on Github external
def parse_args(self):

        parser = argparse.ArgumentParser(description=urlwatch.__doc__,
                                         formatter_class=argparse.RawDescriptionHelpFormatter)
        parser.add_argument('--version', action='version', version='%(prog)s {}'.format(urlwatch.__version__))
        parser.add_argument('-v', '--verbose', action='store_true', help='show debug output')
        group = parser.add_argument_group('files and directories')
        group.add_argument('--urls', metavar='FILE', help='read job list (URLs) from FILE',
                           default=self.urls)
        group.add_argument('--config', metavar='FILE', help='read configuration from FILE',
                           default=self.config)
        group.add_argument('--hooks', metavar='FILE', help='use FILE as hooks.py module',
                           default=self.hooks)
        group.add_argument('--cache', metavar='FILE', help='use FILE as cache database',
                           default=self.cache)

        group = parser.add_argument_group('Authentication')
        group.add_argument('--smtp-login', action='store_true', help='Enter password for SMTP (store in keyring)')
        group.add_argument('--telegram-chats', action='store_true', help='List telegram chats the bot is joined to')