{"id":13504910,"url":"https://github.com/mivanit/dendron-pandoc","last_synced_at":"2026-01-17T09:59:03.994Z","repository":{"id":126694494,"uuid":"446322156","full_name":"mivanit/dendron-pandoc","owner":"mivanit","description":"some utilities for helping dendron work better with pandoc","archived":false,"fork":false,"pushed_at":"2022-01-10T08:17:08.000Z","size":7,"stargazers_count":15,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-11-01T02:34:57.419Z","etag":null,"topics":[],"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/mivanit.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":"2022-01-10T07:31:04.000Z","updated_at":"2024-04-08T03:39:54.000Z","dependencies_parsed_at":"2023-06-17T17:32:49.700Z","dependency_job_id":null,"html_url":"https://github.com/mivanit/dendron-pandoc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mivanit%2Fdendron-pandoc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mivanit%2Fdendron-pandoc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mivanit%2Fdendron-pandoc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mivanit%2Fdendron-pandoc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mivanit","download_url":"https://codeload.github.com/mivanit/dendron-pandoc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246254077,"owners_count":20747946,"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":[],"created_at":"2024-08-01T00:00:53.337Z","updated_at":"2026-01-17T09:59:03.949Z","avatar_url":"https://github.com/mivanit.png","language":"Python","funding_links":[],"categories":["Dendron Enhancers"],"sub_categories":["Other"],"readme":"# dendron-pandoc\n\n[Dendron](https://wiki.dendron.so) is a markdown based note taking tool, and [Pandoc](https://pandoc.org/MANUAL.html) is a document conversion tool. However, they don't always play nice together. I wanted to be able to compile my Dendron vault into nice PDFs using pandoc, which is why this exists.\n\n## Features:\n- Pandoc filters for making Dendron links work properly\n- a script for adding bibliography information (or other data) to all markdown files in a vault\n- also, you should use [`pandoc-mermaid-filter`](https://github.com/timofurrer/pandoc-mermaid-filter)\n\n\n# `dendron-links-filters`\nDendron links look like `[[link.to.a.file]]`, which does not work by default with Pandoc. Pandoc filters are provided to convert the links. \n\n## Files:\n\n- `dendron_links_md.py`: parses the links into the Pandoc AST. \n- `dendron_links_pdf.py`: parses the links, but will additionally link to pdfs files of the same name instead of raw markdown files.\n- `_dendron_link_tools.py` provides the utilities for working with the Pandoc AST.\n\n## Requirements\n\n- [`pandocfilters`](https://pypi.org/project/pandocfilters/) (a python package)\n- [Pandoc](https://pandoc.org/MANUAL.html) itself\n\n## Usage:\n\nTo convert a markdown file to a `.tex` file with working links to the original markdown:\n```bash\npandoc my.dendron.file.md -o my.dendron.file.tex --filter dendron_links_md.py\n```\nOr, if you intent to compile every file into a pdf:\n```bash\npandoc my.dendron.file.md -o my.dendron.file.tex --filter dendron_links_pdf.py\n```\n\nIf you intent to compile many files, you may create a `defaults.yaml` file with the following:\n```yaml\nfilters:\n- dendron_links_pdf.py\n```\n\nand invoke it with\n```bash\npandoc my.dendron.file.md -o my.dendron.file.tex --defaults defaults.yaml\n```\n\n\u003e more information about pandoc filters: https://pandoc.org/filters.html\n\n# `frontmatter`\n\nTo be able to cite things from a bibtex file in your notes, you need to set the bibliography in the frontmatter. `update_frontmatter.py` sets the same bibliography in the frontmatter in all files in a directory.\n\n## Usage:\nFirst, in `update_frontmatter.py` set `MY_REFS` equal to a list of paths (absolute, or relative to the *markdown file itself, **not** the python script*).\n\nThen, run the script, pointing it to your Dendron vault\n```bash\npython update_frontmatter.py vault\n```\n(note: there may be some weirdness for joining paths)\n\n\u003e designed to work with the vscode extension [PandocCiter](https://github.com/notZaki/PandocCiter)\n\n# mermaid\n\nmermaid is a tool for making charts and diagrams that is used in Dendron. Thankfully, there already exists a filter for making this work with Pandoc: [`pandoc-mermaid-filter`](https://github.com/timofurrer/pandoc-mermaid-filter)\n\n\n# planned features:\n\n- somehow getting citations to look nice in the Dendron preview\n- resolving LaTeX macros into raw LaTeX for the Dendron preview\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmivanit%2Fdendron-pandoc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmivanit%2Fdendron-pandoc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmivanit%2Fdendron-pandoc/lists"}