{"id":19674660,"url":"https://github.com/benthillerkus/carp","last_synced_at":"2025-07-28T19:39:15.911Z","repository":{"id":132703100,"uuid":"593182022","full_name":"benthillerkus/carp","owner":"benthillerkus","description":"Framework for generating card decks for the Tabletop Simulator from structured data","archived":false,"fork":false,"pushed_at":"2024-08-05T22:26:45.000Z","size":162,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-05T10:50:23.225Z","etag":null,"topics":["tabletop-simulator"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/benthillerkus.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":"2023-01-25T12:36:48.000Z","updated_at":"2024-08-05T22:26:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"54928edd-0754-4648-b8bf-f37499c5b58a","html_url":"https://github.com/benthillerkus/carp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/benthillerkus/carp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benthillerkus%2Fcarp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benthillerkus%2Fcarp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benthillerkus%2Fcarp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benthillerkus%2Fcarp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/benthillerkus","download_url":"https://codeload.github.com/benthillerkus/carp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benthillerkus%2Fcarp/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267576381,"owners_count":24110315,"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-07-28T02:00:09.689Z","response_time":68,"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":["tabletop-simulator"],"created_at":"2024-11-11T17:19:17.101Z","updated_at":"2025-07-28T19:39:15.839Z","avatar_url":"https://github.com/benthillerkus.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# What is this?\n\nThis is a template project for generating decks for the [Tabletop Simulator](https://tabletopsimulator.com) from structured data.\n\nPretty much all board games with cards (such as *Monopoly*, *Yu-Gi-Oh!* *Take 6!* / *6 Nimmt!* or *Cards Against Humanity*) feature decks of cards that share the same basic layout, but varying data.\nAuthoring such decks can be rather annoying using traditional graphics programs, even if they allow for templates and overrides like Figma or InDesign, as they'd still require some custom scripts for bulk importing the card data, and then exporting the files.\n\nThis repo includes a library for rendering cards ([`carp`](crates/carp)) utilising the [`piet`](https://github.com/linebender/piet) PostScript / Canvas style API.\u003cbr\u003e\nAdditionally there is a sample [App](crates/app) that can load `xml` files describing your decks, render the cards, upload them into an S3 (compatible) bucket and immediately import into the [Tabletop Simulator](https://www.tabletopsimulator.com).\n\nIf you're looking for a more fleshed-out tool, check out [eldstal/cardcinogen](https://github.com/eldstal/cardcinogen) or perhaps [decker](https://splizard.com/magic/decker)\n\n# Features\n\n## lib\n\n- traits for decks and cards\n- render cards with any aspect ratio into grids of 70 cards\n- compress cards, backsides and sheets to PNGs and store on disk or on s3\n- modular and multi-threadable design\n\n## app\n\n- custom XML based format for decks of cards\n- load cards from files \u0026 directories\n- per default *Cards Against Humanity* style rendering of cards\n\nConfiguration can be done via command line arguments, environment variables and `.env` files.\n\nThis is the shape of a `.env` file:\n```env\nAWS_ACCESS_KEY_ID=\nAWS_SECRET_ACCESS_KEY=\nS3_BUCKET=\nS3_REGION=\nS3_ENDPOINT=\nS3_PATH_STYLE= // bool, false is subdomain style\nRUST_LIB_BACKTRACE=full\nRUST_LOG=info\nINPUT= // path to folder with xml files\n```\n\n(note to self): You can start the app by running `cargo run --release -- -s s3` in the workspace main directory!\n\n# XML\n\nThe deck files used by the app are defined as such:\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003c!DOCTYPE deck [\n  \u003c!ENTITY shy \"­\"\u003e\n]\u003e \u003c!-- \u0026shy; marks places where the text layout is allowed to break text --\u003e\n\u003cdeck name=\"this is required\" back=\"shared\"\u003e \u003c!--shared = each card in the deck has the same back (the opposite would be *unique*)--\u003e\n  \u003ccard\u003eText can be \u003ci\u003eitalic and in a \u003cfont family=\"Roboto\"\u003especific Font\u003c/font\u003e\u003c/i\u003e\u003c/card\u003e\n  \u003ccard\u003eYou can have text on top\u003cbottom\u003eand on the bottom\u003c/bottom\u003e\u003c/card\u003e\n  \u003ccard\u003eLines can be broken like\nthis\nor like\u003cbr\u003ethis and very long words like Donau\u0026shy;dampf\u0026shy;schiffahrts\u0026shy;kapitän can be broken as such\u003c/card\u003e\n\u003c/deck\u003e\n```\n\n\nAs of right now, this format is implemented for the default app and unrelated to the `carp` library. If you want specific attributes or use something like JSON, you'll have to modify the code -- this is a template and not a ready-made product after all.\n\n# Remaining Issues\n\n- add renderers for the other platforms `piet_common` supports\n- error handling is still not pretty\n- lots of unnecessary copying, both in xml code and pipeline code\n- allow disk exporter to clear the directory before exporting\n- the s3 exporter fails too silent / it's not clear at all if it a) succeeded uploading and b) if it can actually upload, prior to actually trying\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenthillerkus%2Fcarp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenthillerkus%2Fcarp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenthillerkus%2Fcarp/lists"}