12

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

  • 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 '10 at 18:55
  • Thanks! That helps a lot. I can get the concept from your script. – TusharG Jul 22 '10 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 '15 at 17:07
27

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

tree -H baseHREF
  • 6
    I learn something new everyday here. – steve.lippert Jul 22 '10 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 '10 at 2:53
  • Unfortunately this isn't available on the Windows tree command I have. – jamiebarrow Aug 4 '11 at 7:56
  • 2
    @jamiebarrow: The question is tagged linux. – Dennis Williamson Aug 7 '11 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. – Dennis Williamson Aug 11 '11 at 22:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.