Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

a stupid question #9

Open
wishwish1314 opened this issue Sep 22, 2020 · 6 comments
Open

a stupid question #9

wishwish1314 opened this issue Sep 22, 2020 · 6 comments

Comments

@wishwish1314
Copy link

How I can use below to generate TOC in the bear ? In terminal window?
"$ markdown-toc -h <default: 3> -t bear [--no-write] "Bear Note Title"

@Mundeep-BBC
Copy link

It doesn't appear to work at all for me either. I tried all the commands listed for bear and always receive:

zsh: no matches found: [--no-write]

Not sure what I am doing wrong exactly.

@alexander-lee
Copy link
Owner

[--no write] is a optional flag, you can do something like
markdown-toc -t bear "My Note Title"

@Mundeep-BBC
Copy link

Mundeep-BBC commented Dec 17, 2020

Hi there @alexander-lee

I get the following error, any idea how I can fix this? I really want this to work because I feel its the only thing stopping me from exclusively using bear notes tbh:

Traceback (most recent call last):
File "/usr/local/bin/markdown-toc", line 4, in
markdowntoc.main()
File "/usr/local/lib/python3.9/site-packages/markdowntoc/markdowntoc.py", line 295, in main
md_text_toc_pairs, identifiers = create_table_of_contents_bear()
File "/usr/local/lib/python3.9/site-packages/markdowntoc/markdowntoc.py", line 199, in create_table_of_contents_bear
notes = get_notes_from_bear()
File "/usr/local/lib/python3.9/site-packages/markdowntoc/markdowntoc.py", line 64, in get_notes_from_bear
return list(filter(lambda note: match_title_uuid_tag(note), notes))
File "/usr/local/lib/python3.9/site-packages/markdowntoc/markdowntoc.py", line 64, in
return list(filter(lambda note: match_title_uuid_tag(note), notes))
File "/usr/local/lib/python3.9/site-packages/markdowntoc/markdowntoc.py", line 58, in match_title_uuid_tag
note_tags = get_tags_in_note(note['ZTEXT'])
File "/usr/local/lib/python3.9/site-packages/markdowntoc/markdowntoc.py", line 75, in get_tags_in_note
lines_iter = iter(md_text.splitlines())
AttributeError: 'NoneType' object has no attribute 'splitlines'

@alexander-lee
Copy link
Owner

Hmm which note are you using? What it looks like is that the note seems to empty?

@Mundeep-BBC
Copy link

Mundeep-BBC commented Jan 19, 2021

I am using bear notes if that was what you were asking, I suspect not. Do I need to be in the place where the notes are located possibly?

markdown-toc -h <default: 3> -t bear “temp”. That is the command I am running from my terminal with the H1 title at the top of the page being temp

@muhanadz
Copy link

@Mundeep-BBC try markdown-toc -h 3 -t bear "temp"
Or you can use the UUID (Right-click>Copy note's identifier) markdown-toc -h 3 -t bear "8F8B6D20-2177-47AD-9A3F-3ACC28492FC3-425-00018E359FE3B976"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants