rename some script

This commit is contained in:
Wolfgang Hottgenroth 2021-01-23 22:10:17 +01:00
parent ac95a2f354
commit f9acbf07c9
Signed by: wn
GPG Key ID: E49AF3B9EF6DD469
2 changed files with 6 additions and 3 deletions

View File

@ -3,7 +3,7 @@
Using this script it is possible to generate form letters from a template and an SQL query.
A template file with some placeholder variables is required and an SQL query to be executed
against a MariaDB database. The column names from the query correspond to the variable names
against a MariaDB/MySQL database. The column names from the query correspond to the variable names
in the template.
The template is processed using the Cheetah template (https://cheetahtemplate.org/) module, so simple variable placeholder
@ -58,5 +58,6 @@ configuration file.
## Required modules
* Python 3
* mariadb
* cheetah3

6
serienbrief.py → serienbrief Normal file → Executable file
View File

@ -1,3 +1,5 @@
#!/usr/bin/env python
import argparse
import configparser
import mariadb
@ -35,8 +37,8 @@ args = parser.parse_args()
configFile = args.config
localConfig = {}
localConfig["queryFile"] = args.query
localConfig["templateFile"] = args.template
localConfig["queryFile"] = args.queryFile
localConfig["templateFile"] = args.templateFile
localConfig["outputPrefix"] = args.outputPrefix
localConfig["outputSuffix"] = args.outputSuffix
verbose = args.verbose