예제 #1
0
def run():

    parser = argparse.ArgumentParser(
        description="data collection tool for PathFinder class")
    parser.add_argument(
        "--league",
        default=league_names[0],
        choices=league_names,
        help=
        "League specifier, ie. 'Synthesis', 'Hardcore Synthesis' or 'Flashback Event (BRE001)'",
    )
    parser.add_argument(
        "--path",
        default="data_analysis/raw",
        help="Location where to save collected data",
    )
    parser.add_argument(
        "--fullbulk",
        default=False,
        action="store_true",
        help="Whether to use all supported bulk items",
    )
    parser.add_argument(
        "--nofilter",
        default=False,
        action="store_true",
        help="Whether to disable item pair filters")

    arguments = parser.parse_args()
    league = arguments.league
    path = arguments.path
    use_filter = False if arguments.nofilter else True
    config = {"fullbulk": arguments.fullbulk}
    backend = poetrade
    chosen_currencies = build_item_list("poetrade", config)

    # Load excluded trader list
    with open("excluded_traders.txt", "r") as f:
        excluded_traders = [x.strip() for x in f.readlines()]

    p = PathFinder(league, chosen_currencies, backend, excluded_traders,
                   use_filter)
    p.run(3)

    filename = "{}/{}".format(path, gen_filename())
    with open(filename, "wb") as f:
        data = p.prepickle()
        pickle.dump(data, f)
예제 #2
0
league = arguments.league
currency = arguments.currency
limit = arguments.limit
use_poetrade = arguments.poetrade
fullbulk = arguments.fullbulk
use_filter = False if arguments.nofilter else True

backend = poetrade if use_poetrade else poeofficial

config = {
    "fullbulk": fullbulk
}

if use_poetrade is True:
    chosen_currencies = build_item_list("poetrade", config)
else:
    chosen_currencies = build_item_list("poeofficial", config)

# Load excluded trader list
with open("excluded_traders.txt", "r") as f:
    excluded_traders = [x.strip() for x in f.readlines()]

p = PathFinder(league, chosen_currencies, backend, excluded_traders, use_filter)
p.run(3, True)

try:
    if currency == "all":
        for c in p.graph.keys():
            log_conversions(p.results, c, limit)
    else:
예제 #3
0
                    action="store_true",
                    help="Disable item pair filters")
parser.add_argument("--poetrade",
                    default=False,
                    action="store_true",
                    help="Use poe.trade instead of pathofexile.com/trade")

arguments = parser.parse_args()
league = arguments.league
currency = arguments.currency
limit = arguments.limit
fullbulk = arguments.fullbulk
use_filter = False if arguments.nofilter else True
backend = poetrade if arguments.poetrade else poeofficial
config = {"fullbulk": fullbulk}
chosen_currencies = build_item_list(backend, config)

# Load excluded trader list
with open("excluded_traders.txt", "r") as f:
    excluded_traders = [x.strip() for x in f.readlines()]

p = PathFinder(league, chosen_currencies, backend, excluded_traders,
               use_filter)
p.run(3, True)

try:
    if currency == "all":
        for c in p.graph.keys():
            log_conversions(p.results, c, limit)
    else:
        log_conversions(p.results, currency, limit)