pandoralocal/bin/pandoralocal

24 lines
613 B
Python
Executable file

#!/usr/bin/python
# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
# GPL 2008
import os
import sys
from optparse import OptionParser
root = os.path.join(os.path.abspath(os.path.dirname(__file__)), '..')
if os.path.exists(os.path.join(root, 'pandoralocal')):
sys.path.insert(0, root)
import pandoralocal
if __name__ == '__main__':
parser = OptionParser()
parser.add_option('-d', '--db', dest='db', help='settings db', default=pandoralocal.db_path())
(opts, args) = parser.parse_args()
if None in (opts.db, ):
parser.print_help()
sys.exit()
pandoralocal.main(opts.db)