Many changes
This commit is contained in:
@@ -1,4 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
set -Eeuo pipefail
|
||||||
|
trap cleanup SIGINT SIGTERM ERR EXIT
|
||||||
|
|
||||||
# append_file.sh
|
# append_file.sh
|
||||||
# This script is part of the website-to-other project, which converts my
|
# This script is part of the website-to-other project, which converts my
|
||||||
@@ -21,7 +23,11 @@
|
|||||||
|
|
||||||
WebTextDir="/www/nz/s/scm/text"
|
WebTextDir="/www/nz/s/scm/text"
|
||||||
|
|
||||||
|
echo "Append file..."
|
||||||
|
|
||||||
# Append the previous index.html text file to the new index.html text file
|
# Append the previous index.html text file to the new index.html text file
|
||||||
|
|
||||||
cat $WebTextDir/index.html-04 >> $WebTextDir/index.html-05
|
cat $WebTextDir/index.html-04 >> $WebTextDir/index.html-05
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
|
@@ -21,7 +21,11 @@
|
|||||||
|
|
||||||
WebTextDir="/www/nz/s/scm/text"
|
WebTextDir="/www/nz/s/scm/text"
|
||||||
|
|
||||||
|
echo "Backup file..."
|
||||||
|
|
||||||
# Make a backup of the index.html file
|
# Make a backup of the index.html file
|
||||||
|
|
||||||
cp $WebTextDir/index.html $WebTextDir/index.html.old
|
cp $WebTextDir/index.html $WebTextDir/index.html.old
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/pkg/bin/bash
|
#!/usr/pkg/bin/bash
|
||||||
|
|
||||||
# cleanup.sh
|
# clean_up.sh
|
||||||
# This script is part of the website-to-other project, which converts my
|
# 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
|
# website to other formats. Unless the debug option is invoked, it removes
|
||||||
# files created during the conversion process.
|
# files created during the conversion process.
|
||||||
@@ -23,11 +23,15 @@
|
|||||||
WebDir="/sdf/arpa/ns/s/scm/html"
|
WebDir="/sdf/arpa/ns/s/scm/html"
|
||||||
TextWebDir="/sdf/arpa/ns/s/scm/html/text"
|
TextWebDir="/sdf/arpa/ns/s/scm/html/text"
|
||||||
|
|
||||||
|
echo "Clean up..."
|
||||||
|
|
||||||
# Remove the backed up index.html of the modern website
|
# Remove the backed up index.html of the modern website
|
||||||
|
|
||||||
rm $WebDir/index.html~
|
rm $WebDir/index.html~
|
||||||
|
|
||||||
# Remove the backed up index.html of the text-based website and
|
# Remove the backed up index.html of the text-based website and
|
||||||
# the converted text files
|
# the converted text files
|
||||||
|
|
||||||
rm $TextWebDir/index.html~
|
rm $TextWebDir/index.html~
|
||||||
rm $TextWebDir/index.html.old
|
rm $TextWebDir/index.html.old
|
||||||
rm $TextWebDir/index.html-01
|
rm $TextWebDir/index.html-01
|
||||||
@@ -38,3 +42,4 @@ rm $TextWebDir/index.html-05
|
|||||||
rm $TextWebDir/index.html-06
|
rm $TextWebDir/index.html-06
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
|
@@ -21,7 +21,11 @@
|
|||||||
|
|
||||||
GopherDir="/ftp/pub/users/scm"
|
GopherDir="/ftp/pub/users/scm"
|
||||||
|
|
||||||
|
echo "Cluster plan..."
|
||||||
|
|
||||||
# Write a cluster .plan file from the Gopher index text file
|
# Write a cluster .plan file from the Gopher index text file
|
||||||
|
|
||||||
cat $GopherDir/posts > $HOME/.plan
|
cat $GopherDir/posts > $HOME/.plan
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
|
@@ -21,7 +21,11 @@
|
|||||||
|
|
||||||
WebTextDir="/www/nz/s/scm/text"
|
WebTextDir="/www/nz/s/scm/text"
|
||||||
|
|
||||||
|
echo "Convert file"
|
||||||
|
|
||||||
# Convert the modified index.html file to an index.html text 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
|
html2text -width 65 -o $WebTextDir/index.html-02 $WebTextDir/index.html-01
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
|
@@ -32,7 +32,7 @@ convert_file () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
remove_control () {
|
remove_control () {
|
||||||
sh $HOME/website-to-other/remote_control.sh
|
sh $HOME/website-to-other/remove_control.sh
|
||||||
}
|
}
|
||||||
|
|
||||||
remove_blank () {
|
remove_blank () {
|
||||||
@@ -59,8 +59,8 @@ gopher_map () {
|
|||||||
sh $HOME/website-to-other/gopher_map.sh
|
sh $HOME/website-to-other/gopher_map.sh
|
||||||
}
|
}
|
||||||
|
|
||||||
gemini_posts () {
|
gemini_post () {
|
||||||
sh $HOME/website-to-other/gemini_posts.sh
|
sh $HOME/website-to-other/gemini_post.sh
|
||||||
}
|
}
|
||||||
|
|
||||||
cluster_plan () {
|
cluster_plan () {
|
||||||
@@ -84,7 +84,7 @@ gopher_repo () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
clean_up () {
|
clean_up () {
|
||||||
sh $HOME/website-to-other/cleanup.sh
|
sh $HOME/website-to-other/clean_up.sh
|
||||||
}
|
}
|
||||||
|
|
||||||
backup_file
|
backup_file
|
||||||
@@ -104,3 +104,4 @@ gopher_repo
|
|||||||
clean_up
|
clean_up
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# gemini_posts.sh
|
# gemini_post.sh
|
||||||
# This script is part of the website-to-other project, which converts my
|
# This script is part of the website-to-other project, which converts my
|
||||||
# website to other formats.
|
# website to other formats.
|
||||||
|
|
||||||
@@ -21,7 +21,11 @@
|
|||||||
|
|
||||||
GopherDir="/ftp/pub/users/scm"
|
GopherDir="/ftp/pub/users/scm"
|
||||||
|
|
||||||
|
echo "Gemini post..."
|
||||||
|
|
||||||
# Write a Gemini index.gmi from the Gopher posts file
|
# Write a Gemini index.gmi from the Gopher posts file
|
||||||
|
|
||||||
cat $GopherDir/posts > $GopherDir/index.gmi
|
cat $GopherDir/posts > $GopherDir/index.gmi
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
@@ -21,7 +21,11 @@
|
|||||||
|
|
||||||
GopherDir="/ftp/pub/users/scm"
|
GopherDir="/ftp/pub/users/scm"
|
||||||
|
|
||||||
|
echo "Gopher map..."
|
||||||
|
|
||||||
# Write gophermap file
|
# Write gophermap file
|
||||||
|
|
||||||
cp $HOME/gopher/gophermap $GopherDir/gophermap
|
cp $HOME/gopher/gophermap $GopherDir/gophermap
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
|
@@ -1,6 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/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
|
# This script is part of the website-to-other project, which converts my
|
||||||
# website to other formats.
|
# website to other formats.
|
||||||
|
|
||||||
@@ -21,7 +23,11 @@
|
|||||||
|
|
||||||
GopherDir="/ftp/pub/users/scm"
|
GopherDir="/ftp/pub/users/scm"
|
||||||
|
|
||||||
|
echo "Gopher permissions..."
|
||||||
|
|
||||||
# Set the correct Gopher and Gemini permissions
|
# Set the correct Gopher and Gemini permissions
|
||||||
|
|
||||||
chmod -R 754 $GopherDir
|
chmod -R 754 $GopherDir
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
@@ -22,7 +22,11 @@
|
|||||||
GopherDir="/ftp/pub/users/scm"
|
GopherDir="/ftp/pub/users/scm"
|
||||||
WebTextDir="/www/nz/s/scm/text"
|
WebTextDir="/www/nz/s/scm/text"
|
||||||
|
|
||||||
|
echo "Gopher posts..."
|
||||||
|
|
||||||
# Write the Gopher posts file from the index.html text file
|
# Write the Gopher posts file from the index.html text file
|
||||||
|
|
||||||
cat $WebTextDir/index.html-06 > $GopherDir/posts
|
cat $WebTextDir/index.html-06 > $GopherDir/posts
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
|
@@ -21,7 +21,11 @@
|
|||||||
|
|
||||||
GopherDir="/ftp/pub/users/scm"
|
GopherDir="/ftp/pub/users/scm"
|
||||||
|
|
||||||
|
echo "Gopher site..."
|
||||||
|
|
||||||
# Copy the Gopher posts to the Gopher respository
|
# Copy the Gopher posts to the Gopher respository
|
||||||
|
|
||||||
cp $GopherDir/posts $HOME/gophersite
|
cp $GopherDir/posts $HOME/gophersite
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
|
@@ -21,7 +21,11 @@
|
|||||||
|
|
||||||
WebTextDir="/www/nz/s/scm/text"
|
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
|
sed 's/^$/<br>/' $WebTextDir/index.html > $WebTextDir/index.html-01
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
|
@@ -20,6 +20,8 @@
|
|||||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# Write the MetaArray .plan file from the cluster .plan file
|
# Write the MetaArray .plan file from the cluster .plan file
|
||||||
|
|
||||||
scp $HOME/.plan scm@ma.sdf.org:/meta/s/scm/.plan
|
scp $HOME/.plan scm@ma.sdf.org:/meta/s/scm/.plan
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
|
@@ -22,6 +22,8 @@
|
|||||||
WebTextDir="/www/nz/s/scm/text"
|
WebTextDir="/www/nz/s/scm/text"
|
||||||
|
|
||||||
# Remove the blank lines from the top of the index.html text file
|
# Remove the blank lines from the top of the index.html text file
|
||||||
|
|
||||||
sed '1,13d' $WebTextDir/index.html-03 > $WebTextDir/index.html-04
|
sed '1,13d' $WebTextDir/index.html-03 > $WebTextDir/index.html-04
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
|
@@ -21,7 +21,10 @@
|
|||||||
|
|
||||||
WebTextDir="/www/nz/s/scm/text"
|
WebTextDir="/www/nz/s/scm/text"
|
||||||
|
|
||||||
|
echo "Remove control..."
|
||||||
|
|
||||||
# Remove the control characters from the index.html text file
|
# Remove the control characters from the index.html text file
|
||||||
|
|
||||||
cat $WebTextDir/index.html-02 | col -b -x > $WebTextDir/index.html-03
|
cat $WebTextDir/index.html-02 | col -b -x > $WebTextDir/index.html-03
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
Reference in New Issue
Block a user