{"id":17648071,"url":"https://github.com/gpanders/pushbroom","last_synced_at":"2025-05-07T06:02:12.836Z","repository":{"id":57455575,"uuid":"47363147","full_name":"gpanders/pushbroom","owner":"gpanders","description":"Sweep your filesystem free of clutter","archived":false,"fork":false,"pushed_at":"2021-06-08T03:06:14.000Z","size":69,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-11T20:49:22.340Z","etag":null,"topics":["python"],"latest_commit_sha":null,"homepage":"https://sr.ht/~gpanders/pushbroom","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gpanders.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-12-03T21:52:24.000Z","updated_at":"2025-01-02T10:38:30.000Z","dependencies_parsed_at":"2022-09-05T19:21:40.882Z","dependency_job_id":null,"html_url":"https://github.com/gpanders/pushbroom","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpanders%2Fpushbroom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpanders%2Fpushbroom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpanders%2Fpushbroom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpanders%2Fpushbroom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gpanders","download_url":"https://codeload.github.com/gpanders/pushbroom/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252823910,"owners_count":21809711,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python"],"created_at":"2024-10-23T11:16:11.515Z","updated_at":"2025-05-07T06:02:12.782Z","avatar_url":"https://github.com/gpanders.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pushbroom\n\n`pushbroom` is a tool designed to help keep your filesystem clear of clutter.\nCertain directories, such as your downloads directory, tend to accumulate a\nlarge amount of old files that take up space. Over time, this clutter can\naccumulate to a significant amount of storage space. `pushbroom` gives you an\neasy way to remove these old files.\n\n`pushbroom` is written in Python and should therefore work on any platform that\ncan run Python. For now, it is only officially supported for macOS and Linux.\n\n## Installation\n\n### Package Manager\n\nThe following package managers support `pushbroom`:\n\n#### MacPorts\n\n    sudo port install pushbroom\n\n### pip\n\nInstall using pip:\n\n    pip install --user pushbroom\n\nYou must also copy the [example configuration file][] to\n`~/.config/pushbroom/config` or create your own from scratch.\n\n[example configuration file]: ./pushbroom.conf\n\n### From source\n\nCheck the [releases][] page for the latest release. Download and extract the\narchive, then install with pip:\n\n    tar xzf pushbroom-vX.Y.Z.tar.gz\n    cd pushbroom-vX.Y.Z\n    pip install --user .\n    cp pushbroom.conf ~/.config/pushbroom/config\n\n[releases]: https://git.sr.ht/~gpanders/pushbroom/refs\n\n## Usage\n\n`pushbroom` can be run from the command line using:\n\n    pushbroom\n\nUse `pushbroom --help` to see a list of command line options.\n\n## Configuration\n\nThe `pushbroom` configuration file is organized into sections where each section\nrepresents a directory path to monitor. The default configuration file looks\nlike this:\n\n    [Downloads]\n    Path = ~/Downloads\n    Trash = ~/.Trash\n    NumDays = 30\n\nThis means that, by default, `pushbroom` will monitor your ~/Downloads folder and\nmove any file or folder older than 30 days into your ~/.Trash directory.\n\nIf you don't want to move files into ~/.Trash but instead want to just delete\nthem, simply remove the `Trash` option:\n\n    [Downloads]\n    Path = ~/Downloads\n    NumDays = 30\n\nThe name of the section (`Downloads` in this example) is not important and can\nbe anything you want:\n\n    [Home Directory]\n    Path = ~\n    NumDays = 90\n\nYou can also specify an `Ignore` parameter to instruct `pushbroom` to ignore any\nfiles or directories that match the given glob:\n\n    [Downloads]\n    Path = ~/Downloads\n    NumDays = 30\n    Ignore = folder_to_keep\n\nSimilarly, you can specify `Match` to have `pushbroom` only remove files that\nmatch one of the given patterns:\n\n    [Vim Backup Directory]\n    Path = ~/.cache/vim/backup\n    NumDays = 90\n    Match = *~\n\nBoth `Ignore` and `Match` can be a list of patterns separated by commas.\n\n    [Home Directory]\n    Path = ~\n    NumDays = 365\n    Match = .*\n    Ignore = .local, .config, .cache, .vim\n\nNote that `.*` **is not** a regular expression for \"match everything\", but\nrather a _glob expression_ for \"all files that start with a period\".\n\n---\n\nThe following configuration items are recognized in `pushbroom.conf`:\n\n### Path\n\n**Required**\n\nAbsolute path to a directory to monitor. Tildes (`~`) are expanded to the\nuser's home directory.\n\n### Trash\n\nSpecify where to move files after deletion. If omitted, files will simply be\ndeleted.\n\n### NumDays\n\n**Required**\n\nNumber of days to keep files in `Path` before they are removed.\n\n### Ignore\n\n**Default**: None\n\nList of glob expression patterns of files or directories to ignore.\n\n### Match\n\n**Default**: `*`\n\nList of glob expression patterns of files or directories to remove. If omitted,\neverything is removed.\n\n### Shred\n\n**Default**: False\n\nSecurely delete files before removing them. Note that this option is mutually\nexclusive with the [`Trash`](#trash) option, with `Trash` taking precedence if\nboth options are used.\n\n### RemoveEmpty\n\n**Default**: True\n\nRemove empty subdirectories from monitored paths.\n\n## Automating\n\nIf you are using a Linux distribution that uses systemd, you can copy the\n[systemd service][] and [timer][] files to `~/.local/share/systemd/` and enable\nthe service with\n\n    systemctl --user enable --now pushbroom\n\nNote that you may need to change the path to the `pushbroom` script in the\nservice file depending on your method of installation.\n\nAnother option is to install a crontab entry\n\n    0 */1 * * * /usr/local/bin/pushbroom\n\n[systemd service]: ./contrib/systemd/pushbroom.service\n[timer]: ./contrib/systemd/pushbroom.timer\n\n## Contributing\n\n[Send patches][] and questions to [~gpanders/pushbroom@lists.sr.ht][].\n\nReport a bug or open a ticket at [todo.sr.ht/~gpanders/pushbroom][].\n\n[Send patches]: https://git-send-email.io\n[~gpanders/pushbroom@lists.sr.ht]: https://lists.sr.ht/~gpanders/pushbroom\n[todo.sr.ht/~gpanders/pushbroom]: https://todo.sr.ht/~gpanders/pushbroom\n\n## Similar Work\n\n- [Belvedere](https://github.com/mshorts/belvedere): An automated file manager\n  for Windows\n- [Hazel](https://www.noodlesoft.com/): Automated Organization for your Mac\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgpanders%2Fpushbroom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgpanders%2Fpushbroom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgpanders%2Fpushbroom/lists"}