Giter VIP home page Giter VIP logo

mini-grep's Introduction

Mini-grep

Implementation of a simple grep like the exercise of the Rust Book.

Please don't use it or use it at your risks. You can use ripgrep.

Version Rust LGPL3.0 License Build

Table of contents

Tech Stack

Requirements:

  • Rust 2021
  • Cargo 1.79.0

Setup

You can download the project and build it with Meson.

Clone the project:

git clone https://github.com/Xyphenore/mini-grep.git

Build it:

cargo build

Run it

To search a pattern in a file

cargo run -- Rust resources/example.txt

To ignore case sensitivity

Unix

IGNORE_CASE=1; cargo run -- Rust resources/example.txt

Windows (cmd)

set IGNORE_CASE=1 && cargo run -- Rust resources/example.txt

Windows (PowerShell)

$env:IGNORE_CASE = "1"; cargo run -- Rust resources/example.txt

Generate the documentation

cargo doc

Open the target/doc/mini_grep/index.html in the directory target/doc/web_server.

cd target/doc/web_server

mini-grep's People

Contributors

xyphenore avatar

Watchers

 avatar  avatar

mini-grep's Issues

Document the code

The class Command must be documented to:

  • How create it
  • How use it

Add the possibility to ignore the case

Implement the possibility to ignore case of the pattern, with the environment variable 'IGNORE_CASE'.

Tests:

  • : Update test to use the case mode sensitive by default.

Note that unit tests are replaced by e2e tests.

Check that tests pass for unix and windows

Curently, Windows tests pass but we need to test that we get teh repository in a new install, all tests pass too.

In the same time, we need to check that tests pass for Unix platform.

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.