cli

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 2, 2026 License: MIT Imports: 18 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package cli is the Cobra command tree for the javdb binary.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EmitJSON

func EmitJSON(w io.Writer, v any) error

EmitJSON writes compact JSON.

func FilterHasMagnets

func FilterHasMagnets(movies []map[string]any) []map[string]any

FilterHasMagnets drops rows with magnets_count == 0; keeps missing field.

func FmtSize

func FmtSize(size any) string

FmtSize formats magnet size (MiB integer from API).

func PrintDetail

func PrintDetail(w io.Writer, movie map[string]any)

PrintDetail writes graph-oriented detail lines (Python parity).

func PrintLists

func PrintLists(w io.Writer, errW io.Writer, items []map[string]any)

PrintLists writes id\tname\tmovies\tprivacy\tviews.

func PrintMovieMagnets

func PrintMovieMagnets(w io.Writer, errW io.Writer, items []map[string]any)

PrintMovieMagnets prints magnet rows (name/size/flags/hash). Basic form for detail --magnets.

func PrintMovies

func PrintMovies(w io.Writer, errW io.Writer, movies []map[string]any)

PrintMovies writes number\tid\ttitle[\tdate] lines.

func PrintNamed

func PrintNamed(w io.Writer, errW io.Writer, items []map[string]any)

PrintNamed writes id\tname[\tcount] for codes/series/actors/….

func PrintNamedNoCount

func PrintNamedNoCount(w io.Writer, errW io.Writer, items []map[string]any)

PrintNamedNoCount prints id\tname only.

func PrintRankedMovies

func PrintRankedMovies(w io.Writer, errW io.Writer, movies []map[string]any)

PrintRankedMovies prefixes each row with #ranking.

func PromptPassword

func PromptPassword(out io.Writer) (string, error)

PromptPassword reads a password without echo when stdin is a TTY.

func PromptUsername

func PromptUsername(in io.Reader, out io.Writer) (string, error)

PromptUsername reads a non-empty username from in (or interactive stdin).

func Run

func Run(args []string, stdin io.Reader, stdout, stderr io.Writer) int

Run executes the CLI with the given args (usually os.Args[1:]).

func SearchTypeKey

func SearchTypeKey(type_ string) string

SearchTypeKey maps --type to response list key.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL