示例#1
0
def test(file_path, exp, limit):
    """
    Show chapter title to check if Regular expression is OK
    :param file_path: input txt file path
    :type file_path: String
    :param exp: Regular expression for detect chapter
    :type exp: String
    :param limit: Chapter line max length
    :type limit: Int
    :return:
    :rtype:
    """

    processor = Processor(file_path, exp, limit)
    for title in processor.chapter_titles():
        click.echo(title)
        click.echo("---------------------")