diff --git a/cluster-web-to-other.sh b/cluster-web-to-other.sh index 6f75580..057e78c 100755 --- a/cluster-web-to-other.sh +++ b/cluster-web-to-other.sh @@ -15,14 +15,6 @@ wget -O /sdf/arpa/ns/s/scm/index.html https://scm.sdf.org wget -O /sdf/arpa/ns/s/scm/$month.html https://scm.sdf.org/posts/$year/$month.html -# Remove the posts header line from the index HTML file - -sed -i 's/

Posts<\/h3>//' /sdf/arpa/ns/s/scm/index.html - -# Remove the posts lines from the index HTML file - -sed -i "s/

{$year}<\/a><\/h4>//" /sdf/arpa/ns/s/scm/index.html - # Convert the index HTML file to an index text file html2text -o /sdf/arpa/ns/s/scm/index -ascii -style pretty /sdf/arpa/ns/s/scm/index.html @@ -31,6 +23,18 @@ html2text -o /sdf/arpa/ns/s/scm/index -ascii -style pretty /sdf/arpa/ns/s/scm/in html2text -o /sdf/arpa/ns/s/scm/$month -ascii -style pretty /sdf/arpa/ns/s/scm/$month.html +# Write the footer text file from the index text file + +tail -n 15 /sdf/arpa/ns/s/scm/index > footer + +# Remove the posts header line from the index HTML file + +sed -i 's/

Posts<\/h3>//' /sdf/arpa/ns/s/scm/index.html + +# Remove the posts lines from the index HTML file + +sed -i "s/

{$year}<\/a><\/h4>//" /sdf/arpa/ns/s/scm/index.html + # Remove the blank lines from the beginning of the index file sed -i '1d;2d;3d' /sdf/arpa/ns/s/scm/index