selimrbd / py-obsidianmd

Python interface to your Obsidian notes
BSD 3-Clause "New" or "Revised" License
262 stars 21 forks source link

py-obsidianmd freezes on 'excalidraw' files: #21

Open r-menezes opened 1 year ago

r-menezes commented 1 year ago

Hi, thank you for this amazing tool !

I am testing this out to make some bulk chances in my vault, but I the code was stalling. I checked and it seems to be stalling at excalidraw.md files, which might be too large to add contents and especially metadata in the Note object (might not be the case, this is just intuition).

I made a quick and dirty fix by including these lines in the add method at note.py (after line 190):

                        # check if f_name contains 'excalidraw'
                        if 'excalidraw' in f_name:
                            continue

would it help if the class and this method was changed to accept an argument like skip which would accept a list of matches that if were detected then the Notes object would not attempt to create a Note object from the file?

I could attempt to create a PR.