#!/usr/bin/python3
"""
    A small tool to check OpenFOAM log files for simulation progress
    and save points

    Usage:
        timeleft.py [options]

    Options:
        -h --help           Show this screen
        -v --version        Print version and exit
        --progressbar (True|False) Display the progressbar [default: True]
        --folder (True|False)      Display the foldername  [default: True]
        --logfile (True|False)     Display the filename of the logfile [default: True]
        --time (True|False)        Display the the current simulation time [default: True]
        --writeout (True|False)    Display expected writeout [default: True]
        --remaining (True|False)   Display expected remaining simulation time [default: True]
        --custom_filter=filter     Further overview mode filter [default: {}]
"""

from docopt import docopt
from colorama import Fore, Back, Style
import datetime
import glob
import os
import re
import time
import sys
# import FoamMon
from FoamMon import cui

if __name__ == '__main__':
    arguments = docopt(__doc__)
    if arguments.get("--version"):
        from FoamMon.version import __version__
        print(__version__)
        print(arguments)
        sys.exit(0)

    cui.cui_main(arguments)
