Skip to content

Commit

Permalink
docs: update for new catwalk options (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
nekowinston authored Nov 4, 2023
1 parent 00f26b5 commit 5b1101e
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 24 deletions.
23 changes: 14 additions & 9 deletions catwalk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ A sweet program that takes in four showcase images and displays them all at once

Installation with Cargo, Nix, or from source:

```bash
```console
$ cargo install catppuccin-catwalk
$ catwalk <images> <flags>
# to install from source:
Expand All @@ -28,14 +28,19 @@ $ nix run github:catppuccin/toolbox#catwalk -- <images> <flags>

Usage:

| Parameter | Description |
| -------------- | -------------------------------------------------------------------------------------------------|
| `images[4]` | 4 images to merge into one. **REQUIRED**. *All other parameters are optional.* |
| `--layout` | Style of the showcase image. Available options are `composite` (default), `grid`, `row`, and `stacked`. |
| `--gap` | Gap size for the `grid` layout. |
| `--radius` | Radius of rounded corners. |
| `--output` | Output file (defaults to `./result.webp`) |
| `--help` | A summary of the available parameters. |
Parameter | Description
--------------| -------------------------------------------------------------------------------------------------------
`[latte]` | Path to Latte image (default: `./latte.webp`)
`[frappe]` | Path to Frappé image (default: `./frappe.webp`)
`[macchiato]` | Path to Macchiato image (default: `./macchiato.webp`)
`[mocha]` | Path to Mocha image (default: `./mocha.webp`)
`--output` | Path to output file (default: `./preview.webp`)
`--layout` | Style of the showcase image. Available options are `composite` (default), `grid`, `row`, and `stacked`.
`--radius` | Radius of rounded corners (percentage).
`--directory` | Change to `<DIRECTORY>` before processing files. (e.g. `catwalk -C ./assets/`)
`--ext` | File extension to use for input files, if they're not explicitly named. `webp` (default) or `png`.
`--gap` | Size of gaps between pictures for the `grid` layout.
`--help` | A summary of the available parameters.

&nbsp;

Expand Down
30 changes: 15 additions & 15 deletions catwalk/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,34 +22,34 @@ pub enum Extension {
#[derive(Parser)]
#[command(author, version, about)]
pub struct Cli {
/// Latte image
#[arg(default_value = "latte.webp")]
/// Path to Latte image.
#[arg(default_value = "./latte.webp")]
pub latte: Option<PathBuf>,
/// Frappé image
#[arg(default_value = "frappe.webp")]
/// Path to Frappé image.
#[arg(default_value = "./frappe.webp")]
pub frappe: Option<PathBuf>,
/// Macchiato image
#[arg(default_value = "macchiato.webp")]
/// Path to Macchiato image.
#[arg(default_value = "./macchiato.webp")]
pub macchiato: Option<PathBuf>,
/// Mocha image
#[arg(default_value = "mocha.webp")]
/// Path to Mocha image.
#[arg(default_value = "./mocha.webp")]
pub mocha: Option<PathBuf>,
/// Output file
#[arg(short, long, default_value = "preview.webp")]
/// Path to output file.
#[arg(short, long, default_value = "./preview.webp")]
pub output: PathBuf,
/// Layout
/// Layout to use.
#[arg(short, long, value_enum, default_value_t=Layout::Composite)]
pub layout: Layout,
/// Sets the radius (percentage)
/// Radius of rounded corners (percentage).
#[arg(short, long)]
pub radius: Option<u32>,
/// Gap (grid layout)
/// Size of gaps between pictures for the `grid` layout.
#[arg(short, long)]
pub gap: Option<u32>,
/// Change to <DIRECTORY> before processing files
/// Change to <DIRECTORY> before processing files.
#[arg(short = 'C', long, default_value = ".")]
pub directory: Option<PathBuf>,
/// Extension to use when auto-detecting formats
/// File extension to use for input files, if they're not explicitly named.
#[arg(long = "ext", value_enum, default_value_t = Extension::Webp)]
pub extension: Extension,

Expand Down

0 comments on commit 5b1101e

Please sign in to comment.