NAME
iabtcfv2 - CLI tool for GDPR IAB TCF v2 strings
SYNOPSIS
iabtcfv2 [options] <subcommand> [subcommand-options]
OPTIONS
SUBCOMMANDS
- dump
-
Parses TC strings and outputs them as JSON.
- validate
-
Validates TC strings against provided business rules (Stub).
DUMP
Parses TC strings and outputs them as JSON.
Options
- --pretty, -p
-
Output human-readable, indented JSON.
- --json-array
-
Output a single JSON array containing all parsed objects.
- --compact
-
Output a compact JSON representation (lists of IDs instead of boolean maps).
- --ignore-errors, -i
-
Do not output any JSON error object for failed strings.
- --fail-fast, -f
-
Stop processing and exit the program immediately upon the first parse error.
- --errors-to-stderr, -e
-
Output JSON error objects to STDERR instead of STDOUT.
- --quiet, -q
-
Suppress human-readable warning messages on STDERR.
Examples
# Dump a string to JSON line
iabtcfv2 dump CPi...AAA
# Dump multiple strings to a pretty-printed JSON array
iabtcfv2 dump --pretty --json-array CPi...AAA CPj...BBB
# Read from STDIN
cat strings.txt | iabtcfv2 dump --json-array
DOCKER USAGE
This tool is also available as a Docker image on Docker Hub.
Basic Usage
docker run --rm peczenyj/iabtcfv2 dump "CLcVDxRMWfGmWAVAHCENAXCkAKDAADnAABRgA5mdfCKZuYJez-NQm0TBMYA4oCAAGQYIAAAAAAEAIAEgAA"
Processing Streams (STDIN)
To process a stream of strings via pipe:
cat strings.txt | docker run -i --rm peczenyj/iabtcfv2 dump
To type strings manually:
docker run -it --rm peczenyj/iabtcfv2 dump
VALIDATE
Validates TC strings against provided business rules. (Not yet implemented).
DESCRIPTION
iabtcfv2 is a command-line interface for the GDPR::IAB::TCFv2 library.
Warning: Name Change
Previous versions of this distribution (v0.300) included a standalone utility named iabtcf-dump. This has been unified into the iabtcfv2 tool using the dump subcommand.