internetarchive

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProgressBarConfig

func ProgressBarConfig(bar *pb.ProgressBar, prefix string)

Types

type File

type File struct {
	Name      string `json:"name"`
	Source    string `json:"source"`
	Mtime     string `json:"mtime,omitempty"`
	Size      string `json:"size,omitempty"`
	Md5       string `json:"md5"`
	Crc32     string `json:"crc32,omitempty"`
	Sha1      string `json:"sha1,omitempty"`
	Format    string `json:"format"`
	Rotation  string `json:"rotation,omitempty"`
	Original  string `json:"original,omitempty"`
	Btih      string `json:"btih,omitempty"`
	Summation string `json:"summation,omitempty"`
}

type Item

type Item struct {
	Created         int      `json:"created"`
	D1              string   `json:"d1"`
	D2              string   `json:"d2"`
	Dir             string   `json:"dir"`
	Files           []File   `json:"files"`
	FilesCount      int      `json:"files_count"`
	ItemLastUpdated int      `json:"item_last_updated"`
	ItemSize        int      `json:"item_size"`
	Metadata        Metadata `json:"metadata"`
	Server          string   `json:"server"`
	Uniq            int      `json:"uniq"`
	WorkableServers []string `json:"workable_servers"`
	JP2Zip          string
}

func New

func New(identifier string) (*Item, error)

func (*Item) Download

func (i *Item) Download() error

func (*Item) Downloaded

func (i *Item) Downloaded() bool

func (*Item) Manifest

func (i *Item) Manifest() error

type Metadata

type Metadata struct {
	Identifier       string        `json:"identifier"`
	Mediatype        string        `json:"mediatype"`
	Collection       []string      `json:"collection"`
	Creator          string        `json:"creator"`
	Date             string        `json:"date"`
	Description      stringOrArray `json:"description"`
	Language         string        `json:"language"`
	Licenseurl       string        `json:"licenseurl"`
	Scanner          string        `json:"scanner"`
	Subject          stringOrArray `json:"subject"`
	Title            string        `json:"title"`
	Publicdate       string        `json:"publicdate"`
	Uploader         string        `json:"uploader"`
	Addeddate        string        `json:"addeddate"`
	IdentifierAccess string        `json:"identifier-access"`
	IdentifierArk    string        `json:"identifier-ark"`
	Imagecount       string        `json:"imagecount"`
	Ppi              string        `json:"ppi"`
	Ocr              string        `json:"ocr"`
	RepubState       string        `json:"repub_state"`
	BackupLocation   string        `json:"backup_location"`
}

type ProgressBar

type ProgressBar struct {
	// contains filtered or unexported fields
}

func (*ProgressBar) TrackProgress

func (cpb *ProgressBar) TrackProgress(src string, currentSize, totalSize int64, stream io.ReadCloser) io.ReadCloser

Jump to

Keyboard shortcuts

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