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 🙏

© 2026 – Pkg Stats / Ryan Hefner

ptcgo-log-parser

v1.0.0

Published

Module for parsing ptcgo logs

Readme

Welcome to PTCGO-Log-Parser

Node.js module for quickly parsing PTCGO Game logs into a more usable json representation.

Installation


$ npm i ptcgo-log-parser

Usage


var ptcgo-parser = require('ptcgo-log-parser');

Read log data from a file, and parse it.


var result = ptcgo-parser.parse(data);

Result Json will look something like this:

{
	"turns": 
	[{ 
		"number": 1, 
		"entry": "August flipped 1 coin(s), resulting in 1 heads and 0 tails, for Beginning of Game", 
		"data": 
		{
			"hasData": false,
       			"noDataString": "",
       			"source": {"CARD OBJECT"},
       			"actor": "",
       			"target": {"CARD OBJECT"}
		}
	}],
	"errors": [""],
  	"gs":
    	{ 
		"data":
		{
			"playerHand": [{"CARD OBJECT"}],
			"playerDiscard": [{"CARD OBJECT"}],
			"playerBench": [{"CARD OBJECT"}],
			"playerActivePokemon": [{"CARD OBJECT"}],
			"opponentHand": [{"CARD OBJECT"}],
			"opponentDiscard": [{"CARD OBJECT"}],
			"opponentBench": [{"CARD OBJECT"}],
			"opponentActivePokemon": [{"CARD OBJECT"}],
			"lostZone": [{"CARD OBJECT"}],
			"stadium": {"CARD OBJECT"},
			"playerDeckCount": 0,
			"playerprizeCount": 0,
			"opponentDeckCount": 0,
			"opponentPrizeCount": 0
		},
		"errors": [""]
	}
}

Each Card Object will have this structure:

{ 
	"numberInSet": 193,
	"name": "DarkCity",
	"series": "Sun & Moon",
	"set": "Unified Minds",
	"link": "",
	"type": "TrainerCard" 
}

Npm Url

https://www.npmjs.com/package/ptcgo-log-parser

Versions

  • 0.1.6 (Latest) - JSON names finalized, sample JSON provided in README.md
  • 0.1.5 - Clean data for turn entries and cards
  • 0.1.4 - No major feature addition. Reason for publish: Don't deploy tests to npm, just source code
  • 0.1.3 - No major feature addition. Reason for publish: Don't deploy tests to npm, just source code
  • 0.1.2 - No major feature addition. Reason for publish: Project source code restructure
  • 0.1.1 - Parsing of game log and game state is functional
  • 0.1.0 - Project initialization

Upcoming Features

  • Card JSON Representations will include a link to their specific card entry in the Pokemon Card Database instead of only raw data. Link to database: https://www.pokemon.com/us/pokemon-tcg/pokemon-cards/
  • Ability to generate PTCGO decklists from log files (Helps with discovering decks that are hidden from viewing/exporting