Package: linuxdir2html
LinuxDir2HTMLLinuxDir2HTML is a small program to help create an offline manifest of your files in an easily navigable html format. It is a CLI-only clone ofSnap2HTML. LinuxDir2HTML is a rewrite ofDiogenesList, making significant improvements to it:Python 3.6+Doesn't fail on symlinks (symlinks are optional)More graceful invocation and sane usageMuch, much, much fasterHighly improved codeLinuxDir2HTML will produce essentially an identical output to Snap2HTML by using the same HTML template from that project.InstallationPython PIP InstallLinuxpython -m pip install --user --upgrade linuxdir2htmlmacOSpython3 -m pip install --user --upgrade linuxdir2htmlAdd the --upgrade flag to install or upgrade.Basic InstallThere are no external dependencies. If you do not wish to use pip, downloadlinuxdir2html.pyandtemplate.html. Run the python script directly.UsageThe program takes two mandatory arguments, the directory to be indexed and the output file name without the extension. So:linuxdir2html ~/Pictures outputwill index the contents of/home/username/Picturesand save the index asoutput.htmlin the present working directory.Extra optionsThere are five optional flags:--hiddento include hidden files and directories.--linksto make the HTML link to the files directly.--symlinkto follow symlinks. This flag is dangerous (circular references).--silentto suppress output. Good for scripting. Still prints errors.--verboseextra terminal output. Does not affect the results.You should only enable the symlink flag if you have a known need for it.By user request, newly introduced in v1.4.0 are a stacking--startswithand--childparameters. For example,linuxdir2html --startswith 'dev' --child 'Pictures' ~ ~/outputwill select directories that start with 'dev' and the directory named 'Pictures' from the the user's home directory. The--startswithfilter only affects the root search directory, all subdirectories and files will be indexed. The hidden flag is usable with the startswith flag.LicenseThe LinuxDir2HTML.py file is licensed under GPLv2.The template.html file Copyright (C) by Dan and is licensed as GPLv3.Known IssueFiles with * in their names will not break the html output, but it may cause issues with the --links feature, and truncate the file names and cause minor metadata issues.See this issue for more information.NotesThere are no plans to implement a GUI.The up-to-date template uses epoch time and converts to your locale. If you'd like to change this behavior, update the JS functiontimestampToDatein the template.Certain characters like\nI've chosen to not implement handling for. In my humble opinion, just don't use new lines in file names :)LinuxDir2HTML requires Python 3.6 or greater, but if you modify the code to remove string interpolation and the barely used pathlib, the minimum required version will be much lower.Similar programsI have long used an excellent program calledncduto perform a similar function to WinDirStat or Disk Inventory X. I recently learned it has an export feature which you may find useful. Consider using it!Export a directory and browse it once scanning is done:ncdu -o- ~/book | tee ~/ncduscan.file | ncdu -f-Browse the contents of the file, without rescanning:ncdu -f ~/ncduscan.file