Many changes

This commit is contained in:
2025-10-16 19:59:34 +00:00
parent fa6bf41cdf
commit a70da1f9cd
15 changed files with 67 additions and 10 deletions

View File

@@ -1,4 +1,6 @@
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
# append_file.sh
# This script is part of the website-to-other project, which converts my
@@ -21,7 +23,11 @@
WebTextDir="/www/nz/s/scm/text"
echo "Append file..."
# Append the previous index.html text file to the new index.html text file
cat $WebTextDir/index.html-04 >> $WebTextDir/index.html-05
exit 0

View File

@@ -21,7 +21,11 @@
WebTextDir="/www/nz/s/scm/text"
echo "Backup file..."
# Make a backup of the index.html file
cp $WebTextDir/index.html $WebTextDir/index.html.old
exit 0

View File

@@ -1,6 +1,6 @@
#!/usr/pkg/bin/bash
# cleanup.sh
# clean_up.sh
# This script is part of the website-to-other project, which converts my
# website to other formats. Unless the debug option is invoked, it removes
# files created during the conversion process.
@@ -23,11 +23,15 @@
WebDir="/sdf/arpa/ns/s/scm/html"
TextWebDir="/sdf/arpa/ns/s/scm/html/text"
echo "Clean up..."
# Remove the backed up index.html of the modern website
rm $WebDir/index.html~
# Remove the backed up index.html of the text-based website and
# the converted text files
rm $TextWebDir/index.html~
rm $TextWebDir/index.html.old
rm $TextWebDir/index.html-01
@@ -38,3 +42,4 @@ rm $TextWebDir/index.html-05
rm $TextWebDir/index.html-06
exit 0

View File

@@ -21,7 +21,11 @@
GopherDir="/ftp/pub/users/scm"
echo "Cluster plan..."
# Write a cluster .plan file from the Gopher index text file
cat $GopherDir/posts > $HOME/.plan
exit 0

View File

@@ -21,7 +21,11 @@
WebTextDir="/www/nz/s/scm/text"
echo "Convert file"
# Convert the modified index.html file to an index.html text file
html2text -width 65 -o $WebTextDir/index.html-02 $WebTextDir/index.html-01
exit 0

View File

@@ -32,7 +32,7 @@ convert_file () {
}
remove_control () {
sh $HOME/website-to-other/remote_control.sh
sh $HOME/website-to-other/remove_control.sh
}
remove_blank () {
@@ -59,8 +59,8 @@ gopher_map () {
sh $HOME/website-to-other/gopher_map.sh
}
gemini_posts () {
sh $HOME/website-to-other/gemini_posts.sh
gemini_post () {
sh $HOME/website-to-other/gemini_post.sh
}
cluster_plan () {
@@ -84,7 +84,7 @@ gopher_repo () {
}
clean_up () {
sh $HOME/website-to-other/cleanup.sh
sh $HOME/website-to-other/clean_up.sh
}
backup_file
@@ -104,3 +104,4 @@ gopher_repo
clean_up
exit 0

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# gemini_posts.sh
# gemini_post.sh
# This script is part of the website-to-other project, which converts my
# website to other formats.
@@ -21,7 +21,11 @@
GopherDir="/ftp/pub/users/scm"
echo "Gemini post..."
# Write a Gemini index.gmi from the Gopher posts file
cat $GopherDir/posts > $GopherDir/index.gmi
exit 0

View File

@@ -21,7 +21,11 @@
GopherDir="/ftp/pub/users/scm"
echo "Gopher map..."
# Write gophermap file
cp $HOME/gopher/gophermap $GopherDir/gophermap
exit 0

View File

@@ -1,6 +1,8 @@
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
# gopher_perms.sh
# gopher_permisson.sh
# This script is part of the website-to-other project, which converts my
# website to other formats.
@@ -21,7 +23,11 @@
GopherDir="/ftp/pub/users/scm"
echo "Gopher permissions..."
# Set the correct Gopher and Gemini permissions
chmod -R 754 $GopherDir
exit 0

View File

@@ -22,7 +22,11 @@
GopherDir="/ftp/pub/users/scm"
WebTextDir="/www/nz/s/scm/text"
echo "Gopher posts..."
# Write the Gopher posts file from the index.html text file
cat $WebTextDir/index.html-06 > $GopherDir/posts
exit 0

View File

@@ -21,7 +21,11 @@
GopherDir="/ftp/pub/users/scm"
echo "Gopher site..."
# Copy the Gopher posts to the Gopher respository
cp $GopherDir/posts $HOME/gophersite
exit 0

View File

@@ -21,7 +21,11 @@
WebTextDir="/www/nz/s/scm/text"
# Where there are blank lines in index.html file insert the <br> HTML tag
echo "Insert break..."
# Where there are blank lines in the index.html file insert the <br> HTML tag
sed 's/^$/<br>/' $WebTextDir/index.html > $WebTextDir/index.html-01
exit 0

View File

@@ -20,6 +20,8 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# Write the MetaArray .plan file from the cluster .plan file
scp $HOME/.plan scm@ma.sdf.org:/meta/s/scm/.plan
exit 0

View File

@@ -22,6 +22,8 @@
WebTextDir="/www/nz/s/scm/text"
# Remove the blank lines from the top of the index.html text file
sed '1,13d' $WebTextDir/index.html-03 > $WebTextDir/index.html-04
exit 0

View File

@@ -21,7 +21,10 @@
WebTextDir="/www/nz/s/scm/text"
echo "Remove control..."
# Remove the control characters from the index.html text file
cat $WebTextDir/index.html-02 | col -b -x > $WebTextDir/index.html-03
exit 0