goexiftool

package module
v0.0.0-...-0e25a28 Latest Latest
Warning

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

Go to latest
Published: May 9, 2018 License: GPL-3.0 Imports: 8 Imported by: 1

README

GoDoc Build Status Report Card Coverage Status GPLv3

goexiftool

A Go wrapper around the excellent exiftool.

Usage

If you have a working Go environnment, go get it:

$ go get -u github.com/barsanuphe/goexiftool

then use it:

import "github.com/barsanuphe/goexiftool"

See godoc for more information.

Documentation

Overview

Package goexiftool is a very simple wrapper around the excellent exiftool (http://www.sno.phy.queensu.ca/~phil/exiftool/).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MediaFile

type MediaFile struct {
	Filename string
	Info     map[string]string
}

MediaFile holds all the metadata provided by exiftool in a map

func NewMediaFile

func NewMediaFile(filename string, args ...string) (mf *MediaFile, err error)

NewMediaFile initializes a MediaFile and parses its metadata with exiftool.

func (*MediaFile) AnalyzeMetadata

func (m *MediaFile) AnalyzeMetadata(args []string) (err error)

AnalyzeMetadata calls exiftool on the file and parses its output.

func (*MediaFile) Get

func (m *MediaFile) Get(tagLabel string) (tagValue string, err error)

Get an exiftool value. exiftool has its own entry names, sometimes aggregating several exif/xmp/iptc tags.

func (*MediaFile) GetCamera

func (m *MediaFile) GetCamera() (camera string, err error)

GetCamera used for a MediaFile.

func (*MediaFile) GetDate

func (m *MediaFile) GetDate() (date time.Time, err error)

GetDate of creation of this MediaFile.

func (*MediaFile) GetLens

func (m *MediaFile) GetLens() (lens string, err error)

GetLens used for a MediaFile.

func (*MediaFile) IsGeoTagged

func (m *MediaFile) IsGeoTagged() (isGeoTagged bool)

IsGeoTagged returns if GPS data is found.

func (*MediaFile) String

func (m *MediaFile) String() string

String displays all metadata

Jump to

Keyboard shortcuts

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