From 0010c660520d92e6ab23347e4d690a2c0c13b1b5 Mon Sep 17 00:00:00 2001 From: Dave Vandenbout Date: Thu, 3 Oct 2019 11:06:50 -0400 Subject: [PATCH] Fixed problem caused by whitespace at beginning of part/footprint search terms. * Changed script name from skidl_part_fp_search to zyc. --- setup.py | 3 +-- skidl/part_query.py | 2 +- skidl/search_gui/skidl_part_footprint_search.py | 2 +- skidl/tools/kicad.py | 1 + 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 9ccbcafa..5fa6ef0d 100644 --- a/setup.py +++ b/setup.py @@ -54,10 +54,9 @@ entry_points={ "console_scripts": [ "netlist_to_skidl = skidl.netlist_to_skidl_main:main", - "skidl_part_search = skidl.skidl_part_search:main", ], "gui_scripts": [ - "skidl_part_fp_search = skidl.search_gui.skidl_part_footprint_search:main", + "zyc = skidl.search_gui.skidl_part_footprint_search:main", ], }, package_dir={"skidl": "skidl"}, diff --git a/skidl/part_query.py b/skidl/part_query.py index 625d7971..70e82073 100644 --- a/skidl/part_query.py +++ b/skidl/part_query.py @@ -57,7 +57,7 @@ def parse_search_terms(terms): non-white chars to prevent the initial portion of a quoted string from being gathered up as a non-white character sequence. """ - return re.sub(r"((\".*?\")|(\S+))\s*", r"(?=.*(\1))", terms).replace('"', "") + ".*" + return re.sub(r"((\".*?\")|(\S+))\s*", r"(?=.*(\1))", terms.strip().rstrip()).replace('"', "") + ".*" def search_parts_iter(terms, tool=None): diff --git a/skidl/search_gui/skidl_part_footprint_search.py b/skidl/search_gui/skidl_part_footprint_search.py index afbf9546..6e6ce544 100644 --- a/skidl/search_gui/skidl_part_footprint_search.py +++ b/skidl/search_gui/skidl_part_footprint_search.py @@ -44,7 +44,7 @@ from skidl.search_gui.skidl_footprint_search import FootprintSearchPanel from skidl.search_gui.skidl_part_search import PartSearchPanel -APP_TITLE = "SKiDL Part/Footprint Search" +APP_TITLE = "zyc: SKiDL Part/Footprint Search" APP_EXIT = 1 SHOW_HELP = 3 SHOW_ABOUT = 4 diff --git a/skidl/tools/kicad.py b/skidl/tools/kicad.py index a5ece7a6..59b5e43d 100644 --- a/skidl/tools/kicad.py +++ b/skidl/tools/kicad.py @@ -116,6 +116,7 @@ def _load_sch_lib_(self, filename=None, lib_search_paths_=None): keywords="", datasheet="", description="", + search_text = "", ) )