convert_manual
Convert experiential operation manual JSON into S1000D publication and data modules, glossary, and ICN assets; verify results, apply exact fixes, and optionally write to CSDB.
Instructions
Convert an experiential operation manual (@shuji-bonji/experiential-manual-model JSON) into S1000D: one publication module, one data module per topic (description → descript, procedure → proced, troubleshooting → fault, screenFlow → process plus one proced per screen), a glossary data module, applicability from the scopes, and ICNs for the assets. Every data module goes through the same flow as build_data_module (build, verify, automatic exact fixes, verify again); references between the data modules are resolved against the CSDB plus the data modules built in this call. Returns dataModules[], publicationModule, assets[] (assetId → ICN and the original file; with write: true the originals are copied under the ICN file name), the ledger, a summary of verification states and notRepresented (what the draft format cannot express). Nothing is written unless write is true.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| write | No | Write the result into the CSDB (the first folder of csdbDirs / S1000D_CSDB_DIR). Default false: the XML is only returned. Nothing is written when the XML is not valid against the XSD unless allowInvalid is true. | |
| manual | No | The manual as JSON (Manual of experiential-manual-model). Alternative to manualPath. | |
| topics | No | Topic ids to convert (default: all; the glossary is converted only when all topics are). | |
| product | No | The product to evaluate applicability for. attributes: ACT productAttribute id → value; conditions: CCT cond id → value. Omit to skip the applicability check. | |
| csdbDirs | No | CSDB folders (in addition to S1000D_CSDB_DIR) used to resolve references, find BREX and number new objects. The FIRST folder is also where write: true writes. | |
| language | No | Language of the output. Default: Manual.language ("ja" → ja-JP). A BCP 47 tag or { languageIsoCode, countryIsoCode }. | |
| maxFixes | No | Cap on the remaining fixes listed in the response (default 50). | |
| overwrite | No | With write: true, replace a file of the same name. Default false: an existing file is left alone and reported as write-conflict. | |
| allocation | Yes | Numbering rules and the ledger. infoCodeByKind must give the info codes for descript, proced, process and fault (there is no default). | |
| includeXml | No | Include the XML of every data module in the response (default: true when write is false, false when write is true). | |
| manualPath | No | Path of a manual JSON file. Relative asset paths are resolved from its folder. | |
| originator | No | ||
| issuePolicy | No | When the CSDB already has the same data module and the draft gives no issueInfo: raise issueNumber (default), raise inWork, or keep the issue. | increment-issue |
| allowInvalid | No | With write: true, write even when verification.schema.state is "invalid". Default false. | |
| assetBaseDir | No | Folder the relative Asset.source.path values are resolved from (default: the folder of manualPath). | |
| assetFormats | No | File format of each figure original, by assetId (or ICN): { extension: "PNG", notation: "png", publicId? }. Default: taken from the original file name for known formats (png, jpg, gif, svg, cgm, pdf). | |
| maxFixRounds | No | How many times to apply the fixes the server is certain about (confidence "exact") and verify again (default 3). 0 turns automatic fixing off. | |
| defaultApplic | No | applic for data modules without scopeRefs (default: display text "All" / "すべて"). | |
| publicationModule | No | Build the publication module too (default true). | |
| securityClassification | Yes | securityClassification for every data module (the manual has none; the value is written as given, not interpreted). | |
| responsiblePartnerCompany | No |