homeisfar / LinuxDir2HTML

Other
86 stars 17 forks source link

Relative / base paths option #9

Open andy-pi opened 1 year ago

andy-pi commented 1 year ago

Thanks for making this. I found it whilst searching for a linux replacement for my windows dir2html. My use case is to use as an index for files in an s3 bucket, but I generate the file locally. Windows dir2html had an option to create relative paths, so that the html links would work wherever they were ultimately placed on the filesystem or internet. I tried just a find and replace on the output html but didn't work for some reason, and I couldn't see an easy way to change it in the source code. Is this something you might implement?

homeisfar commented 1 year ago

Are you saying something like this:

Your pwd is /home/localcomputer/BunchOfFiles/ and you create the html output into this directory. So the expected file links are ./file1 ./file2 instead of /home/localcomputer/BunchOfFiles/file1.

Therefore, you can now transfer BunchOfFiles/ to another destination and reuse the links. Am I understanding correctly?

andy-pi commented 1 year ago

yeah exactly. I want to generate something on my local filesystem and then upload it to s3. Would be amazing if this is possible!