Add a new topic to the BCF. Args: title: The title of the topic. description: The description of the topic. author: The author of the topic. topic_type: The type of the topic. topic_status: The status of the topic.
(
self, title: str, description: str, author: str, topic_type: str = "", topic_status: str = ""
)
| 229 | topic_handler.save(destination_zip) |
| 230 | |
| 231 | def add_topic( |
| 232 | self, title: str, description: str, author: str, topic_type: str = "", topic_status: str = "" |
| 233 | ) -> TopicHandler: |
| 234 | """ |
| 235 | Add a new topic to the BCF. |
| 236 | |
| 237 | Args: |
| 238 | title: The title of the topic. |
| 239 | description: The description of the topic. |
| 240 | author: The author of the topic. |
| 241 | topic_type: The type of the topic. |
| 242 | topic_status: The status of the topic. |
| 243 | |
| 244 | Returns: |
| 245 | The newly created topic wrapped inside a TopicHandler object. |
| 246 | """ |
| 247 | topic_handler = TopicHandler.create_new( |
| 248 | title, |
| 249 | description, |
| 250 | author, |
| 251 | topic_type=topic_type, |
| 252 | topic_status=topic_status, |
| 253 | xml_handler=self._xml_handler, |
| 254 | ) |
| 255 | self.topics[topic_handler.guid] = topic_handler |
| 256 | return topic_handler |
| 257 | |
| 258 | def __eq__(self, other: object) -> bool | NoReturn: |
| 259 | return ( |