Giter Site home page Giter Site logo

layers's Introduction

This project is still pre-pre-alpha, so if you somehow stumble onto this page:

  • Use at your own discretion
  • Feel free to help out by submiting a feature request, pull request, or an issue

Thank you, that was all; I'll now hand it over to the poorly written pre-pre-alpha documentation.

Layers

layers is a CLI tool that allows you create folder on multiple different drives, and have their content mirrored via symlinks, while being able to controll which drive contains the original one.

To me, this is especially usefull for my Plex Media setup. Where I want all media of the same type in the same directory, so they can be kept in the same library, but I dont necesarilly want aaalll the series I've downloaded on the same drive, but I still definetly want high bitrate video that I'm going to watch in the near future on one of the fast drives.

Usage

You create one or more layer to a layer set. Each layer in the has a level number, used to easier reference them in the future.

To create a new layer set with it's first layer run

$ layers new /path/to/first/layer

This will create a new layer, to a new layer set.

To create a second layer for the same layer set you can either run

$ cd /path/to/first/layer
$ layers new /path/to/second/layer

or, if you prefer

$ layers -l /path/to/first/layer new /path/to/second/layer

Every command is run with a layer as target. The layer target is automatically set to the whatever layer the current working directory is in. The new command, however, will create a new layer set if no layer target is found. If a layer target is found, it will create a new layer for that layer set.

Once you have done that, you can start filling the different layers with files you want in each of them. When you want to, you can run sync to create the symlinks between the directories

#cwd: /path/to/one/of/the/layers
$ layers sync

You can easily rename files, and move them between layers with the mv command

#cwd: /path/to/one/of/the/layers

# Move the file one level up
$ layers mv --up ./a/file

# Move the file to level 3
$ layers mv -l 3 ./a/file

# Move the file from a/file to new/path inside the same layer
$ layers mv ./a/file ./new/path

# Move the file from a/file to new/path and move down one layer
$ layers mv --down ./a/file ./new/path

The choises for the options are

  • --up,       -u Up one level
  • --down,     -d Down one level
  • --top,      -t Top level
  • --bottom,   -b Bottom level
  • --level,  -l N To level n

layers's People

Contributors

sigurdsvela avatar

Watchers

 avatar  avatar

layers's Issues

Copy file to temprorary file before finishing

When moving a file, the copy process should copy the file to a temporary file until the copying process is complete. In case of an error, this makes it easier to spot and clean up.

The issue here was just that the LayerMoveProcess didnt know where the temporary file was, making it impossible to track the status of the copy. That should be easily solvable though.

Global Config

  • LayerSet aliases for easier reference that using path to a layer
  • Active Process Tracking

This should also allow us to remove the concept of "base layer", which is just confusing anyway. All layers contain some original files, and symlinks to other files. There is no conceptual "base layer"

Come to think of it, we should just remove the layers list from each layer. This should be in the user config. Each layer can instead list a UUID used to verify the layer in case of corruption.

´verify´ and ´repair´ commands

Remove the purge command and replace with a verify and repair command.
Both should verify/repair all files,links, and directories in all linked layers, in all layers (The config of a single layer should not be trusted to list all layers.

It should also verify the config file of all layers, making sure that each layer list all layers, and that no one i missing or listing extraneaus layers.

By defaults, the repair command should be interactive, giving the user a choice for the intervention for each problem, but with options to set those choices before running the command

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.