Skip to content

Commit

Permalink
install
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Jan 26, 2024
1 parent 7c3a95d commit 158ed5d
Showing 1 changed file with 21 additions and 33 deletions.
54 changes: 21 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,39 +25,7 @@ Read
[_PDD in Action_](http://www.yegor256.com/2017/04/05/pdd-in-action.html)
and watch [this webinar](https://www.youtube.com/watch?v=nsYGC2aUwfQ).

## Installation
<details><summary>

### Prerequisites: `Ruby installed` and `Libmagic`
</summary>
<details><summary>

#### Ruby version 2.7+
</summary>

[Ruby installation instruction](https://www.ruby-lang.org/en/documentation/installation/)
</details>
<details>
<summary>

#### Libmagic library
</summary>

**For Debian/Ubuntu:**
```bash
$ apt install libmagic-dev
```
**For Mac**
```bash
$ brew install libmagic
```
**For Windows**
Unfortunately, there is no easy way to install, please use WSL

</details>
</details>

Then, install our gem:
First, make sure Ruby 2.6+ and `libmagic` are installed. Then, install our gem:

```bash
$ gem install pdd
Expand All @@ -70,6 +38,7 @@ $ pdd --help
```

## Usage

You can exclude & include certain number of files from the search via these options:

```bash
Expand Down Expand Up @@ -106,6 +75,7 @@ $ pdd [--verbose] [--quiet] [--remove] [--skip-gitignore] [--skip-errors] \
[--source <project_dir_path>] [--file puzzles_file.xml] [--include src/**/*.py] \
[--format xml|html] [--rule min-words:5] [--exclude src/**/*.java]
```

| Parameter | Description |
|-------------------------|---------------------------------------------------------------------------------------|
| --verbose | Enable verbose (debug) mode. --file must be used in case of using this option |
Expand Down Expand Up @@ -265,6 +235,24 @@ The most interesting parts of each puzzle are:

- `lines` is where the puzzle is found, inside the file.

## How to install libmagic

For Debian/Ubuntu:

```bash
$ apt install libmagic-dev
```

For Mac:

```bash
$ brew install libmagic
```

For Windows:

Unfortunately, there is no easy way to install, try to use WSL.

## How to contribute

Read [these guidelines](https://www.yegor256.com/2014/04/15/github-guidelines.html).
Expand Down

0 comments on commit 158ed5d

Please sign in to comment.