vwidentity

command module
v0.0.0-...-341ca65 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2020 License: Unlicense Imports: 12 Imported by: 0

README

vwidentity

Little go code to get a token for apis used by the myvolkswagen page. This is my first go code, so do not judge me to harsh.

To test create a vw.yaml with:

mail: <mail>
password: <password>

I run this on a raspbery pi with a working root mail, with ssmtp and a script in the cron.hourly:

#!/bin/bash

DIR="<path to vw.yaml and space to store last run result>"

OLDRESULT=$(cat $DIR/oldresult)
RESULT=$(docker run -v $DIR/vw.yaml:/vwidentity/vw.yaml -it vwidentity | cut -c 21-)
if [ "$OLDRESULT" != "$RESULT" ]; then
    echo "$RESULT" > $DIR/oldresult
    echo "changed"
    echo "new"
    echo "$RESULT"
    echo "old"
    echo "$OLDRESULT"
fi

This informs me on every change in the response.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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