{"id":13648770,"url":"https://github.com/ruuda/pris","last_synced_at":"2025-04-14T06:44:39.372Z","repository":{"id":66191265,"uuid":"82381491","full_name":"ruuda/pris","owner":"ruuda","description":"A language for designing slides","archived":false,"fork":false,"pushed_at":"2023-11-20T22:15:06.000Z","size":582,"stargazers_count":116,"open_issues_count":9,"forks_count":5,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-27T20:24:07.818Z","etag":null,"topics":["design","dsl","graphics","pdf","slides"],"latest_commit_sha":null,"homepage":"https://docs.ruuda.nl/pris/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ruuda.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","contributing":"contributing.md","funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-02-18T11:18:00.000Z","updated_at":"2024-11-01T21:26:14.000Z","dependencies_parsed_at":"2023-11-20T23:26:30.300Z","dependency_job_id":"3cc8ecc8-a038-41ac-bb47-6752888b4b06","html_url":"https://github.com/ruuda/pris","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruuda%2Fpris","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruuda%2Fpris/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruuda%2Fpris/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruuda%2Fpris/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ruuda","download_url":"https://codeload.github.com/ruuda/pris/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248837264,"owners_count":21169373,"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":["design","dsl","graphics","pdf","slides"],"created_at":"2024-08-02T01:04:31.650Z","updated_at":"2025-04-14T06:44:39.335Z","avatar_url":"https://github.com/ruuda.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# Pris\n\nPris is a domain-specific language for designing slides and other graphics.\n\n[![Build Status][ci-img]][ci]\n[![Gitter][gitter-img]][gitter]\n\n\n## Example\n\nThe obligatory “hello world”:\n\n    {\n      put t(\"Hello world\") at (0.1w, 0.5h)\n    }\n\nAnd to show a little more of the language, here is a slightly more elaborate\nprogram that also draws lines:\n\n    top_left = (0w, 0h)\n    top_right = (1w, 0h)\n    bottom_left = (0w, 1h)\n    bottom_right = (1w, 1h)\n\n    {\n      put line(bottom_right) at top_left\n      put line(top_right - bottom_left) at bottom_left\n\n      font_family = \"Cantarell\"\n      font_size = 0.3h\n      color = #882244\n      put t(\"A language for designing slides.\") at (0.1w, 0.1w + font_size)\n    }\n\n    {\n      color = #000000\n      put line((1w, 0h)) at (0w, 0.5h)\n    }\n\nIt creates two slides, the first one with a cross in it, the second one with a\nhorizontal line. The first slide contains text in dark purple.\n\n## Comparison to other technologies\n\n * Pris is similar to LaTeX with Beamer in the sense that you write your slides\n   in a text-based, human readable format, from which a pdf is produced. Pris\n   differs from LaTeX with Beamer in not doing any lay-out. All elements must be\n   placed manually.\n * Pris is similar to reveal.js in that its control over visuals superficially\n   resembles css. It differs from reveal.js in requiring a separate compilation\n   step that renders a pdf. It differs from html in being imperative rather than\n   declarative.\n * Pris is similar to TikZ in LaTeX, in the sense that it is a domain-specific\n   language for creating graphics. It is similar in providing complete control\n   over where elements are placed. Pris differs from TikZ in not being embedded\n   in LaTeX. It has a more modern syntax, and it has first class support for\n   computation. For instance, arithmetic with coordinates is supported out of\n   the box, and Pris has proper functions, rather than TeX macros.\n * Pris is similar to [Fran][fran], in having first-class, composable graphics\n   (although implementation is a work in progress). Pris differs from Fran in\n   not being embedded in Haskell. Pris differs from Fran in placing emphasis on\n   graphics rather than animation.\n * Pris is similar to [Diagrams][diagrams] in being a domain-specific language\n   with first-class composable graphics, giving complete control over layout.\n   Pris differs from Diagrams in not being embedded in Haskell. Pris differs\n   from Diagrams in its styling system. Customization in Pris resembles CSS due\n   to dynamic scoping, whereas in Diagrams functions pass around a style value.\n * Pris is vaguely similar to Powerpoint and graphical editors like Illustrator\n   or Inkscape in providing complete control over where elements are placed. It\n   differs in being a text-based format intended to be edited with a text\n   editor, rather than with a graphical editor.\n * Pris is similar to an html canvas element, or to drawing with Skia or Cairo,\n   in providing complete control over how graphics are drawn. It differs from\n   direct canvas drawing in being more high-level (graphic elements can be\n   manipulated as first-class values), and in being a domain-specific language\n   rather than being controlled by a general-purpose scripting language.\n\n## Documentation\n\n * [A language for designing slides][blogpost], a blog post that details the\n   motivation for building Pris.\n * [Examples](examples), small examples that demonstrate one feature at a time.\n * Ask questions in [the Gitter chatroom][gitter], or [send me an email][contact].\n * The [online documentation][docs] (a work in progress).\n\n## Building\n\nPris uses [Cairo][cairo] for drawing and [Harfbuzz][harfbuzz] for text shaping,\nand links against `libcairo.so` and `libharfbuzz.so`. It uses [Rsvg][rsvg] to\nrender svg images, for which it links against `librsvg-2.so`. Ensure that these\nare installed:\n\n    # On Ubuntu\n    apt install fonts-cantarell libcairo2-dev libharfbuzz-dev librsvg2-dev\n\n    # On Arch\n    pacman -S --needed cantarell-fonts cairo harfbuzz librsvg fontconfig freetype2\n\nPris is written in [Rust][rust] and builds with Cargo, the build tool bundled\nwith Rust.\n\n    cargo build --release\n    target/release/pris examples/lines.pris\n    evince examples/lines.pdf\n\n## License\n\nPris is free software. It is licensed under the\n[GNU General Public License][gplv3], version 3.\n\n[ci-img]:     https://travis-ci.org/ruuda/pris.svg?branch=master\n[ci]:         https://travis-ci.org/ruuda/pris\n[gitter-img]: https://badges.gitter.im/ruuda/pris.svg\n[gitter]:     https://gitter.im/ruuda/pris\n[blogpost]:   https://ruudvanasseldonk.com/2017/04/27/a-language-for-designing-slides\n[contact]:    https://ruudvanasseldonk.com/contact\n[docs]:       https://ruuda.github.io/pris/\n[rust]:       https://rust-lang.org\n[cairo]:      https://cairographics.org\n[harfbuzz]:   https://www.freedesktop.org/wiki/Software/HarfBuzz/\n[rsvg]:       https://wiki.gnome.org/Projects/LibRsvg\n[gplv3]:      https://www.gnu.org/licenses/gpl-3.0.html\n[fran]:       http://conal.net/fran/\n[diagrams]:   https://archives.haskell.org/projects.haskell.org/diagrams/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruuda%2Fpris","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fruuda%2Fpris","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruuda%2Fpris/lists"}