From 6009a2328342d2be7857247e255de951e8f71a7b Mon Sep 17 00:00:00 2001 From: Tim Van Baak Date: Thu, 6 Aug 2020 13:49:36 -0700 Subject: [PATCH] Rename importer to sources --- inquisitor/app.py | 4 ++-- inquisitor/cli.py | 4 ++-- inquisitor/{importer.py => sources.py} | 0 3 files changed, 4 insertions(+), 4 deletions(-) rename inquisitor/{importer.py => sources.py} (100%) diff --git a/inquisitor/app.py b/inquisitor/app.py index b8385db..4c585ab 100644 --- a/inquisitor/app.py +++ b/inquisitor/app.py @@ -8,7 +8,7 @@ from flask import Flask, render_template, request, jsonify # Application imports from inquisitor.configs import logger, DUNGEON_PATH -from inquisitor import importer, loader, timestamp +from inquisitor import sources, loader, timestamp # Globals app = Flask(__name__) @@ -146,5 +146,5 @@ def callback(): params = request.get_json() if 'source' not in params and 'itemid' not in params: logger.error("Bad request params: {}".format(params)) - importer.item_callback(params['source'], params['itemid']) + sources.item_callback(params['source'], params['itemid']) return jsonify({}) diff --git a/inquisitor/cli.py b/inquisitor/cli.py index c6ecd3d..0e46c3e 100644 --- a/inquisitor/cli.py +++ b/inquisitor/cli.py @@ -30,7 +30,7 @@ def command_update(args): logger.error("Couldn't find sources. Set INQUISITOR_SOURCES or cd to parent folder of ./sources") # Update sources - from inquisitor.importer import update_sources + from inquisitor.sources import update_sources update_sources(*args.source) return 0 @@ -117,7 +117,7 @@ def command_add(args): logger.error("Source '{}' does not exist".format(source)) return -1 - from inquisitor.importer import populate_new + from inquisitor.sources import populate_new item = { 'id': '{:x}'.format(random.getrandbits(16 * 4)), 'source': 'inquisitor' diff --git a/inquisitor/importer.py b/inquisitor/sources.py similarity index 100% rename from inquisitor/importer.py rename to inquisitor/sources.py