Added footer from index
This commit is contained in:
parent
aaf8934679
commit
c017cb18f9
@ -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/<h3>Posts<\/h3>//' /sdf/arpa/ns/s/scm/index.html
|
||||
|
||||
# Remove the posts lines from the index HTML file
|
||||
|
||||
sed -i "s/<h4><a href="https\:\/\/scm.sdf.org\/posts\/{$year}\/{$month}.html">{$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/<h3>Posts<\/h3>//' /sdf/arpa/ns/s/scm/index.html
|
||||
|
||||
# Remove the posts lines from the index HTML file
|
||||
|
||||
sed -i "s/<h4><a href="https\:\/\/scm.sdf.org\/posts\/{$year}\/{$month}.html">{$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
|
||||
|
Loading…
Reference in New Issue
Block a user