<commit_before>package main

import (
	"fmt"
	"github.com/codegangsta/cli"
	"github.com/keybase/go-libkb"
	"github.com/keybase/go-jsonw"
)

type CmdTrack struct {
	user      string
	assertion string
	track     bool
}

func (v *CmdTrack) ParseArgv(ctx *cli.Context) error {
	nargs := len(ctx.Args())
	var err error
	v.track = ctx.Bool("track-statement")
	if nargs == 1 {
		v.user = ctx.Args()[0]
	} else {
		err = fmt.Errorf("track takes one arg -- the user to track")
	}
	return err
}

func (v *CmdTrack) Run() error {

	u2, err := libkb.LoadUser(libkb.LoadUserArg{
		Name:             v.user,
		RequirePublicKey: true,
		Self:             false,
		LoadSecrets:      false,
		ForceReload:      false,
		SkipVerify:       false,
	})

	if err != nil {
		return err
	}

	me, err := libkb.LoadMe()

	if err != nil {
		return err
	}

	if me.Equal(*u2) {
		return fmt.Errorf("Cannot track yourself")
	}

	err = u2.Identify()
	if err != nil {
		G.Log.Warning("Some proofs failed")
	}

	var jw *jsonw.Wrapper 
	jw, err = me.TrackingProofFor(u2)
	if err != nil {
		return err
	}
	fmt.Printf("%v\n", jw.MarshalPretty())


	return nil<commit_msg>work ongoing<commit_after>package main

import (
	"fmt"
	"github.com/codegangsta/cli"
	"github.com/keybase/go-libkb"
	"github.com/keybase/go-jsonw"
)

type CmdTrack struct {
	user      string
	assertion string
	track     bool
}

func (v *CmdTrack) ParseArgv(ctx *cli.Context) error {
	nargs := len(ctx.Args())
	var err error
	v.track = ctx.Bool("track-statement")
	if nargs == 1 {
		v.user = ctx.Args()[0]
	} else {
		err = fmt.Errorf("track takes one arg -- the user to track")
	}
	return err
}

func (v *CmdTrack) Run() error {

	u2, err := libkb.LoadUser(libkb.LoadUserArg{
		Name:             v.user,
		RequirePublicKey: true,
		Self:             false,
		LoadSecrets:      false,
		ForceReload:      false,
		SkipVerify:       false,
	})

	if err != nil {
		return err
	}

	me, err := libkb.LoadMe()

	if err != nil {
		return err
	}

	if me.Equal(*u2) {
		return fmt.Errorf("Cannot track yourself")
	}

	err = u2.Identify()
	if err != nil {
		G.Log.Warning("Some proofs failed")
	}

	var jw *jsonw.Wrapper 
	jw, err = me.TrackingProofFor(u2)
	if err != nil {
		return err
	}
	fmt.Printf("%v\n", jw.MarshalPretty())
	fmt.Printf("%v\n", u2.IdTable.MakeTrackSet())


	return nil
{'fraction_non_alphanumeric': 0.14335060449050085, 'fraction_numerical': 0.005613126079447323, 'mean_word_length': 2.817133443163097, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1913415', 'n_tokens_mistral': 946, 'n_tokens_neox': 898, 'n_words': 218}