#!python
# -*- coding: utf-8 -*-
#
# Copyright 2019 - Gabriel Acosta <acostadariogabriel@gmail.com>
#
# This file is part of Notas.
#
# Notasis 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
# any later version.
#
# Notasis 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 Notas; If not, see <http://www.gnu.org/licenses/>.
"""Entry point"""

import os
import sys

project_path = os.path.abspath(os.path.dirname(os.path.dirname(os.path.realpath(sys.argv[0]))))
if project_path not in sys.path:
    sys.path.insert(0, project_path)


from notas import cli  # noqa


def main():
    parser = cli.cliparse()
    if len(sys.argv) == 1:
        parser.print_help()
        sys.exit(1)
    args = parser.parse_args()
    if 'slot' in args:
        args.slot(args)


if __name__ == '__main__':
    main()
