Open andymeneely opened 4 years ago
I think there's an opportunity to have a "save_cgs" method that works similar to the "save_png" method, except it would also create a couple JSON files and output to a folder structured for CGS.
What do you think?
Hey @andymeneely, I figured you closed this to reduce scope creep, as it may not be worth your time to try to setup some kind of integration. But would you be interested if I raised a PR with "save_cgs" (or "export_cgs"?) ?
Go for it! Yeah I was just doing some routine trimming of the backlog
Actually I'll re-open and give you some ideas. I'm going to be working on some other things but here's some thoughts...
Looks like CGS needs a couple of key files that Squib can help with. Here's some ways we could go about this:
squib new
has a --simple
and --advanced
mode, but I wouldn't mind having more. It would make sense to have a squib new --cgs
with everything preset. That'd be quick and easySquib::DataFrame
(https://github.com/andymeneely/squib/blob/dev/lib/squib/import/data_frame.rb). There's already a to_pretty_text
and to_pretty_json
that I use frequently to save plaintext versions of the data. Something along the lines of to_cgs_allcards
or something like that would be easy and pretty straightforwardBeyond that, I think the other files that CGS expects are things you can do in plain ol' Ruby, and it's just a matter of showing people how to do it.
For my own testing, I'd like to take one of my existing card games, called Victory Point Salad (https://github.com/andymeneely/victory-point-salad) and get it into CGS to see how it goes.
Came across this: https://boardgamegeek.com/thread/2293210/card-game-simulator
https://www.cardgamesimulator.com/
Seems perfect for Squib people. Looks like you have to just post a JSON file, which maybe we could have Squib generate?
I'll look into this and report back. Would be really cool to have this easily integrate.