1
0

Compare commits

...

2 Commits

Author SHA1 Message Date
330c65697a gitignore misc 2025-08-23 11:06:15 +08:00
3dcdc6f847 Дополнение внутренних ссылок в html 2025-08-23 11:05:52 +08:00
2 changed files with 11 additions and 4 deletions

8
.gitignore vendored
View File

@@ -1,12 +1,14 @@
/.data/* /.data/*
/rag/input_html/* /rag/input_html*/*
/rag/output_md/* /rag/output_md*/*
/rag/ready_rag/* /rag/ready_rag*/*
/rag/venv /rag/venv
.env .env
*.html *.html
*.pdf *.pdf
*.sqlite* *.sqlite*
*.bin
*.pickle
!.gitkeep !.gitkeep

View File

@@ -49,7 +49,12 @@ if [ -z "$content" ]; then
fi fi
path="$output_path/${title//\//_}.html" 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" echo "Сохранено: $output_path/$title.html"
child_ids=$(echo "$response" | jq -r '.children.page.results[]?.id' 2>/dev/null) child_ids=$(echo "$response" | jq -r '.children.page.results[]?.id' 2>/dev/null)