{"id":16335726,"url":"https://github.com/nzbr/pandocode","last_synced_at":"2026-03-08T14:40:37.258Z","repository":{"id":136879315,"uuid":"186821707","full_name":"nzbr/pandocode","owner":"nzbr","description":"Pandocode is a program/pandoc-filter that converts Python(-like) code to LaTeX Pseudocode","archived":false,"fork":false,"pushed_at":"2024-04-15T03:21:33.000Z","size":343,"stargazers_count":11,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-01T22:52:32.064Z","etag":null,"topics":["code-converter","education","latex","markdown","pandoc","pandoc-filter","pseudocode","pseudocode-generator","pypy","pypy3","python","python3"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nzbr.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,"zenodo":null}},"created_at":"2019-05-15T12:28:05.000Z","updated_at":"2024-10-06T05:13:33.000Z","dependencies_parsed_at":"2025-08-01T22:32:30.838Z","dependency_job_id":"1628c90b-182e-4029-a28b-b17a68e13f28","html_url":"https://github.com/nzbr/pandocode","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/nzbr/pandocode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nzbr%2Fpandocode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nzbr%2Fpandocode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nzbr%2Fpandocode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nzbr%2Fpandocode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nzbr","download_url":"https://codeload.github.com/nzbr/pandocode/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nzbr%2Fpandocode/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273534472,"owners_count":25122676,"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","status":"online","status_checked_at":"2025-09-03T02:00:09.631Z","response_time":76,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["code-converter","education","latex","markdown","pandoc","pandoc-filter","pseudocode","pseudocode-generator","pypy","pypy3","python","python3"],"created_at":"2024-10-10T23:42:14.024Z","updated_at":"2026-03-08T14:40:37.219Z","avatar_url":"https://github.com/nzbr.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pandocode\n\n`pandocode` is a pandoc filter that converts Python _(-like)_ code to LaTeX-Pseudocode.  \nIt can also be used as a standalone program.\n\n## [Try it in your browser](https://pandocode.nzbr.de)\n\n## Usage\n\n### Standalone\nOutputs the resulting LaTeX code to console\n\n**Run:**  \n`./pandocode.pyz \u003cfile\u003e`  \nor  \n`pandocode \u003cfile\u003e`\n\n### Filter\nConverts every code-block of type _pseudo_ to LaTeX\n\n**Run:**  \n`pandoc --filter /path/to/pandocode.pyz \u003cinfile.md\u003e -o \u003coutfile\u003e`  \nor  \n`pandoc --filter pandocode \u003cinfile.md\u003e -o \u003coutfile\u003e`\n\n## Building\n- Install dependencies from `requirements.txt` and `make-requirements.txt`\n    - `pip3 install -r requirements.txt -r make-requirements.txt`\n    - or `pip3 install --user -r requirements.txt -r make-requirements.txt`\n- Run `make`\n- _Optional:_ Run `sudo make install`\n    - This will install `pandocode.pyz` to `/usr/bin/pandocode`\n\n#### Use PyPy3 instead of CPython\n- Use `pypy3 -m pip` instead of `pip3`\n    - If pip is missing, install it with `pypy3 -m ensurepip` or `pypy3 -m ensurepip --user`\n- Run `make PY=pypy3` instead of `make`\n\n#### Without PyLint:\nIf you want to build without running pylint:\n- Don't install `make-requirements.txt`\n- Run `make PYLINT=$(which true)` instead of `make`\n\n## Examples\n\n[There is an example in the demo directory](https://github.com/nzbr/pandocode/tree/master/demo)\n\n## Control sequences\nPandocode allows the use of the following control sequences inside the code:\n\n#### Begin/End\nSyntax:\n- `#$begin`\n- `#$end`\n\nIf a begin sequence is found, Pandocode ignores any code that is outside of a pair of begin/end control sequences.  \nIf the end of the code is reached and no end sequence is encountered, all code from the begin sequence on is included.\n\n#### Add\nSyntax:\n- `#$+ \u003ctext\u003e`\n\nIncludes `\u003ctext\u003e` as a line in the code before code processing.\n\n#### Remove\nSyntax:\n- `#$-`\n\nRemoves the next line before code processing.\n\n#### Replace\nSyntax:\n- `#$= \u003ctext\u003e`\n\nReplaces the next line by `\u003ctext\u003e` before code processing.\n\n#### Raw\nSyntax:\n- `:: \u003cLaTeX\u003e`\n\nWhen encountered during processing, instead of processing this line, `:: ` gets removed and `\u003cLaTeX\u003e` is appended to the output.  \nThis can be used as `\u003ctext\u003e` in any control sequence that is processed before code processing.\n\nExample:  \n`#$= :: \u003cLaTeX\u003e`  \nReplaces the next line by raw LaTeX\n\n## External Code\n\nPandocode is tested to be working with [pandoc-include-code](https://github.com/owickstrom/pandoc-include-code)\n\n    ---\n    header-includes:\n      - \\usepackage[noend]{algpseudocode}\n    ---\n\n    ```{.pseudo include=code.py}\n    ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnzbr%2Fpandocode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnzbr%2Fpandocode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnzbr%2Fpandocode/lists"}