.TH INI2YAML 1 "2025-07-24" "v1.0" "User Commands" .SH NAME ini2yaml \- convert INI configuration files to YAML format .SH SYNOPSIS .B ini2yaml .RB [ \-h ] \fB\-f\fR \fISOURCE\fR .RB [ \-n \fIAPP_NAME\fR ] .RB [ \-v \fIVERSION\fR ] .RB [ \-p \fIPATH\fR ] .SH DESCRIPTION This program converts INI configuration files (with extensions .ini, .cf, or .conf) into YAML format. It can process either a single file or all valid files in a directory. Output is saved in the specified directory with YAML formatting. .SH OPTIONS .TP \fB\-h\fR, \fB\-\-help\fR Show help message and exit .TP \fB\-f\fR \fISOURCE\fR, \fB\-\-file\fR \fISOURCE\fR Specify input source (required). Can be either: .RS .IP \(bu 2 A single INI file (.ini, .cf, or .conf extension) .IP \(bu 2 A directory containing INI files .RE .TP \fB\-n\fR \fIAPP_NAME\fR, \fB\-\-name\fR \fIAPP_NAME\fR Specify application name for YAML metadata. Default: \fI'app'\fR .TP \fB\-v\fR \fIVERSION\fR, \fB\-\-version\fR \fIVERSION\fR Specify configuration version. Default: \fI'1.0.0'\fR .TP \fB\-p\fR \fIPATH\fR, \fB\-\-path\fR \fIPATH\fR Specify output directory. Default: \fI${HOME}/yaml\fR .SH PROCESSING DETAILS .IP \(bu 2 Converts each INI section to a YAML object .IP \(bu 2 Preserves option values while stripping surrounding quotes .IP \(bu 2 Adds metadata fields: .RS .RS \fI_default\fR: Original value from INI .br \fI_type\fR: Always 's' (string type) .RE .RE .IP \(bu 2 Output filename: \fI.yaml\fR .SH ENVIRONMENT .TP .B HOME Determines default output directory when \fB\-p\fR is not specified .SH EXAMPLES .TP Convert single file with defaults: .B ini2yaml \-f /etc/dput.cf .TP Convert directory with custom parameters: .B ini2yaml \-f ~/configs/ \-n myapp \-v 2.1.0 \-p /tmp/output .TP Process system configurations: .B ini2yaml \-f /etc/sysconfig/ \-n system_cfg .SH SEE ALSO .BR configparser (3python), .BR PyYAML (3python) .SH NOTES .IP \(bu 2 Nested INI sections are not supported .IP \(bu 2 All values are treated as strings .IP \(bu 2 Existing YAML files will be overwritten .SH AUTHOR Written for the UKUI project.