75typedef enum : uint16_t {
87typedef enum : uint8_t {
295 const char* chapter_dir,
296 const char* out_path,
326 const char* chapter_dir,
327 const char* out_path,
bool mdl_format_is_dir_output(mdl_format_t fmt)
Whether fmt writes per-page sibling files rather than one container.
ra8_err_t mdl_export_build_comicinfo(const mdl_export_meta_t *meta, char *buf, size_t cap)
Generate ComicInfo.xml content from metadata.
void * mdl_export_workspace_take(mdl_export_workspace_t *ws, size_t bytes, size_t alignment)
Reserve aligned bytes from an exporter arena.
struct mdl_export_workspace mdl_export_workspace_t
Caller-owned bounded arena for all exporter scratch state.
ra8_err_t mdl_export_build_comicinfo_pages(const mdl_export_meta_t *meta, size_t page_count, char *buf, size_t cap)
Generate ComicInfo.xml including page count and direction semantics.
mdl_format_t mdl_format_from_str(const char *s)
Map a --format string to a container kind.
mdl_meta_size_t
Sizing constants for metadata fields.
@ k_mdl_meta_id_max
Stable publication identifier max bytes.
@ k_mdl_meta_title_max
Title (series or chapter) buffer max bytes.
@ k_mdl_meta_name_max
Person name (writer/artist) buffer max bytes.
@ k_mdl_meta_date_max
ISO-8601 modified timestamp max bytes.
@ k_mdl_meta_summary_max
Summary description buffer max bytes.
@ k_mdl_meta_lang_max
BCP-47 language tag buffer max bytes.
@ k_mdl_meta_path_max
Bounded host cover path, including NUL.
@ k_mdl_meta_url_max
Absolute source URL max bytes, including NUL.
const char * mdl_format_ext(mdl_format_t fmt)
File extension (without dot) for a format, e.g.
ra8_err_t mdl_export_chapter_meta_ws(mdl_storage_t *storage, mdl_format_t fmt, const char *chapter_dir, const char *out_path, const mdl_export_meta_t *meta, mdl_export_workspace_t *ws)
Package a chapter with explicit metadata and caller-owned workspace.
mdl_reading_direction_t
Logical page progression used by fixed-layout readers.
@ k_mdl_read_rtl
Right-to-left page progression.
@ k_mdl_read_ltr
Left-to-right page progression.
ra8_err_t mdl_meta_parse(mdl_export_meta_t *meta, const char *text)
Parse metadata key-value lines or XML text into a metadata struct.
void mdl_export_workspace_init(mdl_export_workspace_t *ws, void *data, size_t cap)
Bind an exporter arena without allocating memory.
ra8_err_t mdl_meta_load_dir(mdl_storage_t *storage, mdl_export_meta_t *meta, const char *dir)
Load metadata from a directory by looking for metadata files.
ra8_err_t mdl_export_chapter_ws(mdl_storage_t *storage, mdl_format_t fmt, const char *chapter_dir, const char *out_path, mdl_export_workspace_t *ws)
Package a chapter after auto-loading bounded local metadata.
void mdl_meta_init(mdl_export_meta_t *meta)
Initialise a metadata struct to empty/default values.
Injected portable storage resources for downloader domain code.
Error Code Definitions for ra8-firmware.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Caller-owned bounded arena for all exporter scratch state.
size_t high_water
Largest used value observed.
size_t used
Current allocation high edge.
size_t cap
Total arena capacity.
uint8_t * data
Writable arena bytes.
One non-reentrant downloader filesystem dependency bundle.