{"id":23326206,"url":"https://github.com/nirokay/cardgenerator","last_synced_at":"2025-06-22T05:04:55.409Z","repository":{"id":182786258,"uuid":"669078203","full_name":"nirokay/CardGenerator","owner":"nirokay","description":"A simple generator for cards.","archived":false,"fork":false,"pushed_at":"2023-07-29T14:07:31.000Z","size":6095,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-22T05:04:48.666Z","etag":null,"topics":["automation","creator-tools","generator","playing-cards"],"latest_commit_sha":null,"homepage":"","language":"Nim","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/nirokay.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":"2023-07-21T09:37:11.000Z","updated_at":"2023-07-21T10:30:57.000Z","dependencies_parsed_at":"2023-07-21T12:06:14.793Z","dependency_job_id":"35ffa3a4-6dd0-4e6e-8e0c-f6b59e72e362","html_url":"https://github.com/nirokay/CardGenerator","commit_stats":null,"previous_names":["nirokay/cardgenerator"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/nirokay/CardGenerator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nirokay%2FCardGenerator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nirokay%2FCardGenerator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nirokay%2FCardGenerator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nirokay%2FCardGenerator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nirokay","download_url":"https://codeload.github.com/nirokay/CardGenerator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nirokay%2FCardGenerator/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261238895,"owners_count":23128879,"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":["automation","creator-tools","generator","playing-cards"],"created_at":"2024-12-20T19:15:04.703Z","updated_at":"2025-06-22T05:04:50.382Z","avatar_url":"https://github.com/nirokay.png","language":"Nim","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CardGenerator\n\nCardGenerator generates playing cards from a couple of resources (such as base background, colours, images).\n\n## Usage\n\n```txt\n-h, --help              Displays this help message and quits.\n-v, --version           Displays the program version and quits.\n-d, --directory         Sets the resource directory.\n-o, --output            Sets the output directory for final cards.\n-f, --fontsize          Sets the global font size for card images.\n-z, --safezone          Sets the pixels-indents from the corners.\n-s, --shadow            Toggles if the text should have shadows (slow).\n-c, --shadowcolour      Sets the shadow colour. Four values (rgba) seperated by commas (example: '255,255,255,255').\n```\n\n## Resource directory structure\n\n### Files\n\n* `base_card.png`\n\n* `font.ttf` / `font.otf`\n\nYou can override these on a by-colour basis. For example, you want to have one base card for red and another for all other colours:\n\nCreate these files:\n\n* `base_card.png` for all colours\n\n* `base_card.red.png` to override the base card for red\n\nThe same is true for font files!\n\n### Directories\n\nEach directory you create in the resource directory is a colour. You can name the directories anything you want - they do not have to be colours.\n\nFor example: `./69/`, `./purple/`, `./amongus` are all valid.\n\nInside these directories you can put your overlay images. Name them like you want the cards to appear as: `A.png -\u003e \"A\"`, `9.png -\u003e \"9\"`, `Ace.png -\u003e \"Ace\"`\n\nThese overlay images will be centered and drawn directly onto the base card.\n\n**Note:** Overlay images should always be smaller than the base card, as then the overlay would be bigger than the \"background\"!\n\n### Example\n\n```txt\nroot: ./\n |\n | \u003e .some_file.txt      # dot-files are ignored!\n |\n | \u003e font.ttf            # font used on all cards\n | \u003e font.red.ttf        # OPTIONAL: overrides font used on red cards\n |\n | \u003e base_card.png       # image used for the background of all cards\n | \u003e base_card.red.png   # OPTIONAL: overrides base card ONLY for red\n |\n | \u003e red/                # contains card images for red cards\n |    | \u003e 9.png          # card image for card '9'; '9' will be printed onto the card\n |    | \u003e Ace.png        # 'Ace' will be printed onto the card\n |\n | \u003e blue/               # same as red, but only for blue\n     | \u003e 9.png\n     | \u003e Ace.png\n```\n\n## Examples\n\n### Base cards\n\n| Default                                                | Red                                                    | Blue\n|:------------------------------------------------------:|:------------------------------------------------------:|:--------------------------------------------------------:\n| ![default base card](examples/resources/base_card.png) | ![red base card](examples/resources/base_card.red.png) | ![blue base card](examples/resources/base_card.blue.png)\n\n### Characters\n\n| \\#   | Ace-Card                                        | 9-Card                                                 |\n|:----:|:-----------------------------------------------:|:------------------------------------------------------:|\n| Blue | ![blue 9](./examples/resources/blue/Ace.png)    | ![blue ace](./examples/resources/blue/9.png)           |\n| Red  | ![red 9](./examples/resources/red/Ace.png)      | ![red ace](./examples/resources/red/9.png)             |\n\n### Final cards\n\n| \\#   | Ace-Card                                        | 9-Card                                                 |\n|:----:|:-----------------------------------------------:|:------------------------------------------------------:|\n| Blue | ![blue 9](./examples/output/blue/Ace.png)       | ![blue ace](./examples/output/blue/9.png)              |\n| Red  | ![red 9](./examples/output/red/Ace.png)         | ![red ace](./examples/output/red/9.png)                |\n\nGenerated using `./cardgenerator -o:./examples/output -f:100 -d:./examples/resources -s -c:255,255,255,255 -z:50`!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnirokay%2Fcardgenerator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnirokay%2Fcardgenerator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnirokay%2Fcardgenerator/lists"}