Generating browsable HTML directory listing for collections (guide)

211 views
Skip to first unread message

Patrick Mulrooney

unread,
Oct 31, 2023, 3:32:29 PM10/31/23
to Discuss
Figured I would share this too. We share a lot of our data via read-only collections with folks who do not use Globus and can't set up an endpoint for various reasons. Most of this data is public so we wanted to make it easier to browse and compatible with tools like 'wget --mirror' for anyone who wants to pull it all down. Basically, we wanted to mimic directory listings.

The following Python script (not mine, way better than I would have done) will recursively generate directory listing index.html files, https://gist.github.com/glowinthedark/625eb4caeca12c5aa52778a3b4b0adb4

Then you just need to point the folks trying to access the data to the root 'index.html'

https://g-xxxxxx.xxxxxx.xxxx.data.globus.org/index.html

If your collection does require authentication this will still work they will just get taken to Globus to log in first before getting access.

You can also do this with the 'tree' command but I like the style of the Python script pages better.

Hope this helps someone.
Reply all
Reply to author
Forward
0 new messages