sdf-scripts/cluster-web-to-other.ksh

60 lines
1.6 KiB
Bash
Raw Normal View History

2023-02-11 15:33:40 +00:00
#/bin/ksh
2023-02-14 22:52:30 +00:00
#
2023-02-13 19:54:06 +00:00
# Cluster
2023-02-14 22:52:30 +00:00
#
# Download the websites index.html file
2023-02-13 19:54:06 +00:00
2023-02-11 15:33:40 +00:00
wget -O /sdf/arpa/ns/s/scm/index.html https://scm.sdf.org
2023-02-14 22:52:30 +00:00
# Download the websites 02.html file
2023-02-14 19:26:18 +00:00
wget -O /sdf/arpa/ns/s/scm/02.html https://scm.sdf.org/posts/2023/02.html
2023-02-14 22:52:30 +00:00
# Convert the index.html file to an index text file
2023-02-14 18:52:55 +00:00
html2text -o /sdf/arpa/ns/s/scm/index -ascii -style pretty /sdf/arpa/ns/s/scm/index.html
2023-02-11 15:33:40 +00:00
2023-02-14 22:52:30 +00:00
# Convert the 02.html file to a 02 text file
2023-02-14 19:26:18 +00:00
html2text -o /sdf/arpa/ns/s/scm/02 -ascii -style pretty /sdf/arpa/ns/s/scm/02.html
2023-02-14 22:52:30 +00:00
# Write the .plan text file from the index text file
2023-02-14 18:52:55 +00:00
cat /sdf/arpa/ns/s/scm/index > .plan
2023-02-11 15:33:40 +00:00
2023-02-14 22:52:30 +00:00
# Write the index text file to the root of Gopher
2023-02-14 18:52:55 +00:00
cp /sdf/arpa/ns/s/scm/index /sdf/arpa/ns/s/scm/gopher
2023-02-13 19:54:06 +00:00
2023-02-14 22:52:30 +00:00
# Write the 02 text file to the posts Gopher location
2023-02-14 19:26:18 +00:00
2023-02-14 22:52:30 +00:00
cp /sdf/arpa/ns/s/scm/02 /sdf/arpa/ns/s/scm/gopher/posts/2023
2023-02-14 19:37:49 +00:00
2023-02-14 22:52:30 +00:00
#
2023-02-13 19:54:06 +00:00
# Meta Array
2023-02-14 22:52:30 +00:00
#
# Remove all control chracters from the index text file and write it to the index.ma text file
2023-02-13 19:54:06 +00:00
2023-02-14 19:06:07 +00:00
cat /sdf/arpa/ns/s/scm/index | col -b -x > /sdf/arpa/ns/s/scm/index.ma
2023-02-13 19:54:06 +00:00
2023-02-14 22:52:30 +00:00
# Remove all the control chracters from the 02 text file and write it to the 02.ma text file
2023-02-14 21:44:59 +00:00
cat /sdf/arpa/ns/s/scm/02 | col -b -x > /sdf/arpa/ns/s/scm/02.ma
2023-02-14 22:52:30 +00:00
# Write the index.ma text file to the .plan text file
2023-02-14 18:52:55 +00:00
scp /sdf/arpa/ns/s/scm/index.ma scm@ma.sdf.org:/meta/s/scm/.plan
2023-02-13 19:54:06 +00:00
2023-02-14 22:52:30 +00:00
# Write the index.ma text file to the index.gmi text file to the root of Gemini
2023-02-14 18:52:55 +00:00
scp /sdf/arpa/ns/s/scm/index.ma scm@ma.sdf.org:/meta/gemini/scm/index.gmi
2023-02-13 19:54:06 +00:00
2023-02-14 22:52:30 +00:00
# Write the 02.ma text file to the 02.gmi text file to the posts location on Gemini
2023-02-14 21:51:31 +00:00
scp /sdf/arpa/ns/s/scm/02.ma scm@ma.sdf.org:/meta/gemini/scm/posts/2023/02.gmi
2023-02-14 21:44:59 +00:00
2023-02-11 15:33:40 +00:00
exit 0