https://github.com/willbasky/lineman
Lineman traverses directory recursively and run command by condition
https://github.com/willbasky/lineman
hacktoberfest utility
Last synced: 2 months ago
JSON representation
Lineman traverses directory recursively and run command by condition
- Host: GitHub
- URL: https://github.com/willbasky/lineman
- Owner: willbasky
- License: bsd-3-clause
- Created: 2020-10-22T19:34:28.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2025-08-29T04:20:43.000Z (10 months ago)
- Last Synced: 2025-08-29T08:22:09.033Z (10 months ago)
- Topics: hacktoberfest, utility
- Language: Haskell
- Homepage:
- Size: 90.8 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# lineman
[](LICENSE)
[](https://github.com/willbasky/lineman/actions/workflows/haskell-ci.yml)
## Description
Lineman traverses directory recursively and run command by conditions.
For example supposed there a many haskell projects with building files (like `.stack-work` or `dist-newstyle`) that take enormous space of disk. It takes time to purge them all manually. The lineman is able to carry out this job automatically. All you need is to configure lineman's config and run it.
## Installation
git clone https://github.com/willbasky/lineman
cd lineman
And either
cabal install
## Usage
lineman /path/to/toml/config/
## Lineman's config
Lineman uses [dhall](https://dhall-lang.org) configuration. See [Config](./lineman.dhall) example.
## Term policy
- `Action` - a single command that run in a directory due to particular `conditions`
- `Conditions` describe the directory has to have to run `action`
- `EntryPoint` is a parent directory where `lineman` starts seeking for `targets`
- `Target` is a directory that aligns to `condition`
- `Swarm` is a bunch of `actions` that match to `condition`
- `Hive` is a collection of `swarms`
## Features
- Both `actions` in a `swarm` and `swarms` in a `hive` can be run concurrently or successively
- Both `actions` and `swarms` can be interspersed with breaks
- `Lineman` starts seeking `targets` from `entryPoint` recursively and finds directories that have particular subdirectories, files or extensions. And then it run `Action` in found `targets`.
## Use cases
- Clear build artefact in bunch of projects.