From jkosin at beta.intcomgrp.com Fri Jun 5 18:01:51 2015 Content-Type: multipart/mixed; boundary="===============1758330394659088583==" MIME-Version: 1.0 From: James Kosin To: users at lists.fedoraproject.org Subject: [Off Topic] Directory Listing to HTML Date: Tue, 18 Sep 2007 12:13:46 -0400 Message-ID: <46EFF93A.4010200@beta.intcomgrp.com> --===============1758330394659088583== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 = Anyone have a good script to generate an HTML file for a directory listing? - -James Kosin -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org = iD8DBQFG7/k6kNLDmnu1kSkRAhkoAJ96Ctt5IXWyZndtQAqoXiZuqH/TowCcD8Iy r9PJ5Kmheaq1+W7boqBmS2Q=3D =3DSQSP -----END PGP SIGNATURE----- -- = Scanned by ClamAV - http://www.clamav.net --===============1758330394659088583==-- From alex at tvtransilvania.ro Fri Jun 5 18:01:51 2015 Content-Type: multipart/mixed; boundary="===============7104488565425119323==" MIME-Version: 1.0 From: Alexandru Ciobanu To: users at lists.fedoraproject.org Subject: Re: [Off Topic] Directory Listing to HTML Date: Tue, 18 Sep 2007 20:49:43 +0300 Message-ID: <46F00FB7.1050609@tvtransilvania.ro> In-Reply-To: 46EFF93A.4010200@beta.intcomgrp.com --===============7104488565425119323== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable James Kosin wrote: > Anyone have a good script to generate an HTML file for a directory > listing? > = In what language? Here are some pieces that can get you going. You can also do this is sh, = perl, etc., with a simple loop[1]. python: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/200131 php: $file\n"; } } } closedir($dir); clearstatcache(); ?> Not tested. [1]http://en.wikipedia.org/wiki/Control_flow#Loops --===============7104488565425119323==-- From ignored_mailbox at yahoo.com.au Fri Jun 5 18:01:55 2015 Content-Type: multipart/mixed; boundary="===============6770735405438163598==" MIME-Version: 1.0 From: Tim To: users at lists.fedoraproject.org Subject: Re: [Off Topic] Directory Listing to HTML Date: Wed, 19 Sep 2007 12:12:08 +0930 Message-ID: <1190169728.2697.12.camel@localhost.localdomain> In-Reply-To: 46EFF93A.4010200@beta.intcomgrp.com --===============6770735405438163598== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On Tue, 2007-09-18 at 12:13 -0400, James Kosin wrote: > Anyone have a good script to generate an HTML file for a directory > listing? If you're using Apache, it can do that all by itself. You can even customise what it does above and below the listing. The following very simple BASH script generates a file with a listing of the current directory, vaguely similar to how Apache generates one. echo "testing

testing

" for file in * do echo "
$file
" done echo "" You could do something like that, but you'd probably want to expand on it. -- = [tim(a)bigblack ~]$ uname -ipr 2.6.22.4-65.fc7 i686 i386 Using FC 4, 5, 6 & 7, plus CentOS 5. Today, it's FC7. Don't send private replies to my address, the mailbox is ignored. I read messages from the public lists. --===============6770735405438163598==-- From cr33dog at gmail.com Fri Jun 5 18:01:57 2015 Content-Type: multipart/mixed; boundary="===============4193863227826547155==" MIME-Version: 1.0 From: Chris Mohler To: users at lists.fedoraproject.org Subject: Re: [Off Topic] Directory Listing to HTML Date: Wed, 19 Sep 2007 08:57:47 -0500 Message-ID: In-Reply-To: 46EFF93A.4010200@beta.intcomgrp.com --===============4193863227826547155== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On 9/18/07, James Kosin wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Anyone have a good script to generate an HTML file for a directory > listing? There's also autoIndex.php - I occasionally use it b/c it has thumbnail and search options. Chris --===============4193863227826547155==-- From stymar at alcatel-lucent.com Fri Jun 5 18:02:02 2015 Content-Type: multipart/mixed; boundary="===============7149084567893124780==" MIME-Version: 1.0 From: Styma, Robert E (Robert) To: users at lists.fedoraproject.org Subject: RE: [Off Topic] Directory Listing to HTML Date: Wed, 19 Sep 2007 12:07:39 -0500 Message-ID: In-Reply-To: 46EFF93A.4010200@beta.intcomgrp.com --===============7149084567893124780== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable > = > Anyone have a good script to generate an HTML file for a directory > listing? > = I use this to generate an index.html for the cartoons I have in a directory. It works in the current directory and generates an index.html file with links to all the other files. ---------------------- start ------------------------------ #!/bin/bash #set -xv dir=3D`/bin/pwd` if [ -f index.html ] then echo "remove index.html from directory $dir manually" exit 1 fi dir=3D`basename $dir` tmpfile=3D/tmp/bi$$ find . -type f -print | sed -e 's!^\./!!' -e 's! !%20!g' | sort > $tmpfile echo "" > index.html echo "" >> index.html echo "$dir" >> index.html echo "" >> index.html echo "" >> index.html echo "" >> index.html echo "

$dir

" >> index.html for i in `cat $tmpfile` do j=3D`echo "$i" | sed -e 's!%20! !g'` echo "
$j" >> index.html done rm $tmpfile echo "" >> index.html echo "" >> index.html ------------------------end ------------------------------ Bob S Phoenix, AZ --===============7149084567893124780==--