{"id":21768254,"url":"https://github.com/averms/pandoc-filters","last_synced_at":"2025-04-13T15:41:28.978Z","repository":{"id":56536838,"uuid":"154044120","full_name":"averms/pandoc-filters","owner":"averms","description":"A small, useful collection of pandoc filters","archived":false,"fork":false,"pushed_at":"2024-04-09T09:37:38.000Z","size":104,"stargazers_count":13,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T06:34:44.907Z","etag":null,"topics":["pandoc","pandoc-filter"],"latest_commit_sha":null,"homepage":"","language":"Lua","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/averms.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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-10-21T19:23:06.000Z","updated_at":"2025-01-31T13:14:32.000Z","dependencies_parsed_at":"2024-11-26T15:17:32.175Z","dependency_job_id":null,"html_url":"https://github.com/averms/pandoc-filters","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/averms%2Fpandoc-filters","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/averms%2Fpandoc-filters/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/averms%2Fpandoc-filters/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/averms%2Fpandoc-filters/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/averms","download_url":"https://codeload.github.com/averms/pandoc-filters/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248739911,"owners_count":21154247,"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":["pandoc","pandoc-filter"],"created_at":"2024-11-26T13:34:59.891Z","updated_at":"2025-04-13T15:41:28.957Z","avatar_url":"https://github.com/averms.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pandoc filters\n\nA collection of pandoc filters. They are written in Lua, [which makes them\nfaster than filters written in any other language][1]. Copy from the `dist`\nfolder into `$HOME/.local/share/pandoc/filters`. Use them with `--lua-filter`.\n\n[1]: https://pandoc.org/lua-filters.html\n\n## Usage\n\n### code-includes\n\n_For all output formats_\n\nInclude code from another file by using a code block attribute and the name of the file\ninside the code block. This is useful for a couple of reasons:\n\n- You can keep code examples in separate directory and keep everything in sync.\n- Large scripts that you don't want to scroll past can be kept in a separate file.\n\nFile paths can be either absolute or relative. Relative paths are relative to\nthe directory from which pandoc is run.\n\n````\n```{.python inc=yes}\n/path/to/file.py\n```\n````\n\n### standard-code\n\n_For HTML output_\n\nPandoc has great syntax highlighting built-in but sometimes you just want to use\nsomething else. Unfortunately, the default pandoc codeblock output with `--no-highlight`\nlooks like this:\n\n    \u003cpre class=\"lua\"\u003e\u003ccode\u003eprint 'Hello World!'\u003c/code\u003e\u003c/pre\u003e\n\nThe above is not what the [W3C recommends][spec], nor is it compatible with prism.js.\nThis filter makes sure pandoc outputs the recommended syntax:\n\n    \u003cpre\u003e\u003ccode class=\"language-lua\"\u003eprint 'Hello World!'\u003c/code\u003e\u003c/pre\u003e\n\nUsing `standard-code.lua` doesn't require any changes in your source file.\n\n[spec]: https://www.w3.org/TR/html5/text-level-semantics.html#the-code-element\n\n### transclude\n\n_For all output formats_\n\nInclude content from another file just like in AsciiDoc and ReST. Is recursive and works\nwith spaces in file names.\n\nThe [official Pandoc filters repository has a filter][paf] that does this and has a\ncouple of extra features. Use that one instead.\n\nNote that neither filter can resolve internal references between files like\nfootnotes or citations (with pandoc-citeproc). If you _do_ want internal\nreferences to work, try [`m4`][m4], a generic preprocessor that should already\nbe installed on your Linux/macOS system. You can also try [`pp`][pp], which has\nbetter defaults. Alternatively, you could probably write your own in less than\n20 lines of Perl/Python/Awk.\n\n[paf]: https://github.com/pandoc/lua-filters/tree/master/include-files\n[m4]: https://www.gnu.org/software/m4/m4.html\n[pp]: http://christophe.delord.free.fr/pp/download.html\n\n### oldschool (under construction)\n\n_For plain output_\n\nTries to write files in a basic plain format that you might use for a README\nthat is never meant to be rendered. Extends pandoc's `plain` output to add some\nmore goodies like header underlines and link targets. Use with like this:\n\n    pandoc -s -t plain --lua-filter oldschool.lua -o \u003coutput\u003e \u003cinput\u003e\n\nInsipired by the READMEs of Bash and Opus.\n\n## License\n\nAll filters are distributed under the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faverms%2Fpandoc-filters","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faverms%2Fpandoc-filters","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faverms%2Fpandoc-filters/lists"}