forked from bodleian/goobi.scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstep_a_template_file.py
executable file
·72 lines (39 loc) · 1020 Bytes
/
step_a_template_file.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/usr/bin/python
# -*- coding: utf-8 -*-
from goobi.goobi_step import Step
class Step_${Step_Name} ( Step ) :
'''
${Step_Name}
By ${USER}
${DATE}
WHAT IT DOES!
Command line:
needs: process_id, and WHAT IT NEEDS
Relies on steps:
DOES IT?
Example run :
In Goobi:
/gscripts/bdlss/step_DUMMY.py process_id={processid} SOMETHING_HERE
From command line:
sudo -u tomcat6 ./step_DUMMY.py process_id=75 SOMETHING_HERE
'''
def setup( s ):
s.name = "${Step_Name}"
s.config_main_section = "CONFIG_SECTION!"
s.essential_config_sections = {}
s.essential_commandlines = {
# Use with self.command_line.NAME
"process_id":Step.type_number,
# ANYTHING_ELSE?
}
def step( s ):
"""
How's it do it?
Try using, debug, auto_complete, detach and report_problem on commandline
"""
error = None
# DO SOMETHING...
return error
if __name__ == '__main__' :
import config_ini
Step_${Step_Name}( config_ini.file ).begin()