crhallberg / json-against-humanity

Finally, Cards Against Humanity as plain text and JSON.
https://crhallberg.com/cah/
Other
167 stars 37 forks source link

Release 2.0 #23

Closed crhallberg closed 4 years ago

crhallberg commented 4 years ago

I have a new version of the website and the generation tools coming out very soon.

After merge:

Improvements

Digesting all cards from the open spreadsheet

I've used the massive open spreadsheet as a primary source for a long time and now I'm doing it automatically. This will largely take the place of ingesting from the src folder documents.

The digestion from src will remain in the repository to make it easy to create sets with custom decks.

Brand New Website

Modern look. More accessible. Faster deck downloading with local JS.

JS library to digest compact.md.json

let deck = CAHDeck.fromCompact("./compact.md.json");
deck.listPacks() // Get metadata: [{ name: "CAH Base Pack", official: true, counts: { white: ...
deck.getPack(0); // Get one pack by index (based on listPacks)
deck.getPacks([0, 4]); // Combine packs by index (based on listPacks)

Community Examples

Open source examples of using the cards data in various settings and systems. Starting with one:

Canvas Deck Sampler

Demonstration of ingesting the compact.json file with the basic Javascript library and displaying cards on a canvas element.

Breaking Changes

Change to compact.md.json

In cah-all-compact.json, white cards will now just be a string instead of a JSON object.

{
  "cards": {
    "white": [
-     { "text": "A sexy saddle." },
+     "A sexy saddle.",
    ]
  }
}

Removing .html.txt sources

They are currently not being used and this just creates more work. Will automate markdown to HTML for easier contribution if these files are demanded.

Additional PRs after merge

robnester commented 4 years ago

Depending on your workflow, pandoc can autoconvert md to html. This could be put in place as part of your commit or release pipeline.

crhallberg commented 4 years ago

Going to drop this at the start of Hacktoberfest!