Giter Site home page Giter Site logo

futbin's Introduction

futbin

Go Reference goreleaser GitHub release (latest by date) GitHub go.mod Go version Go Report Card GitHub GitHub all releases

An unofficial command-line tool for futbin. Also, it can be used as a library.

Install

Pre-compiled binaries

  1. Download the file for your system/architecture from the GitHub releases assets
  2. Unpack the downloaded archive (e.g tar -xzf futbin_Linux_x86_64.tar.gz)
  3. Ensure that the binary has execution permissions (chmod +x ./futbin)
  4. Move the binary somewhere in your $PATH (e.g mv ./futbin $HOME/.local/bin)

Install script

The installation process can be automated using the following script:

curl -sSfL https://raw.githubusercontent.com/matheusfm/futbin/main/install.sh | sh -s -- -b $HOME/.local/bin

From source

go install github.com/matheusfm/futbin@latest

Usage

asciicast

Usage:
  futbin [command]

Available Commands:
  cardversions card versions
  clubs        clubs
  completion   generate the autocompletion script for the specified shell
  help         Help about any command
  latest       latest added players
  leagues      leagues
  nations      nations
  players      players
  popular      popular players
  totw         current TOTW players

Flags:
      --config string     Config file (default is $HOME/.futbin.yaml)
  -h, --help              help for futbin
      --platform string   Platform (PS, XB or PC) (default "PS")

Use "futbin [command] --help" for more information about a command.

players command examples:

Usage:
  futbin players [flags]

Examples:
1.  # Brazilian players in LaLiga:
    futbin players --nation 54 --league 53
2.  # OTW players (see options in 'futbin cardversions' command):
    futbin players --version otw
3.  # Brazilian players with more than 90 of passing:
    futbin players --nation 54 --passing 90-
4.  # Icons with a maximum price of 300K:
    futbin players --league 2118 --price -300000
5.  # Players with 5 weak foot and 5 skills:
    futbin players --wf 5 --skills 5
6.  # Players with Lengthy AcceleRATE:
    futbin players --accelerate=lengthy

Flags:
      --accelerate string           Accelerate
      --acceleration string         Acceleration
      --aggression string           Aggression
      --agility string              Agility
      --balance string              Balance
      --ball-control string         Ball Control
      --club int                    Club ID
      --composure string            Composure
      --crossing string             Crossing
      --curve string                Curve
      --defending string            Defending
      --dribbling string            Dribbling
      --finishing string            Finishing
      --free-kick-accuracy string   Free Kick Accuracy
      --heading-accuracy string     Heading Accuracy
  -h, --help                        help for players
      --interceptions string        Interceptions
      --jumping string              Jumping
      --league int                  League ID
      --long-passing string         Long Passing
      --long-shots string           Long Shots
      --marking string              Marking
      --nation int                  Nation ID
      --ovr string                  Rating
      --pace string                 Pace
      --page int                    Page (default 1)
      --passing string              Passing
      --penalties string            Penalties
      --physicality string          Physicality
      --position strings            Position
      --position-type string        Position type (default "all")
      --positioning string          Positioning
      --price string                Price
      --reactions string            Reactions
      --shooting string             Shooting
      --short-passing string        Short Passing
      --shot-power string           Shot Power
      --skills string               Skills
      --sliding-tackle string       Sliding Tackle
      --sprint-speed string         Sprint Speed
      --stamina string              Stamina
      --standing-tackle string      Standing Tackle
      --strength string             Strength
      --version string              Card version
      --vision string               Vision
      --volleys string              Volleys
      --wf string                   Weak Foot

Global Flags:
      --config string     Config file (default is $HOME/.futbin.yaml)
      --platform string   Platform (PS, XB or PC) (default "PS")

Docker

You can also run futbin using Docker:

docker run --rm --name futbin ghcr.io/matheusfm/futbin players

Library Usage

If you want to use Futbin as a library in your Go program, you can use the following code snippet as an example:

package main

import (
	"fmt"
	"os"

	"github.com/matheusfm/futbin/players"
)

func main() {
	playersClient := players.DefaultClient()
	p, err := playersClient.Get(&players.Options{
		Platform: "PS",
		NationID: 54, // Brazil
		LeagueID: 53, // LaLiga
	})
	if err != nil {
		fmt.Fprintln(os.Stderr, "Error:", err)
		os.Exit(1)
	}
	for _, player := range p {
		fmt.Println(player.CommonName)
	}
}

License

See LICENSE.

futbin's People

Contributors

codeofjannik avatar matheusfm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

futbin's Issues

Search by players name

Hi bro, thank you for this awesome tool .

would we able to add search by player . do you think that is possible ?

Pagination or getting all records

Hey,
First of all, thanks for this great tool!

Is there a way to support pagination further than the page flag?

  1. Getting all records from all pages?
  2. Getting the number of pages available for specific commands so we can loop through?

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.