Clean up your filesystem
Project description
Pushbroom
Pushbroom is a tool designed to help keep your filesystem clear of clutter. Certain directories, such as your downloads directory, tend to accumulate a large amount of old files that take up space. Over time, this clutter can accumulate to a significant amount of storage space. Pushbroom gives you an easy way to remove these old files.
Pushbroom is written in Python and should therefore work on any platform that can run Python. For now, it is only officially supported for macOS and Linux.
Installation
Homebrew (macOS only)
Install via Homebrew:
brew install gpanders/tap/pushbroom
Copy and modify the included pushbroom.conf
file to
~/.config/pushbroom/config
and use brew services start gpanders/tap/pushbroom
to start the automatic launchd daemon:
cp -n /usr/local/etc/pushbroom.conf ~/.config/pushbroom/config
brew services start gpanders/tap/pushbroom
Pushbroom will run once every hour.
PyPI
Install using pip:
pip install pushbroom
From source
Check the releases page for the latest release. Extract the archive and copy the files to their correct locations:
tar xzf pushbroom-vX.Y.Z.tar.gz
cd pushbroom-vX.Y.Z
cp -r bin /usr/local/
cp -n pushbroom.conf ~/.config/pushbroom/config
Configuration
The Pushbroom configuration file is organized into sections where each section represents a directory path to monitor. The default configuration file looks like this:
[Downloads]
Path = ~/Downloads
Trash = ~/.Trash
NumDays = 30
This means that, by default, Pushbroom will monitor your ~/Downloads folder and move any file or folder older than 30 days into your ~/.Trash directory.
If you don't want to move files into ~/.Trash but instead want to just delete
them, simply remove the Trash
option:
[Downloads]
Path = ~/Downloads
NumDays = 30
The name of the section (Downloads
in this example) is not important and can
be anything you want:
[Home Directory]
Path = ~
NumDays = 90
You can also specify an Ignore
parameter to instruct Pushbroom to ignore any
files or directories that match the given glob:
[Downloads]
Path = ~/Downloads
NumDays = 30
Ignore = folder_to_keep/**/*
The following configuration items are recognized in pushbroom.conf
:
Path
Specify which directory to monitor
Trash
Specify where to move files after deletion. If this option is not provided, files will simply be deleted.
NumDays
Number of days to keep files in Path
before they are removed.
Ignore
Glob expression pattern of files or directories to ignore.
Similar Work
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pushbroom-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9574aa451e6b47e09d3a003fff9bf06c688872587486250a8bb6cf5b0e3a0f4d |
|
MD5 | f4441cb137dd4d06f4715b45a0e995ab |
|
BLAKE2b-256 | 7ad8af5ae9ce865de484f11e7c22581bf962a8c44b2ab2eaec01559def017b79 |