rename some script
This commit is contained in:
parent
ac95a2f354
commit
f9acbf07c9
@ -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
6
serienbrief.py → serienbrief
Normal file → Executable 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
|
Loading…
x
Reference in New Issue
Block a user