mirror of
https://github.com/charmbracelet/glow
synced 2024-11-10 06:04:18 +00:00
Separate out the TUI and CLI sections of the README
This commit is contained in:
parent
1443d3e5f3
commit
a5b67ba721
1 changed files with 35 additions and 11 deletions
46
README.md
46
README.md
|
@ -61,11 +61,40 @@ go get github.com/charmbracelet/glow
|
|||
[releases]: https://github.com/charmbracelet/glow/releases
|
||||
|
||||
|
||||
## Usage
|
||||
## The TUI
|
||||
|
||||
Run without arguments to start the TUI and browse local and stashed markdown.
|
||||
Or, to simply format a document on the CLI, use a markdown source as the
|
||||
primary argument:
|
||||
Simply run `glow` without arguments to start the textual user iterface and
|
||||
browse local and stashed markdown. Glow will find local markdown files it the
|
||||
current directory or below or, if you’re in a Git repository, Glow will search
|
||||
the repo.
|
||||
|
||||
Markdown files can be read with Glow's high-performance pager. Most of the
|
||||
keystokes you know from `less` are the same, but you can press `?` to list
|
||||
the hotkeys.
|
||||
|
||||
### Stashing
|
||||
|
||||
Glow works with the Charm Cloud to allow you to store any markdown files in
|
||||
your own private collection. You can stash a local document from the Glow TUI by
|
||||
pressing `s`.
|
||||
|
||||
You can also stash from the CLI:
|
||||
|
||||
```bash
|
||||
glow stash README.md
|
||||
```
|
||||
|
||||
Then, when you run `glow` without arguments will you can browse through your
|
||||
stashed documents. This is a great way to keep track of things that you need to
|
||||
reference often.
|
||||
|
||||
Stashing is private, its contents will not be exposed publicly, and it's
|
||||
encrypted end-to-end. More on encryption below.
|
||||
|
||||
## The CLI
|
||||
|
||||
In addition to a TUI, Glow has a CLI for working with Markdown. To format a
|
||||
document use a markdown source as the primary argument:
|
||||
|
||||
```bash
|
||||
# Read from file
|
||||
|
@ -83,9 +112,7 @@ glow https://host.tld/file.md
|
|||
|
||||
### Stashing
|
||||
|
||||
Glow works with the Charm Cloud to allow you to store any markdown file in your
|
||||
own private collection. You can stash a local document from the Glow TUI by
|
||||
pressing `s`. You can also stash from the CLI:
|
||||
You can also stash documents from the CLI:
|
||||
|
||||
```bash
|
||||
glow stash README.md
|
||||
|
@ -95,9 +122,6 @@ Then, when you run `glow` without arguments will you can browse through your
|
|||
stashed documents. This is a great way to keep track of things that you need to
|
||||
reference often.
|
||||
|
||||
Stashing is private, its contents will not be exposed publicly, and it's
|
||||
encrypted end-to-end. More on encryption below.
|
||||
|
||||
### Word Wrapping
|
||||
|
||||
The `-w` flag lets you set a maximum width at which the output will be wrapped:
|
||||
|
@ -136,7 +160,7 @@ glow --help
|
|||
Check out the [Glamour Style Section](https://github.com/charmbracelet/glamour/blob/master/styles/gallery/README.md)
|
||||
to find more styles. Or [make your own](https://github.com/charmbracelet/glamour/tree/master/styles)!
|
||||
|
||||
## 🔒 Encryption: how it works
|
||||
## 🔒 Encryption: How It Works
|
||||
|
||||
Encryption works by issuing symmetric keys (basically a generated password) and
|
||||
encrypting it with the local SSH public key generated by the open-source
|
||||
|
|
Loading…
Reference in a new issue