From f1bbc4657d8bd410fe26905e9c60388e99130fc1 Mon Sep 17 00:00:00 2001 From: Bel LaPointe Date: Thu, 17 Feb 2022 13:01:01 -0700 Subject: [PATCH] fix up gitlab wiki anchor annoyance --- crawler/gitlab_wiki.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/crawler/gitlab_wiki.sh b/crawler/gitlab_wiki.sh index ca74742..9fc04c5 100644 --- a/crawler/gitlab_wiki.sh +++ b/crawler/gitlab_wiki.sh @@ -6,8 +6,9 @@ gitlab_wiki() ( } human_url() { - log "not impl: human url: $@" - exit 1 + local url="${1%/}" + url="${url%%#*}" + echo "$url/$(echo "$2" | base64 --decode)" } _host() { @@ -25,7 +26,7 @@ gitlab_wiki() ( project="${project%/-/}" project="${project#/}" project="${project%/}" - echo "$project" + echo "${project%%#*}" } _blob() { @@ -36,7 +37,7 @@ gitlab_wiki() ( local blob="${path#*/wikis}" blob="${blob#/}" blob="${blob%/}" - echo "$blob" + echo "${blob%%#*}" } get() {