14

does any one knows a linux based program/script that can generate html files based on directory structure?

3
  • I made my own in python to index my Dropbox public folder. It wasn't very hard. (dl.dropbox.com/u/2502059/index.html if you want to see. The script that generated it is makeIndex2.py under /Python Scripts.)
    – Phoshi
    Jul 22, 2010 at 18:55
  • Thanks! That helps a lot. I can get the concept from your script.
    – TusharG
    Jul 22, 2010 at 20:05
  • @Phoshi, someone noted in a soon/now deleted answer: "makeIndex2.py doesnt work because it uses a reserved word with that cannot be used in the way the script was written". That said, maybe you can post the script as an answer here? Links go dead.
    – Arjan
    Aug 23, 2015 at 17:07

1 Answer 1

33

Some versions of tree, which is a common utility, can produce HTML output.

tree -H baseHREF
9
  • 7
    I learn something new everyday here. Jul 22, 2010 at 21:05
  • Hey Dennis Thanks a lot. Your answer is closest and easiest to deploy. I wasn't aware tree command is so powerful.
    – TusharG
    Jul 23, 2010 at 2:53
  • Unfortunately this isn't available on the Windows tree command I have. Aug 4, 2011 at 7:56
  • 2
    @jamiebarrow: The question is tagged linux. Aug 7, 2011 at 3:06
  • 1
    @jamiebarrow: Windows includes its own tree command. If you also have a GNU version, you should be able to upgrade to a version that supports -H. Aug 11, 2011 at 22:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .