{"id":13572344,"url":"https://github.com/alexander-lee/markdown-github-bear-toc","last_synced_at":"2025-05-12T03:31:46.221Z","repository":{"id":55632304,"uuid":"159724768","full_name":"alexander-lee/markdown-github-bear-toc","owner":"alexander-lee","description":"Autogenerated Table of Contents for Github Markdown or Bear Notes","archived":false,"fork":false,"pushed_at":"2023-03-01T02:50:14.000Z","size":321,"stargazers_count":94,"open_issues_count":9,"forks_count":7,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-13T01:02:26.895Z","etag":null,"topics":["autogeneration","bear","bear-notes","github-markdown","markdown","table-of-contents"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alexander-lee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-29T20:41:24.000Z","updated_at":"2025-02-04T13:53:28.000Z","dependencies_parsed_at":"2024-06-19T22:59:43.045Z","dependency_job_id":null,"html_url":"https://github.com/alexander-lee/markdown-github-bear-toc","commit_stats":{"total_commits":18,"total_committers":3,"mean_commits":6.0,"dds":"0.11111111111111116","last_synced_commit":"06037316dac6c8b3e16e3ea29a5142fca65c02bb"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexander-lee%2Fmarkdown-github-bear-toc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexander-lee%2Fmarkdown-github-bear-toc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexander-lee%2Fmarkdown-github-bear-toc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexander-lee%2Fmarkdown-github-bear-toc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexander-lee","download_url":"https://codeload.github.com/alexander-lee/markdown-github-bear-toc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253668064,"owners_count":21944970,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["autogeneration","bear","bear-notes","github-markdown","markdown","table-of-contents"],"created_at":"2024-08-01T14:01:20.689Z","updated_at":"2025-05-12T03:31:45.855Z","avatar_url":"https://github.com/alexander-lee.png","language":"Python","readme":"# Autogenerated Table of Contents for Github Markdown or Bear Notes\n\n\u003e Generated by the script ;)\n## Table of Contents\n* [Overview](#Overview)\n* [Installation](#Installation)\n\t* [PyPi (Preferred)](#PyPi-(Preferred))\n\t* [Manually](#Manually)\n* [Usage](#Usage)\n\t* [Flags](#Flags)\n\t* [With Bear](#With-Bear)\n\t* [With Markdown Files](#With-Markdown-Files)\n\n## Overview\nI love using [Bear Notes](https://bear.app/) for note taking of all sorts. Recently, Bear released a feature that allowed headers to be linked with [x-callback-urls](http://x-callback-url.com/). And thus, I created a script to autogenerate a Table of Contents for your notes based on the headers.\n\n## Installation\n*NOTE:* This program is only compatible with Python 3.x\n\n### PyPi (Preferred)\n```sh\n$ pip3 install markdown-toc --upgrade\n```\n\n### Manually\n```sh\n$ git clone https://github.com/alexander-lee/markdown-github-bear-toc.git\n\n$ cd markdown-github-bear-toc\n$ python3 setup.py install\n```\n\n## Usage\n### Flags\n* `-h` or `--header-priority` is the Limiting Header Priority/Strength (whether you limit your Table of Contents to h3s or h4s)\n* `-t` or `--type` is the type of anchor you want to use (Github or Bear x-callback-url)\n* `--no-write` is a flag on whether you want to disable the feature that automatically injects the ToC into your Markdown file or Bear Note\n* `-toc` or `--table-of-contents-style` is the Markdown style for your Table of Contents header\n\n### With Bear\n* Add a Table of Contents to a Bear Note with the title \"Bear Note Title\"\n```sh\n$ markdown-toc -h \u003cdefault: 3\u003e -t bear [--no-write] \"Bear Note Title\"\n```\n‎\n\n* Add a Table of Contents to a Bear Note with the UUID `20703126-FA33-400A-B98E-F55F57E3EF48-47683-000143B2335758CA`\n```sh\n$ markdown-toc -h \u003cdefault: 3\u003e -t bear [--no-write] \"20703126-FA33-400A-B98E-F55F57E3EF48-47683-000143B2335758CA\"\n```\n‎\n\n* Add a Table of Contents to two Bear Notes with titles \"Bear Note Title 1\" and \"Bear Note Title 2\"\n```sh\n$ markdown-toc -h \u003cdefault: 3\u003e -t bear [--no-write] \"Bear Note Title 1\" \"Bear Note Title 2\"\n```\n‎\n\n* Add a Table of Contents to all Bear Notes that contain the tag `#bear` OR tag `#beet`\n```sh\n$ markdown-toc -h \u003cdefault: 3\u003e -t bear [--no-write] \"#bear\" \"#beet\"\n```\n‎\n\n* This allows you to take input a list of Bear Note titles, tags, or UUIDs and will inject the ToC into your note whether or not you submit the `--no-write` flag.\n* If you have `#tags` at the top of your note (cause I use them to categorize my notes), it will inject the ToC right after any tags.\n\n| **Original Note**  | **Note with ToC** |\n| :---:  | :---:  |\n|![Original Note](https://github.com/alexander-lee/markdown-github-bear-toc/blob/master/images/Original%20Note.png?raw=true)|![Note with ToC](https://github.com/alexander-lee/markdown-github-bear-toc/blob/master/images/Note%20with%20ToC.png?raw=true)|\n\n### With Markdown Files\n* Add of a Table of Contents to README.md (Using Github Anchors)\n```sh\n$ markdown-toc -h \u003cdefault: 3\u003e -t github [--no-write] README.md\n```\n‎\n\n* Add of a Table of Contents to README.md and Folder/README2.md (Using Github Anchors)\n```sh\n$ markdown-toc -h \u003cdefault: 3\u003e -t github [--no-write] README.md Folder/README2.md\n```\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexander-lee%2Fmarkdown-github-bear-toc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexander-lee%2Fmarkdown-github-bear-toc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexander-lee%2Fmarkdown-github-bear-toc/lists"}