Giter Club home page Giter Club logo

taboo-data's Introduction

 

Taboo-Data

 

Current version GitHub Workflow Status (branch) License

A data set for Taboo games. Plain JSON files which contain the keyword, and some buzzwords like in the original Taboo game. It was originally created for my Taboo browser game.

Available languages: English, German

 

Data Structure

All lists are structured by using a key > value based approach. This means that the array keys contain the keyword like Bear and the array values contain the buzzwords, like Grizzly, Honey, Pooh.

Instead of having to parse all entries like before, you can now decode the whole file contents and directly use all entries out of the box.

 

Usage

You can use the data set by downloading it or use one of the following methods:

Javascript

npm install taboo-data
or
yarn add taboo-data

Here's an example on how to use the package with Javascript:

import { TabooData } from 'taboo-data';

// Get all available languages, their categories and the category descriptions
const categories = TabooData.categories();

// Get the keywords for a specific category and language
const animals = await TabooData.getCategory('animals', 'de');

Please notice that importing the whole TabooData dataset will bloat your Javascript files as all entries from all categories are loaded. To import single categories manually or asynchronously, you can call them on their own:

import * as cars from 'taboo-data/src/data/de/cars';

const data = cars;

PHP

composer require kovah/taboo-data

Here's an example on how to use the package with PHP:

<?php
use Kovah\TabooData;

$categories = TabooData::getCategories();

$cars = TabooData::getCategory('cars');
// or
$carsDE = TabooData::getCategory('cars', 'de');

 

Contributing

Found a bug or typo? Have a feature request?

Please open a new issue and explain what's wrong or what needs to be improved.

Words

To contribute words, just add them to the appropriate category and add at least 3-4 buzzwords.

 


Taboo Data is a project by Kevin Woblick and Contributors

taboo-data's People

Contributors

kovah avatar renovate-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

malys

taboo-data's Issues

Remove .js data files and import plain .json

Instead of having two files with data in it (.json and .js), remove the .js file and import the .json directly in the JS loader.

import { categories } from './data/categories.json';
import { animals } from './data/de/animals.json';
import { cars } from './data/de/cars.json';
...

Is this German only?

I don't see English anywhere, but confused since the readme is in English and German just looks like a module with default categories in English?

Add tests

Add tests for both the PHP and the JS class, integrate Github Actions for automatic testing.

Mixed Categories

It would be nice to have mixed categories like "All", "General Culture" or "XXI Century" where other categories are dinamically merged.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Other Branches

These updates are pending. To force PRs open, click the checkbox below.

  • Update github-actions (major) (actions/cache, actions/checkout, phpunit/phpunit, shivammathur/setup-php)

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

composer
composer.json
  • php ^7.2 | ^8.0
  • phpunit/phpunit ^8
github-actions
.github/workflows/test.yml
  • actions/checkout v2
  • actions/cache v2
  • actions/checkout v2
  • shivammathur/setup-php v1
  • actions/cache v1
npm
package.json
  • jest ^27.0.6

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.