2025-03-31 00:42:01 -07:00
|
|
|
function cleanurls { for result in $(find . -name "result-*"); do; (cd $result; python3 ../chatgpt-fix-root-URLs.py); done; }
|
2025-04-12 17:35:36 -07:00
|
|
|
function htmls { find -s result-$1/blog -name "*.html" | sed "s|^result-$1/|http://localhost:8081/|" | awk 'BEGIN { print "export const pages = [" } { printf(" \"%s\",\n", $0); } END { print "]" }'; }
|
2025-03-31 00:42:01 -07:00
|
|
|
function commonhtmls { comm -12 <(htmls $1) <(htmls $2); }
|
2025-04-12 17:35:36 -07:00
|
|
|
function compare {
|
|
|
|
commonhtmls $1 $2 > e2e/pages.ts;
|
|
|
|
# (cd result-$1 && python -m http.server 8081 & SERVER_PID=$! && trap "kill $SERVER_PID" EXIT && sleep 1 && cd .. && npx playwright test);
|
|
|
|
(cd result-$2 && python -m http.server 8081 & SERVER_PID=$! && trap "kill $SERVER_PID" EXIT && sleep 1 && cd .. && npx playwright test);
|
|
|
|
}
|