@ -34,9 +34,10 @@ usage() {
printf "\t-h: prints this message\n"
printf "\t-h: prints this message\n"
printf "\t-o [destdir]: specifies the output direcotory to be [destdir]\n"
printf "\t-o [destdir]: specifies the output direcotory to be [destdir]\n"
printf "\t-p [string]: Rename the \"Pages\" section to [string]\n"
printf "\t-p [string]: Rename the \"Pages\" section to [string]\n"
printf "\t-n [string]: Set the title of the atom feed"
printf "\t-n [string]: Set the title of the atom feed\n"
printf "\t-d [string]: Set the description of the atom feed"
printf "\t-d [string]: Set the description of the atom feed\n"
printf "\t-m [number]: Set the max number of elements in the atom feed"
printf " \t-m [number]: Set the max number of elements in the atom feed,
0 to include all files\n "
printf "\t-v: Makes the script verbose\n"
printf "\t-v: Makes the script verbose\n"
printf "\t-e: Do not prepend _header.html to .html files\n"
printf "\t-e: Do not prepend _header.html to .html files\n"
printf "\t-f: Do not prepend _footer.html to .html files\n"
printf "\t-f: Do not prepend _footer.html to .html files\n"
@ -71,7 +72,7 @@ prefix='https'
linksec = 'Pages'
linksec = 'Pages'
blog_title = 'Atom feed'
blog_title = 'Atom feed'
blog_desc = ''
blog_desc = ''
blog_nmax = '3 '
blog_nmax = '0 '
while getopts 'o:vhelfsrup:n:d:m:' c
while getopts 'o:vhelfsrup:n:d:m:' c
do
do
case " $c " in
case " $c " in
@ -244,9 +245,11 @@ EOF
count = '0'
count = '0'
while IFS = "" read -r line; do
while IFS = "" read -r line; do
count = $(( count + 1 ))
count = $(( count + 1 ))
if [ " $blog_nmax " -gt '0' ] ; then
if [ $count -gt " $blog_nmax " ] ; then
if [ $count -gt " $blog_nmax " ] ; then
break
break
fi
fi
fi
tfile = " $( awk " NR== $count " " $objlist " ) "
tfile = " $( awk " NR== $count " " $objlist " ) "
title = " $( sed -E -n 's/.*<title>\s*(.+)\s*<\/title>.*/\1/p' " $tfile " ) "
title = " $( sed -E -n 's/.*<title>\s*(.+)\s*<\/title>.*/\1/p' " $tfile " ) "
if [ -z " $title " ] ; then
if [ -z " $title " ] ; then