@ -34,9 +34,10 @@ usage() {
printf "\t-h: prints this message\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-n [string]: Set the title of the atom feed"
printf "\t-d [string]: Set the description of the atom feed"
printf "\t-m [number]: Set the max number of elements in 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\n"
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-e: Do not prepend _header.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'
blog_title = 'Atom feed'
blog_desc = ''
blog_nmax = '3 '
blog_nmax = '0 '
while getopts 'o:vhelfsrup:n:d:m:' c
do
case " $c " in
@ -244,8 +245,10 @@ EOF
count = '0'
while IFS = "" read -r line; do
count = $(( count + 1 ))
if [ $count -gt " $blog_nmax " ] ; then
break
if [ " $blog_nmax " -gt '0' ] ; then
if [ $count -gt " $blog_nmax " ] ; then
break
fi
fi
tfile = " $( awk " NR== $count " " $objlist " ) "
title = " $( sed -E -n 's/.*<title>\s*(.+)\s*<\/title>.*/\1/p' " $tfile " ) "