Skip to content

Commit

Permalink
merge master
Browse files Browse the repository at this point in the history
  • Loading branch information
bashbunni committed Nov 15, 2024
2 parents 3465288 + ae57cce commit dc166ff
Show file tree
Hide file tree
Showing 40 changed files with 1,049 additions and 3,104 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @meowgorithm @muesli
* @charmbracelet/everyone
13 changes: 13 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,16 @@ jobs:
uses: charmbracelet/meta/.github/workflows/snapshot.yml@main
secrets:
goreleaser_key: ${{ secrets.GORELEASER_KEY }}

govulncheck:
uses: charmbracelet/meta/.github/workflows/govulncheck.yml@main
with:
go-version: stable

semgrep:
uses: charmbracelet/meta/.github/workflows/semgrep.yml@main

ruleguard:
uses: charmbracelet/meta/.github/workflows/ruleguard.yml@main
with:
go-version: stable
14 changes: 5 additions & 9 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,17 @@ on: [push, pull_request]

jobs:
coverage:
strategy:
matrix:
go-version: [^1]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
env:
GO111MODULE: "on"
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}

- name: Checkout code
uses: actions/checkout@v4
go-version: stable

- name: Coverage
env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json

name: goreleaser

on:
Expand All @@ -21,5 +23,3 @@ jobs:
nfpm_gpg_key: ${{ secrets.NFPM_GPG_KEY }}
nfpm_passphrase: ${{ secrets.NFPM_PASSPHRASE }}
snapcraft_token: ${{ secrets.SNAPCRAFT_TOKEN }}

# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
uses: golangci/golangci-lint-action@v6
with:
# Optional: golangci-lint command line arguments.
args: --issues-exit-code=0
Expand Down
3 changes: 2 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ linters:
- goconst
- godot
- godox
- gofumpt
- goimports
- goprintffuncname
- gosec
- ifshort
# - ifshort
- misspell
- prealloc
- revive
Expand Down
8 changes: 4 additions & 4 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# yaml-language-server: $schema=https://goreleaser.com/static/schema-pro.json

version: 2

includes:
- from_url:
url: charmbracelet/meta/main/goreleaser-glow.yaml

variables:
main: "."
binary_name: glow
description: "Render markdown on the CLI, with pizzazz!"
github_url: "https://github.com/charmbracelet/soft-serve"
maintainer: "Christian Muehlhaeuser <muesli@charm.sh>"
brew_commit_author_name: "Christian Muehlhaeuser"
brew_commit_author_email: "muesli@charm.sh"

# yaml-language-server: $schema=https://goreleaser.com/static/schema-pro.json
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019-2023 Charmbracelet, Inc
Copyright (c) 2019-2024 Charmbracelet, Inc

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
7 changes: 2 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

.PHONY: default clean glow run log

LOGFILE := debug.log

default: glow

clean:
Expand All @@ -13,8 +11,7 @@ glow:
go build

run: clean glow
GLOW_LOGFILE=$(LOGFILE) ./glow
./glow

log:
> $(LOGFILE)
tail -f $(LOGFILE)
tail -f ~/.cache/glow/glow.log
68 changes: 15 additions & 53 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Render markdown on the CLI, with _pizzazz_!
</p>

<p align="center">
<img src="https://stuff.charm.sh/glow/glow-1.3-trailer-github.gif" width="600" alt="Glow UI Demo">
<img src="https://github.com/user-attachments/assets/c2246366-f84b-4847-b431-32a61ca07b74" width="800" alt="Glow UI Demo">
</p>

## What is it?
Expand All @@ -20,13 +20,9 @@ Glow is a terminal based markdown reader designed from the ground up to bring
out the beauty—and power—of the CLI.

Use it to discover markdown files, read documentation directly on the command
line and stash markdown files to your own private collection, so you can read
them anywhere. Glow will find local markdown files in subdirectories or a local
line. Glow will find local markdown files in subdirectories or a local
Git repository.

By the way, all data stashed is encrypted end-to-end: only you can decrypt it.
More on that below.

## Installation

### Package Manager
Expand All @@ -44,8 +40,8 @@ pacman -S glow
# Void Linux
xbps-install -S glow

# Nix
nix-env -iA nixpkgs.glow
# Nix shell
nix-shell -p glow --command glow

# FreeBSD
pkg install glow
Expand Down Expand Up @@ -84,11 +80,12 @@ packages. ARM builds are also available for macOS, Linux, FreeBSD and OpenBSD.
### Go

Or just install it with `go`:

```bash
go install github.com/charmbracelet/glow@latest
```

### Build (requires Go 1.13+)
### Build (requires Go 1.21+)

```bash
git clone https://github.com/charmbracelet/glow.git
Expand All @@ -98,27 +95,17 @@ go build

[releases]: https://github.com/charmbracelet/glow/releases


## The TUI

Simply run `glow` without arguments to start the textual user interface and
browse local and stashed markdown. Glow will find local markdown files in the
browse local. Glow will find local markdown files in the
current directory and 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
keystrokes 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`.

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
Expand All @@ -138,18 +125,6 @@ glow github.com/charmbracelet/glow
glow https://host.tld/file.md
```

### Stashing

You can also stash documents 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.

### Word Wrapping

The `-w` flag lets you set a maximum width at which the output will be wrapped:
Expand Down Expand Up @@ -201,42 +176,29 @@ Here's an example config:
```yaml
# style name or JSON path (default "auto")
style: "light"
# show local files only; no network (TUI-mode only)
local: true
# mouse support (TUI-mode only)
# mouse wheel support (TUI-mode only)
mouse: true
# use pager to display markdown
pager: true
# word-wrap at width
# at which column should we word wrap?
width: 80
# show all files, including hidden and ignored.
all: true
```
## 🔒 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
[charm][charmlib] library. That encrypted key is then sent up to our server.
We can’t read it since we don’t have your private key. When you want to decrypt
something or view your stash, that key is downloaded from our server and
decrypted locally using the SSH private key. When you link accounts, the
symmetric key is encrypted for each new public key. This happens on your
machine and not our server, so we never see any unencrypted data.
[charmlib]: https://github.com/charmbracelet/charm
## Feedback
We’d love to hear your thoughts on this project. Feel free to drop us a note!
* [Twitter](https://twitter.com/charmcli)
* [The Fediverse](https://mastodon.social/@charmcli)
* [Discord](https://charm.sh/chat)
- [Twitter](https://twitter.com/charmcli)
- [The Fediverse](https://mastodon.social/@charmcli)
- [Discord](https://charm.sh/chat)
## License
[MIT](https://github.com/charmbracelet/glow/raw/master/LICENSE)
***
---
Part of [Charm](https://charm.sh).
Expand Down
Loading

0 comments on commit dc166ff

Please sign in to comment.