Python Builder

Build the Camptown player

camptown.process(album, output_dir, footer_urls: list[tuple[str, str]] | None = None, file_callback: Callable[[str], str] | None = None) set[str]

Process an album into its output

Parameters:
  • album (dict) – The album data

  • output_dir (str) – Output directory to receive the output

  • footer_urls (list[tuple[str,str]]) – A set of (url,text) for URLs to add to the page footer

  • file_request_callback (caallable) – A callback to handle file requests; takes one parameters source_filename, and returns the path to the requested file.

See the metadata specification for how to fill out the album data.

Note that this will only generate Camptown’s own files into the specified directory; it is up to the caller to transcode/copy audio, images, and user CSS into the output directory. All path names are relative to output_dir.

Returns:

the set of generated files, relative to output_dir