1
0

Упрощено изменение внутренних ссылок + скрипт для очистки данных

This commit is contained in:
2025-08-23 11:53:23 +08:00
parent 2e3eb52e9f
commit a01f903714
2 changed files with 9 additions and 4 deletions

View File

@@ -49,10 +49,8 @@ if [ -z "$content" ]; then
fi
path="$output_path/${title//\//_}.html"
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}
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"

7
rag/clear.sh Executable file
View File

@@ -0,0 +1,7 @@
#!/bin/bash
rm -rf ./input_html/*.html
rm -rf ./input_pdf/*.pdf
rm -rf ./output_md/*.md
rm -rf ./ready_rag/*
touch ./ready_rag/.gitkeep