Globals and constants
Vars
dateFrom: DateTime
- Has to be set by convertDates
dateFromRaw: string
- Has to be converted
dateTill: DateTime
- Has to be set by convertDates
dateTillRaw: string
- Has to be converted
outputDirectory: string
- Output path, where all generated files will go
outputFileName: string
- Output name (will be: sourceDocxFile & "_" & DATE & ".docx")
sourceDocxFile: string
- Source .docx file
Lets
tempUnzippedDocumentXml: string = tempWorkingUnzipped & "word/document.xml"
- Path to document.xml file in the temporary directory
tempWorkingDir: string = tempDir & "temp-topicdocchanger-files/"
- Temporary directory used by this program
tempWorkingUnzipped: string = tempWorkingDir & "unzipped/"
- Temporary directory with unzipped template .docx file
Consts
dateFormat: string = "yyyy-MM-dd"
- Date format used by the json file
Procs
proc convertDates() {....raises: [TimeParseError], tags: [TimeEffect], forbids: [].}
- Converts dateFromRaw to dateFrom and dateTillRaw to dateTill
proc setSourceDocument(filepath: string) {....raises: [OSError], tags: [ReadDirEffect], forbids: [].}
- Sets the source document, errors when it is not found