Skip to main content

HTML directory listing

Project description

LinuxDir2HTML

LinuxDir2HTML 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. LinuxDir2HTML is based on DiogenesList, but makes significant improvements to it.

  • Python 3.6+
  • Doesn't fail on symlinks (symlinks are ignored)
  • More graceful invocation and sane usage
  • Much, much, much faster
  • Highly improved code

This program will produce essentially an identical output to Snap2HTML - using the same template from that project.

Installation

Python PIP

Linux

python -m pip install --user linuxdir2html

macOS

python3 -m pip install --user linuxdir2html

Basic

Just download this repository and run the Python file directly.

Usage

The program takes two mandatory arguments, the directory to be indexed and the output file name without the extension. So:

linuxdir2html ~/Pictures output

will index the contents of /home/Pictures and save the index as output.HTML in the present working directory.

There are two optional flags. --hidden to include hidden files and directories, and --links to make the HTML link to the files.

Note LinuxDir2HTML requires Python 3.6 or greater, but if you modify the Python to remove string interpolation and the barely used pathlib, the minimum version will be much lower.

License

The LinuxDir2HTML.py file is licensed under GPLv2.

The template.html file Copyright (C) by Dan and is licensed as GPLv3.

Issues (Wishlist)

Nice. I did everything I set out to do. These are all fixed/improved:

[X] The original Python code was not well-implemented. I've made essentially the minimum efforts needed to improve upon it, but have plans to continue making improvements, but no timeline to do so.

[X] The template HTML is based on an old version, and I'd like to update the output to use the latest available version from Snap2HTML. This will improve the search functionality, among other things.

[X] File links in the HTML are not implemented.

[X] I'd also like to include an option to ignore hidden files.

[X] There are no plans to implement a GUI.

[X] 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

linuxdir2html-1.3.0.tar.gz (84.6 kB view details)

Uploaded Source

Built Distribution

linuxdir2html-1.3.0-py3-none-any.whl (84.1 kB view details)

Uploaded Python 3

File details

Details for the file linuxdir2html-1.3.0.tar.gz.

File metadata

  • Download URL: linuxdir2html-1.3.0.tar.gz
  • Upload date:
  • Size: 84.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.3

File hashes

Hashes for linuxdir2html-1.3.0.tar.gz
Algorithm Hash digest
SHA256 7c68ac8bc54891b69d4e8c386291ee501c635195a701a2a5f7e3655c355c4f94
MD5 6d9d1f801826d8f2af5cd42957a08f1e
BLAKE2b-256 89bea91e76b96b6246fa47696623b26619de592657cb9cd422253f4dd8948187

See more details on using hashes here.

File details

Details for the file linuxdir2html-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: linuxdir2html-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 84.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.3

File hashes

Hashes for linuxdir2html-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ab37ca4993fb73a53fa6e65546222f704bf9573f2b9c64087d305d5a046dc074
MD5 f57d7266124117230733298870d1cf28
BLAKE2b-256 b8ebe3a36d9f6881968173a259920506645b228fd5034309b7fafc548c701de9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page