From 1b891743ed2628b8ac36fe4685a92b65dc7dd862 Mon Sep 17 00:00:00 2001 From: Andreas Gerler Date: Thu, 23 Nov 2023 19:43:10 +0100 Subject: [PATCH] update x-path-walker Signed-off-by: Andreas Gerler --- .../x-path-walker-pkg.el | 11 ----------- .../x-path-walker-autoloads.el | 9 +++------ .../x-path-walker-pkg.el | 13 +++++++++++++ .../x-path-walker.el | 13 +++++++------ .../xpathwalker/__init__.py | 0 .../xpathwalker/__main__.py | 0 .../xpathwalker/args.py | 0 .../xpathwalker/json_Processor.py | 6 +++--- .../xpathwalker/json_jq_Processor.py | 0 .../xpathwalker/lxml_Processor.py | 0 .../xpathwalker/processor.py | 0 .../xpathwalker/utils.py | 4 +++- .../xpathwalker/yaml_Processor.py | 0 13 files changed, 29 insertions(+), 27 deletions(-) delete mode 100644 elpa/x-path-walker-20160922.1835/x-path-walker-pkg.el rename elpa/{x-path-walker-20160922.1835 => x-path-walker-20220714.1056}/x-path-walker-autoloads.el (76%) create mode 100644 elpa/x-path-walker-20220714.1056/x-path-walker-pkg.el rename elpa/{x-path-walker-20160922.1835 => x-path-walker-20220714.1056}/x-path-walker.el (93%) rename elpa/{x-path-walker-20160922.1835 => x-path-walker-20220714.1056}/xpathwalker/__init__.py (100%) rename elpa/{x-path-walker-20160922.1835 => x-path-walker-20220714.1056}/xpathwalker/__main__.py (100%) rename elpa/{x-path-walker-20160922.1835 => x-path-walker-20220714.1056}/xpathwalker/args.py (100%) rename elpa/{x-path-walker-20160922.1835 => x-path-walker-20220714.1056}/xpathwalker/json_Processor.py (98%) rename elpa/{x-path-walker-20160922.1835 => x-path-walker-20220714.1056}/xpathwalker/json_jq_Processor.py (100%) rename elpa/{x-path-walker-20160922.1835 => x-path-walker-20220714.1056}/xpathwalker/lxml_Processor.py (100%) rename elpa/{x-path-walker-20160922.1835 => x-path-walker-20220714.1056}/xpathwalker/processor.py (100%) rename elpa/{x-path-walker-20160922.1835 => x-path-walker-20220714.1056}/xpathwalker/utils.py (96%) rename elpa/{x-path-walker-20160922.1835 => x-path-walker-20220714.1056}/xpathwalker/yaml_Processor.py (100%) diff --git a/elpa/x-path-walker-20160922.1835/x-path-walker-pkg.el b/elpa/x-path-walker-20160922.1835/x-path-walker-pkg.el deleted file mode 100644 index 550df4b2..00000000 --- a/elpa/x-path-walker-20160922.1835/x-path-walker-pkg.el +++ /dev/null @@ -1,11 +0,0 @@ -(define-package "x-path-walker" "20160922.1835" "Navigation feature for JSON/XML/HTML based on path (imenu like)" - '((helm-core "1.9.2")) - :keywords - '("convenience") - :authors - '((nil . "")) - :maintainer - '(nil . "")) -;; Local Variables: -;; no-byte-compile: t -;; End: diff --git a/elpa/x-path-walker-20160922.1835/x-path-walker-autoloads.el b/elpa/x-path-walker-20220714.1056/x-path-walker-autoloads.el similarity index 76% rename from elpa/x-path-walker-20160922.1835/x-path-walker-autoloads.el rename to elpa/x-path-walker-20220714.1056/x-path-walker-autoloads.el index 6801d5f9..9790c43e 100644 --- a/elpa/x-path-walker-20160922.1835/x-path-walker-autoloads.el +++ b/elpa/x-path-walker-20220714.1056/x-path-walker-autoloads.el @@ -1,4 +1,4 @@ -;;; x-path-walker-autoloads.el --- automatically extracted autoloads +;;; x-path-walker-autoloads.el --- automatically extracted autoloads -*- lexical-binding: t -*- ;; ;;; Code: @@ -9,12 +9,9 @@ ;;;### (autoloads nil "x-path-walker" "x-path-walker.el" (0 0 0 0)) ;;; Generated autoloads from x-path-walker.el -(autoload 'helm-x-path-walker "x-path-walker" "\ +(autoload 'helm-x-path-walker "x-path-walker" nil t nil) - -\(fn)" t nil) - -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "x-path-walker" '("x-path-"))) +(register-definition-prefixes "x-path-walker" '("x-path-")) ;;;*** diff --git a/elpa/x-path-walker-20220714.1056/x-path-walker-pkg.el b/elpa/x-path-walker-20220714.1056/x-path-walker-pkg.el new file mode 100644 index 00000000..15b837fc --- /dev/null +++ b/elpa/x-path-walker-20220714.1056/x-path-walker-pkg.el @@ -0,0 +1,13 @@ +(define-package "x-path-walker" "20220714.1056" "Navigation feature for JSON/XML/HTML based on path (imenu like)" + '((helm-core "3.6.0")) + :commit "c91deaaba0d5cc9018008a39c96222deacba3868" :authors + '((nil . "")) + :maintainers + '((nil . "")) + :maintainer + '(nil . "") + :keywords + '("convenience")) +;; Local Variables: +;; no-byte-compile: t +;; End: diff --git a/elpa/x-path-walker-20160922.1835/x-path-walker.el b/elpa/x-path-walker-20220714.1056/x-path-walker.el similarity index 93% rename from elpa/x-path-walker-20160922.1835/x-path-walker.el rename to elpa/x-path-walker-20220714.1056/x-path-walker.el index fbec88f0..1a627458 100644 --- a/elpa/x-path-walker-20160922.1835/x-path-walker.el +++ b/elpa/x-path-walker-20220714.1056/x-path-walker.el @@ -4,7 +4,7 @@ ;; Author: ;; Keywords: convenience -;; Package-Requires: ((helm-core "1.9.2")) +;; Package-Requires: ((helm-core "3.6.0")) ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by @@ -25,7 +25,7 @@ ;;; Code: -(require 'helm) +(require 'helm-core) (defvar x-path-walker-source-dir (concat (if load-file-name (file-name-directory load-file-name) @@ -43,9 +43,9 @@ (defun x-path-build-cmd-path (args) (let ((cmdpython (x-path-walker-command))) (mapconcat #'identity - (append cmdpython - args) - " "))) + (append cmdpython + args) + " "))) (defun x-path-run-py-script (args) (let ((cmd (x-path-build-cmd-path args))) @@ -94,7 +94,8 @@ (shell-command-on-region (point-min) (point-max) (concat "python3 -m json.tool " (buffer-file-name)) - (current-buffer)))) + (current-buffer) t + "*x-path-walker-json-error*" t))) (unless (or (string= "" line)) (goto-char 0) (forward-line (1- (string-to-number line))) diff --git a/elpa/x-path-walker-20160922.1835/xpathwalker/__init__.py b/elpa/x-path-walker-20220714.1056/xpathwalker/__init__.py similarity index 100% rename from elpa/x-path-walker-20160922.1835/xpathwalker/__init__.py rename to elpa/x-path-walker-20220714.1056/xpathwalker/__init__.py diff --git a/elpa/x-path-walker-20160922.1835/xpathwalker/__main__.py b/elpa/x-path-walker-20220714.1056/xpathwalker/__main__.py similarity index 100% rename from elpa/x-path-walker-20160922.1835/xpathwalker/__main__.py rename to elpa/x-path-walker-20220714.1056/xpathwalker/__main__.py diff --git a/elpa/x-path-walker-20160922.1835/xpathwalker/args.py b/elpa/x-path-walker-20220714.1056/xpathwalker/args.py similarity index 100% rename from elpa/x-path-walker-20160922.1835/xpathwalker/args.py rename to elpa/x-path-walker-20220714.1056/xpathwalker/args.py diff --git a/elpa/x-path-walker-20160922.1835/xpathwalker/json_Processor.py b/elpa/x-path-walker-20220714.1056/xpathwalker/json_Processor.py similarity index 98% rename from elpa/x-path-walker-20160922.1835/xpathwalker/json_Processor.py rename to elpa/x-path-walker-20220714.1056/xpathwalker/json_Processor.py index 1a4de78c..df55a323 100644 --- a/elpa/x-path-walker-20160922.1835/xpathwalker/json_Processor.py +++ b/elpa/x-path-walker-20220714.1056/xpathwalker/json_Processor.py @@ -1,10 +1,10 @@ +import json +from collections.abc import MutableSequence, MutableMapping +from collections import OrderedDict from xpathwalker.utils import list_compare_idx from xpathwalker.processor import Processor from xpathwalker.utils import traverse_and_remove_path,\ get_dict_from_path, get_class -import json -from collections import MutableSequence, MutableMapping -from collections import OrderedDict ########################################################################## # JSON / Python # diff --git a/elpa/x-path-walker-20160922.1835/xpathwalker/json_jq_Processor.py b/elpa/x-path-walker-20220714.1056/xpathwalker/json_jq_Processor.py similarity index 100% rename from elpa/x-path-walker-20160922.1835/xpathwalker/json_jq_Processor.py rename to elpa/x-path-walker-20220714.1056/xpathwalker/json_jq_Processor.py diff --git a/elpa/x-path-walker-20160922.1835/xpathwalker/lxml_Processor.py b/elpa/x-path-walker-20220714.1056/xpathwalker/lxml_Processor.py similarity index 100% rename from elpa/x-path-walker-20160922.1835/xpathwalker/lxml_Processor.py rename to elpa/x-path-walker-20220714.1056/xpathwalker/lxml_Processor.py diff --git a/elpa/x-path-walker-20160922.1835/xpathwalker/processor.py b/elpa/x-path-walker-20220714.1056/xpathwalker/processor.py similarity index 100% rename from elpa/x-path-walker-20160922.1835/xpathwalker/processor.py rename to elpa/x-path-walker-20220714.1056/xpathwalker/processor.py diff --git a/elpa/x-path-walker-20160922.1835/xpathwalker/utils.py b/elpa/x-path-walker-20220714.1056/xpathwalker/utils.py similarity index 96% rename from elpa/x-path-walker-20160922.1835/xpathwalker/utils.py rename to elpa/x-path-walker-20220714.1056/xpathwalker/utils.py index be6b8e2d..b06c0105 100644 --- a/elpa/x-path-walker-20160922.1835/xpathwalker/utils.py +++ b/elpa/x-path-walker-20220714.1056/xpathwalker/utils.py @@ -59,7 +59,9 @@ def get_dict_from_path(path, separator): res = [] for x in path: - if not isinstance(x, list): + if isinstance(x, str) and x.find("[") == -1: + res.append(x) + elif not isinstance(x, list): pos = x.find("[") while pos != -1: if pos == 0: diff --git a/elpa/x-path-walker-20160922.1835/xpathwalker/yaml_Processor.py b/elpa/x-path-walker-20220714.1056/xpathwalker/yaml_Processor.py similarity index 100% rename from elpa/x-path-walker-20160922.1835/xpathwalker/yaml_Processor.py rename to elpa/x-path-walker-20220714.1056/xpathwalker/yaml_Processor.py -- 2.47.3