Skip to main content

The best library for viewing files over multiple languages.

Project description

โœจ fileShow (fshow) ๐Ÿ“‚

Python Version License: MIT Made with Rich

DirFileShow (fshow) is a command-line file browser and viewer featuring a rich terminal interface powered by the rich library. It provides an enhanced alternative to standard commands like ls, cat, and dir for navigating directories and previewing file contents.


๐ŸŒŸ Features

  • Interactive Navigation: Browse directories using arrow keys, open files or enter directories with Enter. Navigate up to the parent directory easily.
  • Rich Terminal Interface: Utilizes rich for clear presentation using tables, panels, and syntax highlighting.
  • File Preview:
    • Displays text-based files with automatic syntax highlighting (Python ๐Ÿ, JSON, Markdown ๐Ÿ“, etc.).
    • Renders Markdown files directly in the terminal.
    • Provides a hexadecimal view ๐Ÿ‘พ for binary files.
    • Option to open non-text files (e.g., images ๐Ÿ–ผ๏ธ) using the system's default application.
  • Detailed Information: Shows file metadata including size, modification date, MIME type, permissions, and calculates MD5/SHA1/SHA256 hashes ๐Ÿ”.
  • Directory Statistics: Analyzes directory contents to display total size, item counts, size distribution by file extension, and lists the largest files ๐Ÿ“Š.
  • Integrated Search: Recursively search for files and directories by name within the current path ๐Ÿ•ต๏ธโ€โ™€๏ธ.
  • Customization:
    • Selectable color themes ๐ŸŽจ for syntax highlighting.
    • Toggle visibility of hidden files (.dotfiles) ๐Ÿ‘๏ธ.
    • Sort directory listings by name, type, size, or modification date (ascending/descending) โ‡….
  • File Type Icons: Uses Unicode icons (e.g., ๐Ÿ“, ๐Ÿ“„, ๐Ÿ, ๐ŸŽต, ๐ŸŽฌ, ๐Ÿ“ฆ) for quick identification.
  • Pagination: Handles large directories by displaying content in pages ๐Ÿ“–.
  • Cross-Platform: Compatible with Linux ๐Ÿง, macOS ๐ŸŽ, and Windows ๐ŸชŸ.

๐Ÿš€ Installation

  1. Prerequisites: Requires Python 3.x ๐Ÿ.
  2. Obtain the script: Download the fshow.py file.
  3. Install dependencies: The primary dependency is rich.
    pip install rich
    
    (Using a virtual environment is recommended: python -m venv venv && source venv/bin/activate)
  4. (Optional) Make globally accessible:
    • Ensure the script is executable: chmod +x fshow.py.
    • Move fshow.py to a directory in your system's PATH, renaming it to fshow:
      mv fshow.py ~/.local/bin/fshow
      # Ensure ~/.local/bin is in your PATH environment variable
      

๐Ÿ› ๏ธ Usage

If installed globally (step 4 above), invoke using:

Enter a Folder with fshow:

fshow ([FOLDER PATH])

View a File:

fshow --file [FILE PATH]

Enter fshow menu's:

fshow

Key Action

  • โ†‘ / โ†“ Navigate list entries
  • โ† / โ†’ Navigate pages (for long listings)
  • Enter Enter selected directory / Preview selected file
  • Select .. + Enter Go to parent directory
  • Tab Access context menu (Statistics, Hex View, etc.)
  • / Initiate search within the current directory
  • h Toggle visibility of hidden files
  • s Change sorting criteria (name, type, size, date)
  • r Refresh the current view
  • f Toggle favorite status (basic implementation)โญ
  • q Quit DirFileShow (fshow)

โš™๏ธ Configuration

Default settings (theme, hidden file visibility, sort order) are defined in the CONFIG dictionary at the beginning of the fshow.py script. These can be modified directly in the source file.

CONFIG = {
    "theme": "monokai",
    "show_hidden": False,
    "sort_by": "name",
    "reverse_sort": False,
    # ... other settings
}

๐Ÿ“ฆ Dependencies

  • Python 3.x
  • Rich library (pip install rich)

๐Ÿ™ Contributing

Contributions are welcome. Please follow standard practices such as:

  1. Forking the repository (if applicable).
  2. Creating feature branches (git checkout -b feature/YourFeature).
  3. Committing changes (git commit -m 'Add YourFeature').
  4. Pushing to the branch (git push origin feature/YourFeature).
  5. Opening a Pull Request. Alternatively, open an issue to report bugs or suggest features.

๐Ÿ“œ License

This project is distributed under the MIT License (confirm or specify actual license).

๐ŸŒŸ Github ๐ŸŒŸ

https://github.com/Dimitri-Blanchard/fshow/

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

fshow-0.1.0.tar.gz (15.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fshow-0.1.0-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file fshow-0.1.0.tar.gz.

File metadata

  • Download URL: fshow-0.1.0.tar.gz
  • Upload date:
  • Size: 15.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for fshow-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d0a2321151fd82d5febb00f3ced9661b678645d1c033e0f34b96e5e126318538
MD5 f9f0e41bc8639836f88bd7f0fc82b84b
BLAKE2b-256 2a484a1116791b58249cbb7b0976d7710c5f361e2d636bd6f77a3b020778ffd9

See more details on using hashes here.

File details

Details for the file fshow-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: fshow-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 13.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for fshow-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 274d2b2d1101129cdcf743f07d83419bacd9bb4194fb927369926c63802e2161
MD5 d9aeab6c8d3bf3f6093c69698cf71c00
BLAKE2b-256 c5c663d6bee8784914fe3c178d991bab2b58637551b3f65e39eeff49bec513e2

See more details on using hashes here.

Supported by

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