Coder Social home page Coder Social logo

autofolder's Introduction

AutoFolder (WIP)

Python Script to move files from one folder to another and apply transformations along the way.

Concept

With some simple yet powerful configuration, files can be move from one directory to another and have a number of transformation apply including but not limited to:

  • Converting file type i.e mp4 -> gif
  • Unzipping zipped files.
  • Renaming files
  • Filter out certain images sizes.
  • Segment files based on duration (video file types only.)

Tasks are configured in a pipeline where the first task is fed the contents of the source directory and subsequent steps retrieve the most up to date version of the directory.

Config

Top Level

There are 4 top level configuration options at the moment:

  • Source Directory -> The source directory of the files
  • Output Directory -> The output of the files after all tasks have run.
  • Files Masks -> Collections of MIME types grouped under an ID so they can be referenced easily.
  • Pipeline -> An array of subsequent steps that will happen to the source directory before the eventual contents are copied to another directory.

Each task in the pipeline has it's their own config options.

Pipeline Task

There are 4 main config options for a pipeline task:

  • ID -> An identifier for the step taking place.
  • File Mask -> This can be an array of the mime types for the task to operate on OR an ID of a file mask configured at the top level.
  • Task -> The name of the task you want to run. These will perform certain operations based on the arguments provided.
  • Arguments -> This is an object with the keys being the corresponding parameter name and the value being the argument value.
  • Filters -> Logical filters that filter out files based on conditional values.

Tasks

The current lists of tasks includes:

  • Converting File type
  • Unzipping files
  • Renaming Files
  • Deleting files
  • Segmenting

Filters

Filters allow you to apply tasks to a subset of the files under a file mask based on different categories filter types.

e.g. videos have a duration field, images have a resolution field, files have a file size field etc.

WIP

Iterators:

Iterators are a way of turning one file into many others.

WIP

Basic process:

For a given pipeline task, the following steps will be run:

  1. The directory data will be updated with all files that fit inside the file mask for this task.
  2. Any filters that are to be applied will be applied to the above dataset.
  3. Finally, the task will be run with the above data. If an iterator is present the step will be run multiple times (for the same file) based on the configuration.
  4. If another step is present, the process begins again for that step's transformation. Else, autofolder will begin to dump the source directory to the output directory.

autofolder's People

Contributors

childishhalbino avatar

Watchers

 avatar  avatar

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.