Дополнение внутренних ссылок в html
This commit is contained in:
@@ -49,7 +49,12 @@ if [ -z "$content" ]; then
|
||||
fi
|
||||
|
||||
path="$output_path/${title//\//_}.html"
|
||||
echo "<html><body>Страница: <a href=\"$CONF_URL/pages/viewpage.action?pageId=$PAGE_ID\">$title</a><br><br>$content</body></html>" > "$path"
|
||||
content=$(echo "$content" | sed "s#href=\"/#href=\"$CONF_URL/#g")
|
||||
content=$(echo "$content" | sed "s#src=\"/#src=\"$CONF_URL/#g")
|
||||
# content=${content//href=\"\//href=\"$CONF_URL}
|
||||
# content=${content//src=\"\//src=\"$CONF_URL}
|
||||
|
||||
echo "<html><body>Страница: <a href=\"$CONF_URL/pages/viewpage.action?pageId=$PAGE_ID\">$CONF_URL/pages/viewpage.action?pageId=$PAGE_ID</a><br><br><h1>$title</h1>$content</body></html>" > "$path"
|
||||
echo "Сохранено: $output_path/$title.html"
|
||||
|
||||
child_ids=$(echo "$response" | jq -r '.children.page.results[]?.id' 2>/dev/null)
|
||||
|
||||
Reference in New Issue
Block a user