A cross-platform file sorting program

Overview

Cabinet

Cross-platform file sorting system that sorts files based on their attributes, such as file type, file name and date modified.

Disclaimer: Note that features may be added, revised, or removed at any time as this is in active development


In future, options to do things like renaming and deleting a bunch of files may be implemented, though that is not a priority.

Currently implemented:

  • Sort by file type
  • Sort by date modified
  • Sort by file name
  • Sort by file size
  • Load commands from a config or task file

Installation

Clone the repository

git clone https://github.com/rayokamoto/cabinet
cd cabinet

Build with cargo

cargo build --release

Usage

cab <command> [<options>] <path>

More in-depth information is available in the features documentation.

Commands

  • type - Sort by file type (e.g. .jpg, .png, .pdf, etc.)
  • date - Sort by date modified (before or after given date in YYYY-MM-DD format)
  • name - Sort by name of file (by whether given pattern is in the name or not)
  • size - Sort by size of file in KB (by whether file is smaller or larger than given size)

There are two options for sorting files: absolute path and path templates:

Using absolute paths

Use -p or --path to use absolute or relative paths. This option is used by default. Note that if the directory that you are sorting is in the same directory as cab, then you can just use relative paths.

cab type -p "C:\Users\User\Downloads"
cab type -p "/home/User/Downloads"

No flags provided will default to absolute path:

cab type "C:\Users\User\Downloads"
cab type "/home/User/Downloads"

Using templates

With templates, you can sort directories quickly. Invoke using the -t or --template option:

cab type -t downloads

Currently, the following templates are available:

  • Documents
  • Downloads
  • Desktop
  • Home directory (e.g. C:\Users\User\ or /home/User/)
  • Music (or Audio)
  • Pictures
  • Videos (or Movies)

Testing

For testing, such as generating test files to sort, Python is used. Python 3.7+ is recommended.

You might also like...
Cross-platform Rust library for coloring and formatting terminal output
Cross-platform Rust library for coloring and formatting terminal output

Coloring terminal output Documentation term-painter is a cross-platform (i.e. also non-ANSI terminals) Rust library for coloring and formatting termin

Cross platform terminal library rust
Cross platform terminal library rust

Cross-platform Terminal Manipulation Library Crossterm is a pure-rust, terminal manipulation library that makes it possible to write cross-platform te

A cross platform minimalistic text user interface
A cross platform minimalistic text user interface

titik Titik is a crossplatform TUI widget library with the goal of being able to interact intuitively on these widgets. It uses crossterm as the under

Alacritty - A fast, cross-platform, OpenGL terminal emulator
Alacritty - A fast, cross-platform, OpenGL terminal emulator

Alacritty is a modern terminal emulator that comes with sensible defaults, but allows for extensive configuration. By integrating with other applications, rather than reimplementing their functionality, it manages to provide a flexible set of features with high performance. The supported platforms currently consist of BSD, Linux, macOS and Windows.

A cross-platform graphical process/system monitor with a customizable interface and a multitude of features
A cross-platform graphical process/system monitor with a customizable interface and a multitude of features

A cross-platform graphical process/system monitor with a customizable interface and a multitude of features. Supports Linux, macOS, and Windows. Inspired by both gtop and gotop.

Cross-platform terminal screen clearing library

ClearScreen Cross-platform terminal screen clearing library. API documentation. Dual-licensed with Apache 2.0 and MIT. Uses Caretaker Maintainership.

📺(tv) Tidy Viewer is a cross-platform CLI csv pretty printer that uses column styling to maximize viewer enjoyment.
📺(tv) Tidy Viewer is a cross-platform CLI csv pretty printer that uses column styling to maximize viewer enjoyment.

📺(tv) Tidy Viewer is a cross-platform CLI csv pretty printer that uses column styling to maximize viewer enjoyment.

Native cross-platform full feature terminal-based sequence editor for git interactive rebase.
Native cross-platform full feature terminal-based sequence editor for git interactive rebase.

Native cross-platform full feature terminal-based sequence editor for git interactive rebase.

Cross-platform Rust rewrite of the GNU coreutils
Cross-platform Rust rewrite of the GNU coreutils

Cross-platform Rust rewrite of the GNU coreutils

Comments
  • v0.4.0: Use clap for command-line parsing and other changes

    v0.4.0: Use clap for command-line parsing and other changes

    v0.4.0 changes:

    • Use clap for command-line parsing
    • Removed superfluous -p and --path flags
    • Bug fix: don't unwrap on None (commands/size.rs)
    • Update documentation to reflect the new changes
    bug documentation refactor 
    opened by rayokamoto 0
  • Feature 0.3.0

    Feature 0.3.0

    Instead of only being able to provide one option (e.g. only min size instead of both min and max file size) for sorting, multiple can now be provided:

    • Sort files by size by specifying minimum size, maximum size, or both
    • Sort files by date [modified] by specifying before date, after date, or both
    • Sort files by name by specifying text to include, text to exclude, or both
    enhancement 
    opened by rayokamoto 0
Owner
Ray
Ray
Human numeric sorting program — does what `sort -h` is supposed to do!

hns — Human Numeric Sort v0.1.0 (⏫︎2022-09-20) © 2022 Fredrick R. Brennan and hns Authors Apache 2.0 licensed, see LICENSE. man page Packages hns_0.1.

Fredrick Brennan 7 Sep 25, 2022
That program use on platform windows. And if you write any text on uncorrect keyboard layout, that program for that.

?? This program is designed to translate text into the correct layout when typing is incorrect. ?? Example ghbdtn -> привет Just (by default) pressing

Gest Se 5 Jan 26, 2023
Learning rust by coding different sorting algorithms in it

Sorting in Rust Sorting a 32 bit unsigned integer vector by using: Radix Sort Quick Sort Merge Sort Bubble Sort Inbuilt Sort (Probably Tim Sort) This

Pulak Malhotra 1 Nov 28, 2021
A Rust implementation of Glidesort, my stable adaptive quicksort/mergesort hybrid sorting algorithm.

Glidesort Glidesort is a novel stable sorting algorithm that combines the best-case behavior of Timsort-style merge sorts for pre-sorted data with the

Orson Peters 1.4k Apr 22, 2023
Cross-platform terminal program to download IEEE journals

IEEE Journal Downloader A cross-platform terminal program which tries to download every article in a specified journal and merge the documents into on

Fong Chien Yoong 18 Jul 23, 2022
Cross-platform file sharig application for desktop and mobile devices

Skylite Description Getting Started Dependencies Installing Executing program License Acknowledgments Description Cross platform file sharing applicat

Adeoye Adefemi 5 Nov 16, 2023
Simple, cross-platform GameMaker lib for getting file metadata

File Metadata Tiny baby library for getting file metadata. Originally written to work for a GameMaker game a friend is creating. Table of Contents Ins

SpikeHD 3 Nov 28, 2023
Rust File Management CLI is a command-line tool written in Rust that provides essential file management functionalities. Whether you're working with files or directories, this tool simplifies common file operations with ease.

Rust FileOps Rust File Management CLI is a command-line tool written in Rust that provides essential file management functionalities. Whether you're w

Harikesh Ranjan Sinha 5 May 2, 2024
A simple program for C program IO testing. Written in Rust

A simple program for C program IO testing. Written in Rust, using concurrency to speed up valgrind testing. Make sure to update settings at your first run of the program!

null 1 Feb 22, 2022
A simple command line program to upload file or directory to web3.storage with optional encryption and compression

w3s-cli A simple command line program to upload file or directory to web3.storage with optional encryption and compression. Features Uploads single fi

qdwang 5 Oct 22, 2022