I've made two scripts to generate index pages (html or bbcode).
HTML:
Code: Select all
#!/bin/sh
#by puppy_apprentice
IFS=','
echo "<!DOCTYPE html><html><head><meta charset-"UTF-8"><title>Java Apps</title></head><body>Last update: $(date)<hr>"
while read -r line || [ -n "$line" ]
do
array=($line)
category=${array[0]}
name=${array[1]}
link=${array[2]}
if [[ $categories != *"$category"* ]]; then
categories+="$category,"
fi
declare table_body_$category+="<tr><td><a href=\"$link\">$name</a></td>"
done < $1
for cat in $categories
do
temp=table_body_$cat
echo "<table border=\"0\"><caption style=\"text-align: left;font-weight: bold\">$cat</caption>${!temp}</table>"
done
echo "</body></html>"
Usage:
Code: Select all
make-html.sh puppy-apprentice.csv >index.html
BBCODE:
Code: Select all
#!/bin/sh
#by puppy_apprentice
IFS=','
bbcode="[u]Last update: $(date)[/u]\n"
while read -r line || [ -n "$line" ]
do
array=($line)
category=${array[0]}
name=${array[1]}
link=${array[2]}
if [[ $categories != *"$category"* ]]; then
categories+="$category,"
fi
declare table_body_$category+="[*][url=$link]$name[/url]"
done < $1
for cat in $categories
do
temp=table_body_$cat
bbcode+="[b]$cat[/b][list=1]${!temp}[/list]"
done
echo -e $bbcode | xclip -selection clipboard
Usage:
It will copy bbcode to clipboard.

- bbcode_output.png (15.36 KiB) Viewed 7284 times
And puppy-apprentice.csv looks like this:
Code: Select all
Editor,Arachnophilia,https://forum.puppylinux.com/viewtopic.php?p=21632#p21632
Entertainment,CrosswordEditor,https://forum.puppylinux.com/viewtopic.php?p=22457#p22457
Graphics,FidoCadJ,https://forum.puppylinux.com/viewtopic.php?p=22457#p22457
Entertainment,HoDoKu,https://forum.puppylinux.com/viewtopic.php?p=22457#p22457
Music,Jalmus,https://forum.puppylinux.com/viewtopic.php?p=24281#p24281
Music,JavaMod,https://forum.puppylinux.com/viewtopic.php?p=21632#p21632
Music,JavaTunes,https://forum.puppylinux.com/viewtopic.php?p=21632#p21632
Emulator,JPC,https://forum.puppylinux.com/viewtopic.php?p=22474#p22474
Graphics,SlowQR,https://forum.puppylinux.com/viewtopic.php?p=22474#p22474
Graphics,TTFEdit,https://forum.puppylinux.com/viewtopic.php?p=22474#p22474
Music,aTunes,https://forum.puppylinux.com/viewtopic.php?p=22529#p22529
Music,Jajuk,https://forum.puppylinux.com/viewtopic.php?p=22529#p22529
Music,Jukes,https://forum.puppylinux.com/viewtopic.php?p=22529#p22529
Now every volunteer of this topic have to make own csv file and send it to me 