.. SPDX-License-Identifier: CC-BY-4.0 .. SPDX-FileCopyrightText: Netresearch DTT GmbH .. include:: /Includes.rst.txt .. _usage: ===== Usage ===== There are two ways to run a generation: the *Repurpose* backend module (asynchronous, the normal path) and the ``nr_repurpose:generate`` CLI command (synchronous, for ops and debugging). .. _usage-backend-module: The Repurpose backend module ================================ The module registers under :guilabel:`Web > Repurpose` (``web_nrrepurpose``) and is available to any backend user (``access: user``). It has three views, backed by the :php:`JobController` actions ``list``, ``new`` / ``create``, and ``show``. .. _usage-list: Job list -------- The landing view lists the jobs of all storage pages, newest first, 25 per page. Each row shows the source, the selected artifacts, and the live status as the worker advances it: ``queued → ingesting → analyzing → generating → done`` (or ``partially_done`` / ``failed``). From here you open the *New job* form or a job's result view. With more than 25 jobs, a pager below the table shows the record range (*Records 1 - 25*), links to the first, previous, next and last page, and a page-number field: enter a number and press :kbd:`Enter` to open that page. A page number beyond the last page shows the last page. .. figure:: /Images/Usage/JobList.png :alt: Repurpose job list with the New job and Social planning buttons, jobs 30 to 6 with source URL, status badge, artifact icons, a progress bar and a Details button each, and the pagination below the table :zoom: lightbox :class: with-border with-shadow The first of two pages of the job list. A long source URL is cut with an ellipsis; the full URL is in the tooltip. The list, the result view and the social planning show the URL without user name, password, query and fragment; the job record in the List module keeps it as entered. .. _usage-new: Create a job ------------ The *New job* form submits to the ``create`` action, which persists the job and dispatches the generation message. The form fields map directly to the job record: .. list-table:: :header-rows: 1 :widths: 24 30 46 * - Field - Options - Notes * - Source type - Webpage URL / PDF URL / PDF file (FAL) - Selects how the source is ingested. * - Source URL - free text - The URL for *Webpage URL* and *PDF URL* sources. * - PDF extraction mode - Auto / Embedded text only / Vision OCR / Layout / tables - Only relevant for PDF sources. *Auto* decides per page (see :ref:`architecture-ingestion`). * - Theme - Netresearch CI / Neutral - The branded or neutral look of the rendered diagram and story. * - Audience / Tone of voice / Persona / Layout / Style - selects, populated from nr-llm prompt snippets - Optional prompt steering; each option shows the snippet's description. Up to three *personas* define the podcast speakers (name, character, optional own voice); *layout* and *style* shape the AI imagery — a layout's ``imageSize`` metadata sets the image dimensions (see :ref:`configuration-snippets`). * - Podcast / Schaubild / Story - checkboxes (all on by default) - Which artifacts to generate this run. * - Also as video (in the story card) - checkbox (off by default) - Turns the story slides into one silent MP4 (4 seconds per slide, slow zoom, cross-fades). Only with the story. * - Executive summary / FAQ / Social posts / Newsletter - checkboxes (all off by default) - Which text formats to generate this run. They are opt-in, so an upgraded installation makes no additional LLM calls until an editor ticks one. *Audience* and *tone of voice* steer them; persona, layout and style do not apply to text. * - Slide deck / Handout - checkboxes (both off by default) - Which documents to print as PDF this run (see :ref:`usage-documents`). Steered like the text formats. .. note:: For a *PDF file (FAL)* source, upload the PDF as a ``sys_file`` and attach it to the job record via the record edit view; the *New job* form sets the source type, URL and extraction mode. .. figure:: /Images/Usage/JobNew.png :alt: New job form with source type, source URL, PDF extraction mode, theme, audience and tone of voice selects, the Podcast, Schaubild and Story cards with their persona, layout and style selects, and the text and document format checkboxes :zoom: lightbox :class: with-border with-shadow The *New job* form. The snippet selects offer the nr-llm prompt snippets of their tag; without snippets they offer only "(none)". After submitting, a flash message confirms the job was created and queued, and you are redirected to the list. The worker picks the job up and processes it asynchronously. .. _usage-show: Result view ----------- While a job is still running, the view shows fine-grained per-step progress (which generator is working and what it is doing) and refreshes itself automatically. The result view (``show``) renders the finished job: it plays the podcast MP3 with its WebVTT subtitles and shows the speaker-tagged transcript, and it displays — and lets you download — every generated image (the three Schaubild variants and the story slides, shown as a horizontal, scrollable strip in slide order) and plays the story video. Each artifact carries its own status, so a partially successful run still shows whatever was produced. For transparency, every artifact lists its complete creation parameters: the exact system, user and image prompts that produced it, the models, the image sizes and the voices used. .. figure:: /Images/Usage/JobResult.png :alt: Result view of job 30 with source, status and creation parameters, the podcast card with audio player, download buttons and the expanded generation parameters, and the first Schaubild variant with its preview :zoom: lightbox :class: with-border with-shadow The top of a result view: the podcast with its generation parameters opened, followed by the first Schaubild variant. .. figure:: /Images/Usage/JobResultStory.png :alt: Story card with five 9:16 slides side by side, each with its slide number, a Download PNG link and its review state :zoom: lightbox :class: with-border with-shadow The story slides as a horizontal strip in slide order. .. _usage-text-formats: Text formats ------------ Each text format is written by one LLM call that must answer in a fixed JSON shape (see :ref:`adr-004`). The result view renders the structured answer; the plain-text version of every text is stored on the artifact as well (``script_text``), ready to copy. .. list-table:: :header-rows: 1 :widths: 18 32 50 * - Format - Result view - Rules enforced in code * - Executive summary - one paragraph - At most eight sentences (the first eight are kept). A shorter answer is kept rather than padded: a thin source may not carry five sentences of facts. * - FAQ - a definition list of questions and answers, plus the schema.org ``FAQPage`` JSON-LD in a collapsible block - At most ten pairs; a pair without a question or an answer is dropped. The JSON-LD names the text's language (``inLanguage``) and escapes ``<`` and ``>``, so it can be pasted into a ``