parse logseq markdown text with easy access to properties, hierarchy, TODO etc
Project description
LogseqMarkdownParser
a simple python script to load a markdown file and easily access the properties of each block etc.
Why?
- I wanted a script that reads a logseq page, extracts every "DONE" tasks and append it to another file. So I made this little parser. If you need anything just create an issue.
Features
- access block properties as a dictionary
- get the parent uuid of each block as well as its position in the hierarchy (i.e. which header is above)
- get the indentation of each block
- easily save to a path
Usage
- load file parsed_text = parse_file(file_path)
- get information about a block print(parsed_text.parsed_blocks[0]) print(parsed_text.parsed_blocks[0].block_properties)
- save to path parsed_text.save_as(other_file_path)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
LogseqMarkdownParser-0.1.tar.gz
(41.1 kB
view hashes)
Built Distribution
Close
Hashes for LogseqMarkdownParser-0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 866205250d89a994431a8451541cf5affad05f136bdf2698d319dcd6072bf8d1 |
|
MD5 | 276faeaf8d33a9fac27ea4a213cdd8a8 |
|
BLAKE2b-256 | e8397dfccaa0de06a2f57a2bd599159ca1d1a0f6a21144926c4709125e78386b |