3 #########################################################################
4 # This program is free software: you can redistribute it and/or modify #
5 # it under the terms of the version 3 of the GNU General Public License #
6 # as published by the Free Software Foundation. #
8 # This program is distributed in the hope that it will be useful, but #
9 # WITHOUT ANY WARRANTY; without even the implied warranty of #
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU #
11 # General Public License for more details. #
13 # You should have received a copy of the GNU General Public License #
14 # along with this program. If not, see <http://www.gnu.org/licenses/>. #
16 # Written by and Copyright (C) Francois Fleuret #
17 # Contact <francois@fleuret.org> for comments & bug reports #
18 #########################################################################
25 ## Header ############################################################
28 <?xml version="1.0" encoding="utf-8"?>
29 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
31 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
34 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
42 ## Body ##############################################################
44 echo "<h1>Directory content</h1>"
50 for d in $(find . -maxdepth 1 -type d -name "[^.]?*" | sort); do
51 echo "<a href=\"${d}\">${d}</a>"
53 # most_recent=$(find ${d} -type f -exec stat --printf="%Y %n\n" '{}' \; | sort | tail -1 | awk '{print $4}')
55 # if [[ ${most_recent} ]]; then
56 # date=$(date -r ${most_recent})
58 # date=$(date -r ${d})
61 # echo "${date} <a href=\"${d}\">${d}</a>"
68 ## Footer ############################################################
76 ######################################################################