booklib

package
v0.0.0-...-55bd97c Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Lib = map[string]Book{}
)

书库

Functions

func BookExist

func BookExist(bookname string) error

func GetPageContent

func GetPageContent(bookname string, pagePath string) string

func ScanBook

func ScanBook(dir string) error

ScanBook 扫描目录,初始化书库

Types

type Book

type Book struct {
	Title   string `json:"title"`
	DirName string
	// 目录
	Catalogues CatalogueList `json:"catalogue"`
}

单个书

type Catalogue

type Catalogue struct {
	Title    string      `json:"title"`
	Path     string      `json:"path"`
	Children []Catalogue `json:"children"`
	Parent   int         `json:"-"`
}

type CatalogueList

type CatalogueList []Catalogue

Jump to

Keyboard shortcuts

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