Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (twin-scanner-cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Twin scanner CLI
Description • Technical Stack • Features • DX features • Documentation • Pre-requisites • Quick start • Miscellaneous •
Description
- Find duplicate files in multiple folder(s) scanning .txt or/and .torrent files and depending on the selected mode (readonly: true | false) get information about duplicated files /+ extract them into new folders.
Technical Stack
- fp-ts
- inquirer
- inquirer-autocomplete-standalone
- inquirer-fuzzy-path
- zod
Features
- Nested scanning in one/multi folders to get info about files
- Interactive CLI with step-by-step configuration and autocomplete for path selection
- Supporting only .txt, .torrent file scanning or both formats simultaneously to find duplicates between multiple folders
- Supporting readonly mode for casual listing info about duplicates without extraction them
- Supporting of removing duplicates not only between cross folders, but into the same folder as well f.e:
- For .torrent files: [ "cat.torrent", "cat (1).torrent", "cat (19).torrent"] => ["cat.torrent"]
- For .txt files: remove equal and duplicate (by analogy with torrent file names logic) lines from .txt file
- Supporting opportunity to define own custom mapper between torrent file name (
[rutracker.org].3021606.torrent) and URL to torrent file locating in some txt file (https://rutracker.org/forum/viewtopic.php?t=3021606)
DX features
- semantic-release deploy
- strict functional eslint config based on eslint-plugin-functional
- dependency graph builder
- flamegraph profiling
- git hooks
- typescript with dev server
- vite bundler
- CI for quality analysis and auto deploy to NPM
- one command upgrade dependencies
- debug mode
- This repo was built based on functional version of my custom template
Documentation
Example of manual configuration
Setting VITE_APP_TORRENT_URL=
https://rutracker.org/forum/viewtopic.phpmeans that:- line in txt file
https://rutracker.org/forum/viewtopic.php?t=3021606and torrent file[rutracker.org].3021606.torrentwill be considered the same during deduplication process
- line in txt file
For overriding default mapper between torrent file and URL to torrent file, change
extractTorrentFileNameFromURL,convertTorrentFilenameToURLfunctions and rebuild app.
Demo
On the image is described file structure before and after applying CLI:

Graph dependencies
- Top-level
- All code
Pre-requisites
- Linux-based OS
- Node.js (checked on v20.15.1)
- pnpm
Quick start
- Clone actual version of app
git clone --depth 1 https://github.com/Skippia/twin-scanner-cli.git- Install dependencies
cd ./twin-scanner-cli && pnpm i- Set env (url) for mapping between torrent name and torrent URL in txt files
Rename .env.example -> .env and update variables- Build and run
npm run build && npm run start:prod