Skip to content

Commit

Permalink
A bit more doc.
Browse files Browse the repository at this point in the history
  • Loading branch information
smimram committed Dec 13, 2023
1 parent 7653b42 commit af19f1e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@ all: build
build:
@dune build

doc:
@dune build @doc

clean:
@dune clean
8 changes: 8 additions & 0 deletions src/metadata.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions src/metadataBase.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit af19f1e

Please sign in to comment.