【文件属性】:
文件名称:orgparse:用于读取Emacs组织模式文件的Python模块
文件大小:44KB
文件格式:ZIP
更新时间:2021-05-14 12:14:18
python org-mode org Python
orgparse-用于读取Emacs组织模式文件的Python模块
安装
pip安装orgparse
用法
如果您对某些特定方法感兴趣,可以使用大量的doctest。 否则,这里是一些示例代码片段:
加载组织节点
from orgparse import load, loads
load('PATH/TO/FILE.org')
load(file_like_object)
loads('''
* This is org-mode contents
You can load org object from string.
** Second header
''')
遍历组织树
>>> root = loads( '''
... * Heading 1
... ** Heading 2
... *** Heading 3
... ''' )
>>> for node in root[ 1
【文件预览】:
orgparse-master
----setup.py(2KB)
----.gitignore(3KB)
----Makefile(202B)
----LICENSE(1KB)
----doc()
--------Makefile(5KB)
--------make.bat(5KB)
--------source()
----orgparse()
--------node.py(42KB)
--------__init__.py(4KB)
--------utils()
--------tests()
--------py.typed(0B)
--------date.py(19KB)
--------extra.py(3KB)
--------inline.py(926B)
----.github()
--------workflows()
----.ci()
--------run(372B)
--------release(2KB)
----README.rst(2KB)
----pytest.ini(217B)
----tox.ini(578B)
----mypy.ini(220B)