Packmatic v0.1.0 Packmatic View Source
Top-level module holding the Packmatic library, which provides ZIP-oriented stream aggregation services from various sources.
Link to this section Summary
Functions
Builds a Stream which can be consumed to construct a ZIP file from various sources, as specified in the Manifest. When buinding the Stream, options can be passed to configure how the Encoder should behave when Source acquisition fails.
Link to this section Types
Link to this type
stream_entry_extended()
View Sourcestream_entry_extended() :: {source_entry(), source_path(), [source_option(), ...]}
Link to this section Functions
Link to this function
build_stream(target, options \\ [])
View Sourcebuild_stream(manifest(), options()) :: term()
build_stream([stream_entry() | stream_entry_extended(), ...], options()) :: term()
Builds a Stream which can be consumed to construct a ZIP file from various sources, as specified in the Manifest. When buinding the Stream, options can be passed to configure how the Encoder should behave when Source acquisition fails.
Examples
stream = Packmatic.build_stream([
{{:file, "/tmp/hello.pdf"}, "hello.pdf"},
{{:file, "/tmp/world.pdf"}, "world.pdf"}
])
stream = Packmatic.build_stream([
{{:file, "/tmp/htllo.pdf"}, "hello.pdf"},
{{:file, "/tmp/world.pdf"}, "world.pdf"}
], on_error: :skip)