https://github.com/afroborg/picsum-cli
https://github.com/afroborg/picsum-cli
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/afroborg/picsum-cli
- Owner: afroborg
- License: mit
- Created: 2024-06-20T10:48:51.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-20T13:37:06.000Z (about 2 years ago)
- Last Synced: 2025-02-04T13:23:02.125Z (over 1 year ago)
- Language: Go
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# picsum.photos CLI
## Description
This is a CLI tool that allows you to download images from [picsum.photos](https://picsum.photos/).
## Installation
```bash
git clone https://github.com/afroborg/picsum-cli.git
cd picsum-cli
make install
```
This will install the CLI tool in `/usr/local/bin`.
## Usage
Help: `picsum-cli -h`
### Dimensions
You can specify the width and height of the image you want to download using the `-w` and `-h` flags.
```bash
picsum-cli -w 200 -h 200
```
### Output
You can specify the output directory using the `-d` flag, and the output file name using the `-o` flag.
```bash
picsum-cli -d /path/to/output -o image # saves the image as /path/to/output/image.jpg
```
### Format
The default format is `jpg`, but you can download a `webp` image using the `-webp` flag.
```bash
picsum-cli -webp
```
### Blur and grayscale
Blur and grayscale can be applied to the image using the `-b` and `-g` flags.
```bash
picsum-cli -b 5 -g
```
> Blur is a number between 0 and 10.
### Seed and Id
You can specify a seed using the `-s` flag. This will generate a random image based on the seed.
You can also specify an image id using the `-id` flag. This will download the image with the specified id. Complete list of images can be found [here](https://picsum.photos/images).
```bash
picsum-cli -s 123
```
```bash
picsum-cli -id 100
```
## License
MIT