Skip to content

A library made to offer Haskell datatypes that can handle information that is extracted from media files using the 'exiftool' software. -- Supports Music and Video types and does LaTeX 'pretty-printing' using the TeX library included in the bundle.

License

Notifications You must be signed in to change notification settings

paulotruta/exif

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

exif

A library made to offer Haskell datatypes that can handle information that is extracted from media files using the 'exiftool' software.

-- Supports Music and Video types and does LaTeX 'pretty-printing' using the TeX library included in the bundle.

-- Auxiliary-non-needed functions that helped sketch this library can be found on the 'exif_old.hs' and 'exif_testing.hs' ( to be coming after removing the NFSW stuff :P ) files.

-- INSTRUCTIONS: Run "main" function and choose an option. It will recursively invoke exiftool for all the files in the current dir and subdirs, parse the information for every music or/and video file, and generate .pdf

-- Changelog: -- Process colletions of audio. -- Process collection of video. -- Micro-LaTeX audio and video print support (Only separated). -- IO for user -- Media (Audio and Video) datatype support. -- Process collections of mixed music and video. (Mix of "find -exec" and exiftool arguments, and post processing, and Media datataype dependent) -- Deprecation of Audio and Video type (Separated, to start using Media instead) -- Normalize sizes (All to bytes) -- Convert the size string to integer (in bytes) -- Output the size in Megabits in the generated pdf (ie. 23.02 Mb) -- Instantiate Show for the Media datatype -- Output the size in Megabits in the show instance for Media. -- typetofile function converts the MC datatype to a string that can be parsed by the TeX library -- Sorting capabilities with sortOn using decorate-sort-undecorate idiom -- Sorting by name (SortOn) -- Sorting by size (SortOn) -- Select function ( select = filter ) -- New file ("dummy") that must be always empty and present in order for the software to function properly -- New "sorting_options" and "select_options" function that combined can ease the use of the select and sortOn functions combined. -- IO for Sorting options. -- Select content by size (<, > than x), and respective IO in the ExifIO module. -- Replace the actual 6 "main" functions by one that can receive arguments and process all the tasks (Maybe more computing expensive but as a result we get less garbage and repetitive code) (SEE "show_testing"). -- Added a function that does recursive extraction of all the cover art for every music present in the folder and sub-folders of a given pathname. -- Recursively parse from any folder in the system, given its path as an argument -- Sorting by title and artist for mixed media without causing an error (SortOn by (title || Artist) for Music + pure output for Video) -- Custom and more informative exception message for the case that there is not any media file present in the given pathname (before was: "*** Exception: Prelude.head: empty list". -- "Attribute" and "Data" description fields now appear in Bold in the out.pdf file generated by the dat.hs file -- "Year as Int" bug solved -- Sorting by year (SortOn) is now an option when parsing musics or mixed media -- Temporary files are now removed when no longer being needed -- If any of the "to be parsed" music information does not "contain information" on one or more tags, the program crashes with "*** Exception: Prelude.read: no parse" -> Solved by forcing exiftool to print empty and unknown tags with "-" and by converting "-" or "" to 0 on the year field and vice-versa for output. -- After parsing and before generating dat.hs, the program now extracts every cover art of every music file, moves them all to a temporary folder (Covers), remove duplicates, and using ImageMagick, generates the "cover_finale.jpg" that contains all covers in a tile format with shadows that will appear in the cover of the generated .pdf file -- Parsing is now done using pattern matching to avoid exceptions. -- Prettier .pdf output by having a tile of cover-art in the cover-page. -- New pdf output mode (list of musics by each artist + filezise) -- No more need to load dat.hs, the "showit" function now does all the work!

-- Known bugs: -- No bugs ;)

-- Known Issues: -- pdflatex has problems compiling if some music or video propery contains the '#' char or special chars like 'á'. Backslash does not work either. Meanwhile, every # is deleted before parsing the media, and every special char is omitted from the output .pdf but for copyright reasons this behavior has to be changed. If there is any special char omitted on the output .pdf, the message "ExitFailure" is printed in the end of the toTex function execution in the dat.hs file. -- In order to remove duplicates, fdupes software is needed, and is included in the "Dependencies" folder. If not installed, covers will appear duplicated in the pdf coverpage. A warning in the beggining of the program is needed if fdupes is not installed.

About

A library made to offer Haskell datatypes that can handle information that is extracted from media files using the 'exiftool' software. -- Supports Music and Video types and does LaTeX 'pretty-printing' using the TeX library included in the bundle.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published