Types
Includes all global types (basically only the Replacement object). Objects have default values, which means the json does not require all fields, but they should still be in there for maximal customization.
Types
DateRange = object starting*, ending*: string = "yyyy-MM-dd" ## Starting and ending dates in, obviously, `yyyy-MM-dd` format starting_weekday*: int = 0 ## Week starts at Monday, 0 means not specified - pick the fist-valid day day_interval*: int = 7 ## Repeat generation every `x` days
- document_date_range json field
Replacement = object document_output_directory*: Option[string] = (val: "./output/", has: true) ## Output directory for generated files document_source_filename*: Option[string] = (val: "input_document.docx", has: true) ## Template .docx file, that will be used to generate documents document_date_range*: Option[DateRange] = (val: (starting: "yyyy-MM-dd", ending: "yyyy-MM-dd", starting_weekday: 0, day_interval: 7), has: true) participants*: Option[Table[string, seq[string]]] ## Values to replace -> "${`participant_prefix` & `index`} will become `value`" name_separator*: Option[string] = (val: ", ", has: true) ## Separators for participant names search_strings*: Option[SearchStrings] = (val: ( starting: (val: "${", has: true), ending: (val: "}", has: true), participant_prefix: (val: "PARTICIPANTS_", has: true), date: (val: "INSERT_DATE", has: true)), has: true)
- Entire replacement object - parsed from json at runtime
SearchStrings = object starting*: Option[string] = (val: "${", has: true) ## Start of the replacement string identifier ending*: Option[string] = (val: "}", has: true) ## End of the replacement string identifier participant_prefix*: Option[string] = (val: "PARTICIPANTS_", has: true) ## Replacement identifier date*: Option[string] = (val: "INSERT_DATE", has: true) ## Replacement identifier for the date
- search_strings json object
Vars
replacement: Replacement = Replacement(document_output_directory: ( val: "./output/", has: true), document_source_filename: ( val: "input_document.docx", has: true), document_date_range: (val: ( starting: "yyyy-MM-dd", ending: "yyyy-MM-dd", starting_weekday: 0, day_interval: 7), has: true), name_separator: (val: ", ", has: true), search_strings: (val: ( starting: (val: "${", has: true), ending: (val: "}", has: true), participant_prefix: (val: "PARTICIPANTS_", has: true), date: (val: "INSERT_DATE", has: true)), has: true))
- Global replacement object