Coder Social home page Coder Social logo

fileproc's Introduction

fileProc

Version 0.1

Run commands on a set of files.

Notice

It should first be said this was made to solve a specific problem for myself so it may have shortcomings that keep it from working for you. The most important one is that it expects input files to be in a path taken from a date (yyyy/mm/dd) and output them to a modified path (yyyy/mm_Month). This is currently hard coded. Otherwise, I've kept it as general as possible.

Second, this was also an attempt to get my feet wet in Python. So it has much room for improvement. But it does the job. Since I was looking for practice I didn't look too hard for existing solutions, and there is likely something out there that does this better.

Overview

fileProc.py allows configuring commands to run for a set of files. It provides a set of variables that can be used to help specify input directories and output directories within those commands, as well as a few others. It also provides commands to run before and after processing all files.

It was originally made to transcode a set of video files, then upload those files to a photo sharing site. It is likely limited by that goal in some ways, but I've attempted to make it fairly general.

Requirements

python3

Use

python3 fileProc.py

Reads fileProc.config for settings. See the example included in this directory. It does nothing without modification, but includes much documentation. See also piwigoExample.config for a "working" example. It is essentially what I use this for with some directories, hostnames, and users changed for use as an example.

Needed improvements

  • Allow specifying the configuration file.
  • Allow the file list to contain paths relative to input_root_dir.
  • Allow multiple tasks to be listed without joining them together with &&. Let the program take care running them together.
  • More generic way to translate an input path/name to an output one. Ideally custom methods could be written and pulled in through configuration and dependency injection.
  • A way to translate input file names to output file names.

Desired improvements:

  • Other ways to read in a list of files. E.g. from a database or a command.
  • TODOs throughout the files.

fileproc's People

Contributors

rcmosher avatar

Watchers

 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.