Code Monkey home page Code Monkey logo

scout's Introduction

scout-seeker

Banner with large array and scout-seeker title

rust tests

scout-seeker is a simple Rust CLI to scan a directory to list files, recursively.

Installation

You can install scout-seeker with Cargo.

cargo install scout-seeker

Usage

You have to pass the directory to scan as an argument.

Optional arguments:

  • -o or --output: to specify the output file, by default it will be ./output.json.
  • -v or --verbose: to display more information in the terminal.
  • -p or --print: to print the output in the terminal (this will disable the output file and verbose).
scout-seeker /path/to/directory -o=/path/to/output.json -v

You will have an output, like this:

Directory: /path/to/directory
Date: "2024-04-28 10:07:12.081879 +02:00"
Time in seconds: 3.123456
Total files: 1234
Output file: /path/to/output.json

And an output file, like this:

{
  "path": "/path/to/directory",
  "date": "2024-04-28 10:07:12.081879 +02:00",
  "time_seconds": "3.123456",
  "total_files": 1234,
  "files": ["/path/to/directory/file1.txt", "/path/to/directory/file2.txt"]
}

Print

If you want to print the output in the terminal, you can use the -p or --print argument.

scout-seeker /path/to/directory -p

You will have an output, like this:

tests/data/file-3.md
tests/data/file-2.md
tests/data/file.jpg
tests/data/file.mkv
tests/data/file-1.md
tests/data/nested/file-nested-2.md
tests/data/nested/file-nested-1.md

Files excluded

  • Files with dots at the beginning of their names, like .gitignore.
  • Files into directories with dots at the beginning of their names, like .git/HEAD.

Build

Clone repository:

git clone https://github.com/ewilan-riviere/scout-seeker.git
cd scout-seeker

To build, you have to install Rust, you can follow this guide.

cargo build
cargo run /path/to/directory

Release

Build the release version:

cargo build --release

Put the binary in your path:

cp target/release/scout-seeker /usr/local/bin

Tests

To run the tests.

cargo test

License

This project is licensed under the MIT License - see the LICENSE file for details.

scout's People

Contributors

ewilan-riviere avatar

Stargazers

Mortexa avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.