Skip to content

Commit

Permalink
Allow specifying ignore globs via config files
Browse files Browse the repository at this point in the history
- Implement loading and merging config files using `cosmiconfig`
- Limit extra files display count to 20. You can scroll down using arrows
- Add `--version` (`-v`) CLI argument
- Change file select indicator to `■`
- Create `jsconfig.json` to enable type checking
- Add Standard codestyle badge
- Update dependencies
  • Loading branch information
nikolay-borzov committed Sep 15, 2019
1 parent 05000ee commit dca8c41
Show file tree
Hide file tree
Showing 6 changed files with 291 additions and 85 deletions.
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# torrent-clean
# torrent-clean [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

CLI utility that parses specified torrent file and removes files that are not specified in torrent file. Useful when torrent is updated and some files have been removed. Also, it deletes empty directories.
CLI utility that parses specified torrent file and removes files that are not specified in the torrent file. Useful when torrent is updated and some files have been removed. Also, it deletes empty directories.

## Install

Expand All @@ -27,6 +27,15 @@ gets files' paths from `nature-pack.torrent` and compares them with files from `

`--verbose` - Output all outdated filenames. By default only first 20 filenames are displayed

`--version` - Outputs the app version

## Config files

`torrent-clean` allow specifying some parameters via config file (`.torrent-cleanrc`, `.torrent-cleanrc.json`, `.torrent-cleanrc.yaml`, `.torrent-cleanrc.yml` or `.torrent-cleanrc.js`). There are might be many files - `torrent-clean` will collect and merge all files up to root directory.

Parameter are:
- `ignore` - an array of globs or filenames that will be excluded from the list of extra files.

## Known bugs

- Torrent files with names containing unicode characters (e.g. 𝗚𝗪𝗔 1.txt) cannot be parsed correctly.
Expand All @@ -35,7 +44,8 @@ gets files' paths from `nature-pack.torrent` and compares them with files from `

- [webtorrent](https://github.com/webtorrent/webtorrent)
- [minimist](https://github.com/substack/minimist)
- [cosmiconfig](https://github.com/davidtheclark/cosmiconfig)
- [enquirer](https://github.com/enquirer/enquirer)
- [recursive-readdir](https://github.com/jergason/recursive-readdir)
- [delete-empty](https://github.com/jonschlinkert/delete-empty)
- [chalk](https://github.com/chalk/chalk)
- [chalk](https://github.com/chalk/chalk)
7 changes: 7 additions & 0 deletions jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"compilerOptions": {
"resolveJsonModule": true,
"checkJs": true
},
"exclude": ["node_modules"]
}
Loading

0 comments on commit dca8c41

Please sign in to comment.