Skip to content

Latest commit

 

History

History
34 lines (27 loc) · 2.34 KB

README.md

File metadata and controls

34 lines (27 loc) · 2.34 KB

Indexer

Indexer is a Python script that generates an .html index of files within a selected directory. You can start from the current directory or from folder passed as first positional argument. Optionally filter by file types with --filter "*.py". This script is an hodgepodge of older scripts collected & built over the years.

Prerequisites:

  • This script requires you to have Python > 3.x.x installed on your system.
  • Ideally use the current build of Python 3.10 (significantly faster processing on larger directories! 🏃)

Usage

python3 indexer.py /top_dir

Positional arguments:

  • top_dir: top folder from which to start generating indexes (uses current working directory/folder if not specified).

Optional arguments:

  • -h, --help: show help message (along with available options)
  • -f, --filter: only include files matching glob (i.e.indexer.py --filter '\**/*.jpg'*).
  • -o filename, --output-file filename: Custom output file (by default generates "index.html")
  • -r, --recursive: recursively process nested folders/directories (Off/False by default).
  • -v, --verbose: verbosely list every processed file. (NOTE: will take longer time with complex file tree structures on slow terminals.)

Features:

  • File Size & Modified Time display for each file.
  • Create a custom output file (by default index.html is generated).
  • Ability to match/filter specified parameters using glob ('*/.jpg' & '*/.UFD').

Contact

  • Email: josh [dot] brunty [at] marshall [dot] edu
  • Follow @joshbrunty on Twitter Twitter Follow
  • Indexer is Open Source via the MIT License (MIT): SysScout is Open Source via MIT License