Module Odig_support.Pkg_info

Gather package information

Gathers Doc_cobj, Opam and Docdir information about a package.

Package info

type t

The type for package information.

val doc_cobjs : t -> Doc_cobj.t list

doc_cobjs i are the documentation compilation objects of i.

val doc_dir : t -> Doc_dir.t

doc_dir i is the doc dir information of i.

val opam : t -> Opam.t

opam i is the opam information of i.

Uniform field access

Access information as list of strings.

type field = [
  1. | `Authors
  2. | `Changes_files
  3. | `Depends
  4. | `Doc_cobjs
  5. | `Homepage
  6. | `Issues
  7. | `License
  8. | `License_files
  9. | `Maintainers
  10. | `Odoc_assets
  11. | `Odoc_pages
  12. | `Online_doc
  13. | `Readme_files
  14. | `Repo
  15. | `Synopsis
  16. | `Tags
  17. | `Version
]

The type for fields.

val field_names : (string * field) list

field_names associated a string name to each field.

val get : field -> t -> string list

get field i is the field field of i as a list of strings.

val pp : t B0_std.Fmt.t

pp formats all package information fields in alphabetic order.

Queries

val query : doc_dir:B0_std.Fpath.t -> Pkg.t list -> (Pkg.t * t) list

query ~doc_dir pkgs combines the result of Doc_cobj.of_pkg, query and Doc_dir.of_pkg.