Skip to content

Commit 8a277c7

Browse files
committed
add config to readme
1 parent ca19882 commit 8a277c7

1 file changed

Lines changed: 24 additions & 1 deletion

File tree

README.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ A simple CLI tool to create screenshots from web pages in the terminal.
44

55
This tool uses the [headless_chrome](https://crates.io/crates/headless_chrome) crate, which requires a local installation of Chrome or Chromium.
66

7-
> **Info**
7+
> **Information**
88
> This is the successor for my old tool [zekroTJA/webshot](https://github.com/zekroTJA/webshot), which uses [puppeteer](https://pptr.dev).
99
1010
## Usage
@@ -34,4 +34,27 @@ Options:
3434
You can either download the latest release builds form the [Releases page](https://github.com/shellshape/webshot/releases) or you can install it using cargo install.
3535
```
3636
cargo install --git https://github.com/shellshape/webshot
37+
```
38+
39+
## Configuration
40+
41+
You can create a configuration to define some default parameters. The tool will look for a config file in one of the following locations.
42+
43+
| | Local | Home Config |
44+
|--|-------|-------------|
45+
| **Linux** | `./webshot.*` | `$HOME/.config/webshot/config.*` |
46+
| **Windows** | `.\webshot.*` | `%APPDATA%\webshot\config.*` |
47+
| **OSX** | `./webshot.*` | `$HOME/Library/Application Support/webshot/config.*` |
48+
49+
Supported config types are the following.
50+
- YAML (`.yaml`)
51+
- TOML (`.toml`)
52+
- JSON (`.json`)
53+
54+
An example config could look as following.
55+
56+
```toml
57+
default_width = 1920
58+
default_height = 1080
59+
default_scale = 1.5
3760
```

0 commit comments

Comments
 (0)