#!/usr/local/opt/python/bin/python2.7

################################################################################
#                                                                              #
#   This file is part of the Bibolamazi Project.                               #
#   Copyright (C) 2013 by Philippe Faist                                       #
#   philippe.faist@bluewin.ch                                                  #
#                                                                              #
#   Bibolamazi 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.                                        #
#                                                                              #
#   Bibolamazi 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 Bibolamazi.  If not, see <http://www.gnu.org/licenses/>.        #
#                                                                              #
################################################################################


import os
import os.path
import sys
import logging

try:
    import bibolamazi.init
except ImportError:
    # realpath() needed for resolving executable symlink
    ourrootpath = os.path.abspath(os.path.join(os.path.dirname(os.path.realpath(__file__)), '..'))
    sys.path.append(ourrootpath)
    sys.path.append(os.path.join(ourrootpath, '3rdparty', 'pybtex'))
    sys.path.append(os.path.join(ourrootpath, '3rdparty', 'arxiv2bib'))
    sys.path.append(os.path.join(ourrootpath, '3rdparty', 'pylatexenc'))
    import bibolamazi.init


from bibolamazi.core.butils import BibolamaziError


if __name__ == "__main__":
    
    # run main program
    from bibolamazi.core import main
    main.main()
