GithubHelp home page GithubHelp logo

mrudolph / freshsync Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 11 KB

A small program to one-way-syncing. It tries to fit as many files from one folder in another, priorizing new files. This is useful for podcasts for example.

License: MIT License

Scala 100.00%

freshsync's Introduction

freshsync

This is a small program to one-way-syncing. It copies files from one directory to another,handling the problem of limited disk space on the target. This is useful for transferring podcasts on a mp3-player.

Warning: This means automatic deletion of files without asking for a confirmation. Don't use this for critical data.

While doing this, it handles the problem of limited diskspace in the target by following this rules:

  • If there is space on the drive left, this will be used first
  • If there isn't enough space for everything, only the newest files will be in the target directory
  • To free space, the oldest files in the target will be deleted
  • If they are too old, even files only in the target will be deleted, too
  • Everything is handled on a file by file basis, so directories can be copied partially

Running with scala

This is a standalone script. Having scala installed you can run it via

freshsync <dir1> <dir2>

or, if shebangs don't work on your system

scala freshsync <dir1> <dir2>

to copy files from dir1 to dir2. It will print out a detailled report on which files were present and what was done with each one.

Running with java

I'm still looking for an easy way to bundle this up without the use of special build-tools, as this software has no dependencies except the scala runtime. Pull requests welcome.

freshsync's People

Contributors

mrudolph avatar

Stargazers

Christian Schäfer avatar

Watchers

James Cloos 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.