0.0
No commit activity in last 3 years
No release in over 3 years
Lets you delete or archive files and dirs
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.16
~> 10.0
~> 10.0
~> 3.0

Runtime

 Project Readme

Housekeeper

Housekeeper helps with keeping directories clean. It takes content that is older than a specified age and either deletes or archives it.

Usage

$ housekeeper -h

Usage: housekeeper [options]
    -a, --action ACTION              Action (can be archive or delete)
    -d, --dir DIRNAME                Directory to cleanup
    -m, --age AGE                    The minimum mtime age in seconds of contents to be cleaned up

In order to have only contents in your ~/Downloads directory, which are newer than 1 day, setup the following cronjob:

* * * * * housekeeper --dir $HOME/Downloads --age 86400 --action archive

And to keep only files in your ~/Downloads/archive directory, which are newer than 5 days, setup the following cronjob:

* * * * * housekeeper --dir $HOME/Downloads/archive --age 432000 --action delete

Contents can be ignored by putting a file called .housekeeper_ignore with an fnmatch pattern, for example

myfile.*
**.rb

Installation

Install it with bundler

$ gem install housekeeper

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/romanlehnert/housekeeper.

License

The gem is available as open source under the terms of the MIT License.