Добавление ссылки на исходную страницу в формируемый html-файл
This commit is contained in:
@@ -39,12 +39,12 @@ output_path="./input_html"
|
||||
|
||||
title=$(echo "$response" | jq -r .title)
|
||||
content=$(echo "$response" | jq -r .body.storage.value)
|
||||
echo "<html><body>$content</body></html>" > "$output_path/$title.html"
|
||||
|
||||
echo "<html><body>Страница: <a href=\"$CONF_URL/pages/viewpage.action?pageId=$PAGE_ID\">$title</a><br><br>$content</body></html>" > "$output_path/$title.html"
|
||||
echo "Сохранено: $output_path/$title.html"
|
||||
|
||||
child_ids=$(echo "$response" | jq -r '.children.page.results[]?.id' 2>/dev/null)
|
||||
for child_id in $child_ids; do
|
||||
echo "Переход к дочерней странице: $child_id"
|
||||
sleep 1
|
||||
$0 "$child_id"
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user