Skip to content

Commit 3396093

Browse files
john-athanclaude
andcommitted
sucher — a fast terminal viewer for awkward-in-a-browser files
Markdown, spreadsheets, PDF, images, SVG, video, docx, pptx, Keynote, archives, and binary — one command that picks a viewer by extension and renders in place using the terminal graphics protocol, plus a two-pane directory browser with live previews. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SWpEyKSkEuE2v5NPouLMbP
0 parents  commit 3396093

66 files changed

Lines changed: 12616 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/ci.yml‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
env:
9+
CARGO_TERM_COLOR: always
10+
11+
jobs:
12+
check:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: dtolnay/rust-toolchain@stable
17+
with:
18+
components: clippy, rustfmt
19+
- uses: Swatinem/rust-cache@v2
20+
- name: Format
21+
run: cargo fmt --check
22+
- name: Clippy
23+
run: cargo clippy -- -D warnings
24+
- name: Test
25+
run: cargo test
26+
- name: Build (release)
27+
run: cargo build --release

‎.gitignore‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Rust build output
2+
/target
3+
4+
# Local sample / scratch files used for manual testing
5+
/sample.*
6+
/*.tmp
7+
8+
# macOS
9+
.DS_Store

‎CONTRIBUTING.md‎

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Contributing
2+
3+
Thanks for your interest in sucher.
4+
5+
## Development
6+
7+
```sh
8+
cargo build # debug build
9+
cargo test # unit tests (markdown, docx, xlsx)
10+
cargo clippy # lints
11+
cargo fmt # format
12+
make run # run against samples/sample.md
13+
```
14+
15+
CI runs `fmt --check`, `clippy -D warnings`, `test`, and a release build, so
16+
please run those locally before opening a PR.
17+
18+
## Adding a format
19+
20+
Each format lives in its own module under `src/` and exposes:
21+
22+
- `run(title, path)` — the interactive TUI (TTY), and
23+
- a non-interactive `dump`/`to_markdown` for piped output.
24+
25+
Classification has a single source of truth (see `docs/adr/0001`): add the
26+
variant to the `Format` enum and its extension mapping in `src/format.rs` —
27+
that one registry drives both which viewer opens a file and how the directory
28+
browser colours and previews it. Then dispatch the new variant in `src/main.rs`
29+
(the `main()` match for TTY vs. pipe, and `open_interactive` for previews).
30+
31+
## Runtime dependencies
32+
33+
PDF needs poppler (`pdftocairo`, `pdfinfo`, `pdftotext`); video needs `ffmpeg`
34+
and `ffprobe`. Keep these optional — the tool should degrade gracefully when a
35+
backend is missing.
36+
37+
## Scope
38+
39+
sucher aims to be a fast, good-looking terminal viewer for awkward-in-a-browser
40+
files. Keep dependencies lean and the startup path quick.

0 commit comments

Comments
 (0)