Update 2023-11-03 13:48:17

This commit is contained in:
c0dev0id 2023-11-03 13:48:18 +01:00
parent 6603818525
commit cf4a147140
2 changed files with 13 additions and 3 deletions

View File

@ -20,8 +20,13 @@ EOF
# print list
ls -r1 *.ps *.pm *.ph *.pa *.pt 2>/dev/null | fgrep '.draft.' | while read line
do
TITLE="$(echo "${line%%.*}" | tr '_' ' ')"
URI="posts/${line%.*}.html"
if [ $(echo "${line##*.}") == "pm" ]
then
TITLE="$(head -1 "$line" | sed 's/^# //g')"
else
TITLE="$(echo "${line%%.*}" | tr '_' ' ')"
fi
URI="posts/${line%%.*}.html"
cat <<EOF
<li>

View File

@ -20,7 +20,12 @@ EOF
# print list
ls -r1 *.ps *.pm *.ph *.pa *.pt 2>/dev/null | fgrep -v '.draft.' | while read line
do
TITLE="$(echo "${line%%.*}" | tr '_' ' ')"
if [ $(echo "${line##*.}") == "pm" ]
then
TITLE="$(head -1 "$line" | sed 's/^# //g')"
else
TITLE="$(echo "${line%%.*}" | tr '_' ' ')"
fi
URI="posts/${line%%.*}.html"
cat <<EOF