From 2bc55063594d422947ec753bea6def5b3eb412e3 Mon Sep 17 00:00:00 2001 From: Yan <2641574067@qq.com> Date: Fri, 10 Sep 2021 21:53:48 +0800 Subject: [PATCH] rename variables --- .gitignore | 3 ++- dblpSearch.py | 8 ++++---- settings.json | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index fea2c78..4b90fcd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ test* activate_env.bat -dblpSearch.bat \ No newline at end of file +dblpSearch.bat +output/ \ No newline at end of file diff --git a/dblpSearch.py b/dblpSearch.py index cfd9f09..4b23a69 100644 --- a/dblpSearch.py +++ b/dblpSearch.py @@ -5,8 +5,8 @@ from config import settings # load parameters -CONFERENCES = settings['conferences'] -NUMBER_PER_CONFERENCE = int(settings['number_per_conference']) +PUBLISHERS = settings['publishers'] +NUMBER_PER_PUBLISHER = int(settings['number_per_publisher']) NUMBER_PER_SEARCH = int(settings['number_per_search']) # init output file @@ -20,9 +20,9 @@ while True: terms = input("Search for: ") while True: - mode = input("Search by conferences? [y/n]:") + mode = input("Search by publishers? [y/n]:") if mode == 'y': - info = db.search_by_conference(terms, CONFERENCES, NUMBER_PER_CONFERENCE) + info = db.search_by_conference(terms, PUBLISHERS, NUMBER_PER_PUBLISHER) break elif mode == 'n': info = db.search(terms, NUMBER_PER_SEARCH) diff --git a/settings.json b/settings.json index 49569fe..85ac480 100644 --- a/settings.json +++ b/settings.json @@ -1,9 +1,9 @@ { - "conferences": [ + "publishers": [ "sigcomm", "mobicom", "nsdi", "sensys", "mobisys", "imwut" , "ipsn", "infocom", "mobihoc" ], "number_per_search": 100, - "number_per_conference": 100, + "number_per_publisher": 100, "entry_style": { "style": "rainbow", "line_height": 30,