https://github.com/agrafix/ignore
Library and tiny tool for working with ignore files of different version control systems
https://github.com/agrafix/ignore
Last synced: about 1 year ago
JSON representation
Library and tiny tool for working with ignore files of different version control systems
- Host: GitHub
- URL: https://github.com/agrafix/ignore
- Owner: agrafix
- License: bsd-3-clause
- Created: 2015-08-22T17:10:03.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2020-11-04T05:16:13.000Z (over 5 years ago)
- Last Synced: 2025-04-04T15:46:22.693Z (about 1 year ago)
- Language: Haskell
- Size: 13.7 KB
- Stars: 2
- Watchers: 3
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
ignore
=====
[](https://travis-ci.org/agrafix/ignore)
[](http://hackage.haskell.org/package/ignore)
## Intro
Hackage: [ignore](http://hackage.haskell.org/package/ignore)
Stackage: [ignore](https://www.stackage.org/package/ignore)
Handle ignore files of different VCSes
## Cli Usage: ignore
```sh
$ ignore --help
The ignore tool
(c) 2015 Alexander Thiemann
Tiny tool to check if a file in a repo is ignored by a VCS
Usage: ignore [--help|-h] file1 file2 file3 ... fileN
```
## Library Usage Example
```haskell
module Main where
import Ignore
import Path
import System.Environment
import System.Directory
main :: IO ()
main =
do dir <- getCurrentDirectory >>= parseAbsDir
ignoreFiles <- findIgnoreFiles [VCSGit, VCSMercurial, VCSDarcs] dir
checker <- buildChecker ignoreFiles
case checker of
Left err -> error err
Right (FileIgnoredChecker isFileIgnored) ->
putStrLn $
"Main.hs is "
++ (if isFileIgnored "Main.hs"
then "ignored" else "not ignored")
```
## Install
* Using cabal: `cabal install ignore`
* Using Stack: `stack install ignore`
* From Source (cabal): `git clone https://github.com/agrafix/ignore.git && cd ignore && cabal install`
* From Source (stack): `git clone https://github.com/agrafix/ignore.git && cd ignore && stack build`
## Misc
### Supported GHC Versions
### License
Released under the BSD3 license.
(c) 2015 Alexander Thiemann