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

62 lines
1.6 KiB
Bash
Raw Normal View History

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