Sniff out stuff about your files.
With rye
rye init . --virtual
rye sync --no-dev
Suggested to use a virtual environment.
pip install -r requirements.lock
pip install .
Run the following command to start the GUI version of sniffler
sniffler
or
python src/sniffler/gui.py
To run the Django web GUI, follow these steps:
-
Apply migrations:
rye run dj migrate
-
Create a superuser:
rye run dj createsuperuser
-
Run the development server:
rye run dj runserver
-
Access the web GUI at
http://127.0.0.1:8000/
.
To test the Django Web GUI run:
rye run dj test sniffler.web_ui
> sniffler-cli -h
usage: sniffler [-h] [-O OUTPUT] [--delimiter DELIMITER] path
Collect information about files in a directory.
positional arguments:
path The path to the directory to collect information from.
options:
-h, --help show this help message and exit
-O OUTPUT, --output OUTPUT
The path to the output file.
--delimiter DELIMITER
The delimiter to use in the output file (',', ';', or 'tab').
--search SEARCH Search for files containing the given string in filename or attributes.
Alternatively, you can run src/sniffler
directly.
python src/sniffler -h
This will collect information about the files in the current directory and output it to output.csv
.
sniffler . -O output.csv
Note: When no output file is specified, the output will be printed to the console as a CSV.
To generate the documentation, run the following command:
rye run build-docs
Documentation will be available in the docs/build/html
directory.
To view the documentatation, run:
- On Windows:
start docs/build/html/index.html
- On MacOS:
open docs/build/html/index.html
- On Linux:
xdg-open docs/build/html/index.html