votar

module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2022 License: GPL-3.0

README

votar

AUR vote utility

As a CLI Util

go install

go install github.com/Jguer/votar/cmd/votar

Usage:

Usage: main [--vote VOTE] [--unvote UNVOTE] [--user USER] [--password PASSWORD]

Options:
  --vote VOTE, -v VOTE   packages to vote for
  --unvote UNVOTE, -u UNVOTE
                         packages to unvote for
  --user USER [env: AUR_USER]
  --password PASSWORD [env: AUR_PASSWORD]
  --help, -h             display this help and exit

Examples:

vote for a package

votar --user <user> --password <password> -v <package>
# or 
export AUR_USER=<user>
export AUR_PASSWORD=<password>
votar -v <package> -v <package 2>

unvote for a package

votar --user <user> --password <password> -u <package>
# or 
export AUR_USER=<user>
export AUR_PASSWORD=<password>
votar -u <unvote package> -v <vote package 2>

As a library

go get github.com/Jguer/votar/pkg/vote
package main

import (
	"context"
	"log"

	"github.com/Jguer/votar/pkg/vote"
)

client, err := vote.NewClient()
if err != nil {
    log.Println("Failed to create client")
}

client.SetCredentials("user", "password")


if err = client.Vote(context.Background(), "package");err != nil {
    log.Println("Failed to vote for", "package")
}

Directories

Path Synopsis
cmd
votar command
pkg
vote
Methods interacting with the AUR website.
Methods interacting with the AUR website.

Jump to

Keyboard shortcuts

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