<commit_before>"""The command-line interface for Fava."""

import os
import errno

import click
from werkzeug.wsgi import DispatcherMiddleware
from cheroot import wsgi

from fava.application import app
from fava.util import simple_wsgi
from fava import __version__


# pylint: disable=too-many-arguments
@click.command()
@click.argument('filenames', nargs=-1,
                type=click.Path(exists=True, resolve_path=True))
@click.option('-p', '--port', type=int, default=5000, metavar='<port>',
              help='The port to listen on. (default: 5000)')
@click.option('-H', '--host', type=str, default='localhost', metavar='<host>',
              help='The host to listen on. (default: localhost)')
@click.option('--prefix', type=str,
              help='Set an URL prefix. (for reverse proxy)')
@click.option('--incognito', is_flag=True,
              help='Run in incognito mode (obscure all numbers).')
@click.option('-d', '--debug', is_flag=True,
              help='Turn on debugging.')
@click.option('--profile', is_flag=True,<commit_msg>cli: disallow directory as beancount file; fix #814<commit_after>"""The command-line interface for Fava."""

import os
import errno

import click
from werkzeug.wsgi import DispatcherMiddleware
from cheroot import wsgi

from fava.application import app
from fava.util import simple_wsgi
from fava import __version__


# pylint: disable=too-many-arguments
@click.command()
@click.argument(
    'filenames',
    nargs=-1, type=click.Path(exists=True, dir_okay=False, resolve_path=True))
@click.option('-p', '--port', type=int, default=5000, metavar='<port>',
              help='The port to listen on. (default: 5000)')
@click.option('-H', '--host', type=str, default='localhost', metavar='<host>',
              help='The host to listen on. (default: localhost)')
@click.option('--prefix', type=str,
              help='Set an URL prefix. (for reverse proxy)')
@click.option('--incognito', is_flag=True,
              help='Run in incognito mode (obscure all numbers).')
@click.option('-d', '--debug', is_flag=True,
              help='Turn on debugging.')
@click.option('--profile', is_flag=True,
{'fraction_non_alphanumeric': 0.15632291180587962, 'fraction_numerical': 0.00979934671021932, 'mean_word_length': 3.9400921658986174, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2788743', 'n_tokens_mistral': 703, 'n_tokens_neox': 675, 'n_words': 184}