Skip to content

consoleaf/koreader-http-inspector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KOReader HTTP Inspector Client

Go Reference Go Report Card

A Go client library for interacting with the KOReader's HTTP Inspector. This allows you to programmatically control and query your KOReader device.

📦 Installation

go get github.com/Consoleaf/koreader-http-inspector

💡 Usage

package main

import (
	"fmt"
	"log"
	koreaderinspector "github.com/Consoleaf/koreader-http-inspector"
)

func main() {
	koreaderURL := "http://192.168.15.244:8080" // Default IP for Usbnetlite. You can also use `http://localhost:8080` if running KOReader on PC

	client, err := koreaderinspector.New(koreaderURL)
	if err != nil {
		log.Fatalf("Failed to create client: %v", err)
	}

	// Example: Get KOReader's Lua version
	luaVersion, err := client.GetLuaVersion()
	if err != nil {
		log.Printf("Error getting Lua version: %v", err)
	} else {
		fmt.Printf("KOReader Lua Version: %s\n", luaVersion)
	}

	// Example: Start SSH on the device
	sshPort, err := client.SSHStart()
	if err != nil {
		log.Printf("Error starting SSH: %v", err)
	} else {
		fmt.Printf("SSH started on port: %d\n", sshPort)
	}

	// Check the source code for more available methods!
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages