From d1e2966ab8d3fd38edfa3e50fae8e26601ef1902 Mon Sep 17 00:00:00 2001 From: dvs1 Date: Mon, 20 Jan 2025 14:50:57 +1000 Subject: Clean up the cleaning up --- SuckItFos | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'SuckItFos') diff --git a/SuckItFos b/SuckItFos index b59f6b0..11adaf9 100755 --- a/SuckItFos +++ b/SuckItFos @@ -10,7 +10,7 @@ filter=" -name TWiki -prune -o \ " -pushd /opt/merged +pushd /opt/mergedWork find /opt/Foswiki/data ${filter} \ -name "*.txt" -type f,l -printf "%P\n" | while read line @@ -26,7 +26,6 @@ do # TODO - try curl, to see what is actually downloaded, and maybe not download unchanged pages. curl to .HTM # Doesn't help with redownloads, coz natch a dynamic site isn't cached. But I can at least comment out the curl command during testing to save time. curl --silent --no-progress-meter ${URL}/${base}/${file}?cover=print -o Foswiki/${base}/${file}.HTM - cp Foswiki/${base}/${file}.HTM Foswiki/${base}/${file}.HTM_ORIGINAL csplit -ks Foswiki/${base}/${file}.HTM '%
%' '/
/' if [ -f xx00 ]; then @@ -58,18 +57,21 @@ do sed -i -E Foswiki/${base}/${file}.md \ -e 's/\$/\$dlr\$/g' \ -e 's/\{#.*\}//g' \ - -e 's/\{\.pattern.*\}//g' \ - -e 's/\{\.pattern.*//g' \ + -e '/^:::/d' \ -e '/^/d' \ - -e '/^:::/d' +# -e 's/\{\.pattern.*\}//g' \ +# -e 's/\{\.pattern.*//g' \ + echo -e "****\n[Original page](${URL}/${base}/${file}) where maybe you can edit it." >> Foswiki/${base}/${file}.md # pandoc -t html -f commonmark_x --self-contained Foswiki/${base}/${file}.md > Foswiki/${base}/${file}.htm # cmark-gfm -t html -e footnotes -e table -e strikethrough Foswiki/${base}/${file}.md > Foswiki/${base}/${file}.body # ln -frs Foswiki/${base}/${file}.body combined/${base}/${file}.body ln -frs Foswiki/${base}/${file}.md combined/${base}/${file}.md -done -notYetAnotherWiki.lua + if [ -f xx01 ]; then + rm xx01 + fi +done popd -- cgit v1.1