-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Haskell bindings to ExifTool -- -- Haskell bindings to the ExifTool command-line application that -- enable reading, writing and deleting metadata in various file formats. @package exiftool @version 0.2.0.4 -- | This module contains bindings to the ExifTool command-line -- application that enable reading, writing and deleting metadata in -- various file formats. Here's a short code example, the details are -- explained below. -- --
--   {-# LANGUAGE OverloadedStrings #-}
--   
--   import Data.Text (Text)
--   import ExifTool
--   
--   data Foo = Foo
--     { description :: Text,
--       resolution :: Int
--     }
--     deriving (Show)
--   
--   main :: IO ()
--   main = withExifTool $ \et -> do
--     m <- readMeta et [] "a.jpg"
--     print $ Foo <$> get (Tag "Description") m <*> get (Tag "XResolution") m
--     let m' = del (Tag "Description") . set (Tag "XResolution") (42 :: Int) $ m
--     writeMeta et m' "a.jpg"
--   
-- -- Note that this module expects the exiftool binary to be in -- your PATH. module ExifTool -- | An ExifTool instance, initialized with startExifTool and -- terminated with stopExifTool. data ExifTool -- | Start an ExifTool instance. Use stopExifTool when done, or -- withExifTool to combine both steps. startExifTool :: IO ExifTool -- | Stop a running ExifTool instance. stopExifTool :: ExifTool -> IO () -- | Start an ExifTool instance, do something with it, then stop it. withExifTool :: (ExifTool -> IO a) -> IO a -- | Read the given tags from a file. Use an empty tag list to return all -- metadata. Tag names are returned in "simple" form without any leading -- group prefixes, independent of how they are specified in the given tag -- list. readMeta :: ExifTool -> [Tag] -> FilePath -> IO Metadata -- | Like readMeta, but ExifTool errors are returned as Left values -- instead of leading to runtime errors. readMetaEither :: ExifTool -> [Tag] -> FilePath -> IO (Either Text Metadata) -- | Write metadata to a file. The file is modified in place, make sure you -- have the necessary backups! writeMeta :: ExifTool -> Metadata -> FilePath -> IO () -- | Like writeMeta, but ExifTool errors are returned as Left values -- instead of leading to runtime errors. writeMetaEither :: ExifTool -> Metadata -> FilePath -> IO (Either Text ()) -- | A set of ExifTool tag/value pairs. Use get, set and -- del to query and manipulate this set. data Metadata -- | An ExifTool tag name like Tag Description or Tag -- "EXIF:IFD0:XResolution". newtype Tag Tag :: Text -> Tag [tagName] :: Tag -> Text -- | Remove group prefixes from a tag name e.g., stripGroups (Tag -- "XMP:XMP-dc:Description") == Tag Description. stripGroups :: Tag -> Tag -- | An ExifTool tag value, enclosed in a type wrapper. The type wrapper -- can usually be ignored when using the FromValue and -- ToValue instances. data Value String :: !Text -> Value Binary :: !ByteString -> Value Number :: !Scientific -> Value Bool :: !Bool -> Value List :: ![Value] -> Value -- | Data types that a Value can be turned into. class FromValue a fromValue :: FromValue a => Value -> Maybe a -- | Data types that can be turned into a Value. class ToValue a toValue :: ToValue a => a -> Value -- | Retrieve the value of a tag. Tag case is ignored i.e., get (Tag -- "Description)" m == get (Tag "description") m. get :: FromValue a => Tag -> Metadata -> Maybe a -- | Set a tag to a (new) value. Tag case is ignored. set :: ToValue a => Tag -> a -> Metadata -> Metadata -- | Delete a tag (i.e., set its value to a marker that will make ExifTool -- delete it when writeMeta is called). Tag case is ignored. del :: Tag -> Metadata -> Metadata instance Data.Aeson.Types.ToJSON.ToJSONKey ExifTool.Tag instance Data.Aeson.Types.ToJSON.ToJSON ExifTool.Tag instance Data.Aeson.Types.FromJSON.FromJSONKey ExifTool.Tag instance Data.Aeson.Types.FromJSON.FromJSON ExifTool.Tag instance Data.Hashable.Class.Hashable ExifTool.Tag instance GHC.Classes.Eq ExifTool.Tag instance GHC.Show.Show ExifTool.Tag instance GHC.Classes.Eq ExifTool.Value instance GHC.Show.Show ExifTool.Value instance GHC.Base.Monoid ExifTool.Metadata instance GHC.Base.Semigroup ExifTool.Metadata instance GHC.Classes.Eq ExifTool.Metadata instance GHC.Show.Show ExifTool.Metadata instance ExifTool.ToValue ExifTool.Value instance ExifTool.ToValue Data.Text.Internal.Text instance ExifTool.ToValue Data.ByteString.Internal.ByteString instance ExifTool.ToValue GHC.Types.Int instance ExifTool.ToValue GHC.Num.Integer.Integer instance ExifTool.ToValue GHC.Types.Float instance ExifTool.ToValue GHC.Types.Double instance ExifTool.ToValue GHC.Types.Bool instance ExifTool.ToValue a => ExifTool.ToValue [a] instance ExifTool.FromValue ExifTool.Value instance ExifTool.FromValue Data.Text.Internal.Text instance ExifTool.FromValue Data.ByteString.Internal.ByteString instance ExifTool.FromValue GHC.Types.Int instance ExifTool.FromValue GHC.Num.Integer.Integer instance ExifTool.FromValue GHC.Types.Float instance ExifTool.FromValue GHC.Types.Double instance ExifTool.FromValue GHC.Types.Bool instance ExifTool.FromValue a => ExifTool.FromValue [a] instance Data.Aeson.Types.FromJSON.FromJSON ExifTool.Value instance Data.Aeson.Types.ToJSON.ToJSON ExifTool.Value