diff --git a/Makefile b/Makefile index fd2d9b3..8d06a2c 100644 --- a/Makefile +++ b/Makefile @@ -3,5 +3,8 @@ all: build build: @dune build +doc: + @dune build @doc + clean: @dune clean diff --git a/src/metadata.ml b/src/metadata.ml index 4d7fab7..414ee24 100644 --- a/src/metadata.ml +++ b/src/metadata.ml @@ -11,6 +11,7 @@ module Make (E : CharEncoding.T) = struct module AVI = MetadataAVI module MP4 = MetadataMP4 + (** Charset conversion function. *) let recode = E.convert module ID3 = struct @@ -59,8 +60,15 @@ module Make (E : CharEncoding.T) = struct module Any = struct let parsers = Audio.parsers @ Image.parsers @ Video.parsers + + (** Genering parsing of metadata. *) let parse = first_valid parsers + + (** Parse the metadatas of a file. *) let parse_file = Reader.with_file parse + + (** Parse the metadatas of a string. *) + let parse_string = Reader.with_string parse end include Any diff --git a/src/metadataBase.ml b/src/metadataBase.ml index 0b21ad2..10b0536 100644 --- a/src/metadataBase.ml +++ b/src/metadataBase.ml @@ -4,7 +4,10 @@ exception Invalid type metadata = (string * string) list type endianness = Big_endian | Little_endian +(** Abstractions for accessing data from various sources (files, strings, + etc.). *) module Reader = struct + (** A function to read taking the buffer to fill the offset and the length and returning the number of bytes actually read. *) type t = {