Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
heysarver committed Sep 21, 2024
1 parent b37526a commit 472e1ad
Showing 1 changed file with 37 additions and 4 deletions.
41 changes: 37 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,36 @@ Perfect for use with pbcopy or outputting to a text file.
## Requirements

- libmagic

### macOS
```bash
# macOS
$ brew install libmagic
```

### Linux (Debian/Ubuntu)
```bash
$ sudo apt-get install libmagic1
```

### Windows
On Windows, you can install the `python-magic-bin` package which includes the necessary binaries.

```bash
$ pip install python-magic-bin
```

## Usage

Create a virtual environment, unless installing on host.

### macOS/Linux
```bash
$ python -m venv venv && source venv/bin/activate
$ python3 -m venv venv && source venv/bin/activate
```

### Windows
```bash
$ python -m venv venv && .\venv\Scripts\activate
```

Install requirements
Expand All @@ -28,17 +47,31 @@ Install requirements
$ pip install -r requirements.txt
```

Run
Run. On macOS this works great in combination with <code>pbcopy</code>

```bash
# macOS/Linux
$ python file_enumerator.py ~/workspace/path/to/copy

# Windows
$ python file_enumerator.py C:\path\to\copy
```

If you do not provide a path to copy, the current directory will be used.

## Installation

1. Install the necessary requirements and python libraries as noted above.
2. Alias the script. This can be added to your ~/.bashrc or ~/.zshrc file.
2. Alias the script. This can be added to your ~/.bashrc or ~/.zshrc file on macOS/Linux, or set up as a function in PowerShell on Windows.

### macOS/Linux
```bash
$ alias file_enum='python /path/to/file_enumerator.py'
```

### Windows (PowerShell)
```powershell
function file_enum {
python C:\path\to\file_enumerator.py $args
}
```

0 comments on commit 472e1ad

Please sign in to comment.