The best library for viewing files over multiple languages.
Project description
โจ fileShow (fshow) ๐
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
richfor 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
- Prerequisites: Requires Python 3.x ๐.
- Obtain the script: Download the
fshow.pyfile. - Install dependencies: The primary dependency is
rich.pip install rich
(Using a virtual environment is recommended:python -m venv venv && source venv/bin/activate) - (Optional) Make globally accessible:
- Ensure the script is executable:
chmod +x fshow.py. - Move
fshow.pyto a directory in your system'sPATH, renaming it tofshow:mv fshow.py ~/.local/bin/fshow # Ensure ~/.local/bin is in your PATH environment variable
- Ensure the script is executable:
๐ ๏ธ 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)EnterEnter selected directory / Preview selected file- Select
..+EnterGo to parent directory TabAccess context menu (Statistics, Hex View, etc.)/Initiate search within the current directoryhToggle visibility of hidden filessChange sorting criteria (name, type, size, date)rRefresh the current viewfToggle favorite status (basic implementation)โญqQuit 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:
- Forking the repository (if applicable).
- Creating feature branches (git checkout -b feature/YourFeature).
- Committing changes (git commit -m 'Add YourFeature').
- Pushing to the branch (git push origin feature/YourFeature).
- 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 ๐
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0a2321151fd82d5febb00f3ced9661b678645d1c033e0f34b96e5e126318538
|
|
| MD5 |
f9f0e41bc8639836f88bd7f0fc82b84b
|
|
| BLAKE2b-256 |
2a484a1116791b58249cbb7b0976d7710c5f361e2d636bd6f77a3b020778ffd9
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
274d2b2d1101129cdcf743f07d83419bacd9bb4194fb927369926c63802e2161
|
|
| MD5 |
d9aeab6c8d3bf3f6093c69698cf71c00
|
|
| BLAKE2b-256 |
c5c663d6bee8784914fe3c178d991bab2b58637551b3f65e39eeff49bec513e2
|