【发布时间】:2021-12-27 09:34:50
【问题描述】:
我有一个 rst 文件 SWAP.rst,我需要提取一些特定数据并放入字典中。
文件如下所示:
:baseID: SWAP_DF
The current used for the force ...
.. requirement::SWAT_FD_AR_Force.432
:c_This_is_a: functional
:c_Release: AR_V2.RC
:c_Maturity: accepted
:c_Implementation: implemented
text text text text
tables
.. comment:: SDASD.471
:c_This_is_a: functional
:c_Release: adm_28.1
:c_Implementation: implemented
text tables etc
.. requirement:: SWAT_FD_AR_Force.231
:c_This_is_a: non-functional
:c_Release: AP_V1_RD1
:c_Maturity: accepted
:c_Implementation: implemented
text, tables ,etc
我需要提取所有需求部分并使用 python、docutils 放入字典
【问题讨论】:
-
如果您想要一个更好的答案,您需要说明您遇到的具体问题,以及您的 work in progress 代码示例。
标签: python restructuredtext docutils