Fix more paths
This commit is contained in:
@@ -60,13 +60,13 @@ from optparse import OptionParser
|
||||
script_dir = os.path.dirname(unicode(__file__, sys.getfilesystemencoding()))
|
||||
|
||||
# Form list of effects for processing
|
||||
effects_path = os.path.join(script_dir, "..", "pyfa", "eos", "effects")
|
||||
effects_path = os.path.join(script_dir, "..", "eos", "effects")
|
||||
|
||||
usage = "usage: %prog --database=DB [--debug=DEBUG]"
|
||||
parser = OptionParser(usage=usage)
|
||||
parser.add_option("-d", "--database", help="path to eve cache data dump in \
|
||||
sqlite format, default to eve database file included in pyfa (../pyfa/staticdata/eve.db)",
|
||||
type="string", default=os.path.join(script_dir, "..", "pyfa", "staticdata", "eve.db"))
|
||||
sqlite format, default to eve database file included in pyfa (../staticdata/eve.db)",
|
||||
type="string", default=os.path.join(script_dir, "..", "staticdata", "eve.db"))
|
||||
parser.add_option("-e", "--effects", help="explicit comma-separated list of \
|
||||
effects to process", type="string", default="")
|
||||
parser.add_option("-r", "--remove", help="remove effect files that are not \
|
||||
|
||||
@@ -8,7 +8,7 @@ import sqlite3
|
||||
script_dir = os.path.dirname(unicode(__file__, sys.getfilesystemencoding()))
|
||||
|
||||
# Connect to database and set up cursor
|
||||
db = sqlite3.connect(os.path.join(script_dir, "..", "pyfa", "staticdata", "eve.db"))
|
||||
db = sqlite3.connect(os.path.join(script_dir, "..", "staticdata", "eve.db"))
|
||||
cursor = db.cursor()
|
||||
|
||||
# Queries to get raw data
|
||||
|
||||
@@ -32,7 +32,7 @@ import sqlite3
|
||||
import sys
|
||||
|
||||
script_dir = os.path.dirname(__file__)
|
||||
default_old = os.path.join(script_dir, "..", "pyfa", "staticdata", "eve.db")
|
||||
default_old = os.path.join(script_dir, "..", "staticdata", "eve.db")
|
||||
|
||||
def main(old, new, groups=True, effects=True, attributes=True, renames=True):
|
||||
# Open both databases and get their cursors
|
||||
@@ -50,7 +50,7 @@ def main(old, new, groups=True, effects=True, attributes=True, renames=True):
|
||||
|
||||
# Initialization of few things used by both changed/renamed effects list
|
||||
script_dir = os.path.dirname(__file__)
|
||||
effectspath = os.path.join(script_dir, "..", "pyfa", "eos", "effects")
|
||||
effectspath = os.path.join(script_dir, "..", "eos", "effects")
|
||||
implemented = set()
|
||||
|
||||
for filename in os.listdir(effectspath):
|
||||
|
||||
@@ -23,7 +23,7 @@ import sys
|
||||
|
||||
# Add eos root path to sys.path so we can import ourselves
|
||||
path = os.path.dirname(unicode(__file__, sys.getfilesystemencoding()))
|
||||
sys.path.append(os.path.realpath(os.path.join(path, "..", "pyfa")))
|
||||
sys.path.append(os.path.realpath(os.path.join(path, "..")))
|
||||
|
||||
import json
|
||||
import argparse
|
||||
|
||||
@@ -6,15 +6,13 @@ import os
|
||||
# Phobos location
|
||||
phb_path = os.path.expanduser("path/to/phobos")
|
||||
|
||||
### Append Phobos to path
|
||||
sys.path.append(os.path.realpath(phb_path))
|
||||
|
||||
import argparse
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("-e", "--eve", dest="eve_path", help="Location of EVE directory", required=True)
|
||||
parser.add_argument("-c", "--cache", dest="cache_path", help="Location of EVE cache directory. If not specified, an attempt will be make to automatically determine path.")
|
||||
parser.add_argument("-d", "--dump", dest="dump_path", help="Location of Phobos JSON dump directory", required=True)
|
||||
parser.add_argument("-p", "--phobos", dest="phb_path", help="Location of Phobos, defaults to path noted in script", default=phb_path)
|
||||
parser.add_argument("-s", "--singularity", action="store_true", help="Singularity build")
|
||||
parser.add_argument("-j", "--nojson", dest="nojson", action="store_true", help="Skip Phobos JSON data dump.")
|
||||
|
||||
@@ -24,6 +22,9 @@ cache_path = os.path.expanduser(unicode(args.cache_path, sys.getfilesystemencodi
|
||||
dump_path = os.path.expanduser(unicode(args.dump_path, sys.getfilesystemencoding()))
|
||||
script_path = os.path.dirname(unicode(__file__, sys.getfilesystemencoding()))
|
||||
|
||||
### Append Phobos to path
|
||||
sys.path.append(os.path.expanduser(unicode(args.phb_path, sys.getfilesystemencoding())))
|
||||
|
||||
def header(text, subtext=None):
|
||||
print
|
||||
print "* "*30
|
||||
@@ -82,7 +83,7 @@ jsonToSql.main("sqlite:///"+db_file, dump_path)
|
||||
### Diff generation
|
||||
import itemDiff
|
||||
diff_file = os.path.join(dump_path, "diff.txt")
|
||||
old_db = os.path.join(script_path, "..", "pyfa", "staticdata", "eve.db")
|
||||
old_db = os.path.join(script_path, "..", "staticdata", "eve.db")
|
||||
|
||||
header("Generating DIFF", diff_file)
|
||||
old_stdout = sys.stdout
|
||||
|
||||
Reference in New Issue
Block a user