Coder Social home page Coder Social logo

folder-monitoring's Introduction

Folder Monitoring & File Merging

โš ๏ธ This is currently working on MacOS (and probably on Linux) but not tested on Windows


Prerequisites

  • Conda installed (or miniconda)
  • fswatch installed

Usage

Example

  • Command to run is as seen below.
bash -i monitor.sh ./folders -c
  • ./folder represents the folders file that has 3 strings that are seperated with pipe symbol ( - | - ).
    • The first one is the folder to monitor
    • The second one is the target file to write merged result
    • The last one is the pattern of the filename - in case we do not want to have all the files to be merged
  • In this example we are seeing the full path of my development environment, so this has to be replaced before running
/Users/ikaya/projects/sh/source|/Users/ikaya/projects/sh/target/dtg.txt|*dtg*
  • -c represents the option to create temporary files to trail changes (we are creating temporary clones of all the files to distinguish newly added/modified ones). If this option is enabled, then the script will create temporary clones of all the files that are already inside the folder

Comments

I created this script just to make an introduction to what we can do on the matter you told about. This has a lot of ways to go, like platform independent execution, having the checks of file patterns on shell side and only monitor the changes on those files, integrate with snowflake, integrate with aws s3 buckets for auto uploading the merged file etc. These all can be achiavable, we can talk on them.

I have left those source and target folders and files intentionally, just to demonstrate that the filenames and versions are taken into account.

As I said, this just the initial,we have a lot of way to go.

By the way we can provide different folders, target files, patterns in that folders file. This script can observe any folder you put in there, even we can take actions denepding on modified and deleted files. Let's talk.

folder-monitoring's People

Contributors

iokaya 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.