# This file was auto generated by Styx.
# Do not edit this file directly.

import typing
import pathlib
from styxdefs import *
import dataclasses

QUOTIZE_METADATA = Metadata(
    id="6c4eed808717d714bfc54617b8f18dc0c60724e7.boutiques",
    name="quotize",
    package="afni",
    container_image_tag="afni/afni_make_build:AFNI_24.2.06",
)


class QuotizeOutputs(typing.NamedTuple):
    """
    Output object returned when calling `quotize(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    array_output: OutputPathType
    """Generated C array of strings file"""


def quotize(
    name: str,
    input_file: InputPathType,
    output_file: InputPathType,
    runner: Runner | None = None,
) -> QuotizeOutputs:
    """
    Turns a text file into a C array of strings initialized into an array 'char
    *name[]'.
    
    Author: AFNI Developers
    
    URL: https://afni.nimh.nih.gov/
    
    Args:
        name: The name to be used for the array of strings.
        input_file: Input text file to be converted.
        output_file: Output file which will contain the C array of strings.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `QuotizeOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(QUOTIZE_METADATA)
    cargs = []
    cargs.append("quotize")
    cargs.append(name)
    cargs.append(execution.input_file(input_file))
    cargs.append(execution.input_file(output_file))
    ret = QuotizeOutputs(
        root=execution.output_file("."),
        array_output=execution.output_file(pathlib.Path(output_file).name),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "QUOTIZE_METADATA",
    "QuotizeOutputs",
    "quotize",
]
