Full Code of hayeah/playing-cards-assets for AI

master 1e4497c05c3d cached
4 files
2.2 KB
711 tokens
1 requests
Download .txt
Repository: hayeah/playing-cards-assets
Branch: master
Commit: 1e4497c05c3d
Files: 4
Total size: 2.2 KB

Directory structure:
gitextract_h5o5lsz4/

├── LICENSE
├── Makefile
├── README.md
└── svg2png.js

================================================
FILE CONTENTS
================================================

================================================
FILE: LICENSE
================================================
MIT License

Copyright (c) 2018 Howard Yeh (https://github.com/hayeah)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


================================================
FILE: Makefile
================================================
svgin=svg-cards
svgout=svg-out
pngout=png-out

svgin_files=$(shell ls svg-cards/*.svg)
svgout_files=$(patsubst $(svgin)/%,$(svgout)/%,$(svgin_files))
pngout_files=$(patsubst $(svgout)/%.svg,$(pngout)/%.png,$(svgout_files))

$(svgout):
	mkdir -p $(svgout)

$(pngout):
	mkdir -p $(pngout)

svg: $(svgout) $(svgout_files)

png: svg $(pngout) $(pngout_files)

$(svgout)/%.svg: $(svgin)/%.svg
	xmlstarlet edit -d '//_:path[@id="path5"]' $< > $@

$(pngout)/%.png: $(svgout)/%.svg
	node svg2png.js $< $@

clear:
	rm -r $(svgout) $(pngout)

.PHONY: clear svg png

================================================
FILE: README.md
================================================
# Playing Cards iOS Assets

Courtesy of https://code.google.com/p/vector-playing-cards/ (public domain)

With some additional processing to remove borders of cards.

Build the png assets with four parallel processes:

```
make -j 4 png
```

# Tools

[xmlstartlet](http://xmlstar.sourceforge.net/) to remove the border path from svg.

[svg2png](https://github.com/domenic/svg2png) to convert svg to png (based on phantomjs)


================================================
FILE: svg2png.js
================================================
svg2png = require("svg2png");

source = process.argv[2];
dest = process.argv[3];

svg2png(source, dest, function (err) {
  if(err) {
    consle.error("svg conversion fail: "+source);
  }
});
Download .txt
gitextract_h5o5lsz4/

├── LICENSE
├── Makefile
├── README.md
└── svg2png.js
Condensed preview — 4 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (3K chars).
[
  {
    "path": "LICENSE",
    "chars": 1095,
    "preview": "MIT License\n\nCopyright (c) 2018 Howard Yeh (https://github.com/hayeah)\n\nPermission is hereby granted, free of charge, to"
  },
  {
    "path": "Makefile",
    "chars": 554,
    "preview": "svgin=svg-cards\nsvgout=svg-out\npngout=png-out\n\nsvgin_files=$(shell ls svg-cards/*.svg)\nsvgout_files=$(patsubst $(svgin)/"
  },
  {
    "path": "README.md",
    "chars": 423,
    "preview": "# Playing Cards iOS Assets\n\nCourtesy of https://code.google.com/p/vector-playing-cards/ (public domain)\n\nWith some addit"
  },
  {
    "path": "svg2png.js",
    "chars": 190,
    "preview": "svg2png = require(\"svg2png\");\n\nsource = process.argv[2];\ndest = process.argv[3];\n\nsvg2png(source, dest, function (err) {"
  }
]

About this extraction

This page contains the full source code of the hayeah/playing-cards-assets GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 4 files (2.2 KB), approximately 711 tokens. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!