manage

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2020 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package manage lists and manages available Bible translations

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// BiblePath path to the directory of Gratis Bibles
	BiblePath string
	// Split determines whether or not to use the split version of Gratis Bibles
	Split bool
}

Config contains the configuration needed for most functions

func New

func New(config Config) (*Config, error)

New generates a new Config (but only if the path exists)

func (*Config) Delete

func (c *Config) Delete(ver string, lang string) error

Delete removes a version from the DocumentDir

func (*Config) GetLanguage

func (c *Config) GetLanguage(ver string) (string, error)

GetLanguage returns the language for a version ID

func (*Config) GetPath

func (c *Config) GetPath(ver string, lang string) string

GetPath returns the full path of an OSIS Bible (when using normal GratisBible)

func (*Config) GetPathShort

func (c *Config) GetPathShort(ver string) (string, error)

GetPathShort is identical to GetPath, except it only requires the version but not the language (requires that the language exists)

func (*Config) IsAvailable

func (c *Config) IsAvailable(ver string) bool

IsAvailable uses ListAvailable to determine is a certain language is available

func (*Config) ListAvailable

func (c *Config) ListAvailable() (map[string][]string, error)

ListAvailable lists the available translations stored according to language

func (*Config) ListLanguages

func (c *Config) ListLanguages() ([]string, error)

ListLanguages lists all the languages available in Config.BiblePath

func (*Config) ListSplitBooks

func (c *Config) ListSplitBooks(ver string, lang string) ([]string, error)

ListSplitBooks returns the books available when using Gratis Split

Jump to

Keyboard shortcuts

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