26 lines
563 B
Python
Raw Normal View History

2021-01-29 16:05:22 +01:00
import click
from .checklinks import check_html_links
2021-01-29 16:05:22 +01:00
from .errors import RuleNotFoundError
@click.group()
@click.option('--debug/--no-debug', default=False)
def cli(debug):
'Tools automating RSPEC workflows.'
@cli.command()
@click.option('--rule', help='Validate only the rule matching the provided ID.')
def validate(rule):
'''Validate rules.'''
# TODO
if rule == '42':
raise RuleNotFoundError(rule)
2021-01-29 16:05:22 +01:00
@cli.command()
@click.option('--d', required=True)
def check_links(d):
'''Check links in html.'''
check_html_links(d)
2021-01-29 16:05:22 +01:00
__all__=['cli']