Compare commits
7 Commits
1f440a4b66
...
be5c95bbdf
| Author | SHA1 | Date | |
|---|---|---|---|
| be5c95bbdf | |||
| 5a75196dcc | |||
| f607c9127b | |||
| e52e7c7d3c | |||
| 20e166b860 | |||
| 1fc28b2cf1 | |||
| 23159683d0 |
@ -171,15 +171,14 @@ class Message():
|
|||||||
"""
|
"""
|
||||||
Create a Message from the given file. Expects the following file structures:
|
Create a Message from the given file. Expects the following file structures:
|
||||||
For '.txt':
|
For '.txt':
|
||||||
* TagLine [Optional]
|
* TagLine
|
||||||
* Question.txt_header
|
* Question.txt_header
|
||||||
* Question
|
* Question
|
||||||
* Answer.txt_header [Optional]
|
* Answer.txt_header
|
||||||
# Answer [Optional]
|
|
||||||
For '.yaml':
|
For '.yaml':
|
||||||
* Question.yaml_key: single or multiline string
|
* Question.yaml_key: single or multiline string
|
||||||
* Answer.yaml_key: single or multiline string [Optional]
|
* Answer.yaml_key: single or multiline string
|
||||||
* Message.tags_yaml_key: list of strings [Optional]
|
* Message.tags_yaml_key: list of strings
|
||||||
Returns 'None' if the message does not fulfill the tag requirements.
|
Returns 'None' if the message does not fulfill the tag requirements.
|
||||||
"""
|
"""
|
||||||
if not file_path.exists():
|
if not file_path.exists():
|
||||||
@ -223,7 +222,7 @@ class Message():
|
|||||||
|
|
||||||
def to_file(self, file_path: Optional[pathlib.Path]) -> None:
|
def to_file(self, file_path: Optional[pathlib.Path]) -> None:
|
||||||
"""
|
"""
|
||||||
Write a Message to the given file. Creates the following file structures:
|
Write Message to the given file. Creates the following file structures:
|
||||||
For '.txt':
|
For '.txt':
|
||||||
* TagLine
|
* TagLine
|
||||||
* Question.txt_header
|
* Question.txt_header
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user