diff --git a/files/photos/README.md b/files/photos/README.md index 118a7ff..4bc762a 100644 --- a/files/photos/README.md +++ b/files/photos/README.md @@ -1,3 +1,9 @@ # Hyperling.com - files/photos/ -Used by `http://localhost:8080/photos` to build albums for sharing. +## index.html + +Used by `http://localhost:8080/photos` to build and show list of albums. + +## all.html + +Used by `http://localhost:8080/photos-all` to show all albums at once. diff --git a/files/photos/all/README.md b/files/photos/all/README.md deleted file mode 100644 index 6f2bbc2..0000000 --- a/files/photos/all/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Hyperling.com - files/photos/all/ - -Used by `http://localhost:8080/photos` to show all albums at once. diff --git a/pages/photos-all.sh b/pages/photos-all.sh new file mode 100755 index 0000000..68024a8 --- /dev/null +++ b/pages/photos-all.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# Alias for new All Photos feed. + +# Move to main directory. +DIR=`dirname $0` +cd $DIR/.. + +# Locations of photo scripts. +photos_all=./files/photos/all.html +photos=./pages/photos.sh + +# If the all script does not exist,call the generator and ignore its output. +if [[ ! -e $photos_all ]]; then + $photos > /dev/null +fi + +## Main ## +cat $photos_all + +exit 0 diff --git a/pages/photos.sh b/pages/photos.sh index 6bab140..b0a1706 100755 --- a/pages/photos.sh +++ b/pages/photos.sh @@ -19,7 +19,7 @@ cd $DIR/.. HELPER_DIR=./pages/helpers PHOTOS_DIR=./files/photos mainpage=$PHOTOS_DIR/index.html -allpage=$PHOTOS_DIR/all/index.html +allpage=$PHOTOS_DIR/all.html # Use the cached version if available. if [[ -e $mainpage ]]; then @@ -49,7 +49,7 @@ function start_main_page { echo -e "\t\t" >> $mainpage echo -e "\t\t