Skip to content

Commit 50ddb86

Browse files
committed
Moved readme to a dedicated file
1 parent 84e8af3 commit 50ddb86

File tree

2 files changed

+52
-53
lines changed

2 files changed

+52
-53
lines changed

Exif.hs

-52
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,5 @@
11
module Main where
22

3-
-- This is a library made to offer Haskell datatypes that can handle information that is extracted from media files using the 'exiftool' software.
4-
5-
-- Supports Music and Video types and does LaTeX 'pretty-printing' using the TeX library included in the bundle.
6-
-- Auxiliary-non-needed functions that helped sketch this library can be found on the 'exif_old.hs' and 'exif_testing.hs' files.
7-
8-
-- 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
9-
10-
-- Changelog:
11-
-- Process colletions of audio.
12-
-- Process collection of video.
13-
-- Micro-LaTeX audio and video print support (Only separated).
14-
-- IO for user
15-
-- Media (Audio and Video) datatype support.
16-
-- Process collections of mixed music and video. (Mix of "find -exec" and exiftool arguments, and post processing, and Media datataype dependent)
17-
-- Deprecation of Audio and Video type (Separated, to start using Media instead)
18-
-- Normalize sizes (All to bytes)
19-
-- Convert the size string to integer (in bytes)
20-
-- Output the size in Megabits in the generated pdf (ie. 23.02 Mb)
21-
-- Instantiate Show for the Media datatype
22-
-- Output the size in Megabits in the show instance for Media.
23-
-- typetofile function converts the MC datatype to a string that can be parsed by the TeX library
24-
-- Sorting capabilities with sortOn using decorate-sort-undecorate idiom
25-
-- Sorting by name (SortOn)
26-
-- Sorting by size (SortOn)
27-
-- Select function ( select = filter )
28-
-- New file ("dummy") that must be always empty and present in order for the software to function properly
29-
-- New "sorting_options" and "select_options" function that combined can ease the use of the select and sortOn functions combined.
30-
-- IO for Sorting options.
31-
-- Select content by size (<, > than x), and respective IO in the ExifIO module.
32-
-- 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").
33-
-- 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.
34-
-- Recursively parse from any folder in the system, given its path as an argument
35-
-- Sorting by title and artist for mixed media without causing an error (SortOn by (title || Artist) for Music + pure output for Video)
36-
-- 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".
37-
-- "Attribute" and "Data" description fields now appear in Bold in the out.pdf file generated by the dat.hs file
38-
-- "Year as Int" bug solved
39-
-- Sorting by year (SortOn) is now an option when parsing musics or mixed media
40-
-- Temporary files are now removed when no longer being needed
41-
-- 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.
42-
-- 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
43-
-- Parsing is now done using pattern matching to avoid exceptions.
44-
-- Prettier .pdf output by having a tile of cover-art in the cover-page.
45-
-- New pdf output mode (list of musics by each artist + filezise)
46-
-- No more need to load dat.hs, the "showit" function now does all the work!
47-
48-
-- Known bugs:
49-
-- No bugs ;)
50-
51-
-- Known Issues:
52-
-- 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.
53-
-- 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.
54-
553
import Control.Monad
564
import ExifIO
575
import Data.List

README.md

+52-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,53 @@
11
# exif
2-
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.
2+
A library made to offer Haskell datatypes that can handle information that is extracted from media files using the 'exiftool' software.
3+
4+
-- Supports Music and Video types and does LaTeX 'pretty-printing' using the TeX library included in the bundle.
5+
6+
-- 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.
7+
8+
-- 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
9+
10+
-- Changelog:
11+
-- Process colletions of audio.
12+
-- Process collection of video.
13+
-- Micro-LaTeX audio and video print support (Only separated).
14+
-- IO for user
15+
-- Media (Audio and Video) datatype support.
16+
-- Process collections of mixed music and video. (Mix of "find -exec" and exiftool arguments, and post processing, and Media datataype dependent)
17+
-- Deprecation of Audio and Video type (Separated, to start using Media instead)
18+
-- Normalize sizes (All to bytes)
19+
-- Convert the size string to integer (in bytes)
20+
-- Output the size in Megabits in the generated pdf (ie. 23.02 Mb)
21+
-- Instantiate Show for the Media datatype
22+
-- Output the size in Megabits in the show instance for Media.
23+
-- typetofile function converts the MC datatype to a string that can be parsed by the TeX library
24+
-- Sorting capabilities with sortOn using decorate-sort-undecorate idiom
25+
-- Sorting by name (SortOn)
26+
-- Sorting by size (SortOn)
27+
-- Select function ( select = filter )
28+
-- New file ("dummy") that must be always empty and present in order for the software to function properly
29+
-- New "sorting_options" and "select_options" function that combined can ease the use of the select and sortOn functions combined.
30+
-- IO for Sorting options.
31+
-- Select content by size (<, > than x), and respective IO in the ExifIO module.
32+
-- 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").
33+
-- 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.
34+
-- Recursively parse from any folder in the system, given its path as an argument
35+
-- Sorting by title and artist for mixed media without causing an error (SortOn by (title || Artist) for Music + pure output for Video)
36+
-- 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".
37+
-- "Attribute" and "Data" description fields now appear in Bold in the out.pdf file generated by the dat.hs file
38+
-- "Year as Int" bug solved
39+
-- Sorting by year (SortOn) is now an option when parsing musics or mixed media
40+
-- Temporary files are now removed when no longer being needed
41+
-- 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.
42+
-- 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
43+
-- Parsing is now done using pattern matching to avoid exceptions.
44+
-- Prettier .pdf output by having a tile of cover-art in the cover-page.
45+
-- New pdf output mode (list of musics by each artist + filezise)
46+
-- No more need to load dat.hs, the "showit" function now does all the work!
47+
48+
-- Known bugs:
49+
-- No bugs ;)
50+
51+
-- Known Issues:
52+
-- 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.
53+
-- 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.

0 commit comments

Comments
 (0)