{"id":17806415,"url":"https://github.com/homeisfar/LinuxDir2HTML","last_synced_at":"2025-03-17T13:31:09.268Z","repository":{"id":45553750,"uuid":"281811484","full_name":"homeisfar/LinuxDir2HTML","owner":"homeisfar","description":null,"archived":false,"fork":false,"pushed_at":"2023-05-24T21:26:23.000Z","size":216,"stargazers_count":94,"open_issues_count":10,"forks_count":18,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-21T05:17:05.646Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/homeisfar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-07-23T00:26:48.000Z","updated_at":"2025-02-17T06:20:44.000Z","dependencies_parsed_at":"2023-01-29T01:30:26.813Z","dependency_job_id":null,"html_url":"https://github.com/homeisfar/LinuxDir2HTML","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/homeisfar%2FLinuxDir2HTML","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/homeisfar%2FLinuxDir2HTML/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/homeisfar%2FLinuxDir2HTML/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/homeisfar%2FLinuxDir2HTML/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/homeisfar","download_url":"https://codeload.github.com/homeisfar/LinuxDir2HTML/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244041459,"owners_count":20388242,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-27T14:00:25.945Z","updated_at":"2025-03-17T13:31:09.257Z","avatar_url":"https://github.com/homeisfar.png","language":"HTML","funding_links":[],"categories":["Other"],"sub_categories":["Desktop Applications"],"readme":"# LinuxDir2HTML\n\nLinuxDir2HTML 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 of [Snap2HTML](https://www.rlvision.com/snap2html/). LinuxDir2HTML is a rewrite of [DiogenesList](https://github.com/ZapperDJ/DiogenesList), making significant improvements to it:\n\n- Python 3.6+\n- Doesn't fail on symlinks (symlinks are optional)\n- More graceful invocation and sane usage\n- Much, much, much faster\n- Highly improved code\n\nLinuxDir2HTML will produce essentially an identical output to Snap2HTML by using the same HTML template from that project.\n\n## Known Issue\nCurrently any files with an astrisk character (\\*) will interfere with the results and cause subtle errors in the output. Files with that character in the name are uncommon since they're invalid in Windows, but it's still an issue in Linux. The fix will involve rewriting the data format from a custom one to something more standard like JSON. See the following [issue](https://github.com/homeisfar/LinuxDir2HTML/issues/8) for more.\n\n## Installation\n### Python PIP Install\nLinux\n\n    python -m pip install --user --upgrade linuxdir2html\n\nmacOS\n\n    python3 -m pip install --user --upgrade linuxdir2html\n\nAdd the --upgrade flag to install or upgrade.\n### Basic Install\nThere are no external dependencies. If you do not wish to use pip, download `linuxdir2html.py` and `template.html` directly from this repo and run the python script directly.\n\n## Usage\nThe program takes two mandatory arguments, the directory to be indexed and the output file name without the extension. So:\n\n    linuxdir2html ~/Pictures output\n \nwill index the contents of `/home/username/Pictures` and save the index as `output.html` in the present working directory.\n\n### Extra options\n\nThere are five optional flags:\n\n`--hidden` to include hidden files and directories.  \n`--links` to make the HTML link to the files directly.  \n`--symlink` to follow symlinks. This flag is dangerous (can cause circular references).  \n`--silent` to suppress output. Good for scripting. Still prints errors.  \n`--verbose` extra terminal output. Does not affect the results.\n\nYou should only enable the symlink flag if you have a known need for it.\n\nBy user request, newly introduced in v1.4.0 are a stacking `--startswith` and `--child` parameters. For example,\n\n    linuxdir2html --startswith 'dev' --child 'Pictures' ~ ~/output\n\nwill select directories that start with 'dev' and the directory named 'Pictures' from the the user's home directory. The `--startswith` filter only affects the root search directory, all subdirectories and files will be indexed. The hidden flag is usable with the startswith flag.\n\n\n## License\nThe LinuxDir2HTML.py file is licensed under GPLv2.\n\nThe template.html file Copyright (C) by Dan and is licensed as GPLv3.\n\n## Notes\n- There are no plans to implement a GUI.\n- The up-to-date template uses epoch time and converts to your locale. If you'd like to change this behavior, update the JS function `timestampToDate` in the template.\n- Certain characters like `\\n` I've chosen to not implement handling for. In my humble opinion, just don't use new lines in file names :) *Update 2023: This may be resolved when I do the JSON rewrite*\n- 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.\n\n## Similar programs\n\nI have long used an excellent program called [ncdu](https://dev.yorhel.nl/ncdu/man) to 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!\n\nExport a directory and browse it once scanning is done:\n\n    ncdu -o- ~/book | tee ~/ncduscan.file | ncdu -f-\n\nBrowse the contents of the file, without rescanning:\n\n    ncdu -f ~/ncduscan.file\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhomeisfar%2FLinuxDir2HTML","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhomeisfar%2FLinuxDir2HTML","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhomeisfar%2FLinuxDir2HTML/lists"}