snaparser

package module
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2024 License: BSD-3-Clause Imports: 9 Imported by: 0

README

Snaparser

Snaparser parses snapchat chat history json files to human friendly format. By default, the parsed chat history is printed to stdout.

Installation

$ go install github.com/vanillaiice/snaparser/cmd/snaparser@latest

Usage

To download your chat history data, follow the guide available on snapchat's website. You can then do the following:

# Generic Usage
$ snaparser [global options] command [command options] 

# Extract chats only with user 'johndoe' and write chats to file
$ snaparser -u johndoe -f chat_history.json -w

# Extract chats only with user 'janedoe', read chat history file from stdin,
# and print to Stdout
$ cat chat_history.json | snaparser -u janedoe

# Extract all chats and pipe output to more
$ snaparser -f chat_history.json | more

Flags

NAME:
   snaparser - parse snapchat chat history to human friendly format

USAGE:
   snaparser [global options] command [command options] 

VERSION:
   v0.1.4

AUTHOR:
   vanillaiice <vanillaiice1@proton.me>

COMMANDS:
   help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --file FILE, -f FILE                                  read chats from FILE (use '-' for stdin)
   --directory DIRECTORY, -d DIRECTORY, --dir DIRECTORY  write parsed chats to DIRECTORY
   --user value, -u value                                only extract chat with user
   --write, -w                                           write parsed chats to disk (default: false)
   --create, -c                                          create directory if it does not exist (default: false)
   --color, -l                                           write colored output (default: false)
   --help, -h                                            show help
   --version, -v                                         print the version

Author

vanillaiice

License

BSD-3-Clause

Documentation

Index

Constants

View Source
const Empty = ""

Empty represents an empty string

View Source
const MediaTypeText = "TEXT"

MediaTypeText represents a media that is text

View Source
const Stdin = "-"

Stdin represents receiving input from standard input

Variables

View Source
var ErrNoInput = errors.New("no input file provided")

ErrNoInput means that no snapchat chat history file was provided

View Source
var ParseCommand = &cli.Command{
	Flags: flags,
	Action: func(ctx *cli.Context) error {
		parseFlags := &parseFlags{
			file:      ctx.String("file"),
			dir:       ctx.Path("dir"),
			user:      ctx.String("user"),
			write:     ctx.Bool("write"),
			create:    ctx.Bool("create"),
			withColor: ctx.Bool("color"),
		}

		return parseFunc(parseFlags)
	},
}

ParseCommand is a cli command that parses snapchat chat history

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
cmd
snaparser
Snaparser parses snapchat chat history json files to human friendly format.
Snaparser parses snapchat chat history json files to human friendly format.
Package parser parses snapchat chat history from a json file to a struct.
Package parser parses snapchat chat history from a json file to a struct.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL