MCPcopy Index your code
hub / github.com/Ray-D-Song/goread

github.com/Ray-D-Song/goread @v0.1.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.1.2 ↗ · + Follow
164 symbols 487 edges 29 files 128 documented · 78%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

GoRead

GoRead is a terminal/CLI EPUB reader written in Golang, inspired by epr.

GoRead

中文文档

Features

  • Remembers last read file (just run goread without arguments)
  • Remembers last read state for each file (state saved in $HOME/.config/goread/config or $HOME/.goread)
  • Code highlighting
  • Adjustable text area width
  • Adapts to terminal size changes
  • EPUB3 support (without audio)
  • Vim-style key bindings
  • Image viewing support (using system default image viewer)
  • Dark/light color schemes (depending on terminal color capabilities)
  • Cross-platform

Roadmap

  • Support for mobi format

Usage

goread             Read the last opened epub
goread EPUBFILE    Read specified EPUBFILE
goread STRINGS     Read file matching STRINGS from history
goread NUMBER      Read file numbered NUMBER from history

Options

-r              Print reading history
-d              Export epub content
-h, --help      Print help information

Key Bindings

Help             : ?
Quit             : q
Table of Contents: t
Next Chapter     : n
Previous Chapter : N
Search           : /
Scroll Down      : j
Scroll Up        : k
Half Page Up     : C-u
Half Page Down   : C-d
Chapter Start    : g
Chapter End      : G
Open Image       : o
Increase Width   : +
Decrease Width   : -
Metadata         : m
Toggle Color     : c

Installation

Install the latest release binary to your user directory:

Linux / macOS (~/.local/bin):

curl -fsSL https://raw.githubusercontent.com/Ray-D-Song/goread/main/scripts/install.sh | bash

Windows (%LOCALAPPDATA%\goread\bin):

irm https://raw.githubusercontent.com/Ray-D-Song/goread/main/scripts/install.ps1 | iex

You can customize the install location with INSTALL_DIR:

INSTALL_DIR="$HOME/bin" curl -fsSL https://raw.githubusercontent.com/Ray-D-Song/goread/main/scripts/install.sh | bash
$env:INSTALL_DIR = "$env:USERPROFILE\bin"; irm https://raw.githubusercontent.com/Ray-D-Song/goread/main/scripts/install.ps1 | iex

Scripts are also available in scripts/.

Dependencies

  • Go 1.16 or higher
  • tcell - Terminal handling library
  • tview - Terminal UI library

Building

See Makefile for details

# Build for current platform
make build

# Build for specific platforms
make windows
make linux
make macos

# Build for all platforms
make all

# Clean build artifacts
make clean

License

MIT

Core symbols most depended-on inside this repo

DebugLog
called by 87
pkg/utils/debug.go
SetStatus
called by 24
pkg/ui/ui.go
Close
called by 14
pkg/epub/epub.go
Parse
called by 10
pkg/parser/html_parser.go
Len
called by 8
pkg/utils/dlist.go
SetHighlightTheme
called by 8
pkg/parser/colors.go
SetColorRenderMode
called by 8
pkg/parser/colors.go
GetLines
called by 7
pkg/parser/html_parser.go

Shape

Function 70
Method 65
Struct 26
TypeAlias 3

Languages

Go100%

Modules by API surface

pkg/epub/epub.go29 symbols
pkg/ui/ui.go12 symbols
pkg/parser/colors.go12 symbols
pkg/reader/nav.go11 symbols
pkg/reader/reader.go10 symbols
pkg/config/config.go10 symbols
pkg/ui/theme.go9 symbols
pkg/parser/code.go9 symbols
pkg/parser/html_parser.go8 symbols
cmd/goread/utils.go7 symbols
pkg/utils/dlist.go5 symbols
pkg/reader/search.go5 symbols

For agents

$ claude mcp add goread \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page