Git Product home page Git Product logo

folderize's Introduction

folderize

The folderize utility copies files from multiple sources into a single destination folder.  In the destination folder the files are sorted in a folder tree created by their last modification time (mtime).

Termial Preview

Synopsis

folderize [-c] --input PATH ... [--output PATH] [--locale LOCALE] [--exclude REGEX]

Options

--input, -i PATH ...
The input folder(s).
--output, -o PATH
The destination folder.  The current folder (./) is used as default.
--dirstruct, -d STRING
Structure that should be constructed in the output directory.  Every slash will create a new subdirectory.  The default is %Y/%B/%e which will result in 2020/February/1.

DayMonthYear
eDay 1mMonth, 2-digit 02YYear 2020
dDay, 2-digit 01bMonth, short FebyYear, 2-digit 20
BMonth, long February
1 February 2020
--locale, -l LOCALE
The locale to be used for folder creation in the destination folder.  Locales other than english need at least node v.13 or node build with full-icu.  The default is en−US.
--exclude, -e REGEX
The files and/or folders names which shall not be copied.  The regex must not be enclosed by slashes.
--cache, -c
Enables the creation/use of the cache file `folderize.cache'.

Tests

There is currently an integration test that should be run with the same options, excluding input and output, like you would intend to run folderize itself.

npx jasmine -- [-c] [--locale LOCALE] [--exclude REGEX]

folderize's People

Stargazers

 avatar

Watchers

 avatar

folderize's Issues

Allow directories to have custom text as suffix

Automatically created folders should be allowed to have custom text added after the date and still be found and used by the program.

The folder 2017-03-02 (%Y-%m-%d) should be still found if renamed to 2017-03-02 Customtext.

Create new flag for file lookup creation

Creating a file lookup can take a long time if the output folder contains many files.
If only a couple new files are added a full lookup is not needed.

Add a flag to only index needed folders.

Handle all filenames in the cache file

Filenames containing a newline will break the cache file.
Redo the format so it is independent on any specific characters to separate different file entries.

Properly check file types

Don't just differ between directory and file, when trying to copy files to the output folder, but all other file types from dirent as well.

Add command to remove files

Add a command to remove and remember a file from the sorted output folder.

The command should remove the file and store it in a (hidden) folder. When more files are being sorted into the output folder, the deleted files should be checked upon and skipped if they should match.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.