#!/usr/bin/env python
"""LICENSE
Copyright 2021 Hermann Krumrey <hermann@krumreyh.com>

This file is part of torrent-download.

torrent-download is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

torrent-download is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with torrent-download.  If not, see <http://www.gnu.org/licenses/>.
LICENSE"""

import argparse
from puffotter.init import cli_start, argparse_add_verbosity
from torrent_download import sentry_dsn
from torrent_download.Config import Config


def main():
    """
    Starts the main method of the program
    :return: None
    """
    config = Config.prompt()
    config.save()


if __name__ == "__main__":
    parser = argparse.ArgumentParser()
    argparse_add_verbosity(parser)
    cli_start(
        main, parser,
        sentry_dsn=sentry_dsn,
        package_name="torrent-download",
        exit_msg="Thanks for using torrent-download!"
    )
