Efficient, lightweight, configurable file organizer.

Overview

FileClassed

forthebadge forthebadge

Efficient, lightweight, configurable file organizer. This project is very simple : it takes a file in certains directories (that can be configured), then organize them, and finally moves them to one directory (that can be configured, too).

Feel free to open pull requests or issues.

Example

See before-after.txt.

How it works

The way this program organizes files could be conflicting with some normal software behaviour. Note that this doesn't keep references between files ; LaTeX code with inclusion of other files could thus need to be a little changed. FileClassed should only be used for non-IT classification. Since codes can be very easily changed, this program can be applied to a variety of domains.

Through the following document, the word shortcuts will be used several times. It isn't very clear, so I prefer explain here. The program is configured with "shortcuts", which is a pair Short string / Meaning of the string.

For exmple, fr / Français is a shortcut ; everytime the string fr is encountered alone, it will be expanded into Français.

Basic

Here's a first example of the behavior of this organizer.

Here, the program expands each part seperated by commas. mt is expanded to Mathematics, and asg to Assignments. The last two parts are never expanded : they constitute the file name.

Note that the way the parts are expanded can be configured, via the -c option when running FileClassed or the codes field in the configuration file.

No expanding

Here's a second example of the program's behavior.

Here, we suppose that the program is configured to expand emp into Empire and hst into History. We also suppose that France isn't a registered shortcut.

This is almost the same case as in the first example, but this time, a part isn't expanded. France keeps being France in the final path since it's not configured as a shortcut.

When the program cannot expand a shortcut, it uses it plain.

Variable replacement

In this example, we'll show how include shortcuts inside plain strings, or even combine shortcuts.

We suppose that fr means French, that hst means History and that emp means Empire.

Here the program tries to expand fr then hst. It succeeds, and replace {fr} by Français and {hst} by History. Like in the previous example, if FileClassed fails to expand a part, it replaces it plain. So {France} would be replaced by France, but this isn't useful, at all.

Note that it expands those variables recursively. Say, hypothetically, that we configured 1 as one and fone as Fossil number One. The file name {f{1}}.image.jpg would be expanded to {fone}.image.jpg and then Fossil number One/image.jpeg.

Installing

Here are the instructions for installation :

  • Clone this repo
  • cd in the directory
  • Run cargo build --release. The binary should be placed in target/release/fcs
  • Move it to somewhere in PATH, and running fcs --help should get you started.

Then, you should have a new program named fcs that works as stated before.

Configuring

Note that you can generate a config file by running fcs with the -g flag.

The configuration file is located to C:\Users\ \AppData\Roaming\fcs\init.yml in Windows, /home/ /.config/fcs/init.yml for Linux and BSD operation systems, and /Users/ /Library/Application Support for MacOS.

There are multiple fields, and (almost) each of them corresponds to an option or a flag of this program. Refer to fcs --help for more information about each of the options.

The dirs field / CLI option sets which directories to look for files to organize.

The dest field / CLI option sets which directory to move the files, once expanded. All organized files are moved to it.

The once field / CLI flag makes the program organize the files only once. By default, it organizes them, then sleep and organizes them again.

The sleep field / CLI option sets the sleep time between each loop, in milliseconds.

The static_mode field / CLI flag disables the program looking for configuration changes.

The timeinfo field / CLI flag enables file info in the path. With mt / Mathematics, the file mt.exponentiation.txt wouldn't be expanded to Mathematics/exponentiation.txt but to /Mathematics/ /exponentiation.txt .

The codes field / CLI option sets the "shortcuts".

The completion CLI option generates shell specific completion script and print it to stdout.

Note that the default values are in french, so you really should write your configuration file.

This program is free software (as stated in LICENSE), and published under the MIT license.

You might also like...
Rust crate for configurable parallel web crawling, designed to crawl for content

url-crawler A configurable parallel web crawler, designed to crawl a website for content. Changelog Docs.rs Example extern crate url_crawler; use std:

Sōzu HTTP reverse proxy, configurable at runtime, fast and safe, built in Rust. It is awesome! Ping us on gitter to know more

Sōzu · Sōzu is a lightweight, fast, always-up reverse proxy server. Why use Sōzu? Hot configurable: Sozu can receive configuration changes at runtime

Make ELF formatted apps configurable
Make ELF formatted apps configurable

elfredo `elfredo` is a library that allows you to patch executables after they were compiled. It utilize an extra embedded section to store data/confi

🚀Memory safe, blazing fast, configurable, minimal hello world written in rust(🚀) in a few lines of code with few(1092🚀) dependencies🚀
🚀Memory safe, blazing fast, configurable, minimal hello world written in rust(🚀) in a few lines of code with few(1092🚀) dependencies🚀

🚀 hello-world.rs 🚀 🚀 Memory safe, blazing fast, minimal and configurable hello world project written in the rust( 🚀 ) programming language 🚀 🚀 W

A thread pool for running multiple tasks on a configurable group of threads.
A thread pool for running multiple tasks on a configurable group of threads.

Threadfin A thread pool for running multiple tasks on a configurable group of threads. Extra features: Dynamic pool size based on load Support for asy

An extension to the bevy_ecs_tilemap, allowing for configurable tilesets, auto tiling, and more
An extension to the bevy_ecs_tilemap, allowing for configurable tilesets, auto tiling, and more

bevy_ecs_tilemap_tileset A mouthful, I know. Working on a better name. An extension to the wonderful bevy_ecs_tilemap crate for Bevy, allowing for con

Monorepo for dprint—a pluggable and configurable code formatting platform

dprint Monorepo for dprint—a pluggable and configurable code formatting platform. This project is under active early development. I recommend you chec

Easy to use, configurable C/C++ package manager and build system

Easy to use, configurable C/C++ package manager and build system

Rust Lean Image Viewer - Fast and configurable image viewer inspired by JPEGView by David Kleiner
Rust Lean Image Viewer - Fast and configurable image viewer inspired by JPEGView by David Kleiner

Rust Lean Image Viewer - Fast and configurable image viewer inspired by JPEGView by David Kleiner

Configurable quick search engine shortcuts for your terminal and browser.

Quicksearch Configurable quick search engine shortcuts for your terminal and browser. Installation Run cargo install quicksearch to install Configurat

Easy configurable tmux display-menu
Easy configurable tmux display-menu

tmux-easy-menu Easy configurable tmux display-menu Setup cargo build And run with ./target/debug/tmux-menu show --menu {path-to-your-config} Configu

Uses the cardano mini-protocols to receive every block and transaction, and save them to a configurable destination

cardano-slurp Connects to one or more cardano-node's, streams all available transactions, and saves them to disk (or to S3) in raw cbor format. Usage

This app reads a csv file and sends an email with a formatted Handlebars file.

Bulkmail This app reads a csv file and sends an email with a formatted Handlebars file. This can be run on Linux for AMD64 and ARMv7. Upstream Links D

A simple command-line utility (and Rust crate!) for converting from a conventional image file (e.g. a PNG file) into a pixel-art version constructed with emoji
A simple command-line utility (and Rust crate!) for converting from a conventional image file (e.g. a PNG file) into a pixel-art version constructed with emoji

EmojiPix This is a simple command-line utility (and Rust crate!) for converting from a conventional image file (e.g. a PNG file) into a pixel-art vers

Single File Assets is a file storage format for images

SFA (Rust) Single File Assets is a file storage format for images. The packed images are not guaranteed to be of same format because the format while

🖼️Combines a Javascript and WASM file into a single executable polygot PNG+HTML file.

WASIMAGE Combines a Javascript and WASM file into a single executable polygot PNG+HTML file. Usage: cargo install wasimage wasimage --wasm-file my.was

A command-line tool aiming to upload the local image used in your markdown file to the GitHub repo and replace the local file path with the returned URL.
A command-line tool aiming to upload the local image used in your markdown file to the GitHub repo and replace the local file path with the returned URL.

Pup A command line tool aiming to upload the local image used in your markdown file to the GitHub repo and replace the local file path with the return

A tool for determining file types, an alternative to file

file-rs a tool for determining file types, an alternative to file whats done determining file extension determining file type determining file's mime

SAORI for UKAGAKA. Convert a image file to resized png file.

Resized Png GitHub repository これは何? デスクトップマスコット、「伺か」で使用できるSAORIの一種です。 機能としては、指定した画像ファイルを拡大または縮小し、pngとして出力します。 「伺か」「SAORI」等の用語については詳しく説明いたしませんのでご了承下さい。

Owner
Eolien55
Damn, that's interesting!
Eolien55
BudouX-rs is a rust port of BudouX (machine learning powered line break organizer tool).

BudouX-rs BudouX-rs is a rust port of BudouX (machine learning powered line break organizer tool). Note: This project contains the deliverables of the

null 5 Jan 20, 2022
A visual studio code's workspaces organizer written in Rust

ruscode A visual studio code's workspaces organizer written in Rust Supports Linux, and Windows. What is a workspaces organizer? After months of or ev

晧暐 8 Dec 15, 2022
Heavy - an opinionated, efficient, relatively lightweight, and tightly Lua-integrated game framework for Rust

Heavy - an opinionated, efficient, relatively lightweight, and tightly Lua-integrated game framework for Rust Slow down, upon the teeth of Orange Heav

Shea Leffler 12 Mar 18, 2022
A fast, stable, efficient, and lightweight intranet penetration, port forwarding tool supports multiple connections, cascading proxy, and transmission encryption

A fast, stable, efficient, and lightweight intranet penetration, port forwarding tool supports multiple connections, cascading proxy, and transmission encryption

editso 1.3k Dec 30, 2022
rswatch 🔎 is simple, efficient and reliable file watcher.

rswatch File watcher rswatch is a simple, reliable and efficient file watcher, it can watch a single file or a directory and run arbitrary commands wh

Eugene 3 Sep 23, 2022
An efficient pictures manager based on custom tags and file system organization.

PicturesManager An efficient pictures manager based on custom tags and file system organization. Developed with Tauri (web app) with a Rust backend an

Clément Grennerat 2 Dec 21, 2022
A OAuth2 server library, for use in combination with actix or other frontends, featuring a set of configurable and pluggable backends.

oxide-auth A OAuth2 server library, for use in combination with common web servers, featuring a set of configurable and pluggable backends. About oxid

null 471 Dec 29, 2022
Configurable, extensible, interactive line reader

linefeed linefeed is a configurable, concurrent, extensible, interactive input reader for Unix terminals and Windows console. API Documentation linefe

Murarth 176 Jan 3, 2023
Highly modular & configurable hash & crypto library

Octavo Highly modular & configurable hash & crypto library written in pure Rust. Installation [dependencies] octavo = { git = "https://github.com/libO

Octavo Developers 139 Dec 29, 2022
A highly configurable logging framework for Rust

log4rs log4rs is a highly configurable logging framework modeled after Java's Logback and log4j libraries. Warning If you are using the file rotation

null 753 Jan 8, 2023