From 9b050033292c390cf6be0cfe172cc673d454a2ee Mon Sep 17 00:00:00 2001 From: Bel LaPointe Date: Tue, 1 Feb 2022 14:16:44 -0700 Subject: [PATCH] explicit --- app/crawler/main.sh | 9 +++------ app/crawler/notea.sh | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/app/crawler/main.sh b/app/crawler/main.sh index 48593c1..d85aa8d 100644 --- a/app/crawler/main.sh +++ b/app/crawler/main.sh @@ -24,7 +24,7 @@ config() { } log() { - echo "$(date +%H:%M:%S)> $*" >&2 + echo "$(echo "$(date +%H:%M:%S)> $*" | tr '\n' ' ')" >&2 } ids() { @@ -45,7 +45,7 @@ _crawl() { local json="$(notea get "$id")" local content="$(echo "$json" | jq -r .content)" if ! is_crawlable "$content"; then - log "$content is not crawlable" + log "not crawlable: '${content:0:20}'..." return 0 fi local crawlable_source="$(extract_crawlable_source "$content")" @@ -80,9 +80,6 @@ crawl_with() { log " $PID/$ID ($TITLE): ${#CONTENT}" notea put done - - log not impl crawl with - return 1 } is_crawlable() { @@ -93,7 +90,7 @@ is_crawlable() { } rewrite() { - log not impl rewrite + log not impl rewrite, change images return 1 } diff --git a/app/crawler/notea.sh b/app/crawler/notea.sh index 474ea35..e79e691 100644 --- a/app/crawler/notea.sh +++ b/app/crawler/notea.sh @@ -47,7 +47,7 @@ notea() ( "pid": '"$(echo "$PID" | jq -R)"', "pinned": 0, "shared": 0, - "title": '"$(echo "$TITLE" | jq -R)"' + "title": '"$(echo "$TITLE [generated]" | jq -R)"' }' | jq -c .)" echo "$request" | ncurl \ -X POST \