CineAI commited on
Commit
ae90eca
1 Parent(s): a2756cf

Create core/form_documentation.py

Browse files
Files changed (1) hide show
  1. command/core/form_documentation.py +26 -0
command/core/form_documentation.py ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import logging
3
+
4
+ NAME = 'Chelsea_documentation.txt'
5
+
6
+ TEMPLATE = """
7
+ D
8
+
9
+ """
10
+
11
+ def generate_doc(path: str):
12
+
13
+ if path is not None:
14
+ file = os.path.join(path, NAME)
15
+ else:
16
+ current_dir = os.path.dirname(os.path.realpath(__file__))
17
+ file = os.path.join(current_dir, NAME)
18
+
19
+ try:
20
+ with open(file, 'w') as f:
21
+ text = f.write(TEMPLATE)
22
+ print(type(text))
23
+ return text
24
+ except IOError as e:
25
+ logging.error(e)
26
+