npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

pogo-data-generator

v1.18.2

Published

Pokemon GO project data generator

Downloads

1,273

Readme

Pogo Data Generator

npm version Discord

Generates templated data for Pokemon GO related projects, including:

  • Pokemon
  • Forms
  • Costumes
  • Moves
  • Items
  • Team Rocket Invasions
  • Pokemon Types
  • Weather
  • Translations
  • Quest Conditions
  • Quest Types
  • Quest Reward Types
  • Future Pokemon via PokeAPI

Current Status

  • Internally the typing is strong, however, the return results are typed pretty horribly due to this being my first TypeScript project. Going to work on this in the 2.0 release.

Installing/Usage

Package

// with npm
npm install pogo-data-generator

// with yarn
yarn add pogo-data-generator

Usage:

// commonJS
const { generate } = require('pogo-data-generator')
// es6 with invasion function
import { generate, invasions } from 'pogo-data-generator'

const data = await generate() // returns the default settings

const template = {
  pokemon: {
    enabled: true,
    options: {
      snake_case: true,
      unsetDefaultForm: true,
    },
    template: {
      pokemonName: true,
      pokedexId: true,
      forms: {
        formName: true,
        proto: true,
      },
    },
  },
  types: {
    enabled: true,
    template: {
      typeName: true,
    },
  },
  moves: {
    enabled: false,
  },
  items: {
    enabled: true,
    options: {
      customFields: {
        itemId: 'id',
      },
    },
    template: {
      itemId: true,
      type: true,
      minTrainerLevel: true,
    },
  },
  questRewards: {
    enabled: false,
  },
  questConditions: {
    enabled: false,
  },
  invasions: {
    enabled: true,
  },
  weather: {
    enabled: true,
  },
  translations: {
    enabled: true,
    options: {
      masterfileLocale: 'de',
    },
    locales: {
      en: true,
      de: true,
    },
  },
}
const customData = await generate({ template }) // returns custom templated data

const tr = await invasions()
// returns the default settings

Local Usage/Testing

  1. Clone the repo
  2. yarn install
  3. tsc will compile the TS into JS, then you can run yarn generate, which will generate a local masterfile.json for you to checkout
  • tsc -w will auto recompile the TypeScript during development
  • You can play with the input options by changing the scripts in package.json or modifying the base.ts file.
  • yarn pokeapi, which will generate a local masterfile.json and refresh the data in the static folder from PokeAPI
  • yarn raw will generate a local masterfile.json and with the raw data format

The generate function accepts an object with the following properties:

  • template (object): Your template for each of the categories
  • safe (boolean): Fetches an already built masterfile with known safe values
  • url (string): Custom url to fetch the masterfile from, results not guaranteed
  • test (boolean): Writes the masterfile to a local json
  • raw (boolean): Returns the data in its raw format without any template processing
  • pokeApi (boolean): Fetches fresh data from PokeAPI

To view some static examples of what this library can create, check out these repos: Masterfiles Translations

To view the full list of available options, check out the Wiki!