mediainformation

package
v0.0.0-...-3034afe Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2022 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MediaInformation

type MediaInformation struct {

	// Absolute path for the target link in the link directory from the conten
	// file.
	AbsoluteContentLinkDirPath string

	// The source path of the media as an absolute path
	AbsoluteContentSourcePath string

	// Absolute path of the link directory
	AbsoluteLinkDirPath string

	// Absolute path for the target link in the link directory from the
	// manifest file.
	AbsoluteManifestLinkDirPath string

	// The relative directory path on up with the media files.
	OnsUpPath string

	// The name of the media file
	ContentFileName string

	// The extension of the media file
	Extension string

	// This object represents the conten of the XML comment files
	Comments *gt.CommentsFile

	// A helper object for statistic analyses
	Statistics *statistics.Statistics
	// contains filtered or unexported fields
}

MediaInformation Represent information about a single Media with his Manifest file and data

func NewMediaInformation

func NewMediaInformation(progConfig *config.YamlConfig, statistics *statistics.Statistics, path string) *MediaInformation

NewProgArguments create new instance of MediaInformation and get it back. @path Path of media file.

func NewMediaInformationByManifest

func NewMediaInformationByManifest(progConfig *config.YamlConfig, statistics *statistics.Statistics, path string) (*MediaInformation, error)

NewProgArguments create new instance of MediaInformation and get it back. @path Path of comment file.

func (mediaInfo *MediaInformation) CreateContentLink() error

CreateContentLink Create a content file link in the link directory.

func (*MediaInformation) CreateLinkDirSubDir

func (mediaInfo *MediaInformation) CreateLinkDirSubDir(subDir string)

CreateLinkDirSubDir Create a sub directory in the link tree directory. Include the sub directory for the manifests (.comments) @subDir sing with the mane of the new sub directory.

func (mediaInfo *MediaInformation) CreateManifestLink()

CreateManifestLink Create a manifest file link in the link directory.

func (*MediaInformation) CreateNewEmptyManifestFile

func (mediaInfo *MediaInformation) CreateNewEmptyManifestFile()

CreateNewEmptyManifestFile Create an new empty manifest file it is not exist TODO use Lib github.com/OlafRadicke/go-gthumb

func (*MediaInformation) ExtractFileNameParts

func (mediaInfo *MediaInformation) ExtractFileNameParts() []string

ExtractFileNameParts split the name of the media file in parts and get this beck as string list.

func (*MediaInformation) GetHashValue

func (mediaInfo *MediaInformation) GetHashValue() (string, error)

func (*MediaInformation) ReadingManifestFile

func (mediaInfo *MediaInformation) ReadingManifestFile()

ReadingManifestFile Read and pars the manifest file

func (*MediaInformation) ReconstructContenSourceFile

func (mediaInfo *MediaInformation) ReconstructContenSourceFile() error

ReconstructContenSourceFile Reconstruct the source path of the conten file based on the path of a manifest file.

func (*MediaInformation) ReconstructManifestFile

func (mediaInfo *MediaInformation) ReconstructManifestFile()

ReconstructManifestFile Reconstruct the path of the conten file from the path of a manifest file.

func (*MediaInformation) SaveManifestFile

func (mediaInfo *MediaInformation) SaveManifestFile() error

SaveManifestFile Saved the manifest file

func (*MediaInformation) SetAbsoluteContentLinkDirPath

func (mediaInfo *MediaInformation) SetAbsoluteContentLinkDirPath(subDir string) error

SetAbsoluteContentLinkDirPath Set or create the absolute link path of the contnet file for the link directory tree. @subDir param is the name of a sub directory for link directory tree.

func (*MediaInformation) SetAbsoluteContentSourcePath

func (mediaInfo *MediaInformation) SetAbsoluteContentSourcePath(relativePath string)

SetAbsoluteContentSourcePath Set the absolute source path of the conten file. @relativePath param is maybe the the relative path.

func (*MediaInformation) SetAbsoluteLinkDirPath

func (mediaInfo *MediaInformation) SetAbsoluteLinkDirPath(linkDir string)

SetAbsoluteLinkDirPath Create the absolute link to the directory with the link tree. @linkDir param is the value with an relative path to the link tree directory.

func (*MediaInformation) SetAbsoluteManifestLinkDirPath

func (mediaInfo *MediaInformation) SetAbsoluteManifestLinkDirPath(subDir string)

SetAbsoluteManifestLinkDirPath Create the absolute link path of the manifest file for the link directory tree. @subDir param is the name of a sub directory for link directory tree.

func (*MediaInformation) SetAbsoluteManifestSourcePath

func (mediaInfo *MediaInformation) SetAbsoluteManifestSourcePath(relativePath string)

SetAbsoluteManifestSourcePath Set the absolute source path of the Manifest file. @relativePath param is maybe the the relative path.

type XMLCategories

type XMLCategories struct {
	CategoryList []XMLCategory `xml:"category"`
	Value        string        `xml:"value,attr"`
}

type XMLCategory

type XMLCategory struct {
	Value string `xml:"value,attr"`
}

type XMLComment

type XMLComment struct {
	XMLName    xml.Name      `xml:"comment"`
	Caption    string        `xml:"caption"`
	Note       string        `xml:"note"`
	Place      string        `xml:"place"`
	Categories XMLCategories `xml:"categories"`
}

Jump to

Keyboard shortcuts

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