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/*
/rag/input_html/*
/rag/output_md/*
/rag/ready_rag/*
/rag/input_html*/*
/rag/output_md*/*
/rag/ready_rag*/*
/rag/venv
.env
*.html
*.pdf
*.sqlite*
*.bin
*.pickle
!.gitkeep

View File

@@ -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)