Git Product home page Git Product logo

harder's Introduction

harder

harder copies soft media, like CDs and DVDs, to your hard drive.

Goals:

  • minimal user input
  • autodetect cd/dvd changes
  • prioritize expediency and resiliency over disk space efficiency

Usage

harder --destination

System configuration:

Install harder, and find out where your system Python put it:

which harder
> /usr/local/bin/harder

Using this page as a starting point:

cd /etc/udev/rules.d

We need to create a new file in this folder that runs before the others:

sudo vim 10-harder.rules

Insert the following text:

KERNEL=="sr[0-9]", ACTION=="change", ENV{ID_CDROM_MEDIA_CD}=="1", RUN+="/usr/local/bin/harder --type cd --destination /backups/harder"
KERNEL=="sr[0-9]", ACTION=="change", ENV{ID_CDROM_MEDIA_TRACK_COUNT_AUDIO}=="1", RUN+="/usr/local/bin/harder --type cda --destination /backups/harder"
KERNEL=="sr[0-9]", ACTION=="change", ENV{ID_CDROM_MEDIA_DVD}=="1", RUN+="/usr/local/bin/harder --type dvd --destination /backups/harder"

It seems the following ENV{ID_CDROM_???} boolean variables will be available:

  • ID_CDROM_MEDIA_BD: Blu-ray
  • ID_CDROM_MEDIA_DVD: DVD
  • ID_CDROM_MEDIA_CD: CD
  • ID_CDROM_MEDIA_TRACK_COUNT_AUDIO: AUDIO CD

References

http://salt.readthedocs.org/en/latest/ref/states/all/salt.states.supervisord.html http://salt.readthedocs.org/en/latest/ref/modules/all/salt.modules.supervisord.html

Installation

From github:

git clone https://github.com/chbrown/harder.git
cd harder
python setup.py develop

Import:

import harder

License

Copyright © 2014 Christopher Brown. MIT Licensed.

harder's People

Contributors

chbrown avatar

Stargazers

 avatar

Watchers

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