feat: rewrite pseudonyme generator in rust
This commit is contained in:
20
README.md
20
README.md
@@ -2,21 +2,27 @@
|
||||
|
||||
Generate funny random pseudonyms composed of an adjective, a noun and a number between 1 and 999.
|
||||
|
||||
## Usage
|
||||
## Download data
|
||||
|
||||
You can either use python to directly run the script like this :
|
||||
To download the data files, you can either use python to directly run the script like this :
|
||||
|
||||
```bash
|
||||
python pyrpg.py $NUMBER_OF_PSEUDONYMS
|
||||
python download_data.py
|
||||
```
|
||||
|
||||
Or you can use the provided Dockerfile to build a docker image and run it like this :
|
||||
|
||||
```bash
|
||||
docker build -t pyrpg .
|
||||
docker run --volume $(pwd)/out:/app/out --env NUMBER_OF_PSEUDONYMS=$NUMBER_OF_PSEUDONYMS pyrpg
|
||||
docker build -t download_data .
|
||||
docker run --volume $(pwd)/data:/app/data download_data
|
||||
```
|
||||
|
||||
# Generate pseudonyms
|
||||
|
||||
To generate pseudonyms, just run the rust program with cargo :
|
||||
|
||||
```bash
|
||||
cargo run $NUMBER_OF_PSEUDONYMS
|
||||
```
|
||||
|
||||
If you don't provide a number of pseudonyms, the script will generate 100 by default.
|
||||
|
||||
Pseudonyms are written to a file named `pseudonyms.txt` in the '/app/out' volume so you can retrieve them easily.
|
||||
Reference in New Issue
Block a user