From 47176f1ad2f7e3f23f160af85093088564244624 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 15 Jun 2020 14:49:58 -0400 Subject: [PATCH 1/2] cmd.py: oeisAdapter argparser no longer removes ':' this enables :list --- lib/adapter/cmd.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/adapter/cmd.py b/lib/adapter/cmd.py index be1df97..5e70c46 100644 --- a/lib/adapter/cmd.py +++ b/lib/adapter/cmd.py @@ -130,10 +130,10 @@ class AdapterOeis(CommandAdapter): cmd[0] = _get_abspath(cmd[0]) # cut oeis/ off - # Replace all non (alphanumeric, '-') chars with Spaces to delimit args to oeis.sh + # Replace all non (alphanumeric, '-', ':') chars with Spaces to delimit args to oeis.sh if topic.startswith("oeis/"): topic = topic[5:] - topic = re.sub('[^a-zA-Z0-9-]+', ' ', topic) + topic = re.sub('[^a-zA-Z0-9-:]+', ' ', topic) return cmd + [topic] From cc72fa81a078346ca25d3b64f168b65cc671a401 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 15 Jun 2020 14:52:54 -0400 Subject: [PATCH 2/2] Only search or code snippet if there is a language argument --- share/adapters/oeis.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/share/adapters/oeis.sh b/share/adapters/oeis.sh index 0a4b296..a88813c 100755 --- a/share/adapters/oeis.sh +++ b/share/adapters/oeis.sh @@ -86,7 +86,8 @@ oeis() ( | tr -d '()' \ | sort -u >> $TMP/list [ $(wc -c < $TMP/list) -ne 0 ] && cat ${TMP}/list || printf "No code snippets available.\n" - else + elif [ $# -gt 1 ] + then if [[ ${LANGUAGE^^} == 'MAPLE' ]] && grep -q 'MAPLE' $DOC then GREP_REGEX='MAPLE.*CROSSREFS'