https://github.com/p141592/stformatter
A Python formatter from formats like rst and markdown to the content tree
https://github.com/p141592/stformatter
docs parsing python restructuredtext restructuredtext-parser terms
Last synced: 5 months ago
JSON representation
A Python formatter from formats like rst and markdown to the content tree
- Host: GitHub
- URL: https://github.com/p141592/stformatter
- Owner: p141592
- License: bsd-3-clause
- Created: 2019-07-25T20:27:45.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-09-19T08:44:51.000Z (almost 7 years ago)
- Last Synced: 2025-10-13T01:53:18.928Z (8 months ago)
- Topics: docs, parsing, python, restructuredtext, restructuredtext-parser, terms
- Language: Python
- Homepage:
- Size: 18.4 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# A Python formatter from formats like rst and markdown to the content tree
## Source
Объект для обращения с источником документов
Принимает на вход строку с указанием адресса ресурса + путь к материалам относительно корня документа
source = Source(url, path)
## Parser
Объект, предоставляющий интерфейс для обращения к дереву
Работает как дескриптор
tree = Parser(source)
## Formatter
Объект для преобразования сырого дерева. Для чистки от символов формата и присвоения типов
done_tree = Formatter(tree)
## Преобразование дерева в json
done_tree.to_json()